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

body {
    overflow-x: hidden;
}

::selection {
    background: #1a5c3a;
    color: #f5f5f0;
}

/* ─── Navbar scroll state ─── */
.navbar-scrolled #navbar {
    background: rgba(250, 250, 247, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 92, 58, 0.08), 0 4px 20px rgba(0, 0, 0, 0.06);
}

.navbar-scrolled .nav-text-color {
    color: #0d2e1e;
}

.navbar-scrolled .nav-subtext-color {
    color: #1a5c3a;
}

.navbar-scrolled .nav-link {
    color: #1a5c3a;
}

.navbar-scrolled .mobile-nav-link {
    color: #1a5c3a;
}

.navbar-scrolled #menu-open,
.navbar-scrolled #menu-close {
    stroke: #1a5c3a;
}

/* ─── Scroll reveal ─── */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* Stagger children */
.grid > .scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.grid > .scroll-reveal:nth-child(2) { transition-delay: 0.12s; }
.grid > .scroll-reveal:nth-child(3) { transition-delay: 0.19s; }
.grid > .scroll-reveal:nth-child(4) { transition-delay: 0.26s; }
.grid > .scroll-reveal:nth-child(5) { transition-delay: 0.33s; }
.grid > .scroll-reveal:nth-child(6) { transition-delay: 0.40s; }

/* ─── Mobile menu animation ─── */
#mobile-menu {
    animation: slideDown 0.25s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Button focus states ─── */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1a5c3a;
    outline-offset: 2px;
}

/* ─── Custom scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #a8cfb3;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #72b586;
}

/* ─── Form select arrow ─── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a5c3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
}
