/* ── Reset & Base ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { min-height: 100vh; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── Hero Animations ─────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll Reveal (progressive enhancement) ─────── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        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);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Always-visible fallback for reduced-motion users */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Navbar Scroll State ─────────────────────────── */
#navbar.scrolled {
    background: rgba(15, 26, 14, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
#navbar.scrolled a,
#navbar.scrolled button { color: white; }

/* ── Mobile Menu Transitions ─────────────────────── */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}
.mobile-link {
    display: block;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* ── Custom Scrollbar ────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f1a0e; }
::-webkit-scrollbar-thumb { background: #314f33; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #4a7a4a; }

/* ── Selection ───────────────────────────────────── */
::selection { background: rgba(74, 122, 74, 0.4); color: #fefcf6; }

/* ── Focus Visible ───────────────────────────────── */
:focus-visible { outline: 2px solid #96b696; outline-offset: 2px; }

/* ── Form Inputs (dark section) ──────────────────── */
#visit input, #visit textarea {
    color-scheme: dark;
}

/* ── Smooth Image Loading ────────────────────────── */
img {
    background-color: #1f3220;
    transition: opacity 0.4s ease;
}
img[loading="lazy"] { opacity: 0; }
img.loaded { opacity: 1; }
