/* ---------- Theme tokens ---------- */
:root, :root[data-theme="light"] {
  --bg: #FBF9FF; --surface: #FFFFFF; --text: #17132B; --muted: #5A5677;
  --border: #E2DDF6; --border2: #CFC8EE; --field: #857DB0;
  --dots: rgba(23,19,43,.08); --cyan: #0E7490; --lime: #4D7C0F;
  --accent: #FF2E93; --accent-text: #CC2576; --glow: #FF2E9340;
  --shadow: 0 12px 32px rgba(70,50,160,.12); --bl: .7;
  --on-accent: #17132B; --heart: #E5203A; --heart-hi: #FF8A98;
  --pixel: 'Pixelify Sans', 'Courier New', monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #14102B; --surface: #1F1A40; --text: #F6F4FF; --muted: #BDB8E0;
  --border: #352E66; --border2: #4A428A; --field: #7A70C0;
  --dots: rgba(255,255,255,.07); --cyan: #22D3EE; --lime: #B6FF3B;
  --accent-text: #FF2E93; --glow: #FF2E9355;
  --shadow: 0 12px 32px rgba(0,0,0,.35); --bl: .9;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; overflow-x: hidden; overflow-x: clip;   /* clip also stops sideways panning on iOS Safari */
  -webkit-tap-highlight-color: transparent;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dots) 1px, transparent 1.6px);
  background-size: 12px 12px;
  color: var(--text); font-family: var(--sans); line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { max-width: 100%; }
a:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
input::placeholder { color: var(--muted); opacity: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 48px; }
.pixel-svg { shape-rendering: crispEdges; flex: none; }

/* ---------- Type ---------- */
h1, h2 { margin: 0; font-family: var(--pixel); font-weight: 500; letter-spacing: 1px; word-spacing: .22em; line-height: 1.18; }
h1 { font-size: clamp(42px, 6.6vw, 76px); }
h2 { font-size: clamp(34px, 5vw, 52px); }
/* Hero headline: readable sans words, only the 64×64 stays pixelated */
.hero-title { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; word-spacing: normal; line-height: 1.1; }
.hero-title .hl { font-family: var(--pixel); font-weight: 500; letter-spacing: 1px; white-space: nowrap; }
h3 { margin: 0; font-size: 21px; font-weight: 600; }
p { margin: 0; }
.lead { max-width: 540px; font-size: 20px; line-height: 1.55; color: var(--muted); }
.body { font-size: 16px; line-height: 1.55; color: var(--muted); }
.kicker { display: flex; align-items: center; gap: 12px; font-family: var(--pixel); font-size: 15px; letter-spacing: 3px; color: var(--cyan); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.hl { color: var(--accent-text); text-shadow: 0 0 14px var(--glow); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 30px; border-radius: 999px; font-size: 17px; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn-primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-ghost { background: var(--surface); border-color: var(--border2); color: var(--text); }
.btn-sm { min-height: 44px; padding: 0 22px; font-size: 16px; }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 16px var(--glow); } 50% { box-shadow: 0 0 38px var(--glow); } }
.seg { min-height: 44px; padding: 0 16px; border: 1px solid var(--border2); border-radius: 999px; font-size: 15px; font-weight: 500; cursor: pointer; background: var(--surface); color: var(--text); }
.seg[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Nav ---------- */
/* Sticky bar: transparent at the top, frosted background once the page scrolls. */
.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; transition: background-color .2s, border-color .2s, box-shadow .2s; }
.topbar.scrolled { background: var(--bg); background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border-bottom-color: var(--border); box-shadow: 0 6px 24px rgba(40,30,100,.06); }
section[id] { scroll-margin-top: 88px; }   /* anchor jumps land below the bar */
.nav-link[aria-current="true"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav { position: relative; z-index: 5; padding-top: 20px; padding-bottom: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--pixel); font-weight: 700; font-size: 30px; letter-spacing: 2px; }
.logo-mark { display: block; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 16px; color: var(--muted); }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; }
.nav-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }
.lang { display: inline-flex; padding: 2px; background: var(--surface); border: 1px solid var(--border2); border-radius: 999px; }
.lang button { min-width: 44px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; background: transparent; color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.theme-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; background: var(--surface); color: var(--text); border: 1px solid var(--border2); border-radius: 999px; font-size: 15px; font-weight: 500; cursor: pointer; }
:root[data-theme="dark"] .icon-moon, :root:not([data-theme="dark"]) .icon-sun { display: none; }

