/* ─── Base & Utilities ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; }

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .floating-card { animation: none !important; }
    .floating-card:nth-child(1) { transform: translateY(0) !important; }
    .floating-card:nth-child(2) { transform: translateY(0) !important; }
    .floating-card:nth-child(3) { transform: translateY(0) !important; }
    .floating-card:nth-child(4) { transform: translateY(0) !important; }
}

/* ─── Scroll reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        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:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* ─── Floating cards ─── */
@media (prefers-reduced-motion: no-preference) {
    .floating-card {
        animation: float 6s ease-in-out infinite;
    }
    .card-1 { animation-delay: 0s; }
    .card-2 { animation-delay: -1.5s; }
    .card-3 { animation-delay: -3s; }
    .card-4 { animation-delay: -4.5s; }
}

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

/* ─── Hero orbs ─── */
@media (prefers-reduced-motion: no-preference) {
    .hero-orb { animation: drift 20s ease-in-out infinite; }
    .hero-orb2 { animation: drift 25s ease-in-out infinite reverse; }
    .hero-orb3 { animation: drift 18s ease-in-out infinite; animation-delay: -5s; }
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(20px, 20px) scale(1.02); }
}

/* ─── Navbar scrolled state ─── */
.navbar-scrolled {
    background: rgba(255, 251, 245, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 0 rgba(107, 33, 168, 0.08), 0 4px 30px rgba(107, 33, 168, 0.06) !important;
}

/* ─── Custom scrollbar ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fef3c7; }
::-webkit-scrollbar-thumb { background: #d8b4fe; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #a855f7; }

/* ─── Selection ─── */
::selection { background: #e9d5ff; color: #3b0764; }
