/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #2f5024;
    color: #faf9f6;
}

/* ── Reveal on scroll (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always visible if JS is disabled */
.no-js .reveal,
:not(.reveal) {
    opacity: 1 !important;
    transform: none !important;
}

/* ── Header scroll state ── */
#header.scrolled {
    background-color: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(47, 80, 36, 0.08);
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Menu toggle animation ── */
.menu-line {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
}

#menu-toggle.active .menu-line:first-child {
    transform: translateY(5px) rotate(45deg);
}

#menu-toggle.active .menu-line:last-child {
    transform: translateY(-5px) rotate(-45deg);
}

/* ── Form select arrow ── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239cc188' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

/* ── Subtle focus styles ── */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

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

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

::-webkit-scrollbar-thumb {
    background: #c5dbb8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9cc188;
}
