/* RemoteBar — marketing site.
   Dependency-free by design: no fonts, scripts or images fetched from anywhere
   else, so the page is fast, private and can't break when a CDN does.

   The product UI in the scroll scene is drawn in CSS and inline SVG rather than
   screenshotted — it stays crisp at any size, weighs nothing, and can genuinely
   animate. Each panel mirrors a real one in the app. */

:root {
  --bg: #000;
  --bg-2: #0a0b0d;
  --bg-3: #101216;
  --panel: rgba(28, 28, 30, .92);
  --line: rgba(255, 255, 255, .10);
  --line-soft: rgba(255, 255, 255, .06);
  --ink: #f5f5f7;
  --ink-2: rgba(245, 245, 247, .72);
  --ink-3: rgba(245, 245, 247, .56);
  --ink-4: rgba(245, 245, 247, .34);
  --accent: #2f7cf6;
  --accent-soft: rgba(47, 124, 246, .18);
  --radius: 18px;
  --maxw: 1120px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* `clip`, not `hidden`: hidden makes body a scroll container, which is a
     standing hazard for the sticky elements this page leans on. clip contains
     overflow without creating one. */
  overflow-x: clip;
}

/* Apple-ish display type: big, tight, and confident. */
h1, h2, h3 {
  margin: 0 0 .4em;
  line-height: 1.06;
  letter-spacing: -.028em;
  font-weight: 680;
}
h1 { font-size: clamp(2.7rem, 7vw, 5.2rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.1rem; letter-spacing: -.015em; font-weight: 640; }
p { margin: 0 0 1em; }
a { color: inherit; }
abbr { text-decoration: none; border-bottom: 1px dotted var(--ink-4); }

.accent {
  background: linear-gradient(96deg, #5aa0ff, #a06bff 55%, #ff6b9a);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.fine { font-size: .86rem; color: var(--ink-3); }

/* Clipped rather than pushed off-screen, so it can't widen the page. */
.skip {
  position: absolute; top: 0; left: 0; z-index: 100;
  padding: .6em 1em; border-radius: 0 0 8px 0;
  background: var(--accent); color: #fff;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { clip-path: none; }

/* Sections fade up as they arrive — the one flourish Apple uses everywhere. */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease);
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 5vw, 2.75rem);
  background: rgba(0, 0, 0, .62);
  backdrop-filter: saturate(180%) blur(20px);
  /* Transparent over the hero; the hairline arrives once there's content
     scrolling underneath it (see .is-stuck, set in app.js). */
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line-soft); }
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 640; font-size: 1.02rem; text-decoration: none; letter-spacing: -.02em;
}
.brand-mark { width: 21px; height: 21px; border-radius: 5px; display: block; }
.brand.small { font-size: .95rem; }
.site-header nav { display: flex; align-items: center; gap: clamp(.7rem, 2vw, 1.6rem); }
.site-header nav a { text-decoration: none; color: var(--ink-2); font-size: .89rem; transition: color .2s; }
.site-header nav a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 600;
  background: var(--accent); color: #fff;
  padding: .72rem 1.4rem; border-radius: 980px;
  transition: transform .2s var(--ease), filter .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 6px 22px rgba(47, 124, 246, .28);
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 10px 30px rgba(47,124,246,.38); }
.btn-small { padding: .42rem .95rem; font-size: .87rem; box-shadow: none; }
/* Apple's mark reads a touch high against a cap-height label; nudge it down. */
.btn .apple {
  width: .82em; height: .82em; fill: currentColor;
  margin-right: .5em; vertical-align: -.06em;
}
.btn-big { padding: 1rem 2.2rem; font-size: 1.06rem; }

/* ── App Store card ─────────────────────────────────────────────
   The App Store's own product row: icon, name, subtitle, Get. It says
   what the thing is and where it comes from in one object, which a
   coloured button can't. The whole card is the link — a bigger target
   than the pill, and the pill still reads as the action. */
