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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(17, 82, 45, 0.15);
    color: #1a3a2a;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #faf9f6;
}
::-webkit-scrollbar-thumb {
    background: #bcd3be;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb892;
}

/* ── Hero Animations ── */
.hero-eyebrow {
    animation: fadeDown 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-headline {
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-sub {
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.hero-ctas {
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

.hero-scroll {
    animation: fadeUp 1s ease forwards;
    animation-delay: 1.3s;
    opacity: 0;
}

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

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

/* ── Reveal on Scroll ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html { scroll-behavior: auto; }
    .hero-eyebrow,
    .hero-headline,
    .hero-sub,
    .hero-ctas,
    .hero-scroll {
        opacity: 1;
        animation: none;
    }
    .group img {
        transition: none;
    }
}

/* ── Nav Transition ── */
.nav-scrolled .nav-logo-fill {
    color: #1a3a2a;
}
.nav-scrolled .nav-logo-text {
    color: #1a3a2a;
}
.nav-light .nav-logo-fill {
    color: #1a3a2a;
}
.nav-light .nav-logo-text {
    color: #1a3a2a;
}

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

.mobile-menu-open #menuIcon span:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}
.mobile-menu-open #menuIcon span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-open #menuIcon span:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* ── Focus styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #447a4a;
    outline-offset: 2px;
}

/* ── 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;
}
