/* ── Custom properties ── */
:root {
    --color-offwhite: #F7F5F0;
    --color-forest-50: #f2f7f0;
    --color-forest-100: #e3eddf;
    --color-forest-200: #c6dbbf;
    --color-forest-300: #9cc096;
    --color-forest-400: #72a06e;
    --color-forest-500: #538050;
    --color-forest-600: #3f633d;
    --color-forest-700: #325031;
    --color-forest-800: #294028;
    --color-forest-900: #223422;
    --color-forest-950: #111a10;
}

/* ── Tailwind custom colors ── */
@tailwind base;
@tailwind components;
@tailwind utilities;

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

body {
    background-color: var(--color-offwhite);
    color: var(--color-forest-900);
}

/* ── Typography ── */
.font-serif {
    font-family: 'Fraunces', Georgia, serif;
}

.font-sans {
    font-family: 'Instrument Sans', system-ui, sans-serif;
}

/* ── Scroll-reveal (progressive enhancement — only below fold) ── */
@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.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; }
}

/* ── Navbar scroll state ── */
.nav-scrolled {
    background-color: rgba(247, 245, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(41, 64, 40, 0.08);
}

/* ── Nav links ── */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-forest-600);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

/* ── Selection ── */
::selection {
    background-color: var(--color-forest-200);
    color: var(--color-forest-900);
}

/* ── Focus visible ── */
:focus-visible {
    outline: 2px solid var(--color-forest-500);
    outline-offset: 2px;
}

/* ── Form selects ── */
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='%239cc096' 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: 36px;
}

/* ── Utility ── */
.no-underline {
    text-decoration: none;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
