/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}

.animate-fade-up {
    animation: fade-up .7s cubic-bezier(.22,1,.36,1) both;
}
.animate-scale-in {
    animation: scale-in .8s cubic-bezier(.22,1,.36,1) both;
}

/* ── Scroll Reveal (progressive enhancement) ─────────────── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Fallback: always visible if JS is disabled or reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
}

/* ── Navbar transitions ──────────────────────────────────── */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 8px 32px rgba(0,0,0,.3);
}
#navbar.scrolled .logo-text { color: #fff; }

/* ── Mobile menu ─────────────────────────────────────────── */
#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}
.mobile-link {
    display: block;
    animation: slide-in-right .3s cubic-bezier(.22,1,.36,1) both;
}
.mobile-link:nth-child(1) { animation-delay: .05s; }
.mobile-link:nth-child(2) { animation-delay: .1s; }
.mobile-link:nth-child(3) { animation-delay: .15s; }
.mobile-link:nth-child(4) { animation-delay: .2s; }

/* ── Selection ───────────────────────────────────────────── */
::selection {
    background: rgba(52, 212, 184, 0.3);
    color: #fff;
}

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

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0A1628; }
::-webkit-scrollbar-thumb { background: #1E4A75; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #34D4B8; }