/* ---------- Hero ---------- */
.hero { padding-top: 48px; padding-bottom: 104px; display: flex; flex-wrap: wrap; align-items: center; gap: 72px; }
.hero-copy { position: relative; z-index: 1; flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero-visual { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.panel-wrap { position: relative; width: 416px; max-width: 100%; }
.backlight-wash { position: absolute; left: -8%; top: -8%; width: 116%; height: 116%; filter: blur(40px) saturate(1.5); opacity: var(--bl); }
.backlight-rim { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); border-radius: 24px; filter: blur(12px) saturate(1.5); }
.bezel { position: relative; padding: 16px; background: #14102B; border: 1px solid #352E66; border-radius: 20px; box-shadow: var(--shadow); }
.screen { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #000; overflow: hidden; border-radius: 4px; }
.screen img, .screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; filter: saturate(1.25) contrast(1.05); }
.led-mask { position: absolute; inset: 0; background-image: radial-gradient(circle at center, transparent 0, transparent 30%, rgba(0,0,0,.94) 56%); background-size: 6px 6px; }
.deco { position: absolute; z-index: 2; }
.now { position: relative; z-index: 1; width: 416px; max-width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.now-label { font-family: var(--pixel); font-size: 14px; letter-spacing: 2px; color: var(--muted); }
.now-title { font-size: 18px; font-weight: 500; }
.now-artist { font-size: 15px; color: var(--muted); }
.eq { display: flex; align-items: flex-end; gap: 4px; height: 28px; }
.eq span { width: 5px; height: 28px; background: var(--lime); transform-origin: bottom; animation: eq 1.1s ease-in-out infinite; }
.eq span:nth-child(2) { animation-delay: -.4s; } .eq span:nth-child(3) { animation-delay: -.8s; } .eq span:nth-child(4) { animation-delay: -.2s; }
@keyframes eq { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.bob { animation: bob 2.8s steps(4) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Cards / steps / features ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 24px; }
.card { display: flex; flex-direction: column; gap: 12px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.step { flex: 1 1 300px; min-width: 0; gap: 16px; }
.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-num { font-family: var(--pixel); font-size: 44px; font-weight: 700; color: var(--accent-text); text-shadow: 0 0 18px var(--glow); }
.step h3 { font-size: 22px; }
.callout { align-self: flex-start; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 22px; background: var(--surface); border: 2px solid var(--cyan); border-radius: 999px; }
.callout strong { font-family: var(--pixel); font-weight: 500; font-size: 16px; letter-spacing: 2px; color: var(--cyan); }
.callout span { font-size: 15px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card-rgb { border: 2px solid var(--accent); box-shadow: 0 0 40px var(--glow); }
.card-soon { border: 2px dashed var(--border2); box-shadow: none; }
.t-accent { color: var(--accent-text); } .t-cyan { color: var(--cyan); } .t-lime { color: var(--lime); }
.rgb-dots { display: inline-flex; gap: 4px; }
.rgb-dots span { width: 10px; height: 10px; }
.tag { font-family: var(--pixel); font-size: 14px; letter-spacing: 2px; padding: 4px 10px; border: 1px solid var(--border2); border-radius: 999px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- Try it ---------- */
.stage { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 88px 24px; border-radius: 24px; border: 1px solid var(--border2); transition: background-color .2s; }
.stage-glow { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 520px; max-width: 130%; aspect-ratio: 1 / 1; filter: blur(54px); transition: opacity .2s; }
.stage .panel-wrap { width: 352px; z-index: 1; }
.stage .led-mask { background-size: 5px 5px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.ctrl-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ctrl-label { font-size: 15px; color: var(--muted); margin-right: 4px; }
.upload { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 600; cursor: pointer; }
.upload:focus-within { outline: 3px solid var(--cyan); outline-offset: 3px; }
.room { display: flex; align-items: center; gap: 12px; flex: 1 1 280px; max-width: 420px; }
.room input { flex: 1; min-width: 120px; min-height: 44px; accent-color: var(--accent); }
.room output { font-size: 15px; min-width: 44px; text-align: right; }
.error { font-size: 15px; color: var(--accent-text); }

/* ---------- Specs / FAQ ---------- */
.specs { display: flex; flex-wrap: wrap; gap: 48px 80px; padding-top: 96px; padding-bottom: 96px; }
.specs-head { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.spec-list { flex: 2 1 480px; min-width: 0; margin: 0; }
.spec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--border2); }
.spec-row dt { flex: none; color: var(--muted); }
.spec-row dd { flex: 1 1 auto; min-width: 0; margin: 0; font-weight: 500; text-align: right; }   /* long values wrap in place, still right-aligned */
.faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.faq-item { display: flex; flex-direction: column; gap: 10px; padding: 24px 0; border-top: 2px solid var(--border2); }
.faq-item h3 { font-size: 20px; }

/* ---------- Waitlist ---------- */
.waitlist { padding-top: 48px; padding-bottom: 96px; }
.waitlist-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding: 56px 40px; background: var(--surface); border: 1px solid var(--border2); border-radius: 24px; box-shadow: 0 0 80px var(--glow); }
.wl-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; width: 100%; max-width: 640px; }
.field { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; color: var(--muted); }
.field input { width: 100%; min-height: 52px; padding: 0 18px; background: var(--bg); color: var(--text); border: 1px solid var(--field); border-radius: 12px; font-size: 16px; }
.wl-form .btn { border-radius: 12px; }
.wl-form .btn[disabled] { opacity: .6; cursor: progress; }
.wl-status { min-height: 1.5em; font-size: 16px; }
.wl-status.ok { color: var(--lime); font-weight: 500; }
.wl-status.err { color: var(--accent-text); }

/* ---------- Links in text / legal pages ---------- */
.text-link { color: var(--cyan); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.legal { max-width: 760px; padding-top: 24px; padding-bottom: 96px; }
.legal article { display: flex; flex-direction: column; gap: 16px; }
.legal article[hidden] { display: none; }
.legal h1 { font-size: clamp(34px, 6vw, 52px); }
.legal h2 { margin-top: 24px; font-family: var(--sans); font-size: 22px; font-weight: 600; letter-spacing: 0; word-spacing: normal; }
.legal p, .legal li { font-size: 17px; line-height: 1.65; color: var(--muted); }
.legal strong { color: var(--text); font-weight: 600; }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.legal a:not(.btn) { color: var(--cyan); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.legal-date { font-size: 15px !important; }
.legal-back { margin-top: 24px; }

/* ---------- Footer ---------- */
.footer { padding-top: 32px; padding-bottom: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border2); color: var(--muted); font-size: 15px; }
.footer .logo { font-size: 18px; color: var(--text); min-height: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cyan); font-weight: 500; }

@media (max-width: 720px) {
  .deco-hide { display: none; }
  .waitlist-card { padding: 40px 24px; }

  /* Header: one row (logo + language + theme icon); section links and the header CTA
     are dropped since the hero already has both buttons right below. */
  .nav { flex-wrap: nowrap; padding-top: 12px; padding-bottom: 12px; gap: 12px; }
  section[id] { scroll-margin-top: 72px; }
  /* Once the hero buttons are off screen, swap language/theme for the waitlist button */
  .topbar.past-hero .nav-links .lang, .topbar.past-hero .nav-links .theme-btn { display: none; }
  .topbar.past-hero .nav-links .nav-cta { display: inline-flex; min-height: 40px; padding: 0 18px; font-size: 15px; animation: pop-in .2s ease-out; }
  .logo { font-size: 26px; }
  .nav-links { flex-wrap: nowrap; gap: 8px; }
  .nav-links .nav-link, .nav-links .btn { display: none; }
  .lang button { min-width: 40px; padding: 0 6px; }
  .theme-btn { padding: 0; width: 44px; justify-content: center; }
  #theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* Tighter vertical rhythm */
  .hero { padding-top: 24px; padding-bottom: 56px; gap: 48px; }
  .hero-copy { gap: 22px; }
  .lead { font-size: 18px; }
  .hero-ctas .btn { flex: 1 1 200px; }
  .section { padding-top: 44px; padding-bottom: 44px; gap: 32px; }
  .specs { padding-top: 44px; padding-bottom: 44px; gap: 24px; }
  .waitlist { padding-top: 24px; padding-bottom: 56px; }
  .card { padding: 24px; }
  .steps, .features { gap: 16px; }
  .stage { padding: 64px 16px; }
  /* Smaller panel so the backlight has room to show around it */
  .stage .panel-wrap { width: 62%; max-width: 240px; }
  .stage .bezel { padding: 10px; border-radius: 14px; }
  .stage .led-mask { background-size: 4px 4px; }
  .stage-glow { width: 105%; max-width: none; filter: blur(40px); }
  .controls { gap: 16px 24px; }
}
@media (max-width: 360px) {
  .logo { font-size: 22px; }
  .lang button { min-width: 36px; }
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .topbar, .nav-cta { transition: none; animation: none !important; }
  html { scroll-behavior: auto; }
  .pulse, .eq span, .bob { animation: none; }
}
