/* ── Base & Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Focus Styles ── */
:focus-visible { outline: 2px solid #2D5A27; outline-offset: 2px; border-radius: 4px; }
a:focus-visible { outline-color: #F5F0E8; }

/* ── Header Scroll State ── */
#site-header {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
#site-header.scrolled {
    background: rgba(253, 252, 250, 0.92);
    backdrop-blur-lg;
    box-shadow: 0 1px 20px rgba(45, 90, 39, 0.08);
}

/* ── Nav Links ── */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #2D5A27;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}
.nav-link:hover::after { width: 60%; }

/* ── Mobile Menu ── */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.mobile-nav-link { display: block; }

/* ── Scroll Reveal ── */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS is enabled and reduced motion is preferred, skip animations */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html { scroll-behavior: auto; }
}

/* When JS is enabled and reduced motion is NOT preferred, use hidden initial state */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* ── Card Hover ── */
.card-hover {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card-hover:hover {
    transform: translateY(-6px);
}

/* ── Selection ── */
::selection {
    background: #2D5A27;
    color: #F5F0E8;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F5F0E8; }
::-webkit-scrollbar-thumb { background: #8CC17E; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2D5A27; }

/* ── Utility ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
