/* ── Custom base styles ── */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Hero gradient ── */
.hero-gradient {
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 25%, #a855f7 50%, #c084fc 75%, #d8b4fe 100%);
}

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

/* ── Navbar styles ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 245, 255, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(124, 58, 237, 0.08);
}

#navbar.scrolled .font-serif {
    color: #581c87 !important;
}

#navbar.scrolled a:not([class*="bg-"]):not([class*="text-white"]) {
    color: #7c3aed !important;
}

#navbar.scrolled a:not([class*="bg-"]):not([class*="text-white"]):hover {
    color: #a855f7 !important;
}

/* ── Floating animations ── */
@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.1); }
}
@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-25px, 20px) scale(1.05); }
}
@keyframes float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, 25px) scale(1.08); }
}
@keyframes float-4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -15px) scale(1.12); }
}

.hero-float-1 { animation: float-1 8s ease-in-out infinite; }
.hero-float-2 { animation: float-2 10s ease-in-out infinite; }
.hero-float-3 { animation: float-3 9s ease-in-out infinite; }
.hero-float-4 { animation: float-4 7s ease-in-out infinite; }

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

/* ── Input autofill styling ── */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #faf5ff inset !important;
    box-shadow: 0 0 0 30px #faf5ff inset !important;
}

/* ── Selection color ── */
::selection {
    background: #e9d5ff;
    color: #581c87;
}
