/* ── 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 {
    min-height: 100vh;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

/* ── Scroll Reveal (progressive enhancement) ────── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.08s; }
    .reveal:nth-child(3) { transition-delay: 0.16s; }
}

/* ── Stat Cards Float Animation ─────────────────── */
@media (prefers-reduced-motion: no-preference) {
    .stat-card {
        animation: float 6s ease-in-out infinite;
    }

    .stat-card:nth-child(2) {
        animation-delay: -2s;
        animation-duration: 7s;
    }

    .stat-card:nth-child(3) {
        animation-delay: -4s;
        animation-duration: 5.5s;
    }

    @keyframes float {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-10px); }
    }
}

/* ── Mobile Menu ────────────────────────────────── */
.mobile-link {
    display: block;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    transition: color 0.2s ease;
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ── Nav Transition ─────────────────────────────── */
#nav {
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

#nav.scrolled {
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.2);
}

/* ── Smooth Scroll Offset for Anchored Links ────── */
section[id], nav[id] {
    scroll-margin-top: 64px;
}

/* ── Selection Color ────────────────────────────── */
::selection {
    background: rgba(13, 148, 136, 0.15);
    color: #0f766e;
}

/* ── Focus Styles ───────────────────────────────── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Utility ────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
