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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(45, 114, 54, 0.2);
    color: #1B4332;
}

/* ── Section Labels ────────────────────────────────────────── */
.section-label {
    font-family: 'Lato', system-ui, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #72af76;
    font-weight: 500;
}

/* ── Navigation ────────────────────────────────────────────── */
#navbar {
    background-color: rgba(253, 252, 248, 0);
    backdrop-filter: none;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #72af76;
    transition: width 0.3s ease;
}

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

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

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

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

/* ── Hamburger Animation ───────────────────────────────────── */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

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

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.4rem;
}

/* ── Hero Animations ───────────────────────────────────────── */
.hero-subtitle {
    animation: heroReveal 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
    transform: translateY(16px);
}

.hero-title {
    animation: heroReveal 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
    transform: translateY(16px);
}

.hero-desc {
    animation: heroReveal 0.8s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
    transform: translateY(16px);
}

.hero-ctas {
    animation: heroReveal 0.8s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
    transform: translateY(16px);
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Scroll Indicator ──────────────────────────────────────── */
.scroll-indicator {
    animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ── Reveal Animations (below-fold) ────────────────────────── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-state="hidden"] {
    opacity: 0;
    transform: translateY(32px);
}

/* ── Button Focus States ───────────────────────────────────── */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #72af76;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

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

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

::-webkit-scrollbar-thumb {
    background: #a8ccaa;
    border-radius: 4px;
}

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

/* ── Reduced Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .reveal[data-state="hidden"] {
        opacity: 1;
        transform: none;
    }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
    .section-label {
        font-size: 0.65rem;
    }

    .font-serif.text-4xl {
        font-size: 2.25rem;
    }

    .font-serif.text-5xl {
        font-size: 2.5rem;
    }
}
