/*
 * Smoke It! public splash + login pages -- STATIC layer.
 * Noir city, rain, neon, smoke. This file has no animation at all: it is the
 * complete, still page that prefers-reduced-motion users (and no-JS visitors)
 * see. All motion lives in splash-motion.css, gated on html.mo-on, which
 * splash-motion.js sets only when reduced motion is NOT requested.
 */
:root {
    --ink: #050407;
    --ink-2: #0c0a10;
    --paper: #efe6da;
    --muted: #a99d93;
    --neon: #ff2d55;
    --neon-hot: #ff6b81;
    --neon-glow: rgba(255, 45, 85, 0.55);
    --cyan: #3ee6ff;
    --amber: #ffb547;
    --font-display: 'Bebas Neue', 'Oswald', Impact, 'Arial Narrow Bold', sans-serif;
    --font-type: 'Special Elite', 'Courier New', Courier, monospace;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
}

/* ---------- Background stack ---------- */

.scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.scene__art {
    position: absolute;
    inset: -3%;
    background-color: var(--ink-2);
    background-image: url('/images/splash/night-city-2560.jpg');
    background-image: image-set(
        url('/images/splash/night-city-2560.webp') type('image/webp'),
        url('/images/splash/night-city-2560.jpg') type('image/jpeg'));
    background-size: cover;
    background-position: 50% 40%;
    filter: saturate(1.1) contrast(1.05) brightness(0.82);
    transform: scale(1.04);
    transform-origin: 60% 45%;
}

@media (max-width: 900px) and (orientation: landscape) {
    .scene__art { background-image: url('/images/splash/night-city-1280.webp'); }
}

@media (orientation: portrait) {
    .scene__art {
        background-image: url('/images/splash/night-city-portrait.webp');
        background-position: 50% 35%;
    }
}

/* Neon colour wash + vignette + floor fade, layered over the art. */
.scene__vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(42% 30% at 50% 60%, rgba(5, 4, 7, 0.5), transparent 75%),
        radial-gradient(120% 85% at 50% 42%, transparent 0%, rgba(5, 4, 7, 0.25) 45%, rgba(5, 4, 7, 0.86) 100%),
        linear-gradient(180deg, rgba(5, 4, 7, 0.65) 0%, rgba(5, 4, 7, 0) 22%, rgba(5, 4, 7, 0) 48%, rgba(5, 4, 7, 0.78) 78%, var(--ink) 100%),
        radial-gradient(60% 50% at 18% 85%, rgba(255, 45, 85, 0.22), transparent 70%),
        radial-gradient(55% 45% at 85% 20%, rgba(62, 230, 255, 0.12), transparent 70%);
}

/* Film grain from an inline SVG turbulence filter. */
.scene__grain {
    position: absolute;
    inset: -50%;
    opacity: 0.09;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Low smoke banks lying along the street. */
.smoke {
    position: absolute;
    width: 90vmax;
    height: 45vmax;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(200, 190, 210, 0.16), rgba(200, 190, 210, 0.06) 55%, transparent 100%);
    filter: blur(28px);
    opacity: 0.85;
}
.smoke--1 { left: -30vmax; bottom: -18vmax; }
.smoke--2 { right: -35vmax; bottom: -12vmax; opacity: 0.6; }
.smoke--3 { left: 10vmax; bottom: -28vmax; opacity: 0.5; }

/* Rain is drawn by splash-motion.js; without motion the canvas stays empty. */
.scene__rain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
}

/* Full-screen ink layer used by the motion layer's exit transition. */
.scene__fade {
    position: fixed;
    inset: 0;
    z-index: 5;
    background: var(--ink);
    opacity: 0;
    pointer-events: none;
}

/* ---------- Foreground ---------- */

.stage {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: clamp(24px, 6vh, 72px) 16px clamp(28px, 7vh, 88px);
    text-align: center;
}

.eyebrow {
    margin: 0 0 clamp(6px, 1.2vh, 14px);
    font-family: var(--font-type);
    font-size: clamp(0.72rem, 0.6rem + 0.45vw, 1rem);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--muted);
}

.wordmark {
    position: relative;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(4.4rem, 2.2rem + 13vw, 15rem);
    line-height: 0.86;
    letter-spacing: 0.04em;
    color: #ffe9ee;
    text-shadow:
        0 0 2px #fff,
        0 0 10px var(--neon-hot),
        0 0 24px var(--neon),
        0 0 48px var(--neon-glow),
        0 0 96px rgba(255, 45, 85, 0.35);
}
.wordmark span { display: inline-block; }

/* The smoke the wordmark resolves out of (and that lingers above it). */
.wordmark__smoke {
    position: absolute;
    /* Centred on the wordmark. Offsets, not margins: a percentage margin is
       relative to the WIDTH, which put the plume far above the text. */
    left: -10%;
    top: -35%;
    width: 120%;
    height: 170%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(236, 226, 240, 0.16), rgba(236, 226, 240, 0.05) 60%, transparent 100%);
    filter: blur(20px);
    opacity: 0.55;
    pointer-events: none;
}

