/* toxin.wtf — motion layer: acid intro, cursor light + streak field, smoothness (gated by body.site / body.site-dash) */

html { scroll-behavior: auto; }
body.site, body.site-dash { animation: pageIn .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Page wipe + scroll progress ---------- */
.fx-wipe { position: fixed; inset: 0; z-index: 99990; background: #010503; opacity: 0; pointer-events: none; transition: opacity .28s ease; }
.fx-wipe.on { opacity: 1; pointer-events: all; }
.fx-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 99980; background: linear-gradient(90deg, #00c853, #39ff14, #b6ff00); box-shadow: 0 0 12px #39ff14; pointer-events: none; }

/* ---------- Cursor light + streak field (normal cursor stays) ---------- */
.fx-spot { position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(520px circle at var(--sx, 50%) var(--sy, 40%), rgba(57,255,20,.075), transparent 70%); }
#fx-field { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; }

/* ---------- Card spotlight ---------- */
.glass { position: relative; }
.glass::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(57,255,20,.14), transparent 65%);
}
.glass:hover::after { opacity: 1; }
.fx-float { will-change: translate; }
.fx-bg { will-change: translate; transition: translate .6s cubic-bezier(.2,.8,.2,1); }

/* ---------- Intro ---------- */
.intro-cover { position: fixed; inset: 0; z-index: 100000; background: #010503; display: none; place-items: center; overflow: hidden; clip-path: circle(150% at 50% 50%); }
html.intro-on { overflow: hidden; }
html.intro-on .intro-cover { display: grid; }
.intro-cover::before { content: ""; position: absolute; inset: 0;
    background: radial-gradient(50% 50% at 50% 50%, rgba(57,255,20,.18), transparent 70%),
                repeating-linear-gradient(0deg, rgba(57,255,20,.05) 0 1px, transparent 1px 4px); animation: introPulse 2.4s ease-in-out infinite; }
@keyframes introPulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
.intro-center { position: relative; text-align: center; z-index: 2; width: min(420px, 82vw); }
.intro-skull { width: min(230px, 46vw); height: auto; opacity: 0; transform: scale(.55); filter: drop-shadow(0 0 30px rgba(57,255,20,.7));
    animation: skullIn .9s .1s cubic-bezier(.2,.9,.2,1.15) forwards, skullGlitch 3s 1s infinite; }
@keyframes skullIn { to { opacity: 1; transform: scale(1); } }
@keyframes skullGlitch {
    0%, 86%, 100% { transform: translate(0,0); filter: drop-shadow(0 0 30px rgba(57,255,20,.7)); }
    88% { transform: translate(-6px, 2px); filter: drop-shadow(-6px 0 0 #ff2e63) drop-shadow(6px 0 0 #00e5ff); }
    90% { transform: translate(5px, -2px); filter: drop-shadow(5px 0 0 #ff2e63) drop-shadow(-5px 0 0 #00e5ff); }
    92% { transform: translate(0,0); }
}
.intro-word { margin-top: 16px; font-family: 'Fira Code', monospace; font-weight: 600; font-size: clamp(1.6rem, 6vw, 2.4rem); letter-spacing: .12em; color: #eaffea; min-height: 1.3em; text-shadow: 0 0 22px rgba(57,255,20,.75); }
.intro-word span.dim { color: #39ff14; opacity: .8; }
.intro-bar { margin: 18px auto 8px; height: 3px; background: rgba(57,255,20,.15); border-radius: 3px; overflow: hidden; }
.intro-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #00c853, #39ff14, #b6ff00); box-shadow: 0 0 14px #39ff14; }
.intro-meta { display: flex; justify-content: space-between; font-family: 'Fira Code', monospace; font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: #86a88c; }
.intro-skip { position: absolute; right: 22px; bottom: 20px; z-index: 3; background: none; border: 1px solid rgba(57,255,20,.3); color: #86a88c; font-family: 'Fira Code', monospace; font-size: .72rem; padding: 7px 14px; border-radius: 10px; }
.intro-skip:hover { color: #39ff14; border-color: #39ff14; }
.intro-cover.leaving { animation: irisOut 1s cubic-bezier(.7,0,.2,1) forwards; }
.intro-cover.leaving .intro-center { animation: centerOut .7s ease forwards; }
@keyframes irisOut { 0% { clip-path: circle(150% at 50% 50%); } 100% { clip-path: circle(0% at 50% 50%); } }
@keyframes centerOut { to { transform: scale(1.35); opacity: 0; filter: blur(6px); } }
@media (pointer: coarse) { .fx-spot, #fx-field { display: none; } }
@media (prefers-reduced-motion: reduce) {
    body.site, body.site-dash { animation: none; }
    .intro-cover, .fx-wipe, #fx-field { display: none !important; }
    html.intro-on { overflow: auto; }
}
