/* SPIRALVISION-10 // loud • neon • cassette • mallcore */
:root {
  --pink: #ff2bd6;
  --cyan: #00f0ff;
  --green: #39ff14;
  --magenta: #ff007a;
  --yellow: #ffe600;
  --chrome: #d7dbe4;
  --chrome-dark: #8a8fa0;
  --night: #12002a;
  --night-2: #1d0546;
  --ink: #06000f;
  --text: #fff6ff;
  --radius: 18px;
  --shadow: 8px 8px 0 var(--ink);
  --display: 'Monoton', 'Bungee', Impact, 'Arial Black', sans-serif;
  --head: 'Bungee', Impact, 'Arial Black', sans-serif;
  --body: 'Chakra Petch', 'Trebuchet MS', system-ui, sans-serif;
  --mono: 'VT323', 'Courier New', monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--night);
  /* arcade carpet: confetti squiggles, triangles, dots */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,240,255,.16) 0 3px, transparent 4px),
    radial-gradient(circle at 70% 80%, rgba(255,43,214,.18) 0 4px, transparent 5px),
    radial-gradient(circle at 85% 15%, rgba(57,255,20,.16) 0 3px, transparent 4px),
    conic-gradient(from 45deg at 40% 60%, transparent 0 85%, rgba(255,230,0,.14) 85% 90%, transparent 90%),
    linear-gradient(160deg, #12002a 0%, #22004f 55%, #12002a 100%);
  background-size: 90px 90px, 130px 130px, 110px 110px, 160px 160px, 100% 100%;
  background-attachment: scroll, scroll, scroll, scroll, fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
}

/* CRT scanlines over everything */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
.tracking {
  position: fixed; left: 0; right: 0; height: 18px; top: -20px;
  pointer-events: none; z-index: 101;
  background: linear-gradient(transparent, rgba(255,255,255,.07), transparent);
  animation: tracking 7s linear infinite;
}
@keyframes tracking { to { top: 110vh; } }

