/* CStream Player — marketing site.
   Deliberately dependency-free: no build step, no CDN, no web fonts. It has to
   load fast on a phone in a shop and keep working if npm, a CDN or a font host
   is having a bad day. Colours match the app (red #dc2626 on near-black). */

:root {
  --red: #dc2626;
  --red-hi: #ef4444;
  --bg: #0a0a0b;
  --bg-2: #121214;
  --card: #17171a;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5f5f6;
  --muted: #9b9ba3;
  --radius: 16px;
  --max: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ── header ─────────────────────────────────────────────────────────────── */

header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 16px; height: 64px; }
/* nowrap: at 375px "CStream Player" otherwise breaks after "CStream" and doubles
   the header height, shoving the hero down the page. */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }
.brand svg { width: 32px; height: 32px; border-radius: 22%; flex-shrink: 0; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
@media (max-width: 720px) { .nav-links .hide-sm { display: none; } }
@media (max-width: 420px) {
  .brand { font-size: 16px; gap: 8px; }
  .brand svg { width: 28px; height: 28px; }
  .nav-links { gap: 14px; }
  .wrap { padding: 0 16px; }
}

/* ── buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 12px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s;
  font-family: inherit;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hi); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero { padding: 88px 0 72px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 20% auto 20%; height: 460px;
  background: radial-gradient(ellipse at center, rgba(220, 38, 38, .17), transparent 68%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero .mark { width: 84px; height: 84px; border-radius: 22%; margin: 0 auto 26px; display: block; box-shadow: 0 0 60px rgba(220, 38, 38, .35); }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; margin-bottom: 18px; }
.hero p.lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); max-width: 620px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
/* Not scoped to .hero — the download section uses it too, and there it was
   inheriting body text: white, 16px, jammed under the buttons. */
.fineprint { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ── sections ───────────────────────────────────────────────────────────── */

section { padding: 72px 0; border-top: 1px solid var(--line); }
section h2 { font-size: clamp(24px, 3.6vw, 34px); letter-spacing: -0.02em; font-weight: 800; margin-bottom: 12px; text-align: center; }
section .sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 44px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); }
.card .ico { width: 38px; height: 38px; border-radius: 10px; background: rgba(220, 38, 38, .13); color: var(--red-hi);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.card .ico svg { width: 20px; height: 20px; }

/* ── pricing ────────────────────────────────────────────────────────────── */

.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 800px; margin: 0 auto; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; position: relative; }
.plan.featured { border-color: var(--red); }
.plan .tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; padding: 4px 12px; border-radius: 99px; white-space: nowrap; }
.plan .name { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 2px; }
.plan .price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan ul { list-style: none; text-align: left; margin: 22px 0; display: grid; gap: 9px; }
.plan li { font-size: 14px; color: var(--muted); padding-left: 24px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--red-hi); font-weight: 800; }

.notice {
  max-width: 800px; margin: 26px auto 0; padding: 16px 20px; border-radius: 12px;
  background: rgba(220, 38, 38, .08); border: 1px solid rgba(220, 38, 38, .28);
  font-size: 14px; color: #f0c9c9; text-align: center;
}

/* ── steps ──────────────────────────────────────────────────────────────── */

.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff;
  font-weight: 800; font-size: 14px; margin-bottom: 14px;
}
.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); }

