/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { min-height: 100vh; }

/* ── Scroll reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* ── Floating animations ── */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(-16px) rotate(12deg); }
}
@keyframes float-delayed {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0deg); }
}
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-delayed { animation: float-delayed 5s ease-in-out infinite 1s; }

/* ── Navbar ── */
#navbar.scrolled {
    background: rgba(59, 7, 100, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(147, 51, 234, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ── Menu tabs ── */
.menu-tab {
    color: rgb(196, 181, 253);
    background: transparent;
}
.menu-tab:hover {
    color: #fbbf24;
}
.menu-tab.active {
    color: #3b0764;
    background: #fbbf24;
    box-shadow: 0 2px 12px rgba(251, 191, 36, 0.3);
}

/* ── Mobile menu ── */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #3b0764; }
::-webkit-scrollbar-thumb { background: #7e22ce; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9333ea; }

/* ── Selection ── */
::selection { background: rgba(251, 191, 36, 0.3); color: #f3e8ff; }

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

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