/* ── Base & Typography ── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #2d5a3d;
    color: #faf8f4;
}

/* ── Navigation ── */
#site-header {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#site-header.scrolled {
    background: rgba(250, 248, 244, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(45, 90, 61, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ── Mobile Menu ── */
#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease, color 0.2s ease;
}

#mobile-menu.open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-menu-link:nth-child(5) { transition-delay: 0.25s; }

/* ── Reveal Animations ── */
.reveal-up,
.reveal-left,
.reveal-right {
    /* Content is always visible — animations are progressive enhancement */
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(28px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-28px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(28px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }

    /* Hero animations — these run immediately since hero is above the fold */
    #top .reveal-left {
        opacity: 1;
        transform: translate(0, 0);
    }

    #top .reveal-right {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* ── Button Focus States ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2d5a3d;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ── Image hover container ── */
.rounded-2xl {
    overflow: hidden;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f0e8;
}
::-webkit-scrollbar-thumb {
    background: #bcd3be;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb896;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