.appcard {
  display: inline-flex; align-items: center; gap: 1rem;
  padding: .85rem 1rem .85rem .9rem;
  border-radius: 22px; text-decoration: none;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  transition: background .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
  text-align: left;
}
.appcard:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .2);
  transform: translateY(-2px);
}
.ac-icon {
  width: 56px; height: 56px; border-radius: 13px; flex: none; display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.ac-meta { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.ac-meta b {
  font-size: 1.14rem; font-weight: 660; letter-spacing: -.02em; color: var(--ink);
  white-space: nowrap;
}
.ac-meta span { font-size: .95rem; color: var(--ink-3); white-space: nowrap; }
.ac-get {
  flex: none; margin-left: .9rem;
  padding: .42rem 1.5rem; border-radius: 980px;
  background: rgba(255, 255, 255, .22);
  color: var(--ink); font-weight: 680; font-size: 1rem; letter-spacing: -.01em;
  transition: background .25s var(--ease);
}
.appcard:hover .ac-get { background: rgba(255, 255, 255, .32); }

@media (max-width: 460px) {
  .appcard { gap: .7rem; padding: .7rem .8rem; border-radius: 18px; }
  .ac-icon { width: 46px; height: 46px; border-radius: 11px; }
  .ac-meta b { font-size: 1rem; }
  .ac-meta span { font-size: .84rem; white-space: normal; }
  .ac-get { margin-left: .4rem; padding: .36rem 1.05rem; font-size: .92rem; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  max-width: 62rem; margin: 0 auto;
  padding: clamp(4.5rem, 13vw, 9rem) clamp(1rem, 5vw, 2rem) clamp(2rem, 6vw, 4rem);
  text-align: center;
}
.hero-copy { position: relative; z-index: 2; }
.lede {
  max-width: 40ch; margin: 1.4rem auto 2.4rem;
  font-size: clamp(1.03rem, 1.5vw, 1.24rem); color: var(--ink-2);
  letter-spacing: -.01em;
}
.cta-row { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.cta-note { font-size: .88rem; color: var(--ink-3); }
.hero-glow {
  position: absolute; inset: -25% 0 auto; height: 620px; z-index: 1;
  background:
    radial-gradient(46% 50% at 50% 42%, rgba(47, 124, 246, .22), transparent 72%),
    radial-gradient(30% 40% at 76% 60%, rgba(160, 107, 255, .16), transparent 72%);
  filter: blur(24px); pointer-events: none;
}

/* ── Scroll scene ───────────────────────────────────────────── */
.scene { padding: 0 clamp(1rem, 5vw, 2.5rem) clamp(3rem, 8vw, 6rem); }

/* One grid, two columns: the pinned mock and the copy beside it. No negative
   margins — the copy sits a fixed gap from the artwork at every width. */
.scene-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  max-width: var(--maxw); margin: 0 auto;
}

.scene-stage {
  position: sticky; top: 12vh; height: 76vh;
  display: flex; align-items: center; justify-content: flex-end;
  pointer-events: none;
}

/* The faux Mac: a menu bar and the panels that hang from it. */
.mac {
  position: relative;
  width: 100%; max-width: 520px; aspect-ratio: 1.04;
  /* Tall enough for the deepest panel; the ratio governs above that. */
  min-height: 484px; max-height: 100%;
  border-radius: 18px;
  background: linear-gradient(155deg, #1c2431 0%, #0d1117 55%, #08090c 100%);
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255,255,255,.03) inset;
  overflow: hidden;
}
/* A hint of a wallpaper, so the desktop behind the panels reads as a Mac
   rather than an empty box. Two soft lights, no image to download. */
.mac::before {
  content: ""; position: absolute; inset: 24px 0 0; pointer-events: none;
  background:
    radial-gradient(58% 54% at 20% 80%, rgba(47, 124, 246, .20), transparent 70%),
    radial-gradient(46% 44% at 82% 16%, rgba(160, 90, 220, .17), transparent 70%);
}

.menubar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  height: 24px; padding: 0 10px;
  background: rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  font-size: 10.5px; color: var(--ink-2);
}
.mb-title { font-weight: 620; color: var(--ink); }
.menubar-right { display: flex; align-items: center; gap: 10px; }
.mb-icon { display: inline-flex; width: 13px; color: var(--ink-2); }
.mb-icon svg { width: 100%; height: auto; fill: currentColor; }
.rb-icon { color: var(--ink); transition: transform .5s var(--ease), filter .5s var(--ease); }
.rb-icon svg { width: 10px; }
.mb-clock { font-variant-numeric: tabular-nums; }

.desk { position: absolute; inset: 24px 0 0; }

/* Everything drawn on the screen, so stage 0 can push in on the menu-bar icon
   and pull back as the panel opens — without the frame's own border, radius
   and shadow scaling along with it. The origin is the icon itself. */
.screen {
  position: absolute; inset: 0;
  transform-origin: 86% 12px;
  transition: transform .85s var(--ease);
}

/* ── Panels ─────────────────────────────────────────────────── */
.pnl {
  position: absolute; top: 10px; right: 14px;
  padding: 7px;
  background: var(--panel);
  backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .55), 0 0 70px 12px rgba(47, 124, 246, .10);
  transform-origin: 86% 0;
  opacity: 0; transform: translateY(-10px) scale(.96);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
  font-size: 11px;
}
.p-devices { width: 268px; }
.p-atv     { width: 146px; text-align: center; }
.p-sonos   { width: 216px; }

.p-head { font-size: 9.5px; font-weight: 640; color: var(--ink-3); padding: 3px 7px 6px; }
.p-foot {
  display: grid; gap: 3px; margin-top: 6px; padding: 7px 7px 2px;
  border-top: 1px solid var(--line-soft);
  font-size: 10px; color: var(--ink-2);
}
.p-foot .gl { font-style: normal; display: inline-block; width: 14px; color: var(--ink-3); }

/* Device rows: the volume level is a fill behind the whole row. */
.d-row {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 8px; margin-bottom: 4px;
  border-radius: 9px; overflow: hidden;
  background: rgba(255, 255, 255, .07);
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.d-row.is-off { background: none; }
.d-fill {
  position: absolute; inset: 0 auto 0 0; z-index: 1;
  width: calc(var(--fill, 0) * 100%);
  background: rgba(255, 255, 255, .15);
  transition: width .75s var(--ease);
}
/* The one row that moves, a beat after the list opens. */
.d-fill[data-vol] { --fill: .37; }
.scene.act .d-fill[data-vol] { --fill: .66; }
.d-badge, .d-glyph, .d-stack, .d-name, .d-sub { position: relative; z-index: 2; }
/* Apple TV: a filled tile, the way the app draws a set-top box. */
.d-badge { display: inline-flex; width: 19px; flex: none; }
.d-badge svg { width: 100%; height: auto; fill: rgba(255, 255, 255, .92); }
.d-glyph { display: inline-flex; width: 17px; flex: none; color: var(--ink-2); }
.d-glyph svg { width: 100%; height: auto; fill: currentColor; }
.d-glyph-2 { width: 22px; }          /* the two-speaker glyph is wider */
.d-stack { display: flex; flex-direction: column; line-height: 1.25; }
.d-name { font-size: 11.5px; font-weight: 620; }
.d-sub { font-size: 9px; color: var(--ink-3); }
.is-off .d-name { color: var(--ink-2); font-weight: 560; }

/* ── Remote panels (shared bits) ────────────────────────────── */
.r-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; padding: 2px 3px 8px;
}
.r-back { font-size: 11.5px; font-weight: 650; letter-spacing: -.01em; }
.r-power, .r-more {
  display: grid; place-items: center;
  width: 19px; height: 19px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, .10); color: var(--ink);
  font-size: 11px; line-height: 1;
}
.r-power svg { width: 11px; }
.r-more {
  /* Auto-width so the +N sits beside the ellipsis rather than on top of it. */
  display: inline-flex; align-items: center; gap: 3px;
  width: auto; min-width: 19px; padding: 0 5px;
  border-radius: 980px; background: none; color: var(--ink-2);
}
.more-badge { display: none; font-size: 8.5px; font-weight: 700; color: var(--accent); }

