/* ── Base ────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background-color: #faf9f6;
    color: #192d16;
}

::selection {
    background-color: #c5dfbe;
    color: #192d16;
}

/* ── Reveal animations (progressive enhancement) ────── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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; }
}

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

#mobileMenu .mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* ── Navbar shrink on scroll ─────────────────────────── */
#nav.shrunk {
    padding-top: 0;
    padding-bottom: 0;
}

#nav .max-w-6xl {
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: padding-top 0.4s ease, padding-bottom 0.4s ease;
}

#nav.shrunk .max-w-6xl {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* ── Hamburger animation ─────────────────────────────── */
#menuBtn.active #bar1 {
    transform: translateY(5px) rotate(45deg);
}

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

#menuBtn.active #bar3 {
    transform: translateY(-5px) rotate(-45deg);
}

/* ── Form focus states ───────────────────────────────── */
input:focus,
textarea:focus {
    border-color: #467d3d !important;
}

input:focus + label,
textarea:focus + label {
    color: #467d3d;
}