.tagline {
    margin: clamp(10px, 2vh, 22px) 0 0;
    font-family: var(--font-type);
    font-size: clamp(1rem, 0.85rem + 0.7vw, 1.6rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper);
}
.tagline em {
    font-style: normal;
    color: var(--neon-hot);
}

.lede {
    max-width: 34rem;
    margin: clamp(8px, 1.6vh, 16px) auto 0;
    font-size: clamp(0.92rem, 0.85rem + 0.3vw, 1.08rem);
    line-height: 1.55;
    color: var(--muted);
}

.actions { margin-top: clamp(22px, 4.5vh, 48px); }

/* The one glowing button. Also used as the login submit. */
.btn-neon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    min-width: 13rem;
    min-height: 3.4rem;
    padding: 0.85rem 2.6rem;
    border: 2px solid var(--neon-hot);
    border-radius: 3px;
    background: linear-gradient(180deg, rgba(255, 45, 85, 0.16), rgba(255, 45, 85, 0.04));
    color: #fff3f5;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 1.15rem + 0.6vw, 1.75rem);
    letter-spacing: 0.24em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    text-shadow: 0 0 8px var(--neon);
    box-shadow:
        0 0 0 1px rgba(255, 45, 85, 0.25),
        0 0 18px rgba(255, 45, 85, 0.45),
        inset 0 0 18px rgba(255, 45, 85, 0.25);
}
/* Extra halo: the motion layer breathes its opacity; static it sits at rest. */
.btn-neon::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    box-shadow: 0 0 34px rgba(255, 45, 85, 0.55), 0 0 80px rgba(255, 45, 85, 0.25);
    opacity: 0.5;
    pointer-events: none;
}
.btn-neon .arrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8em;
}
.btn-neon:hover {
    background: linear-gradient(180deg, rgba(255, 45, 85, 0.34), rgba(255, 45, 85, 0.1));
    border-color: #ff8b9c;
}
.btn-neon:hover::after { opacity: 1; }
.btn-neon:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 5px;
}
.btn-neon[aria-busy="true"] { cursor: progress; }

.soon {
    margin: clamp(16px, 3vh, 30px) 0 0;
    font-family: var(--font-type);
    font-size: clamp(0.72rem, 0.66rem + 0.25vw, 0.9rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(239, 230, 218, 0.42);
}
.soon .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 0.7em;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 8px var(--amber);
    vertical-align: middle;
}

.fineprint {
    position: relative;
    z-index: 1;
    padding: 0 16px 18px;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: rgba(239, 230, 218, 0.28);
}

/* ---------- Login card ---------- */

.stage--login { justify-content: center; }

.login-card {
    width: 100%;
    max-width: 25rem;
    padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 36px);
    border: 1px solid rgba(255, 45, 85, 0.28);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(14, 11, 18, 0.82), rgba(8, 6, 11, 0.9));
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    backdrop-filter: blur(10px) saturate(1.2);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 40px rgba(255, 45, 85, 0.12);
    text-align: left;
}

.login-card .wordmark {
    display: block;
    font-size: clamp(3.2rem, 2.4rem + 3vw, 4.6rem);
    text-align: center;
    text-decoration: none;
}
.login-card .wordmark:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 4px;
}

.login-card h1 {
    margin: 0.4rem 0 1.6rem;
    font-family: var(--font-type);
    font-size: 0.86rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-align: center;
    text-transform: uppercase;
    color: var(--muted);
}

.field { margin-bottom: 1.1rem; }
.field label {
    display: block;
    margin-bottom: 0.4rem;
    font-family: var(--font-type);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}
.field input {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(239, 230, 218, 0.18);
    border-radius: 3px;
    background: rgba(5, 4, 7, 0.7);
    color: var(--paper);
    font: 1rem/1.3 var(--font-body);
}
.field input:hover { border-color: rgba(239, 230, 218, 0.32); }
.field input:focus {
    outline: none;
    border-color: var(--neon-hot);
    box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.22), 0 0 18px rgba(255, 45, 85, 0.2);
}

.login-card .btn-neon {
    width: 100%;
    margin-top: 0.6rem;
}

.alert {
    margin: 0 0 1.2rem;
    padding: 0.75rem 0.9rem;
    border-left: 3px solid var(--neon);
    border-radius: 2px;
    background: rgba(255, 45, 85, 0.1);
    color: #ffd3da;
    font-size: 0.92rem;
}
.alert[hidden] { display: none; }

.login-foot {
    margin: 1.4rem 0 0;
    font-size: 0.84rem;
    text-align: center;
    color: var(--muted);
}
.login-foot a {
    color: var(--paper);
    text-underline-offset: 3px;
}
.login-foot a:hover { color: var(--neon-hot); }
.login-foot a:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

@media (min-width: 1800px) {
    .stage { padding-bottom: 10vh; }
}