.clickpad {
  position: relative; width: 104px; height: 104px; margin: 0 auto 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.10), rgba(255,255,255,.05));
  border: 1px solid var(--line-soft);
  display: grid; place-items: center;
}
.cp-arrow {
  position: absolute; color: var(--ink-2);
  font-size: 15px; line-height: 1; font-weight: 300;
}
.cp-up    { top: 8px;    transform: rotate(-90deg); }
.cp-down  { bottom: 8px; transform: rotate(90deg); }
.cp-left  { left: 12px; }
.cp-right { right: 12px; }
.cp-centre {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05);
}

.r-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  justify-items: center; align-items: center; margin-bottom: 9px;
}
.r-key {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  font-size: 12px; color: var(--ink); letter-spacing: -1px;
}
.r-key svg { width: 15px; fill: currentColor; }
.r-key.big { width: 48px; height: 48px; font-size: 14px; }
.r-rocker {
  display: grid; grid-template-rows: 1fr 1fr;
  width: 42px; height: 90px; border-radius: 980px;
  background: rgba(255, 255, 255, .09);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  grid-row: span 2;
}
.r-rocker.tall { height: 104px; width: 48px; }
.r-rocker i {
  display: grid; place-items: center;
  font-style: normal; font-size: 14px; color: var(--ink);
}
.r-rocker i + i { border-top: 1px solid rgba(255, 255, 255, .09); }

