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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #366028;
    color: #fdfcfa;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f3ead8;
}
::-webkit-scrollbar-thumb {
    background: #8fb57e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4a7c3a;
}

/* ── Navbar scroll state ── */
#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(23, 43, 18, 0.08);
    padding-top: 0;
    padding-bottom: 0;
}

#navbar.scrolled nav {
    padding-top: 12px;
    padding-bottom: 12px;
}

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

.menu-line.active:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-line.active:nth-child(2) {
    opacity: 0;
}
.menu-line.active:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Reveal animations (below-fold only, progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Fallback: content always visible if JS disabled or prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}