a { color: var(--cyan); }
img, video, canvas { max-width: 100%; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- NAV ---------- */
nav.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,0,26,.86);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--pink);
  box-shadow: 0 0 24px rgba(255,43,214,.45);
}
nav.top .wrap { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
nav.top .brand { font-family: var(--head); color: var(--pink); text-decoration: none; font-size: 20px; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
nav.top .brand img { width: 32px; height: 32px; border-radius: 8px; }
nav.top .links { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
nav.top .links a {
  font-family: var(--head); font-size: 13px; text-decoration: none; color: var(--text);
  padding: 6px 10px; border-radius: 999px; border: 2px solid transparent; white-space: nowrap;
}
nav.top .links a:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- HERO ---------- */
.hero { position: relative; overflow: hidden; min-height: min(88vh, 760px); display: grid; place-items: center; text-align: center; border-bottom: 6px solid var(--ink); }
.hero canvas#tunnel { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .85; }
.hero .inner { position: relative; z-index: 2; padding: 48px 16px; }
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(42px, 10vw, 128px); line-height: .95; margin: 0;
  color: #fff;
  text-shadow: 0 0 6px #fff, 0 0 18px var(--pink), 0 0 40px var(--pink), 0 0 80px var(--magenta);
  animation: buzz 3.2s infinite;
}
.hero h1 .ten { color: var(--yellow); text-shadow: 0 0 8px var(--yellow), 0 0 30px #ff9900; }
@keyframes buzz { 0%, 92%, 100% { opacity: 1 } 93% { opacity: .55 } 94% { opacity: 1 } 96% { opacity: .7 } }
.hero .tag {
  font-family: var(--head); font-size: clamp(16px, 3.4vw, 28px);
  display: inline-block; margin: 18px 0 6px; padding: 6px 18px;
  background: var(--yellow); color: var(--ink); transform: rotate(-2deg);
  border: 4px solid var(--ink); box-shadow: var(--shadow);
}
.hero p.lede { max-width: 720px; margin: 22px auto; font-size: clamp(17px, 2.4vw, 22px); text-shadow: 0 2px 0 var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 22px; }

.btn {
  --bg: var(--pink); --fg: var(--ink);
  font-family: var(--head); font-size: 17px; letter-spacing: .5px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  color: var(--fg); background: var(--bg); text-decoration: none;
  border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, filter .2s;
}
.btn:hover { filter: brightness(1.15) saturate(1.2); transform: translate(-1px,-1px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(4px,4px); box-shadow: 1px 1px 0 var(--ink); }
.btn.cyan { --bg: var(--cyan); }
.btn.green { --bg: var(--green); }
.btn.yellow { --bg: var(--yellow); }
.btn.chrome { --bg: linear-gradient(180deg, #fff, var(--chrome) 45%, var(--chrome-dark) 55%, #f4f6fb); background: var(--bg); }
.btn.red { --bg: #ff1744; --fg: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { font-size: 13px; padding: 7px 14px; border-width: 3px; box-shadow: 3px 3px 0 var(--ink); }

/* ---------- MARQUEE ---------- */
.marquee { background: var(--ink); color: var(--green); font-family: var(--mono); font-size: 26px; white-space: nowrap; overflow: hidden; border-block: 3px solid var(--green); }
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 26s linear infinite; text-shadow: 0 0 8px var(--green); }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- SECTIONS ---------- */
section { padding: 72px 0; position: relative; }
section h2 {
  font-family: var(--head); font-size: clamp(30px, 6vw, 58px); margin: 0 0 8px; line-height: 1;
  color: var(--cyan);
  text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 var(--ink);
}
section .kicker { font-family: var(--mono); font-size: 24px; color: var(--yellow); margin: 0 0 26px; }
.panel {
  background: linear-gradient(180deg, rgba(40,10,90,.92), rgba(18,0,42,.95));
  border: 4px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255,255,255,.08);
  padding: 22px;
}
.chrome-frame {
  padding: 10px; border-radius: 22px;
  background: linear-gradient(135deg, #fff 0%, var(--chrome) 20%, var(--chrome-dark) 48%, #fdfdff 52%, var(--chrome) 80%, #7d8294 100%);
  border: 4px solid var(--ink); box-shadow: var(--shadow);
}

/* ---------- HOW IT WORKS ---------- */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card { position: relative; padding: 20px; border-radius: var(--radius); border: 4px solid var(--ink); box-shadow: var(--shadow); color: var(--ink); }
.card h3 { font-family: var(--head); margin: 0 0 6px; font-size: 22px; }
.card p { margin: 0; font-weight: 600; }
.card .num { position: absolute; right: 14px; top: 8px; font-family: var(--display); font-size: 44px; opacity: .35; }
.card.c1 { background: var(--pink); transform: rotate(-1deg); }
.card.c2 { background: var(--cyan); transform: rotate(1deg); }
.card.c3 { background: var(--green); transform: rotate(-.6deg); }
.card.c4 { background: var(--yellow); transform: rotate(.8deg); }
.scan-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 28px; align-items: center; }
.scan-demo canvas { width: 100%; aspect-ratio: 4/3; background: #000; border-radius: 12px; display: block; }
.framebar { display: flex; height: 54px; border: 4px solid var(--ink); border-radius: 10px; overflow: hidden; font-family: var(--head); font-size: 12px; box-shadow: var(--shadow); }
.framebar div { display: grid; place-items: center; color: var(--ink); text-align: center; line-height: 1.05; }
.framebar .s { background: var(--yellow); flex: 240; }
.framebar .c { background: var(--green); flex: 192; }
.framebar .g { background: var(--chrome); flex: 24; }
.framebar .d { background: linear-gradient(90deg, var(--pink), var(--cyan)); flex: 4320; }
.spec-list { font-family: var(--mono); font-size: 22px; line-height: 1.25; margin: 18px 0 0; padding: 0; list-style: none; }
.spec-list li::before { content: '▶ '; color: var(--pink); }

/* ---------- DEMO TAPES ---------- */
.tapes { display: flex; gap: 14px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; }
.tape {
  flex: 0 0 180px; scroll-snap-align: start; cursor: pointer;
  border: 4px solid var(--ink); border-radius: 12px; padding: 10px 10px 12px;
  background: linear-gradient(180deg, #2b2b33, #15151b); color: #fff; text-align: left;
  box-shadow: 5px 5px 0 var(--ink); font-family: var(--head); font-size: 14px;
  transition: transform .15s;
}
.tape:hover { transform: translateY(-4px) rotate(-1deg); }
.tape[aria-pressed="true"] { outline: 4px solid var(--yellow); outline-offset: 2px; }
.tape .label { border-radius: 6px; padding: 6px 8px; color: var(--ink); margin-bottom: 8px; }
.tape .reels { display: flex; justify-content: space-around; align-items: center; height: 46px; background: #0b0b10; border-radius: 22px; border: 2px solid #555; }
.tape .reel { width: 34px; height: 34px; border-radius: 50%; background: repeating-conic-gradient(#ddd 0 20deg, #555 20deg 60deg); border: 3px solid #999; }
.tape[aria-pressed="true"] .reel { animation: spin 1.2s linear infinite; }
.tape .side { font-family: var(--mono); font-size: 18px; color: var(--chrome); margin-top: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

.compare { position: relative; width: 100%; aspect-ratio: 4/3; background: #000; border-radius: 14px; overflow: hidden; touch-action: pan-y; user-select: none; cursor: ew-resize; }
.compare video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.compare .after { clip-path: inset(0 0 0 var(--split, 50%)); }
.compare .divider { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 4px; margin-left: -2px; background: var(--yellow); box-shadow: 0 0 14px var(--yellow); pointer-events: none; }
.compare .knob { position: absolute; top: 50%; left: var(--split, 50%); transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: var(--yellow); border: 4px solid var(--ink); display: grid; place-items: center; font-family: var(--head); color: var(--ink); pointer-events: none; box-shadow: 4px 4px 0 var(--ink); }
.compare .tagL, .compare .tagR { position: absolute; top: 10px; font-family: var(--head); font-size: clamp(11px, 2vw, 15px); padding: 4px 10px; border: 3px solid var(--ink); border-radius: 8px; pointer-events: none; }
.compare .tagL { left: 10px; background: var(--cyan); color: var(--ink); }
.compare .tagR { right: 10px; background: var(--pink); color: var(--ink); }
.compare-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.compare-controls input[type=range] { flex: 1 1 200px; }
.demo-caption { font-family: var(--mono); font-size: 22px; color: var(--chrome); margin-top: 10px; min-height: 2.5em; }

/* ---------- THE DECK (web app) ---------- */
.deck { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.screens { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.screen { position: relative; background: #000; border-radius: 16px; overflow: hidden; border: 4px solid var(--ink); box-shadow: 0 0 0 3px var(--chrome-dark), 0 0 30px rgba(0,240,255,.25); }
.screen canvas { width: 100%; aspect-ratio: 4/3; display: block; image-rendering: auto; }
.screen.big { grid-column: 1 / -1; }
.screen .lbl { position: absolute; left: 8px; top: 8px; font-family: var(--head); font-size: 12px; padding: 3px 8px; border-radius: 6px; border: 2px solid var(--ink); }
.screen .lbl.a { background: var(--cyan); color: var(--ink); }
.screen .lbl.b { background: var(--pink); color: var(--ink); }
.screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.55)); }
.hud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-family: var(--mono); font-size: 22px; }
.hud .pill { padding: 2px 12px; border: 3px solid var(--ink); border-radius: 999px; background: #1b1b22; }
.hud .pill.on { background: var(--green); color: var(--ink); box-shadow: 0 0 14px var(--green); }
.hud .pill.free { background: var(--yellow); color: var(--ink); }
.controls label { display: block; font-family: var(--head); font-size: 14px; margin: 14px 0 6px; color: var(--cyan); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { font-family: var(--head); font-size: 13px; padding: 8px 12px; border-radius: 10px; border: 3px solid var(--ink); background: #2a1458; color: #fff; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--pink); color: var(--ink); box-shadow: 0 0 12px var(--pink); }
input[type=range] { width: 100%; accent-color: var(--pink); }
.knob-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-family: var(--mono); font-size: 20px; }
.transport { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.scope { width: 100%; aspect-ratio: 1; background: #020; border-radius: 50%; border: 4px solid var(--ink); box-shadow: inset 0 0 30px rgba(57,255,20,.35), 0 0 0 3px var(--chrome-dark); display: block; margin-top: 16px; max-width: 260px; margin-inline: auto; }
.note { font-family: var(--mono); font-size: 20px; color: var(--chrome); }
.loading-tape { height: 22px; border: 3px solid var(--ink); border-radius: 12px; background: #111; overflow: hidden; margin-top: 10px; display: none; }
.loading-tape i { display: block; height: 100%; width: 40%; background: repeating-linear-gradient(90deg, var(--pink) 0 14px, var(--cyan) 14px 28px); animation: load 1s linear infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- DOWNLOADS ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.dl {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink);
  padding: 18px; border-radius: var(--radius); border: 4px solid var(--ink); box-shadow: var(--shadow);
  background: linear-gradient(180deg, #fff, var(--chrome) 50%, #b6bbca 51%, #eef0f6);
  transition: transform .12s;
}
.dl:hover { transform: translateY(-4px) rotate(-1deg); }
.dl .ico { font-size: 40px; line-height: 1; }
.dl b { font-family: var(--head); font-size: 20px; }
.dl span { font-family: var(--mono); font-size: 19px; line-height: 1.1; }
.dl.pwa { background: linear-gradient(180deg, var(--yellow), #ffb800); }
pre.cmd { background: var(--ink); color: var(--green); font-family: var(--mono); font-size: 20px; padding: 14px 16px; border-radius: 12px; overflow-x: auto; border: 3px solid var(--green); margin: 16px 0 0; }

footer { padding: 40px 0 60px; text-align: center; font-family: var(--mono); font-size: 22px; color: var(--chrome); border-top: 4px solid var(--pink); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .deck { grid-template-columns: 1fr; }
  .scan-demo { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  section { padding: 52px 0; }
  .screens { grid-template-columns: 1fr; }
  nav.top .brand span { display: none; }
  .framebar { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