.r-field {
  position: relative;
  display: flex; align-items: center; gap: 3px;
  height: 23px; padding: 0 8px; margin-bottom: 8px;
  border-radius: 980px;
  background: rgba(0, 0, 0, .38); border: 1px solid var(--line-soft);
  font-size: 10.5px; color: var(--ink-2); text-align: left;
}
.r-kbd { font-size: 9px; color: var(--ink-3); }
.r-placeholder { color: var(--ink-4); }
.caret {
  display: inline-block; width: 1px; height: 11px; background: var(--accent);
  animation: blink 1.05s steps(2) infinite; opacity: 0;
}
@keyframes blink { 50% { opacity: 0; } }

.r-hints {
  display: grid; gap: 4px; font-size: 8px; color: var(--ink-4);
}
.r-hints b {
  display: inline-block; min-width: 11px; padding: 0 2px;
  border: 1px solid var(--ink-4); border-radius: 3px;
  font-weight: 600;
}

/* ── Sonos panel innards ────────────────────────────────────── */
.s-menu, .s-transport, .s-now, .s-queue, .s-rows { display: none; }
.scene[data-stage] .s-menu,
.scene[data-stage] .s-transport,
.scene[data-stage] .s-now,
.scene[data-stage] .s-queue,
.scene[data-stage] .s-rows { animation: rise .36s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.s-menu {
  padding: 8px 9px; margin-bottom: 9px;
  border-radius: 9px; background: rgba(0, 0, 0, .34);
}
.sm-block + .sm-block { margin-top: 2px; }
.sm-rule { height: 1px; background: var(--line-soft); margin: 7px 0; }
.sm-title {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 9.5px; font-weight: 640; color: var(--ink-3); margin-bottom: 4px;
}
.sm-done { color: var(--accent); font-weight: 620; }
.sm-room {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; padding: 2px 0;
}
.sm-room em { margin-left: auto; font-style: normal; font-size: 8.5px; color: var(--ink-4); }
.sm-room.is-leader { color: var(--ink-3); }
.tick {
  display: grid; place-items: center; flex: none;
  width: 12px; height: 12px; border-radius: 50%;
  font-size: 8px; font-style: normal;
  border: 1.2px solid var(--ink-4); color: transparent;
}
.tick.on,
.scene.act .sm-room[data-room="move"] .tick {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.tick { transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }
.sm-chips { display: flex; gap: 4px; }
.sm-chips b {
  padding: 2px 7px; border-radius: 5px; font-size: 9.5px; font-weight: 500;
  background: rgba(255, 255, 255, .09); color: var(--ink-2);
}
.sm-chips b { transition: background .3s var(--ease), color .3s var(--ease); }
/* Off until the timer is set, then 30m — the two ends of the same gesture. */
.scene[data-stage="5"]:not(.act) .sm-chips b[data-min="0"],
.scene.act[data-stage="5"] .sm-chips b[data-min="30"] {
  background: var(--accent); color: #fff; font-weight: 640;
}
.sm-tv {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 7px; border-radius: 6px;
  background: rgba(255, 255, 255, .09); font-size: 10.5px;
}
.sm-tv svg { width: 12px; color: var(--ink-2); }
.sm-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 620; color: var(--ink-2);
}
.sm-row b { margin-left: auto; color: var(--ink-4); font-weight: 400; }

.s-transport {
  /* `display` lives in the stage rules below — see the note there. */
  grid-template-columns: 1fr 1fr; gap: 7px;
  justify-items: center; align-items: center; margin-bottom: 9px;
}

.s-now {
  padding: 8px; margin-bottom: 8px;
  border-radius: 10px; background: rgba(0, 0, 0, .30);
}
.sn-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.sn-art {
  display: grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 6px;
  background: rgba(255, 255, 255, .10); color: var(--ink-2); font-size: 10px;
}
.sn-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sn-meta b { font-size: 11px; font-weight: 650; }
.sn-meta span { font-size: 9px; color: var(--ink-3); }
.sn-bar { height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.14); }
.sn-bar i {
  display: block; height: 100%; border-radius: 2px; background: var(--ink-2);
  width: calc(var(--np, 0) * 100%);
  transition: width .95s linear;
}
.sn-times { display: flex; justify-content: space-between; font-size: 8px; color: var(--ink-3); margin: 3px 0 5px; }
.sn-transport { display: flex; justify-content: center; gap: 20px; font-size: 10px; color: var(--ink); }
.sn-transport .big { font-size: 13px; }

