*,
*::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;
}

/* Hero animations — above the fold, always visible */
.hero-bg {
    animation: heroZoom 20s ease-out forwards;
}

@keyframes heroZoom {
    from { transform: scale(1.05); }
    to   { transform: scale(1); }
}

.hero-scrim {
    animation: scrimFade 1.2s ease-out forwards;
}

@keyframes scrimFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.hero-eyebrow {
    animation: fadeUp 0.8s ease-out 0.3s both;
}

.hero-headline {
    animation: fadeUp 0.8s ease-out 0.5s both;
}

.hero-sub {
    animation: fadeUp 0.8s ease-out 0.7s both;
}

.hero-ctas {
    animation: fadeUp 0.8s ease-out 0.9s both;
}

.hero-scroll {
    animation: fadeUp 0.8s ease-out 1.2s both;
}

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

/* Scroll-reveal — below the fold only, progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }

    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
}

/* Navbar transitions */
.navbar-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

.navbar-scrolled .nav-logo-text {
    color: #064e3b !important;
}

.navbar-transparent .nav-logo-text {
    color: #fefdf8;
}

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

.mobile-link {
    transition: opacity 0.3s ease;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Selection */
::selection {
    background: #064e3b;
    color: #fefdf8;
}
