/* ── 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; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Hero Animations (above fold — always visible) ─── */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    animation: heroSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-anim:nth-child(2) { animation-delay: 0.15s; }
.hero-anim:nth-child(3) { animation-delay: 0.3s; }
.hero-anim:nth-child(4) { animation-delay: 0.45s; }

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

/* ── Stat Cards Float ──────────────────────────────── */
.stat-card {
    opacity: 1;
    animation: cardFloat 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes cardFloat {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Scroll Reveal (below fold only) ───────────────── */
.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);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal:not(.revealed) {
    opacity: 1;
    transform: translateY(24px);
}

/* ── Nav ───────────────────────────────────────────── */
#nav.scrolled {
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(98, 125, 152, 0.15);
}

/* ── Mobile Menu ───────────────────────────────────── */
.mobile-link {
    opacity: 1;
}
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}
#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* ── Menu Lines Animation ──────────────────────────── */
.menu-line {
    display: block;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Utilities ─────────────────────────────────────── */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #f0f4f8;
}

/* ── Reduced Motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .reveal:not(.revealed) {
        opacity: 1;
        transform: none;
    }
}