.s-queue {
  margin-bottom: 6px;
  max-height: 200px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent);
  mask-image: linear-gradient(180deg, #000 78%, transparent);
}
.sq-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 9.5px; font-weight: 640; color: var(--ink-3); margin-bottom: 5px;
}
.sq-count { margin-left: auto; font-weight: 400; color: var(--ink-4); }
.sq-head .chev { color: var(--ink-4); font-weight: 400; }
.sq-row {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 6px; margin-bottom: 2px; border-radius: 6px;
  background: rgba(0, 0, 0, .28);
}
.sq-row i { font-style: normal; font-size: 8px; color: var(--ink-3); width: 11px; }
.sq-row i::before { content: "\266A"; }                 /* ♪ */
.sq-row.is-current i::before { content: "\1F50A"; }     /* 🔊 */
.sq-row { transition: background .35s var(--ease), box-shadow .35s var(--ease); }
.sq-row span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sq-row b { font-size: 10px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq-row em { font-style: normal; font-size: 8.5px; color: var(--ink-3); }
.sq-row.is-current { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(47,124,246,.35); }
.sq-row.is-current i { color: var(--accent); }
.sq-row.is-current b { font-weight: 660; }

.s-rows { gap: 4px; }
.s-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 620; color: var(--ink-3);
}
.s-row b { margin-left: auto; color: var(--ink-4); font-weight: 400; }

/* ── Shortcuts + assistant windows ──────────────────────────── */
.win {
  position: absolute;
  border-radius: 12px; overflow: hidden;
  background: rgba(22, 24, 28, .96);
  border: 1px solid var(--line);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .62);
  opacity: 0; transform: translateY(14px) scale(.96);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.w-shortcuts { top: 16px; left: 5%; width: 60%; }
.w-claude    { bottom: 12px; right: 5%; width: 62%; transition-delay: .1s; }
.win-bar {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 9px; font-size: 9px; color: var(--ink-2);
  background: rgba(255, 255, 255, .06);
  border-bottom: 1px solid var(--line-soft);
}
.win-bar span { margin-left: 6px; font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.win-body { padding: 9px; font-size: 9.5px; }
.win-body.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8.5px; line-height: 1.5; }
.win-body p { margin: 0 0 3px; }

