/* ========== BASE & RESET ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(27, 67, 50, 0.2);
    color: #1B4332;
}

/* ========== NAVIGATION ========== */
#nav {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#nav.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#nav:not(.scrolled) .nav-logo-text {
    color: #1B4332;
}

#nav.scrolled .nav-logo-text {
    color: #1B4332;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3d7a52;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 1;
}

/* Hamburger animation */
#menuBtn.open #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.open #bar2 {
    opacity: 0;
}

#menuBtn.open #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 5px;
}

/* ========== HERO ========== */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(240, 237, 230, 0.97) 0%, rgba(248, 245, 238, 0.95) 100%);
    z-index: 0;
}

#hero > * {
    position: relative;
    z-index: 1;
}

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .group img {
        transition: none;
    }
}

/* ========== IMAGE HOVER ========== */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========== BUTTON RIPPLE ========== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::after {
    opacity: 1;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F0EDE6;
}

::-webkit-scrollbar-thumb {
    background: #8bb396;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d7a52;
}

/* ========== LOADING STATE ========== */
.page-loader {
    position: fixed;
    inset: 0;
    background: #F8F5EE;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ========== FORM STYLES ========== */
input, textarea {
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
}

/* ========== SELECTION ========== */
::selection {
    background: rgba(27, 67, 50, 0.15);
}

/* ========== UTILITY ANIMATIONS ========== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