.keydemo { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .12em; background: #000; border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 7px; font-size: 14px; display: inline-block; }

/* ── faq ────────────────────────────────────────────────────────────────── */

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--red-hi); font-weight: 800; font-size: 18px; }
.faq details[open] summary::before { content: "−"; }
.faq p { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ── legal / prose ──────────────────────────────────────────────────────── */

.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.prose .updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.prose h2 { font-size: 19px; font-weight: 700; margin: 30px 0 8px; text-align: left; }
.prose p, .prose li { color: var(--muted); font-size: 15px; }
.prose ul { margin: 10px 0 10px 22px; display: grid; gap: 6px; }
.prose strong { color: var(--text); }

/* ── footer ─────────────────────────────────────────────────────────────── */

footer { border-top: 1px solid var(--line); padding: 40px 0; background: var(--bg-2); }
.foot { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; font-size: 13px; color: var(--muted); }
.foot .links { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.foot a:hover { color: var(--text); }
.disclaimer { margin-top: 22px; font-size: 12px; color: #6d6d76; line-height: 1.6; }

/* ── icons ──────────────────────────────────────────────────────────────── */

/* The sprite itself is never drawn — only its <symbol>s, via <use>. */
.sprite { display: none; }
/* Default fill for the solid glyphs (zap, play); the outline ones set their own
   stroke="currentColor" fill="none" on the symbol. */
svg { fill: currentColor; }
.ico-sm { width: 16px; height: 16px; flex-shrink: 0; }

/* ── language picker ────────────────────────────────────────────────────── */

.lang-pick { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.lang-pick select {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 9px;
  cursor: pointer; transition: border-color .2s, color .2s;
}
.lang-pick select:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.lang-pick select:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 2px; }
/* The dropdown list itself is drawn by the OS, which uses the page background
   only in some browsers — force a dark option row so it isn't white-on-white. */
.lang-pick option { background: #17171a; color: var(--text); }
@media (max-width: 560px) { .lang-pick .ico-sm { display: none; } }

/* Arabic: flip the few places that are pinned to one side by hand. Everything
   else follows dir="rtl" on its own. */
[dir="rtl"] .nav-links { margin-left: 0; margin-right: auto; }
[dir="rtl"] .foot .links { margin-left: 0; margin-right: auto; }
[dir="rtl"] .plan ul, [dir="rtl"] .ticks { text-align: right; }
[dir="rtl"] .plan li, [dir="rtl"] .ticks li { padding-left: 0; padding-right: 24px; }
[dir="rtl"] .plan li::before, [dir="rtl"] .ticks li::before { left: auto; right: 0; }
[dir="rtl"] h2.left { text-align: right; }

/* ── reveal on scroll ───────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .5s ease-out var(--d, 0ms), transform .5s cubic-bezier(.22,.9,.3,1) var(--d, 0ms);
}

/* ── showcase: the 3D device scene ──────────────────────────────────────── */

.showcase { overflow: hidden; }
.stage { position: relative; }
/* perspective on the parent, transforms on the children: that's what makes the
   two devices share one vanishing point instead of each tilting on its own. */
.scene {
  perspective: 1500px; perspective-origin: 50% 45%;
  display: flex; align-items: flex-end; justify-content: center; gap: 2.5%;
  padding: 10px 0 24px; min-height: 300px;
}
.dev { transform-style: preserve-3d; margin: 0; }
.dev .screen {
  background: #0d0d10; border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  overflow: hidden; position: relative;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.04) inset;
}
.dev figcaption {
  text-align: center; font-size: 12px; color: var(--muted); margin-top: 14px;
  letter-spacing: .04em; text-transform: uppercase; font-weight: 700;
}

/* Three devices in one row. The two flanking devices are angled INWARD toward
   the TV so the group has one focal point instead of three parallel slabs. */

/* TV — centre, largest, sits slightly forward */
.tv { width: min(560px, 46vw); transform: rotateX(6deg) translateZ(40px); animation: floatTv 9s ease-in-out infinite; z-index: 3; }
.tv .screen { aspect-ratio: 16 / 9; }
.tv .stand { display: block; width: 26%; height: 7px; margin: 9px auto 0; border-radius: 0 0 8px 8px; background: rgba(255,255,255,.13); }
@keyframes floatTv {
  0%, 100% { transform: rotateX(6deg) translateZ(40px) translateY(0); }
  50%      { transform: rotateX(6deg) translateZ(40px) translateY(-10px); }
}

/* phone — left, turned in */
.phone {
  width: min(132px, 13vw); margin-bottom: 4px;
  transform: rotateY(20deg) rotateX(5deg);
  animation: floatPh 9s ease-in-out infinite .8s;
  position: relative; z-index: 2;
}
.phone .screen { aspect-ratio: 9 / 18; border-radius: 18px; }
.phone .mock { padding: 7px 6px 0; height: 100%; }
@keyframes floatPh {
  0%, 100% { transform: rotateY(20deg) rotateX(5deg) translateY(0); }
  50%      { transform: rotateY(20deg) rotateX(5deg) translateY(-14px); }
}

/* tablet — right, turned in the other way */
.tab {
  width: min(250px, 24vw); margin-bottom: 4px;
  transform: rotateY(-20deg) rotateX(5deg);
  animation: floatTab 9s ease-in-out infinite 1.6s;
  position: relative; z-index: 2;
}
.tab .screen { aspect-ratio: 4 / 3; border-radius: 14px; }
@keyframes floatTab {
  0%, 100% { transform: rotateY(-20deg) rotateX(5deg) translateY(0); }
  50%      { transform: rotateY(-20deg) rotateX(5deg) translateY(-12px); }
}

/* — real screenshots, when website/shots/ has any (see shots.js) — */
.dev .shot { display: none; width: 100%; height: 100%; object-fit: cover; }
.dev .shot-blur { display: none; position: absolute; pointer-events: none; }
.dev.has-shot .mock { display: none; }
.dev.has-shot .shot { display: block; }
.dev.has-shot .shot-blur {
  display: block;
  backdrop-filter: blur(9px) saturate(1.15);
  -webkit-backdrop-filter: blur(9px) saturate(1.15);
  background: rgba(10, 10, 12, .18);
}
/* Which part of each screenshot gets frosted. Percentages, so one rule holds at
   any capture resolution. Physical left/top on purpose — a screenshot's own
   layout doesn't flip when the PAGE is in RTL. */
.tv.has-shot .shot-blur    { top: 15%; left: 8%;  right: 0; bottom: 0; }
.tab.has-shot .shot-blur   { top: 16%; left: 10%; right: 0; bottom: 0; }
.phone.has-shot .shot-blur { top: 13%; left: 0;   right: 0; bottom: 9%; }

/* — the mock interface itself — */
/* Full height so .ui-body's calc() still measures against the screen after the
   mock was wrapped to make room for a screenshot beside it. */
.dev .mock { height: 100%; }
.ui-top { display: flex; align-items: center; gap: 5px; padding: 7px 9px; background: linear-gradient(#141418, rgba(20,20,24,0)); }
.ui-logo { width: 13px; height: 13px; border-radius: 4px; background: var(--red); flex-shrink: 0; }
.ui-logo.sm { width: 11px; height: 11px; }
.ui-word { width: 52px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.55); }
.ui-word.sm { width: 38px; height: 5px; }
.ui-search {
  margin-inline: auto; display: flex; align-items: center; gap: 5px;
  width: 34%; padding: 4px 8px; border-radius: 99px;
  background: rgba(255,255,255,.09); color: var(--red-hi);
}
.ui-search svg { width: 9px; height: 9px; flex-shrink: 0; }
.ui-search i { display: block; flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); }
.ui-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.1); flex-shrink: 0; }

.ui-body { display: flex; gap: 8px; padding: 0 9px 9px; height: calc(100% - 30px); }
.ui-side { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.ui-nav {
  width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.42);
}
.ui-nav svg { width: 11px; height: 11px; }
.ui-nav.on { background: var(--red); color: #fff; box-shadow: 0 4px 14px -4px rgba(220,38,38,.9); }

.ui-main { flex: 1; min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 6px; }
.ui-hero {
  flex: 0 0 36%; border-radius: 9px; position: relative; padding: 9px 11px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 5px;
  background:
    linear-gradient(90deg, rgba(10,10,12,.94) 22%, rgba(10,10,12,.15) 72%),
    linear-gradient(115deg, #7f1d1d, #3b0764 55%, #172554);
}
.ui-title { width: 46%; height: 8px; border-radius: 4px; background: rgba(255,255,255,.85); }
.ui-meta { width: 30%; height: 5px; border-radius: 3px; background: rgba(255,255,255,.4); }
.ui-btn {
  width: 26px; height: 12px; border-radius: 99px; background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.ui-btn svg { width: 7px; height: 7px; }

.ui-rowlabel { display: block; flex: none; width: 74px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.3); }
.ui-rowlabel.short { width: 54px; }
/* The rows share what the hero leaves, and each poster takes its width from the
   row's height. Sizing the other way round (flex:1 + aspect-ratio) made the
   posters as tall as the screen and pushed the second row out of the frame. */
.ui-row { flex: 1 1 0; min-height: 0; display: flex; gap: 6px; overflow: hidden; }
.ui-row .tile { flex: 0 0 auto; height: 100%; aspect-ratio: 2 / 3; }
.tile { border-radius: 6px; min-width: 0; }
.t1 { background: linear-gradient(150deg, #b91c1c, #431407); }
.t2 { background: linear-gradient(150deg, #1e40af, #0f172a); }
.t3 { background: linear-gradient(150deg, #6d28d9, #1e1b4b); }
.t4 { background: linear-gradient(150deg, #0f766e, #052e2b); }
.t5 { background: linear-gradient(150deg, #b45309, #431407); }
.t6 { background: linear-gradient(150deg, #be185d, #3b0764); }

/* phone interior */
.ph-top { display: flex; align-items: center; gap: 5px; padding: 0 3px 6px; }
.ph-search {
  display: flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 99px;
  background: rgba(255,255,255,.09); color: var(--red-hi); margin-bottom: 7px;
}
.ph-search svg { width: 8px; height: 8px; flex-shrink: 0; }
.ph-search i { display: block; flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.22); }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.ph-grid .tile { aspect-ratio: 2 / 3; }
.ph-tabs {
  position: absolute; inset-inline: 0; bottom: 0; display: flex; padding: 6px 4px 8px;
  background: rgba(0,0,0,.75); border-top: 1px solid rgba(255,255,255,.07);
}
.ph-tabs span { flex: 1; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.38); }
.ph-tabs span.on { color: var(--red-hi); }
.ph-tabs svg { width: 12px; height: 12px; }

/* the recording badge — the same pulse in the scene and in the spotlight */
.rec-chip {
  position: absolute; top: 9px; inset-inline-end: 9px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 99px; font-size: 9px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  background: rgba(220,38,38,.2); border: 1px solid rgba(248,113,113,.5); color: #fecaca;
}
.rec-chip i { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; animation: blink 1.6s ease-in-out infinite; }
.rec-chip.live { font-size: 11px; padding: 5px 11px; top: 14px; inset-inline-end: 14px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* callouts under the scene */
.callouts { list-style: none; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 10px; }
.callouts li {
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  opacity: 0; transform: translateY(14px);
}
.stage.in .callouts li {
  opacity: 1; transform: none;
  transition: opacity .5s ease-out var(--d), transform .5s cubic-bezier(.22,.9,.3,1) var(--d);
}
.callouts .ico-sm { color: var(--red-hi); }

/* Narrow screens: the tilt reads as "broken" at phone width, so flatten it —
   TV full width, phone and tablet side by side underneath it. */
@media (max-width: 760px) {
  /* Flat, and wrapped: the TV takes a line of its own (order:-1 puts it first,
     where it belongs), then the phone and tablet share the line below it. */
  .scene { perspective: none; flex-wrap: wrap; gap: 26px; padding-bottom: 10px; }
  .tv, .phone, .tab { transform: none; animation: none; margin: 0; }
  .tv { flex: 1 0 100%; width: 100%; order: -1; }
  .phone { width: 118px; }
  .tab { width: 210px; }
}
@media (max-width: 400px) {
  .phone { width: 96px; }
  .tab { width: 160px; }
}

/* ── spotlight (recording) ──────────────────────────────────────────────── */

.split { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
h2.left { text-align: left; }
.tag-inline {
  display: inline-block; margin-bottom: 14px; padding: 4px 11px; border-radius: 99px;
  background: rgba(220,38,38,.14); border: 1px solid rgba(220,38,38,.34); color: #fca5a5;
  font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
}
.lead-sm { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { font-size: 14px; color: var(--muted); padding-left: 24px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--red-hi); font-weight: 800; }

.dev.flat { width: 100%; }
.dev.flat .screen { aspect-ratio: 16 / 10; }
.ui-player { position: relative; width: 100%; height: 100%; background: linear-gradient(125deg, #1e1b4b, #0a0a0b 60%, #450a0a); }
.ui-frame {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.16);
}
.ui-frame svg { width: 54px; height: 54px; }
.ui-bar { position: absolute; inset-inline: 16px; bottom: 16px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.16); overflow: hidden; }
.ui-bar b { display: block; height: 100%; border-radius: 99px; background: var(--red); width: 34%; animation: creep 7s ease-in-out infinite; }
@keyframes creep { 0% { width: 22%; } 100% { width: 76%; } }

/* Profile picker mock. Four tiles on the TV-shaped screen — enough to read as
   "a household" at a glance without pretending to be a real screenshot. */
.ui-profiles {
  width: 100%; height: 100%; display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr); padding: 14px; align-content: center;
  background: linear-gradient(140deg, #0f172a, #0a0a0b 55%, #3b0764);
}
.pf {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  border-radius: 12px; padding: 12px 6px; color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
}
.pf svg { width: 24px; height: 24px; }
.pf b { font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.pf.kid { color: #fca5a5; background: rgba(220,38,38,.13); border-color: rgba(220,38,38,.32); }

/* The art column comes FIRST in the markup of the profiles section so the two
   spotlights alternate on a wide screen. On a narrow one that would open the
   section with a picture of nothing explained yet, so the text is pulled back
   above it. */
@media (max-width: 860px) {
  #profiles .split-art { order: 2; }
  #profiles .split-text { order: 1; }
}

/* ── the "type this into Downloader" box ────────────────────────────────── */

.codebox {
  margin: 40px auto 0; max-width: 620px; padding: 26px 22px; border-radius: 18px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
}
.codebox h3 { font-size: 19px; margin-bottom: 6px; }
.codebox .sub { margin-bottom: 18px; font-size: 14px; }
.code-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(0,0,0,.4); border: 1px solid rgba(220,38,38,.3);
}
.code-row code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Sized to be read from a sofa, because that is where it is read from. */
  font-size: clamp(18px, 4.4vw, 26px); font-weight: 700; letter-spacing: .01em;
  color: #fff; word-break: break-all; flex: 1 1 auto; text-align: center;
}
/* The Downloader code is the one thing on this page someone reads off a screen
   two metres away while holding a remote. It gets the room. */
.code-row.big code {
  font-size: clamp(34px, 9vw, 54px); letter-spacing: .12em; line-height: 1.1;
  word-break: normal;
}
.code-row.alt {
  margin-top: 12px; border-color: var(--line); background: rgba(0,0,0,.25);
}
.code-row.alt code { font-size: 13px; font-weight: 500; color: var(--muted); }
.code-label {
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); flex: 0 0 auto;
}
.btn-sm { padding: 7px 14px; font-size: 13px; flex: 0 0 auto; }
.codebox .fineprint { margin: 12px 0 0; }

/* ── where it runs ──────────────────────────────────────────────────────── */

.rail-label {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 20px;
}
.rail-label .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.22); flex-shrink: 0; }
.rail-label .dot.ok { background: #22c55e; box-shadow: 0 0 12px rgba(34,197,94,.7); }
.rail-label.soon { margin-top: 44px; }

.rail { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.rail.soon { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.plat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; text-align: center;
}
.plat .ico {
  width: 40px; height: 40px; border-radius: 11px; margin: 0 auto 13px;
  background: rgba(220,38,38,.13); color: var(--red-hi);
  display: flex; align-items: center; justify-content: center;
}
.plat .ico svg { width: 21px; height: 21px; }
.plat h4 { font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.plat p { font-size: 13px; color: var(--muted); }
/* "Coming soon" is stated, not sold — muted so it can't be mistaken for a
   platform you can buy today. */
.plat.dim { padding: 18px 14px; border-style: dashed; }
.plat.dim .ico { background: rgba(255,255,255,.06); color: var(--muted); width: 34px; height: 34px; margin-bottom: 10px; }
.plat.dim .ico svg { width: 18px; height: 18px; }
.plat.dim h4 { font-size: 14px; color: var(--muted); }
.plat.dim p { font-size: 12px; color: #6d6d76; }

/* ── one licence, two screens ───────────────────────────────────────────── */

.tag-inline.center { display: block; width: fit-content; margin: 0 auto 14px; }

.combos { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 820px; margin: 0 auto; }
.combo {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; text-align: center;
}
.combo h3 { font-size: 18px; font-weight: 700; margin-bottom: 7px; }
.combo p { font-size: 14px; color: var(--muted); }
.combo-art { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 18px; }
.combo-art .mini {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(220,38,38,.13); color: var(--red-hi); border: 1px solid rgba(220,38,38,.3);
}
.combo-art .mini svg { width: 26px; height: 26px; }
.combo-art .plus { font-size: 20px; font-weight: 800; color: var(--muted); }

/* ── motion & focus ─────────────────────────────────────────────────────── */

/* Keyboard users must be able to see where they are. Never remove this. */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--red-hi); outline-offset: 3px; border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal, .callouts li { opacity: 1; transform: none; }
  .tv, .phone { animation: none; }
}

/* ── admin ──────────────────────────────────────────────────────────────── */

.admin { max-width: 900px; margin: 0 auto; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  background: #0d0d0f; border: 1px solid var(--line); color: var(--text);
  padding: 11px 13px; border-radius: 10px; font-size: 15px; font-family: inherit; width: 100%;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--red); }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.out { background: #000; border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
  white-space: pre-wrap; word-break: break-all; max-height: 340px; overflow: auto; margin-top: 16px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pill.unused { background: rgba(255,255,255,.1); color: var(--muted); }
.pill.active { background: rgba(34,197,94,.15); color: #4ade80; }
.pill.revoked { background: rgba(220,38,38,.16); color: #f87171; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
td.key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }

/* ── opening animation (mirrors the app's splash) ───────────────────────── */

/* Driven by CSS ANIMATIONS, not by transitions toggled from a class on the next
   frame. A class flip needs the browser to paint the start state first; if that
   frame is skipped or coalesced, the transition never runs and the visitor gets
   2 seconds of blank screen instead of a logo. Animations start the moment the
   element is inserted, so the worst case is "logo appears instantly" — visible
   either way.

   Everything also starts from a VISIBLE state and animates from there, so a
   browser that ignores animations entirely still shows the mark. */
.cs-splash {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  background: #141414;
  opacity: 1; transition: opacity .6s ease;
}
.cs-splash.out { opacity: 0; pointer-events: none; }
.cs-splash-in {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  animation: cs-rise .8s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes cs-rise {
  from { transform: scale(.55); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.cs-splash-mark {
  width: 96px; height: 96px; border-radius: 22px;
  filter: drop-shadow(0 0 40px rgba(220,38,38,.5));
  animation: cs-breathe 1.5s ease-in-out .8s infinite alternate;
}
@keyframes cs-breathe {
  from { transform: rotate(-6deg) scale(1); }
  to   { transform: rotate(6deg) scale(1.08); }
}
.cs-splash-word {
  font-size: clamp(30px, 6vw, 46px); font-weight: 800; letter-spacing: -.02em; color: #fff;
  animation: cs-word .6s ease .4s both;
}
@keyframes cs-word {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.cs-splash-bar {
  height: 4px; border-radius: 99px; background: var(--red, #dc2626);
  animation: cs-bar 1s ease .8s both;
}
@keyframes cs-bar { from { width: 0; } to { width: 100px; } }

/* Someone who asked for less motion gets no title sequence at all. */
@media (prefers-reduced-motion: reduce) { .cs-splash { display: none; } }