.sc-action {
  padding: 6px 9px; margin-bottom: 5px; border-radius: 8px;
  background: rgba(255, 255, 255, .07); color: var(--ink-2);
}
.sc-action b { color: var(--accent); font-weight: 600; }
/* The picker floats over the window rather than sitting in the flow, so
   dismissing it doesn't shuffle everything underneath. */
.win-body { position: relative; }
.sc-menu {
  position: absolute; z-index: 2; left: 14px; top: 46px; width: 60%;
  display: grid; gap: 1px; padding: 5px;
  border-radius: 9px;
  background: rgba(16, 18, 22, .98);
  border: 1px solid var(--line);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .6);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}
.sc-menu span { padding: 3px 7px; border-radius: 5px; color: var(--ink-2); }
.sc-menu-head { color: var(--ink-4); font-size: 8.5px; }
.sc-menu .is-pick { background: var(--accent); color: #fff; font-weight: 600; }
/* Chosen: the picker goes, the value lands in the action above it. */
.scene.act .sc-menu { opacity: 0; transform: translateY(-5px) scale(.98); }
.sc-slot i { font-style: normal; }
.sc-slot .post { display: none; }
.scene.act .sc-slot .pre { display: none; }
.scene.act .sc-slot .post { display: inline; }

.sc-list { display: grid; gap: 3px; margin-top: 7px; }
.sc-list span {
  padding: 4px 8px; border-radius: 6px; color: var(--ink-2);
  background: rgba(255, 255, 255, .05);
}
.cl-you  { color: var(--ink); }
.cl-tool { color: var(--ink-4); }
.cl-them { color: var(--ink-2); }
.cl-them b { color: var(--ink); }
.cl-them i { color: #43c463; font-style: normal; }

/* ── Stage choreography ─────────────────────────────────────
   The whole sequence is these rules — app.js only sets data-stage. */
.scene[data-stage="0"] .screen { transform: scale(2.6) translate(-12%, 11%); }
.scene[data-stage="0"] .rb-icon { transform: scale(1.3); filter: drop-shadow(0 0 6px rgba(90,160,255,.9)); }

.scene[data-stage="1"] .p-devices { opacity: 1; transform: none; }

.scene[data-stage="2"] .p-atv,
.scene[data-stage="3"] .p-atv { opacity: 1; transform: none; }
.scene[data-stage="3"] .caret { opacity: 1; }
.scene[data-stage="3"] .r-placeholder { display: none; }

.scene[data-stage="4"] .p-sonos,
.scene[data-stage="5"] .p-sonos,
.scene[data-stage="6"] .p-sonos { opacity: 1; transform: none; }

/* The Sonos panel keeps its transport and its two list rows throughout, as the
   app does; only the menu, the now-playing card and the queue come and go. The
   now-playing card steps aside while the menu is open — in the app the panel
   simply grows, but here it has to stay inside the frame. */
.scene[data-stage="4"] .s-transport,
.scene[data-stage="5"] .s-transport,
.scene[data-stage="6"] .s-transport { display: grid; }

.scene[data-stage="4"] .s-rows,
.scene[data-stage="5"] .s-rows,
.scene[data-stage="6"] .s-rows { display: grid; }

.scene[data-stage="4"] .s-now,
.scene[data-stage="6"] .s-now { display: block; }

.scene[data-stage="5"] .s-menu { display: block; }
.scene[data-stage="5"] .r-more { color: var(--accent); background: rgba(255,255,255,.10); }
/* The +N only makes sense once the room has company — from stage 5 onward. */
.scene.act[data-stage="5"] .more-badge,
.scene[data-stage="6"] .more-badge { display: inline; }

.scene[data-stage="6"] .s-queue { display: block; }
.scene[data-stage="6"] .s-row-queue { display: none; }   /* it's expanded above */

.scene[data-stage="7"] .win { opacity: 1; transform: none; }

/* ── Steps beside the stage ─────────────────────────────────── */
.scene-steps { padding-top: 14vh; }
.step {
  min-height: 96vh;
  opacity: .2; transform: translateY(10px);
  transition: opacity .5s var(--ease-soft), transform .5s var(--ease);
}
/* The copy holds level with the middle of the frame for most of its step,
   rather than sliding past — you get a moment to read it while the panel
   beside it does its thing. The step's height is the length of that hold. */
.step-copy { position: sticky; top: 40vh; }
.step.is-active { opacity: 1; transform: none; }
/* The opening step runs long: the frame has to be on screen, zoomed, before
   its stage gives way — otherwise the push-in happens below the fold. */
.step[data-step="0"] { min-height: 140vh; }
.step h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); }
.step p { color: var(--ink-2); margin: 0; font-size: 1.02rem; }
/* Named surfaces lift out of the sentence: heavier, and brighter than the
   grey around them. */
