/* ── Reset & Base ─────────────────────────────────────── */
*, *::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;
}

img, svg {
    display: block;
    max-width: 100%;
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f0e6;
}
::-webkit-scrollbar-thumb {
    background: #064e3b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #053e2b;
}

/* ── Scroll Reveal ────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* ── Hero Animations ──────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
    .hero-subtitle {
        animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
    }
    .hero-headline {
        animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
    }
    .hero-description {
        animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s both;
    }
    .hero-ctas {
        animation: fadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
    }
    .hero-image {
        animation: fadeLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s both;
    }
    .hero-scroll {
        animation: fadeIn 0.8s ease 1.5s both;
    }
}

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

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ── Scroll Line Animation ────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
    .animate-scroll-line {
        animation: scrollLine 1.8s ease-in-out infinite;
    }
    @keyframes scrollLine {
        0% { transform: translateY(-100%); }
        50% { transform: translateY(100%); }
        51% { transform: translateY(100%); }
        100% { transform: translateY(100%); }
    }
}

/* ── Navbar ───────────────────────────────────────────── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 248, 242, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

.nav-link {
    position: relative;
    color: #064e3b;
    transition: color 0.3s ease;
}

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

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

.nav-link:hover {
    color: #047857;
}

#navbar.scrolled .nav-link {
    color: #064e3b;
}

#navbar.scrolled .nav-link:hover {
    color: #047857;
}

.nav-logo-dark { color: #064e3b; }
.nav-logo-light { color: #f5f0e6; }

#navbar.scrolled .nav-logo-dark { color: #064e3b; }
#navbar.scrolled .nav-logo-light { color: #f5f0e6; }

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

.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s 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.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

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

/* ── Focus ────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid #064e3b;
    outline-offset: 2px;
}

/* ── Form Inputs ──────────────────────────────────────── */
input::placeholder,
textarea::placeholder {
    color: rgba(245, 240, 230, 0.25);
}
