/* ==============================================================================
   splash.css — pagina di attesa pubblica di games.agi-one.ai (nessun gioco anticipato)
   Ispirata alla pagina «AGI-ONE is coming.» di agi-one.ai, con l'identità del portale games:
   nero profondo, rosa, giallo, turchese, Unbounded + Inter + JetBrains Mono.
============================================================================== */

:root {
    --sp-bg: #07060f;
    --sp-text: #f6f4ff;
    --sp-soft: #c9c4e6;
    --sp-mute: #8f89b3;
    --sp-line: rgba(255, 255, 255, 0.14);
    --sp-pink: #ff4d8d;
    --sp-gold: #ffc93c;
    --sp-cyan: #2de0c8;
    --sp-violet: #7c4dff;
    --sp-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body.sp {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden;
    background: var(--sp-bg); color: var(--sp-text); font: 400 16px/1.6 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.sp :focus-visible { outline: 3px solid var(--sp-gold); outline-offset: 3px; border-radius: 10px; }

/* sfondo: forme che fluttuano (canvas), due bagliori, righe da monitor CRT */
.sp-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.sp-glow { position: fixed; z-index: 0; border-radius: 50%; filter: blur(90px); opacity: 0.55; pointer-events: none; }
.sp-glow--a { width: 60vmax; height: 60vmax; left: -20vmax; top: -25vmax; background: radial-gradient(circle, rgba(124, 77, 255, 0.55), transparent 65%); animation: sp-drift 18s ease-in-out infinite alternate; }
.sp-glow--b { width: 55vmax; height: 55vmax; right: -18vmax; bottom: -25vmax; background: radial-gradient(circle, rgba(255, 77, 141, 0.45), transparent 65%); animation: sp-drift 22s ease-in-out infinite alternate-reverse; }
.sp-scan { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px); }
@keyframes sp-drift { to { transform: translate(6vmax, 4vmax) scale(1.08); } }

/* barra */
.sp-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 26px 32px; }
.sp-brand { display: flex; align-items: center; gap: 10px; }
.sp-brand img { width: 40px; height: 40px; }
.sp-brand__name {
    font: 700 18px/1 'Unbounded', 'Outfit', sans-serif;
    letter-spacing: 0.01em;
    color: #f6f4ff;
    white-space: nowrap;
}
.sp-brand__name b {
    font-weight: 700;
    background: linear-gradient(120deg, var(--sp-pink), var(--sp-gold), var(--sp-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* interruttore della musica */
.sp-sound {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; cursor: pointer;
    font: 700 13px/1 'Inter', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sp-text);
    border: 1px solid var(--sp-line); background: rgba(255, 255, 255, 0.05); transition: border-color .2s, background .2s;
}
.sp-sound:hover { border-color: rgba(255, 255, 255, 0.35); }
.sp-sound i.fas { font-size: 15px; width: 18px; }
.sp-sound__eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.sp-sound__eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--sp-cyan); transform-origin: bottom; animation: sp-eq .9s ease-in-out infinite; }
.sp-sound__eq i:nth-child(2) { animation-delay: -.3s; background: var(--sp-gold); }
.sp-sound__eq i:nth-child(3) { animation-delay: -.6s; background: var(--sp-pink); }
.sp-sound__eq i:nth-child(4) { animation-delay: -.15s; }
.sp-sound[aria-pressed="true"] { border-color: rgba(45, 224, 200, 0.6); background: rgba(45, 224, 200, 0.1); }
.sp-sound[aria-pressed="true"] .sp-sound__eq { display: inline-flex; }
.sp-sound[aria-pressed="true"] i.fas { display: none; }
@keyframes sp-eq { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }

/* contenuto centrale */
.sp-main { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 24px 90px; }
.sp-pill {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px; padding: 8px 16px; border-radius: 999px;
    font: 700 12px/1 var(--sp-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--sp-soft);
    border: 1px solid rgba(124, 77, 255, 0.5); background: rgba(124, 77, 255, 0.12);
}
.sp-pill i { font-size: 7px; color: var(--sp-cyan); animation: sp-blink 1.2s infinite; }
.sp-pill b { color: var(--sp-gold); min-width: 2ch; text-align: right; }
@keyframes sp-blink { 50% { opacity: 0.2; } }
.sp-title { margin: 0; font: 900 clamp(40px, 8vw, 112px)/0.98 'Unbounded', sans-serif; letter-spacing: -0.03em; }
.sp-title span {
    background: linear-gradient(90deg, var(--sp-pink), var(--sp-gold) 55%, var(--sp-cyan)); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; animation: sp-shine 6s ease-in-out infinite alternate;
}
@keyframes sp-shine { to { background-position: 100% 0; } }
.sp-type { margin: 34px 0 0; min-height: 1.6em; font: 400 clamp(16px, 2vw, 24px)/1.5 var(--sp-mono); color: var(--sp-text); }
.sp-caret { display: inline-block; width: 0.6em; height: 1.1em; margin-left: 4px; vertical-align: -0.15em; background: var(--sp-cyan); animation: sp-blink 1s steps(1) infinite; }
.sp-press { margin: 46px 0 0; font: 700 13px/1 'Unbounded', sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: var(--sp-gold); animation: sp-blink 1.4s steps(1) infinite; }
.sp-press.is-hidden { visibility: hidden; }
.sp-title, .sp-type, .sp-pill { animation-fill-mode: both; }
.sp-title { animation: sp-rise 0.9s cubic-bezier(.2, .8, .2, 1) .1s both; }

@keyframes sp-rise { from { opacity: 0; transform: translateY(26px) scale(0.98); } to { opacity: 1; transform: none; } }

/* terminale «boot» nell'angolo, come su agi-one.ai */
.sp-boot {
    position: fixed; left: 32px; bottom: 28px; z-index: 1; width: 340px; border-radius: 12px; overflow: hidden;
    background: rgba(12, 10, 26, 0.82); border: 1px solid var(--sp-line); backdrop-filter: blur(8px);
}
.sp-boot__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--sp-line); font: 400 11px/1 var(--sp-mono); color: var(--sp-mute); }
.sp-boot__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--sp-pink); }
.sp-boot__bar i:nth-child(2) { background: var(--sp-gold); }
.sp-boot__bar i:nth-child(3) { background: var(--sp-cyan); }
.sp-boot__bar span { margin-left: 8px; }
.sp-boot pre { margin: 0; padding: 12px 14px; min-height: 124px; font: 400 12px/1.6 var(--sp-mono); color: var(--sp-soft); white-space: pre; }
.sp-boot pre b { color: var(--sp-cyan); font-weight: 700; }

.sp-age {
    position: fixed; right: 32px; bottom: 28px; z-index: 1; display: grid; place-items: center; width: 40px; height: 46px; border-radius: 7px;
    background: #fff; color: #07060f; font: 900 15px/1 'Unbounded', sans-serif;
}

@media (max-width: 760px) {
    .sp-top { padding: 18px 16px; }
    .sp-brand__name { font-size: 15px; }
    .sp-sound__label { display: none; }
    .sp-boot { display: none; }
    .sp-age { right: 16px; bottom: 16px; }
    .sp-main { padding-bottom: 60px; }
    .sp-pill { font-size: 11px; letter-spacing: 0.12em; }
    .sp-press { font-size: 11px; letter-spacing: 0.16em; }
}
@media (prefers-reduced-motion: reduce) {
    .sp *, .sp-glow { animation: none !important; transition: none !important; }
}