.step p b { color: var(--ink); font-weight: 620; }
.step p b abbr { border-bottom-color: var(--ink-3); }

/* ── Sections ───────────────────────────────────────────────── */
.section-title { max-width: 20ch; }
.features .section-title { max-width: 24ch; margin-inline: auto; text-align: center; }

.features, .privacy, .get {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(4rem, 10vw, 7.5rem) clamp(1rem, 5vw, 2rem);
}
.features .grid {
  display: grid; gap: 1px; margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden;
}
.features article {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  padding: 1.9rem 1.7rem;
  transition: background .3s var(--ease);
}
.features article:hover { background: linear-gradient(180deg, #16191f, #0d0f13); }
.features p { color: var(--ink-2); margin: 0; font-size: .95rem; }

.privacy { text-align: center; }
.privacy .section-title { margin-inline: auto; }
.privacy p { color: var(--ink-2); max-width: 50ch; margin-inline: auto; }
.privacy-note { max-width: 46ch; margin: 1.6rem auto 0; }
.diagram {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: .9rem; margin-top: 2.4rem;
}
.node {
  padding: .68rem 1.15rem; border-radius: 12px; font-size: .92rem;
  background: var(--bg-3); border: 1px solid var(--line-soft);
}
.wire { width: 46px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }

.get { text-align: center; }
.get h2 { max-width: 16ch; margin-inline: auto; }
.get .appcard { margin: 1.8rem 0 1rem; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 2.8rem clamp(1rem, 5vw, 2.5rem);
  max-width: var(--maxw); margin: 0 auto;
  display: grid; gap: 1.2rem;
}
.site-footer nav { display: flex; gap: 1.3rem; }
.site-footer nav a { color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.site-footer nav a:hover { color: var(--ink); }
.legal { max-width: 60ch; }

/* ── Text pages (privacy) ───────────────────────────────────── */
.prose {
  max-width: 44rem; margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1rem, 5vw, 2.5rem) 5rem;
}
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.prose h2 { font-size: 1.3rem; font-weight: 640; margin-top: 2.6rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose .lede { color: var(--ink); font-size: 1.16rem; margin: 1rem 0 2rem; text-align: left; }
.prose ul { padding-left: 1.1rem; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose b { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em; padding: .1em .35em; border-radius: 5px;
  background: rgba(255, 255, 255, .08);
}

/* ── Wide: an even 3×2 for features ─────────────────────────── */
@media (min-width: 1000px) {
  /* Six cards: three and three. auto-fit would give four then a gap. */
  .features .grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Narrow: the nav links won't fit beside the brand ────────── */
@media (max-width: 620px) {
  .site-header nav a:not(.btn) { display: none; }
}

/* ── Medium and below: the mock pins to the top, copy runs under it ──
   Same choreography, rotated 90°: instead of a sticky column beside the
   text, the frame sits under the header and the steps scroll beneath it.
   Every panel still plays — a phone gets the whole sequence, not a
   single static screenshot. */
@media (max-width: 900px) {
  .scene { padding-top: .5rem; --frame: 444px; }
  .scene-inner { display: block; }
  .scene-stage {
    position: sticky; top: 46px; z-index: 4;
    height: auto; justify-content: center;
    padding: .5rem 0 1.25rem;
    /* Solid under the frame, fading at the hem, so a step scrolling
       underneath slips away instead of colliding with it. */
    background: linear-gradient(180deg, var(--bg) 0, var(--bg) 84%, transparent 100%);
  }
  /* Bounded by both the column width and the viewport height, and kept
     proportional by deriving one from the other. */
  .mac { width: 100%; min-width: 0; max-width: 420px; height: var(--frame); aspect-ratio: auto; min-height: 0; }
  .s-queue { max-height: 128px; }
  .scene-steps { padding-top: 1rem; }
  /* The copy pins under the frame and holds there for the length of its
     step, so you're still reading the heading when the panel above it acts —
     the group forming, the timer landing, the queue jumping. It releases when
     the next step pushes it off. */
  .step { min-height: 125vh; min-height: 125svh; display: block; padding-bottom: 0; }
  .step[data-step="0"] { min-height: 150vh; min-height: 150svh; }
  .step-copy {
    position: sticky;
    top: calc(46px + var(--frame) + 1.75rem);   /* header + frame + the stage's hem */
    padding-bottom: 2rem;
  }
  .step h2 { font-size: clamp(1.45rem, 6vw, 1.9rem); }
}

/* Narrow phones: the device panel is the widest thing in the frame. */
@media (max-width: 430px) {
  .p-devices { width: 232px; }
  .p-sonos   { width: 194px; }
  .pnl { right: 10px; }
}

/* ── Portrait phones: less room than the CSS height suggests ──────────
   Safari's top and bottom bars take ~150–190px, so a 390×844 iPhone reports
   about 660px to a media query. The frame shrinks to suit and the panels
   scale to stay inside it, rather than the page giving up on pinning —
   which is what a height-gated fallback used to do on every iPhone made. */
@media (max-width: 900px) and (max-height: 800px) {
  .scene { --frame: 420px; }
  /* Trim the two panels that would otherwise outgrow the shorter frame,
     rather than scaling the desk — scaling shrinks the container by exactly
     as much as its contents, so an overflow stays an overflow. */
  .s-queue { max-height: 104px; }
  .sm-room { padding: 1px 0; }
  .s-menu { padding: 6px 8px; margin-bottom: 7px; }
  .sm-rule { margin: 5px 0; }
  .step { min-height: 118vh; min-height: 118svh; }
}

/* ── Landscape, and the genuinely tiny: no room to pin at all ─────────
   Below this a pinned frame leaves nothing for the copy, so stack instead
   of covering the text with the picture. Catches landscape phones (~320–380px
   reported) and the small iPhones, where a 420px frame plus the header would
   leave under 90px of band — not enough for a heading and a sentence. */
@media (max-width: 900px) and (max-height: 600px) {
  .mac { height: auto; aspect-ratio: 1.04; min-height: 0; }
  .scene-stage {
    position: relative; top: 0; z-index: auto;
    background: none; padding: 0; margin-bottom: 2rem;
  }
  .step { min-height: 0; opacity: 1; transform: none; margin-bottom: 2.5rem; padding-bottom: 0; }
  .step-copy { position: static; padding-bottom: 0; }
  .p-devices { opacity: 1; transform: none; }
  .p-atv, .p-sonos, .win { display: none; }
}

/* ── Reduced motion: everything readable, nothing moves ─────── */
@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 { opacity: 1; transform: none; }
  .scene-stage {
    position: relative; top: 0; height: auto; margin-bottom: 2rem;
    background: none; padding: 0;
  }
  .scene-inner { display: block; }
  .scene-steps { padding-top: 0; }
  .step { min-height: 0; opacity: 1; transform: none; margin-bottom: 2rem; }
  .step-copy { position: static; padding-bottom: 0; }
  /* No sequence without motion, so show the one panel that stands alone. */
  .p-devices { opacity: 1; transform: none; }
  .p-atv, .p-sonos, .win { display: none; }
}
