/* ==========================================================================
   SteamOS Companion — landing page
   Palette and rhythm follow store.steampowered.com/steamos: navy body,
   near-black header, blurred deep-blue hero collage, black FAQ slabs,
   Steam blue accents. Dependency-free: no framework, no build step.
   ========================================================================== */

:root {
  --bg: #1b2838;
  --bg-deep: #171a21;
  --panel: #16202d;
  --panel-2: #1c2b3b;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .15);
  --text: #c6d4df;
  --text-soft: #dfe6ec;
  --text-dim: #8f98a0;
  --blue: #66c0f4;
  --blue-bright: #1a9fff;
  --blue-deep: #417a9b;
  --green: #a1cd44;
  --red: #e57373;
  --amber: #ffb321;
  --grad-btn: linear-gradient(-60deg, #67c1f5 0%, #417a9b 100%);
  --grad-green: linear-gradient(-60deg, #a1cd44 0%, #5c7e10 100%);
  --font: "Motiva Sans", "Figtree", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: #fff; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code, pre, kbd { font-family: var(--mono); }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
svg[hidden] { display: none; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* --------------------------------------------------------------------------
   Top bar (Steam header: #171a21, uppercase tracked nav)
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23, 26, 33, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, .45);
}
.topbar .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.brand:hover { color: #fff; }
.brand .brand-mark { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #0d2c5e; }
.brand .brand-mark svg { width: 62%; height: 62%; }
.brand small { font-weight: 300; color: #b8b6b4; font-size: 18px; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: #b8b6b4; text-transform: uppercase; font-size: 13px; letter-spacing: .07em; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.nav a:hover { color: #fff; border-color: var(--blue); }
.topbar .btn { padding: 8px 14px; font-size: 13px; }
@media (max-width: 860px) { .nav { display: none; } .brand small { display: none; } }

/* --------------------------------------------------------------------------
   Buttons (Steam store btn_blue_steamui gradient)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 3px;
  font-weight: 600; font-size: 15px; color: #fff; white-space: nowrap;
  background: var(--grad-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 8px 20px -10px rgba(0, 0, 0, .7);
  transition: filter .15s, transform .15s, background .15s;
}
.btn:hover { filter: brightness(1.15); color: #fff; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-ghost { background: rgba(103, 193, 245, .12); color: var(--blue); box-shadow: inset 0 0 0 1px rgba(103, 193, 245, .35); }
.btn-ghost:hover { background: rgba(103, 193, 245, .24); color: #fff; filter: none; }
.btn-green { background: var(--grad-green); }

/* --------------------------------------------------------------------------
   Hero (SteamOS banner: blurred deep-blue collage, centred lockup)
   -------------------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: #0d2c5e;
  min-height: clamp(440px, 58vw, 600px);
  display: grid; place-items: center;
  padding: clamp(56px, 9vw, 110px) var(--gutter);
}
.collage {
  position: absolute; inset: -14%; z-index: -2;
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 1.6%;
  filter: blur(16px) saturate(1.15);
  transform: rotate(-7deg) scale(1.2);
  opacity: .95;
  animation: drift 26s ease-in-out infinite alternate;
}
.collage i { display: block; border-radius: 8px; aspect-ratio: 3 / 4; background: #1e4e9a; }
.collage i:nth-child(3n)    { background: #123b7d; }
.collage i:nth-child(4n+1)  { background: #2a68c4; }
.collage i:nth-child(5n+2)  { background: #0b2a5c; }
.collage i:nth-child(7n+3)  { background: #3b7fd8; }
.collage i:nth-child(6n+4)  { background: #0f3f8f; }
.collage i:nth-child(9n+5)  { background: #5a8fdc; }
.collage i:nth-child(11n+7) { background: #081d45; }
.collage i:nth-child(13n+2) { background: #7fb2ff; }
.collage i:nth-child(2n)    { transform: translateY(-22%); }
.hero-veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(55% 65% at 50% 42%, rgba(24, 82, 170, .38), rgba(9, 33, 74, 0) 72%),
    linear-gradient(180deg, rgba(8, 28, 64, .30) 0%, rgba(8, 28, 64, .12) 45%, rgba(27, 40, 56, .55) 84%, #1b2838 100%);
}
@keyframes drift { to { transform: rotate(-7deg) scale(1.2) translate(-2.5%, -2%); } }

.lockup { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 38px); flex-wrap: wrap; text-align: center; }
.mark {
  width: clamp(92px, 12vw, 150px); aspect-ratio: 1; border-radius: 50%;
  background: #fff; color: #0d2c5e; display: grid; place-items: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .4), 0 0 0 10px rgba(255, 255, 255, .06);
}
.mark svg { width: 58%; height: 58%; }
.wordmark {
  color: #fff; font-size: clamp(30px, 6.4vw, 74px); line-height: 1;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  display: flex; gap: .28em; flex-wrap: wrap; justify-content: center;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
}
.wordmark .light { font-weight: 300; }
.hero-tag {
  margin: clamp(22px, 3vw, 34px) auto 0; max-width: 62ch; text-align: center;
  font-size: clamp(17px, 2vw, 21px); color: #e6edf5; font-weight: 300; line-height: 1.5;
}
.hero-meta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  color: #e6edf5; font-size: 13px; font-weight: 500; backdrop-filter: blur(4px);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.pill code { font-size: 12.5px; color: #fff; }

/* --------------------------------------------------------------------------
   Intro paragraph + CTA (SteamOS "SteamOS is Valve's Linux-based…" block)
   -------------------------------------------------------------------------- */
.intro { padding: clamp(28px, 4vw, 48px) 0 8px; }
.intro p { font-size: clamp(17px, 1.5vw, 19px); color: var(--text-soft); margin: 0; }
.brand-name { color: var(--blue); font-weight: 700; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; align-items: center; }
.cta-note { color: var(--text-dim); font-size: 14px; margin-left: 6px; }
.cta-note code { color: var(--text); }

/* --------------------------------------------------------------------------
   Section scaffolding
   -------------------------------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 80ch; margin-bottom: clamp(28px, 4vw, 48px); }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 700; color: var(--blue); margin-bottom: 12px; }
.section-title { margin: 0 0 .4em; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; font-weight: 500; color: #fff; letter-spacing: -.005em; }
.section-lede { margin: 0; font-size: clamp(17px, 1.5vw, 19px); color: var(--text); }

/* --------------------------------------------------------------------------
   Pairing flow (animated)
   -------------------------------------------------------------------------- */
.flow { background: linear-gradient(180deg, #1b2838 0%, #131d29 18%, #131d29 82%, #1b2838 100%); border-block: 1px solid var(--line); }
.stage {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(84px, 10vw, 150px) minmax(0, 1fr);
  align-items: center; margin-top: 8px;
}
.device { position: relative; z-index: 1; }
.role { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; color: var(--text-soft); font-weight: 600; font-size: 15px; flex-wrap: wrap; }
.role .tag { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; padding: 4px 8px; border-radius: 3px; background: rgba(102, 192, 244, .14); color: var(--blue); }
.role .tag.server { background: rgba(161, 205, 68, .14); color: var(--green); }
.role .addr { font-family: var(--mono); font-size: 12px; color: var(--text-dim); font-weight: 400; }

/* Client: Steam Deck silhouette. All internal sizes use --u (1% of the device
   width) so the mock-up scales as one unit and stays legible on phones. */
.deck { position: relative; width: 100%; aspect-ratio: 298 / 126; container-type: inline-size; --u: 1cqi; }
.deck-body {
  position: absolute; inset: 0; border-radius: calc(7 * var(--u));
  background: linear-gradient(180deg, #2b3038 0%, #1c2025 55%, #14171c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 -2px 0 rgba(0, 0, 0, .6), 0 34px 70px -30px rgba(0, 0, 0, .95);
}
.deck-body::before, .deck-body::after {
  content: ""; position: absolute; bottom: calc(-2.4 * var(--u)); width: calc(15 * var(--u)); height: calc(12 * var(--u));
  border-radius: 50%; background: linear-gradient(180deg, #1c2025, #101317); z-index: -1;
  box-shadow: 0 14px 24px -12px rgba(0, 0, 0, .9);
}
.deck-body::before { left: calc(.8 * var(--u)); }
.deck-body::after { right: calc(.8 * var(--u)); }
.ctl { position: absolute; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3a4048, #1a1e23 70%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 2px 5px rgba(0, 0, 0, .6); }
.stick { width: calc(7 * var(--u)); height: calc(7 * var(--u)); top: calc(5 * var(--u)); }
.stick.l { left: calc(5.4 * var(--u)); } .stick.r { right: calc(5.4 * var(--u)); }
.stick::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: #23272d; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .8); }
.dots { position: absolute; top: calc(14.6 * var(--u)); width: calc(6 * var(--u)); height: calc(6 * var(--u)); display: grid; grid-template-columns: 1fr 1fr; gap: calc(.8 * var(--u)); }
.dots.l { left: calc(5.9 * var(--u)); } .dots.r { right: calc(5.9 * var(--u)); }
.dots i { display: block; border-radius: 50%; background: #2a2f36; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.pad { position: absolute; top: calc(23.2 * var(--u)); width: calc(8 * var(--u)); height: calc(8 * var(--u)); border-radius: calc(1.3 * var(--u)); background: #1b1f25; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), inset 0 2px 6px rgba(0, 0, 0, .7); }
.pad.l { left: calc(4.9 * var(--u)); } .pad.r { right: calc(4.9 * var(--u)); }
.screen {
  position: absolute; left: calc(18 * var(--u)); right: calc(18 * var(--u)); top: calc(3.2 * var(--u)); bottom: calc(3.2 * var(--u));
  border-radius: calc(1.4 * var(--u)); background: #05080c; overflow: hidden;
  box-shadow: 0 0 0 calc(1.1 * var(--u)) #0b0e12, inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.gm { position: absolute; inset: 0; background: radial-gradient(70% 60% at 30% 25%, rgba(41, 86, 140, .6), transparent 70%), linear-gradient(180deg, #0f1c2b, #0a1019); }
.gm::before {
  content: ""; position: absolute; left: 5%; right: 5%; top: 50%; height: 36%; border-radius: 2px; opacity: .95;
  background: linear-gradient(90deg, #28466b 0 17%, transparent 17% 21%, #1f3e64 21% 38%, transparent 38% 42%, #2f5a86 42% 59%, transparent 59% 63%, #1a3555 63% 80%, transparent 80% 84%, #254a72 84% 100%);
}
.gm::after { content: ""; position: absolute; left: 5%; top: 12%; width: 32%; height: 6%; border-radius: 3px; background: linear-gradient(90deg, #6a86a3, #3b5876); }
.gm-dim { position: absolute; inset: 0; background: rgba(3, 6, 10, .55); }
.qam {
  position: absolute; top: 0; bottom: 0; right: 0; width: 63%;
  background: linear-gradient(180deg, rgba(14, 20, 27, .985), rgba(10, 15, 21, .985));
  border-left: 1px solid rgba(255, 255, 255, .07);
  box-shadow: calc(-2 * var(--u)) 0 calc(4 * var(--u)) rgba(0, 0, 0, .5);
  display: flex; flex-direction: column;
}
.qam-head { display: flex; align-items: center; gap: calc(1.2 * var(--u)); padding: calc(1.6 * var(--u)) calc(2.4 * var(--u)) calc(1 * var(--u)); color: #fff; font-weight: 700; font-size: calc(2.1 * var(--u)); }
.qam-head .back { width: calc(3.2 * var(--u)); height: calc(2.6 * var(--u)); border-radius: calc(.5 * var(--u)); background: #2a323c; display: grid; place-items: center; color: #fff; font-size: calc(1.8 * var(--u)); font-weight: 400; }
.qam-body { position: relative; flex: 1; }
.qam .state {
  position: absolute; inset: 0; padding: calc(1.2 * var(--u)) calc(2.4 * var(--u)) calc(2 * var(--u));
  opacity: 0; transform: translateY(calc(1.4 * var(--u)));
  transition: opacity .38s ease, transform .38s ease; pointer-events: none;
  display: flex; flex-direction: column; gap: calc(.85 * var(--u));
}
.qam .state.is-on { opacity: 1; transform: none; }
.q-kicker { font-size: calc(1.55 * var(--u)); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8f98a0; }
.q-line { font-size: calc(2.05 * var(--u)); color: #e6ecf1; line-height: 1.3; display: flex; gap: calc(.8 * var(--u)); align-items: center; flex-wrap: wrap; }
.q-line svg.i { width: calc(2 * var(--u)); height: calc(2 * var(--u)); }
.q-dim { color: #8f98a0; }
.q-ok { color: var(--green); }
.q-mono { font-family: var(--mono); font-size: calc(1.7 * var(--u)); color: #9fd3f5; word-break: break-all; line-height: 1.3; }
.q-btn { font-size: calc(1.95 * var(--u)); color: #e6ecf1; border: 1px solid rgba(255, 255, 255, .14); border-radius: calc(.6 * var(--u)); padding: calc(1 * var(--u)) calc(1.4 * var(--u)); background: #1b2531; }
.q-btn.primary { background: #2a5a86; border-color: #3f7cb1; }
.q-btn.danger { color: #f0a5a5; border-color: rgba(240, 120, 120, .4); }
.q-btn.armed { animation: press 1.1s ease .9s 1 both; }
@keyframes press { 0%, 100% { box-shadow: none; } 40% { background: #4c95d1; box-shadow: 0 0 0 calc(.6 * var(--u)) rgba(102, 192, 244, .4); } }
.q-row { display: flex; gap: calc(1 * var(--u)); }
.q-row .q-btn { flex: 1; text-align: center; }
.q-code { font-family: var(--mono); font-weight: 500; font-size: calc(5 * var(--u)); color: #67c1f5; letter-spacing: .04em; line-height: 1; margin: calc(.5 * var(--u)) 0; display: flex; gap: calc(.5 * var(--u)); }
.q-code span { display: inline-block; min-width: .62em; text-align: center; }
.q-code .gap { min-width: .35em; }
.q-code.rolling span { color: #9fd3f5; }
.q-prog { height: calc(.9 * var(--u)); background: #1b2531; border-radius: calc(1 * var(--u)); overflow: hidden; margin-top: calc(.4 * var(--u)); }
.q-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #67c1f5, #1a9fff); animation: fill 2.6s ease-out forwards; }
@keyframes fill { to { width: 100%; } }
.q-badge { display: inline-flex; align-items: center; gap: calc(.8 * var(--u)); font-size: calc(1.8 * var(--u)); font-weight: 600; padding: calc(.6 * var(--u)) calc(1.1 * var(--u)); border-radius: calc(.5 * var(--u)); background: rgba(161, 205, 68, .14); color: var(--green); width: max-content; }
.q-badge svg.i { width: calc(1.9 * var(--u)); height: calc(1.9 * var(--u)); stroke-width: 2.4; }
.q-radio { display: flex; gap: calc(1.1 * var(--u)); align-items: flex-start; font-size: calc(1.8 * var(--u)); color: #e6ecf1; border: 1px solid rgba(255, 255, 255, .12); border-radius: calc(.6 * var(--u)); padding: calc(.9 * var(--u)) calc(1.2 * var(--u)); background: #1b2531; }
.q-radio.on { border-color: #4b8ccf; background: #233a55; }
.q-radio i { width: calc(1.7 * var(--u)); height: calc(1.7 * var(--u)); border-radius: 50%; border: calc(.25 * var(--u)) solid #cfd8e0; margin-top: calc(.3 * var(--u)); flex: none; }
.q-radio.on i { background: #fff; }
.q-radio b { display: block; font-size: calc(1.9 * var(--u)); line-height: 1.2; }
.q-radio small { display: block; font-size: calc(1.5 * var(--u)); color: #8f98a0; line-height: 1.25; }

/* Server: TV + Steam Machine-style cube. Shares --u with .deck so both devices
   render the Companion panel at the same scale. */
.machine { position: relative; width: 100%; aspect-ratio: 298 / 126; container-type: inline-size; --u: 1cqi; }
.tv {
  position: absolute; left: 0; top: 0; width: calc(72 * var(--u)); height: calc(41.2 * var(--u));
  border-radius: calc(1.2 * var(--u)); background: linear-gradient(180deg, #262a31, #15181d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 34px 70px -30px rgba(0, 0, 0, .95);
}
.tv .screen {
  left: calc(.9 * var(--u)); right: calc(.9 * var(--u)); top: calc(.9 * var(--u)); bottom: calc(.9 * var(--u));
  border-radius: calc(.6 * var(--u)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.tv .qam { width: 50%; }
.tv-stand {
  position: absolute; left: 50%; bottom: calc(-1.1 * var(--u)); width: calc(20 * var(--u)); height: calc(1.1 * var(--u));
  transform: translateX(-50%); background: linear-gradient(180deg, #2a2f36, #15181d);
  border-radius: 0 0 calc(.6 * var(--u)) calc(.6 * var(--u));
}
.box { position: absolute; right: calc(3 * var(--u)); bottom: 0; width: calc(21 * var(--u)); height: calc(21 * var(--u)); }
.box-front {
  position: absolute; inset: 0; border-radius: calc(1 * var(--u)) calc(.4 * var(--u)) calc(1 * var(--u)) calc(1 * var(--u));
  background: linear-gradient(180deg, #2b2f36 0%, #1c1f25 55%, #14171b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 -1px 0 rgba(0, 0, 0, .6), 0 28px 50px -22px rgba(0, 0, 0, .95);
  overflow: hidden;
}
.box-top {
  position: absolute; left: 0; top: calc(-3 * var(--u)); width: 100%; height: calc(3 * var(--u));
  background: linear-gradient(180deg, #3b4048, #2c3037); transform: skewX(-45deg); transform-origin: bottom left;
  border-radius: calc(.5 * var(--u)) calc(.5 * var(--u)) 0 0;
}
.box-side {
  position: absolute; left: 100%; top: 0; width: calc(3 * var(--u)); height: 100%;
  background: linear-gradient(90deg, #15181c, #0e1013); transform: skewY(-45deg); transform-origin: top left;
  border-radius: 0 calc(.5 * var(--u)) calc(.5 * var(--u)) 0;
}
.box-logo { position: absolute; left: calc(1.5 * var(--u)); top: calc(1.4 * var(--u)); width: calc(2.4 * var(--u)); height: calc(2.4 * var(--u)); color: rgba(255, 255, 255, .28); }
.box .power {
  position: absolute; top: calc(1.6 * var(--u)); right: calc(1.6 * var(--u)); width: calc(2 * var(--u)); height: calc(2 * var(--u)); border-radius: 50%;
  background: #0f1215; box-shadow: inset 0 0 0 calc(.28 * var(--u)) #3a4048;
}
.box .power::after { content: ""; position: absolute; inset: 32%; border-radius: 50%; background: var(--blue); box-shadow: 0 0 calc(1.2 * var(--u)) var(--blue); }
.box .seam { position: absolute; left: 0; right: 0; top: calc(4.8 * var(--u)); height: 1px; background: rgba(255, 255, 255, .06); }
.box .ports { position: absolute; left: calc(1.6 * var(--u)); bottom: calc(3.2 * var(--u)); display: flex; gap: calc(.7 * var(--u)); }
.box .ports i { display: block; width: calc(2.4 * var(--u)); height: calc(.9 * var(--u)); border-radius: calc(.15 * var(--u)); background: #0b0e11; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.box .ports i:last-child { width: calc(1.5 * var(--u)); }
.box .led {
  position: absolute; left: calc(1.2 * var(--u)); right: calc(1.2 * var(--u)); bottom: calc(1.3 * var(--u)); height: calc(.6 * var(--u)); border-radius: calc(.3 * var(--u));
  background: rgba(102, 192, 244, .95); --glow: 102, 192, 244;
  box-shadow: 0 0 calc(1.6 * var(--u)) rgba(var(--glow), .75), 0 calc(.8 * var(--u)) calc(2.4 * var(--u)) rgba(var(--glow), .35);
  transition: background .5s, box-shadow .5s;
}
.stage[data-step="3"] .box .led, .stage[data-step="4"] .box .led, .stage[data-step="5"] .box .led { animation: led-pulse 1.1s ease-in-out infinite; }
.stage[data-step="6"] .box .led, .stage[data-step="7"] .box .led { background: rgba(161, 205, 68, .95); --glow: 161, 205, 68; }
@keyframes led-pulse { 50% { opacity: .3; } }

/* Roadmap + support */
.roadmap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card .card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card .soon { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green); background: rgba(161, 205, 68, .12); border: 1px solid rgba(161, 205, 68, .35); border-radius: 999px; padding: 4px 10px; }
.card .ico-warm { background: rgba(255, 221, 0, .12); color: #ffdd00; }
.card .card-foot { margin-top: auto; padding-top: 6px; }
.btn-coffee { background: linear-gradient(-60deg, #ffdd00 0%, #f5a623 100%); color: #1b2838; }
.btn-coffee:hover { color: #1b2838; }
.pill-link { text-decoration: none; color: var(--blue); border-color: rgba(103, 193, 245, .45); }
.pill-link:hover { color: #fff; background: rgba(103, 193, 245, .18); }
@media (max-width: 820px) { .roadmap-grid { grid-template-columns: 1fr; } }

/* Link between the two devices */
.link { position: relative; align-self: stretch; min-height: 220px; z-index: 2; }
.link-line {
  position: absolute; left: -85%; right: -85%; top: 50%; height: 2px; transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, rgba(102, 192, 244, .55) 0 7px, transparent 7px 13px); opacity: .75;
}
.link-lock {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%;
  background: #101a26; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--text-dim); z-index: 2;
  transition: color .3s, border-color .3s, box-shadow .3s;
}
.link-lock svg { width: 17px; height: 17px; }
.stage[data-secure="1"] .link-lock { color: var(--green); border-color: rgba(161, 205, 68, .5); box-shadow: 0 0 18px rgba(161, 205, 68, .25); }
.link-blocked {
  position: absolute; left: 50%; top: calc(50% + 34px); transform: translate(-50%, 0) scale(.7); opacity: 0; transition: .3s;
  font-family: var(--mono); font-size: 11px; color: var(--amber); white-space: nowrap; pointer-events: none;
}
.stage[data-step="4"] .link-blocked { opacity: 1; transform: translate(-50%, 0) scale(1); }
.packet {
  position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 14px 2px rgba(102, 192, 244, .65); z-index: 3; opacity: 0;
  animation: to-server var(--dur, 1.15s) cubic-bezier(.35, .65, .35, 1) var(--delay, 0s) both;
}
.packet.to-client { animation-name: to-client; }
.packet.probe { width: 8px; height: 8px; margin: -4px 0 0 -4px; box-shadow: 0 0 8px rgba(102, 192, 244, .5); }
.packet.probe { animation-name: to-server-faint; }
.packet.secure { background: var(--green); box-shadow: 0 0 14px 2px rgba(161, 205, 68, .6); }
@keyframes to-server { from { left: -85%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { left: 185%; opacity: 0; } }
@keyframes to-server-faint { from { left: -85%; opacity: 0; } 10% { opacity: .5; } 90% { opacity: .5; } to { left: 185%; opacity: 0; } }
@keyframes to-client { from { left: 185%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { left: -85%; opacity: 0; } }

/* Wire log + steps + controls */
.wire {
  margin-top: 26px; display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 8px;
  background: #0f1822; border: 1px solid var(--line); font-family: var(--mono); font-size: 13.5px; color: #9fd3f5; overflow: hidden;
}
.wire .dir { flex: none; width: 34px; height: 26px; display: grid; place-items: center; border-radius: 5px; background: rgba(102, 192, 244, .12); color: var(--blue); font-weight: 700; font-size: 15px; }
.wire .dir[data-dir="none"] { color: var(--text-dim); background: rgba(255, 255, 255, .05); }
.wire .dir[data-dir="blocked"] { color: var(--amber); background: rgba(255, 179, 33, .12); }
.wire .dir[data-dir="to-client"] { color: var(--green); background: rgba(161, 205, 68, .12); }
.wire .msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: wire-in .35s ease both; }
@keyframes wire-in { from { opacity: 0; transform: translateX(6px); } }
.flow-desc { margin: 18px 0 0; min-height: 3.2em; font-size: 17px; color: var(--text-soft); max-width: 84ch; }
.flow-desc strong { color: #fff; }
.flow-controls { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong); color: #fff; transition: .15s; }
.icon-btn:hover { background: rgba(102, 192, 244, .22); border-color: var(--blue); }
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.icon-btn .when-paused { display: none; }
.stage-ctl.is-paused .icon-btn .when-playing { display: none; }
.stage-ctl.is-paused .icon-btn .when-paused { display: block; }
.flow-controls .hint { color: var(--text-dim); font-size: 13px; margin-left: 6px; }
.steps { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.step {
  position: relative; text-align: left; padding: 14px 12px 12px; border-radius: 6px; width: 100%;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: var(--text-dim);
  transition: .2s; min-height: 92px; display: flex; flex-direction: column; gap: 6px; overflow: hidden;
}
.step:hover { border-color: var(--line-strong); color: var(--text); }
.step .n { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--text-dim); }
.step .t { font-weight: 600; font-size: 14px; line-height: 1.25; color: inherit; }
.step.is-active { background: rgba(102, 192, 244, .1); border-color: rgba(102, 192, 244, .45); color: #fff; }
.step.is-active .n { color: var(--blue); }
.step.is-done .n { color: var(--green); }
.step::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.step.is-active::after { transform: scaleX(1); transition: transform var(--step-dur, 3.6s) linear; }
.stage-ctl.is-paused .step.is-active::after { transition: none; }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Stacked layout on narrow screens: bare panels, vertical link */
@media (max-width: 820px) {
  .stage { grid-template-columns: 1fr; }
  .deck { aspect-ratio: 16 / 11; --u: 1.62cqi; }
  .deck-body, .ctl, .dots, .pad { display: none; }
  .screen { inset: 0; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-strong); }
  .qam, .tv .qam { width: 100%; box-shadow: none; border-left: 0; }
  .gm, .gm-dim { display: none; }
  .machine { aspect-ratio: 16 / 11; --u: 1.62cqi; }
  .box, .tv-stand { display: none; }
  .tv { inset: 0; width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; }
  .tv .screen { inset: 0; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-strong); }
  .link { min-height: 96px; }
  .wire .msg { white-space: normal; }
  .link-line { left: 50%; right: auto; top: -8px; bottom: -8px; width: 2px; height: auto; transform: translateX(-50%); background: repeating-linear-gradient(180deg, rgba(102, 192, 244, .55) 0 7px, transparent 7px 13px); }
  .link-blocked { top: auto; left: calc(50% + 30px); transform: translate(0, -50%) scale(.7); top: 50%; }
  .stage[data-step="4"] .link-blocked { transform: translate(0, -50%) scale(1); }
  .packet { left: 50%; top: 0; margin: -7px 0 0 -7px; animation-name: to-server-v; }
  .packet.probe { margin: -4px 0 0 -4px; animation-name: to-server-v-faint; }
  .packet.to-client { animation-name: to-client-v; }
}
@keyframes to-server-v { from { top: -10%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { top: 110%; opacity: 0; } }
@keyframes to-server-v-faint { from { top: -10%; opacity: 0; } 10% { opacity: .5; } 90% { opacity: .5; } to { top: 110%; opacity: 0; } }
@keyframes to-client-v { from { top: 110%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } to { top: -10%; opacity: 0; } }

/* --------------------------------------------------------------------------
   Feature blocks (SteamOS: text 45% / image 50%, alternating)
   -------------------------------------------------------------------------- */
.feature { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 50fr); gap: 5%; align-items: center; padding: clamp(32px, 4.5vw, 64px) 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature h3 { margin: 0 0 .5em; font-size: clamp(22px, 2.4vw, 28px); font-weight: 500; color: #fff; line-height: 1.2; }
.feature p { margin: 0; color: #dcdedf; font-size: 17px; }
.feature ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.feature li { display: flex; gap: 10px; color: var(--text); font-size: 15.5px; }
.feature li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-top: .58em; }
.feature-media { display: flex; justify-content: center; gap: 18px; }
.qam-card {
  position: relative; flex: 1 1 0; max-width: 300px; margin: 0; aspect-ratio: 490 / 900; border-radius: 14px; overflow: hidden;
  background: #0e141b; border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .95), 0 0 0 6px #0c1017, 0 0 0 7px rgba(255, 255, 255, .06);
}
.qam-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: object-position 5.5s cubic-bezier(.25, .6, .25, 1); }
.qam-card:hover img, .qam-card:focus-within img { object-position: 50% 100%; }
.qam-card figcaption {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 4px; background: rgba(11, 42, 74, .85); color: var(--blue); border: 1px solid rgba(102, 192, 244, .3); backdrop-filter: blur(4px);
}
.qam-card figcaption.server { color: var(--green); border-color: rgba(161, 205, 68, .3); background: rgba(30, 50, 12, .8); }
.qam-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(180deg, transparent, rgba(14, 20, 27, .92)); pointer-events: none; transition: opacity .5s; }
.qam-card:hover::after { opacity: 0; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature:nth-of-type(even) .feature-text { order: 0; }
  .feature-media { order: 1; }
}

/* --------------------------------------------------------------------------
   Security cards + relay diagram
   -------------------------------------------------------------------------- */
.sec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 10px;
  padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(102, 192, 244, .4); transform: translateY(-2px); }
.card .ico { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: rgba(102, 192, 244, .12); color: var(--blue); }
.card .ico svg { width: 20px; height: 20px; }
.card h4 { margin: 4px 0 0; font-size: 18px; font-weight: 600; color: #fff; }
.card p { margin: 0; font-size: 15px; color: var(--text); }
.card code { font-size: 13px; color: #9fd3f5; background: rgba(0, 0, 0, .35); padding: 2px 6px; border-radius: 4px; }
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .sec-grid { grid-template-columns: 1fr; } }
.relay {
  margin-top: 36px; padding: 26px; border-radius: 12px; background: #0f1822; border: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: center;
}
.relay-title { grid-column: 1 / -1; margin: 0 0 6px; font-size: 18px; font-weight: 600; color: #fff; }
.node { text-align: center; padding: 16px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.node .nm { font-weight: 600; color: #fff; font-size: 15px; }
.node .fp { font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.node .cd { font-family: var(--mono); font-size: clamp(20px, 2.4vw, 28px); letter-spacing: .06em; margin-top: 10px; color: var(--blue); }
.node.bad .cd { color: var(--red); }
.node.relay-node { border-color: rgba(255, 179, 33, .45); background: rgba(255, 179, 33, .06); }
.node.relay-node .nm { color: var(--amber); }
.node.relay-node .cd { color: var(--amber); font-size: 14px; font-family: var(--font); font-weight: 500; letter-spacing: 0; }
.arrow { color: var(--text-dim); font-size: 22px; text-align: center; }
.relay-note { grid-column: 1 / -1; margin: 6px 0 0; color: var(--text); font-size: 15px; }
.relay-note b { color: #fff; }
.relay-note code { color: #9fd3f5; font-size: 13.5px; }
@media (max-width: 760px) { .relay { grid-template-columns: 1fr; } .arrow { transform: rotate(90deg); } }

/* --------------------------------------------------------------------------
   Install
   -------------------------------------------------------------------------- */
.install-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 12px 16px; font-weight: 600; font-size: 13px; color: var(--text-dim); border-bottom: 2px solid transparent; margin-bottom: -1px; text-transform: uppercase; letter-spacing: .07em; transition: .15s; }
.tab:hover { color: #fff; }
.tab[aria-selected="true"] { color: #fff; border-color: var(--blue); }
.panel { display: none; padding-top: 22px; }
.panel.is-on { display: block; }
.panel ol { margin: 0 0 16px; padding-left: 22px; color: var(--text-soft); display: grid; gap: 8px; }
.panel li, .panel p, .req li { overflow-wrap: anywhere; }
.panel code, .req code { color: #9fd3f5; font-size: .9em; }
.panel p { margin: 0 0 12px; color: var(--text); font-size: 15.5px; }
.codeblock {
  position: relative; background: #0b1118; border: 1px solid var(--line); border-radius: 8px;
  padding: 16px 18px 16px; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; color: var(--text-soft); margin: 0 0 12px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.codeblock:has(.copy) { padding-top: 44px; }
.codeblock .c { color: var(--text-dim); }
.codeblock .k { color: #9fd3f5; }
.copy { position: absolute; right: 10px; top: 10px; font-size: 12px; padding: 6px 10px; border-radius: 4px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong); color: var(--text); transition: .15s; }
.copy:hover { background: rgba(102, 192, 244, .2); color: #fff; }
.copy.done { color: var(--green); border-color: rgba(161, 205, 68, .5); }
.req { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.req h4 { margin: 0 0 12px; color: #fff; font-size: 17px; }
.req ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.req li { display: flex; gap: 10px; color: var(--text); font-size: 15px; }
.req li svg { flex: none; width: 18px; height: 18px; color: var(--green); margin-top: 3px; stroke-width: 2.4; }
.req + .req { margin-top: 16px; }
@media (max-width: 900px) { .install-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   FAQ (SteamOS: black slabs, bold white questions, #ccc answers)
   -------------------------------------------------------------------------- */
.faq-slab { background: #000; padding: clamp(32px, 5vw, 64px) clamp(20px, 5vw, 64px); margin-top: 24px; }
.faq-slab h2 { margin: 0 0 28px; font-size: clamp(28px, 3.6vw, 40px); font-weight: 500; color: #fff; }
.faq-slab dl { margin: 0; display: grid; gap: 26px; }
.faq-slab dt { font-weight: 700; color: #eee; font-size: 17px; margin-bottom: 4px; line-height: 1.35; }
.faq-slab dd { margin: 0; color: #ccc; font-size: 16.5px; max-width: 100ch; }
.faq-slab dd code { color: #9fd3f5; font-size: 14px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .collage { animation: none; }
  .packet { animation: none; opacity: 0; }
  .q-prog i { animation: none; width: 100%; }
  .q-btn.armed { animation: none; }
  .box .led { animation: none; }
  .qam-card img { transition: none; }
  .step.is-active::after { transition: none; }
}
