/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: color-mix(in srgb, #1B4332 80%, white);
    color: #FDFBF7;
}

/* ===== NAVIGATION ===== */
#nav {
    background: transparent;
}

#nav.scrolled {
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #1B4332;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.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;
}

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

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

.menu-line {
    display: block;
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 5rem;
}

/* ===== HERO ANIMATIONS ===== */
.hero-tagline {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-headline {
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.hero-subtitle {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.hero-stats {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both;
}

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

/* ===== SCROLL REVEAL ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* 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;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== IMAGE SHADOWS ===== */
.shadow-xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.shadow-2xl {
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.2);
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #365c38;
}

/* ===== FOCUS STYLES ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ===== UTILITY ===== */
.img-lazy {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.img-lazy.loaded {
    opacity: 1;
}
