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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .scroll-section {
        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);
    }
    
    .scroll-section.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger children */
    .scroll-section.delay-1 { transition-delay: 0.1s; }
    .scroll-section.delay-2 { transition-delay: 0.2s; }
    .scroll-section.delay-3 { transition-delay: 0.3s; }
}

/* ===== HERO ANIMATIONS ===== */
@media (prefers-reduced-motion: no-preference) {
    .hero-subtitle {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
    }
    .hero-title {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
    }
    .hero-desc {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s both;
    }
    .hero-cta {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
    }
    .hero-stats {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s both;
    }
}

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

/* ===== SCROLL LINE ANIMATION ===== */
@media (prefers-reduced-motion: no-preference) {
    .scroll-line {
        animation: scrollPulse 2s ease-in-out infinite;
    }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ===== NAVBAR ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-logo-text {
    color: #060e1c;
}

#navbar.scrolled .nav-link {
    color: #1a3a5c;
}

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

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

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

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

/* Menu button active state */
#menu-btn.active .menu-line:nth-child(1) {
    top: 50%;
    transform: rotate(45deg);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    top: 50%;
    width: 1.5rem;
    left: 0;
    transform: rotate(-45deg);
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* ===== SELECTION ===== */
::selection {
    background: #10b981;
    color: #060e1c;
}

/* ===== CUSTOM SCROLLBAR ===== */
@media (min-width: 1024px) {
    ::-webkit-scrollbar {
        width: 6px;
    }
    ::-webkit-scrollbar-track {
        background: #060e1c;
    }
    ::-webkit-scrollbar-thumb {
        background: #1a3a5c;
        border-radius: 3px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: #10b981;
    }
}

/* ===== 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-section {
        opacity: 1;
        transform: none;
    }
}
