html { scroll-behavior: auto; overflow-x: hidden; }
body { background: #09090B; overflow-x: hidden; overflow-x: clip; max-width: 100vw; }
::selection { background: rgba(124, 58, 237, 0.45); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #09090B; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed, #d946ef);
    border-radius: 8px;
    border: 2px solid #09090B;
}

.text-gradient-brand {
    background: linear-gradient(92deg, #7c3aed 0%, #d946ef 50%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.text-gradient-hero {
    background: linear-gradient(92deg, #a78bfa 0%, #e879f9 55%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.text-outline {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.28);
}

/* Pre-JS hidden states (only when JS is available) */

/* Ambient drifting blobs */
@keyframes drift-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(70px, -50px) scale(1.18); }
}
@keyframes drift-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-80px, 60px) scale(1.12); }
}
.blob-a { animation: drift-a 16s ease-in-out infinite; }
.blob-b { animation: drift-b 20s ease-in-out infinite; }

/* Editorial marquee */
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.marquee-track {
    width: max-content;
    animation: marquee-scroll 46s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

/* Grain overlay */
.grain {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.035;
}

/* Grid lines backdrop */
.grid-lines {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%);
}

.glow-btn {
    box-shadow:
        0 0 24px -4px rgba(124, 58, 237, 0.55),
        0 0 48px -8px rgba(217, 70, 239, 0.35);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, filter 0.35s ease;
}
.glow-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
    box-shadow:
        0 0 32px -2px rgba(124, 58, 237, 0.7),
        0 0 72px -6px rgba(217, 70, 239, 0.5);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.45s ease, background 0.45s ease, box-shadow 0.45s ease;
}
.glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(124, 58, 237, 0.45);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 24px 60px -24px rgba(124, 58, 237, 0.35);
}

.nav-scrolled {
    background: rgba(9, 9, 11, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.icon-chip {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(217, 70, 239, 0.12));
    border: 1px solid rgba(124, 58, 237, 0.35);
}

.cursor-glow {
    background: radial-gradient(circle, rgba(124, 58, 237, 0.14) 0%, rgba(217, 70, 239, 0.07) 40%, transparent 70%);
}

#back-to-top {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, background 0.3s ease;
}
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#cookie-banner {
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
#cookie-banner.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.spotlight-frame img {
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s ease;
}
.spotlight-frame:hover img {
    transform: scale(1.05);
    filter: saturate(1.2);
}

@media (prefers-reduced-motion: reduce) {
    .blob-a, .blob-b, .marquee-track { animation: none !important; }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height, 72px) + 12px);
    scrollbar-gutter: stable;
}
html.overlay-open { overflow: hidden; }
:focus-visible { outline: 2px solid #e9a7ff; outline-offset: 4px; }
dialog#mobile-menu, dialog#app-modal {
    margin: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    padding: 0;
    border: 0;
    color: inherit;
}
dialog:not([open]) { display: none !important; }
dialog#mobile-menu[open] { display: flex; overflow-y: auto; }
dialog#app-modal { background: transparent; }
#app-modal-cta { white-space: normal; text-align: center; padding-inline: clamp(1rem, 4vw, 2rem); }
#app-modal-cta svg { flex-shrink: 0; }
dialog#app-modal::backdrop, dialog#mobile-menu::backdrop { background: transparent; }
dialog#app-modal[open] #app-modal-panel,
dialog#mobile-menu[open] .mobile-link { animation: appear .35s ease-out both; }
#intro-overlay { display: none; }
.play-intro #intro-overlay:not([hidden]) {
    display: flex;
    pointer-events: none;
    animation: intro-exit .9s cubic-bezier(.76,0,.24,1) .7s both;
}
.play-intro .hero-line, .play-intro .hero-fade {
    animation: appear .9s cubic-bezier(.16,1,.3,1) 1.05s both;
}
[data-reveal].enter-view { animation: appear .65s cubic-bezier(.16,1,.3,1) both; }
#cursor-glow { transition: translate .18s ease-out; }
.magnetic { transition: translate .25s ease-out; }
@keyframes intro-exit { to { transform: translateY(-100%); } }
@keyframes appear { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .play-intro #intro-overlay:not([hidden]), #cursor-glow { display: none; }
    .play-intro .hero-line, .play-intro .hero-fade, [data-reveal].enter-view,
    dialog#app-modal[open] #app-modal-panel, dialog#mobile-menu[open] .mobile-link {
        animation: none;
    }
    .magnetic { translate: none !important; }
}

@media (max-height: 570px) {
    dialog#mobile-menu[open] { justify-content: safe center; gap: 1rem; padding: 3.75rem 1rem 1rem; }
}
