/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }

/* ── Navbar scroll state ── */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #34D399;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-blur-lg;
    box-shadow: 0 1px 20px rgba(10, 22, 40, 0.08);
}

/* ── Floating cards animation ── */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes float-medium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes float-fast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-16px); }
}
.float-slow { animation: float-slow 6s ease-in-out infinite; }
.float-medium { animation: float-medium 5s ease-in-out infinite 0.5s; }
.float-fast { animation: float-fast 4.5s ease-in-out infinite 1s; }

/* ── Scroll reveal ── */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal[data-reveal-state="hidden"] {
    opacity: 0;
    transform: translateY(40px);
}

/* ── Mobile menu ── */
.mobile-link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(10, 22, 40, 0.06);
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F0FFF8; }
::-webkit-scrollbar-thumb { background: #0A1628; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #152D56; }

/* ── Selection ── */
::selection { background: rgba(52, 211, 153, 0.3); color: #0A1628; }

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

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

/* ── 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;
}
