/* ─────────────────────────────────────────────
   Dex palette, sampled from the app itself
   ───────────────────────────────────────────── */
:root {
  --bg:        #07080a;
  --bg-2:      #0b0d11;
  --surface:   #111419;
  --surface-2: #161a21;
  --line:      rgba(255,255,255,.085);
  --line-2:    rgba(255,255,255,.14);

  --ink:       #e8edf3;
  --ink-2:     #a7b2bf;
  --ink-3:     #6b7686;

  --accent:    #2aa5f5;
  --accent-2:  #029ff8;
  --accent-dim:rgba(42,165,245,.14);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r:  14px;
  --r-s: 10px;
  --gutter: 24px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .track { transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, kbd, pre { font-family: var(--mono); }

code {
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .1em .38em;
  color: #cfe6fb;
}

kbd {
  font-size: .78em;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: .12em .42em;
  color: var(--ink);
}

.muted { color: var(--ink-3); }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #04121d;
  padding: .6rem 1rem; border-radius: 0 0 var(--r-s) 0; z-index: 99;
}
.skip:focus { left: 0; top: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ───────────── nav ───────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7,8,10,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex; align-items: center;
  gap: 20px; height: 62px;
}
.nav-links { margin-left: auto; }
.lang { margin-left: 4px; }
.brand {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--ink); font-weight: 600; letter-spacing: -.02em; font-size: 1.32rem;
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; display: block; }

.nav-links { display: flex; gap: 26px; }
.nav-links a {
  color: var(--ink-2); font-size: .92rem; font-weight: 450;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }

@media (max-width: 720px) { .nav-links { display: none; } }

/* ───────────── hero ───────────── */
.hero { position: relative; padding: clamp(48px, 5vw, 56px) 0 clamp(48px, 7vw, 88px); }

.glow {
  position: absolute; inset: -20% -10% auto -10%; height: 620px;
  background:
    radial-gradient(62% 72% at 22% 12%, rgba(42,165,245,.17), transparent 68%),
    radial-gradient(48% 60% at 78% 0%, rgba(2,159,248,.09), transparent 70%);
  pointer-events: none;
}

.hero-in {
  position: relative;
  display: grid; grid-template-columns: 1.08fr .92fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}

.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(42,165,245,.18);
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2.4rem, 6.4vw, 4rem);
  line-height: 1.04; font-weight: 600; letter-spacing: -.035em;
}
.accent {
  color: var(--accent);
  text-shadow: 0 0 44px rgba(42,165,245,.35);
}

.lede {
  margin: 0 0 14px; font-size: clamp(1.03rem, 1.6vw, 1.18rem);
  color: var(--ink-2); max-width: 36ch;
}
.sub { margin: 0 0 30px; color: var(--ink-3); font-size: .97rem; max-width: 42ch; }

.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .72rem 1.25rem; border-radius: var(--r-s);
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); font-size: .94rem; font-weight: 500;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:hover { background: var(--surface-2); border-color: rgba(255,255,255,.24); text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #04121d; font-weight: 600;
}
.btn-primary:hover { background: #4fb6f8; border-color: #4fb6f8; }

/* Apple's and Google's own badge artwork, shown as it is (no recolouring, no extra frame) */
.store-badge {
  display: inline-flex; align-items: center; flex: none;
  border-radius: 8px; transition: transform .16s ease, opacity .16s ease;
}
.store-badge img { display: block; height: 48px; width: auto; }
.store-badge:hover { transform: translateY(-1px); opacity: .92; }
.stores { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

/* ───────────── phone frame ───────────── */
.phone {
  position: relative;
  width: 100%; max-width: 288px; margin-inline: auto;
  border: 1px solid var(--line-2);
  border-radius: 30px;
  padding: 8px;
  background: linear-gradient(170deg, #1a1f27, #0a0c10);
  box-shadow:
    0 2px 0 rgba(255,255,255,.05) inset,
    0 40px 80px -30px rgba(0,0,0,.95),
    0 0 90px -40px rgba(42,165,245,.4);
}
.phone img {
  display: block; width: 100%; height: auto;
  border-radius: 23px; background: #000;
}
/* as big as fits with its tabs and caption under the bar, up to 320px */
.hero-shot .phone { max-width: clamp(272px, 46vh - 97px, 320px); max-width: clamp(272px, 46svh - 97px, 320px); }

/* ───────────── section furniture ───────────── */
section { position: relative; }

.section-title {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 600; letter-spacing: -.028em; line-height: 1.12;
}
.section-title.sm { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }

.section-lede {
  margin: 0 0 40px; color: var(--ink-2);
  max-width: 58ch; font-size: 1.02rem;
}

/* the screen is a window; the track slides behind it */
.screen { overflow: hidden; border-radius: 23px; background: #000; }
.track {
  display: flex; width: 400%;
  transform: translateX(0);
  transition: transform .45s cubic-bezier(.65,.02,.25,1);
}
.track img {
  width: 25%; flex: 0 0 25%;
  display: block; height: auto; border-radius: 0;
}

/* the app's bottom bar, reused as the control */
.tabbar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  max-width: 500px; margin: 0 auto;
}
.tab {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 9px 4px 8px;
  background: transparent; border: 0; border-radius: 12px;
  color: var(--ink-3); font-family: var(--sans); font-size: .75rem; font-weight: 500;
  cursor: pointer; transition: background .16s ease, color .16s ease;
}
.tab svg {
  width: 20px; height: 20px; fill: none;
  stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.tab:hover { color: var(--ink-2); background: rgba(255,255,255,.035); }
.tab.is-on { color: var(--accent); background: var(--accent-dim); }

/* fills while that tab is showing */
.tab .bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  opacity: .9;
}
.tab.is-on.is-timing .bar { animation: fill var(--dwell, 5s) linear forwards; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ───────────── machines ───────────── */
.machines { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }

.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px); align-items: center;
}

.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.ticks li {
  position: relative; padding-left: 28px; color: var(--ink-2); font-size: .98rem;
}
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  color: var(--accent); font-size: .95rem;
}

.wires {
  margin: 0; padding: 26px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r);
}
.wire-node {
  display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px;
  align-items: center;
  padding: 13px 15px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-s);
}
.wire-node b { font-weight: 550; font-size: .94rem; grid-column: 2; }
.wire-node small { grid-column: 2; color: var(--ink-3); font-size: .78rem; font-family: var(--mono); }
.wire-ic {
  grid-row: 1 / 3; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent-dim); color: var(--accent); font-size: .95rem;
}
.wire-phone { border-color: rgba(42,165,245,.4); }
.wire-rail {
  width: 1px; height: 26px; margin: 0 auto;
  background: linear-gradient(var(--accent), transparent);
}
.wire-hosts { display: grid; gap: 10px; }
.wires figcaption {
  margin-top: 18px; color: var(--ink-3); font-size: .84rem; line-height: 1.5;
}

/* ───────────── wide screens band ───────────── */
.wide { padding: 0 0 clamp(56px, 8vw, 96px); }
.band {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 4vw, 48px);
  background: linear-gradient(135deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--r);
}
.band .section-lede { margin-bottom: 0; }

.ide {
  display: grid; grid-template-columns: 76px 1fr; gap: 7px;
  height: 190px; padding: 9px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s);
}
.ide-side { background: var(--surface-2); border-radius: 6px; }
.ide-main { display: grid; grid-template-rows: 1.5fr 1fr; gap: 7px; }
.ide-editor { background: var(--surface-2); border-radius: 6px; }
.ide-term {
  background: #05060a; border: 1px solid rgba(42,165,245,.28); border-radius: 6px;
}

/* ───────────── get started ───────────── */
.start { padding: clamp(56px, 8vw, 96px) 0 clamp(64px, 9vw, 104px); border-top: 1px solid var(--line); }

.video {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--r); background: #000;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.95), 0 0 110px -50px rgba(42,165,245,.45);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }


/* ───────────── footer ───────────── */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 38px 0; }
.foot-in {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start;
}
.foot-brand {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 6px; font-weight: 600;
}
.foot-brand img { border-radius: 6px; }
.foot p { margin: 0; font-size: .87rem; }
.foot-legal { max-width: 62ch; line-height: 1.65; justify-self: end; }
.foot a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.foot a:hover { color: var(--accent); }

/* ───────────── responsive ───────────── */
@media (max-width: 920px) {
  .hero-in,
  .split,
  .band { grid-template-columns: 1fr; }

  .hero-in { gap: 44px; }
  .hero-copy { max-width: 38rem; }
  .lede, .sub { max-width: none; }


  .foot-in { grid-template-columns: 1fr; }
  .foot-legal { justify-self: start; }
}

@media (max-width: 560px) {
  :root { --gutter: 18px; }
  .tabbar { border-radius: 16px; }
  .tab { font-size: .7rem; padding: 10px 2px 8px; }
  .tab svg { width: 19px; height: 19px; }
  .wires { padding: 18px; }
}

/* ═════════════════════════════════════════════
   Motion
   ═════════════════════════════════════════════ */

/* ── scroll progress ── */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60;
  background: transparent; pointer-events: none;
}
.progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 12px rgba(42,165,245,.7);
  transition: width .12s linear;
}

/* ── scroll reveal ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity .66s cubic-bezier(.22,.7,.3,1) calc(var(--i, 0) * 95ms),
    transform .66s cubic-bezier(.22,.7,.3,1) calc(var(--i, 0) * 95ms);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }

/* children of a revealed group come in one after another */
.ticks li {
  opacity: 0; transform: translateY(12px);
  transition: opacity .55s ease, transform .55s ease;
}
.ticks.in li { opacity: 1; transform: none; }
.ticks.in li:nth-child(1) { transition-delay: .06s; }
.ticks.in li:nth-child(2) { transition-delay: .16s; }
.ticks.in li:nth-child(3) { transition-delay: .26s; }
.ticks.in li:nth-child(4) { transition-delay: .36s; }

/* ── hero: drifting glow ── */
.glow { animation: drift 19s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate3d(0,0,0)      scale(1);    opacity: .9; }
  to   { transform: translate3d(3%,2.5%,0)  scale(1.09); opacity: 1; }
}


/* ── machines: a packet runs down the rail, hosts answer ── */
.wire-rail { position: relative; overflow: visible; }
.wire-rail .spark {
  position: absolute; left: 50%; top: 0;
  width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(42,165,245,.85);
  opacity: 0;
}
.wires.in .spark { animation: run 2.9s ease-in-out infinite; }
@keyframes run {
  0%        { transform: translateY(-4px); opacity: 0; }
  18%       { opacity: 1; }
  80%, 100% { transform: translateY(28px); opacity: 0; }
}

.wire-hosts .wire-node { transition: border-color .5s ease, background .5s ease; }
.wires.in .wire-hosts .wire-node {
  animation: answer 2.9s ease-in-out infinite;
  animation-delay: calc(.55s + var(--h, 0) * .16s);
}
@keyframes answer {
  0%, 55%, 100% { border-color: var(--line);                background: var(--surface-2); }
  22%           { border-color: rgba(42,165,245,.55);       background: #171d26; }
}

.wire-phone { position: relative; }
.wires.in .wire-phone::after {
  content: ""; position: absolute; inset: -1px; border-radius: var(--r-s);
  border: 1px solid rgba(42,165,245,.5);
  animation: breathe 2.9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe {
  0%, 100% { opacity: .25; }
  14%      { opacity: 1; }
}

/* ── wide band: the desktop layout assembles ── */
.ide-side, .ide-editor, .ide-term {
  opacity: 0; transform: translateY(8px);
  transition: opacity .6s ease, transform .6s ease;
}
.band.in .ide-side   { opacity: 1; transform: none; transition-delay: .10s; }
.band.in .ide-editor { opacity: 1; transform: none; transition-delay: .24s; }
.band.in .ide-term   { opacity: 1; transform: none; transition-delay: .38s; }

.ide-editor { padding: 11px 12px; display: grid; align-content: start; gap: 7px; }
.ide-editor .ln {
  display: block; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.14); width: 0;
}
.band.in .ide-editor .ln { animation: type .7s ease-out forwards; }
.band.in .ide-editor .ln:nth-child(1) { animation-delay: .46s; --w: 78%; }
.band.in .ide-editor .ln:nth-child(2) { animation-delay: .60s; --w: 54%; }
.band.in .ide-editor .ln:nth-child(3) { animation-delay: .74s; --w: 86%; }
.band.in .ide-editor .ln:nth-child(4) { animation-delay: .88s; --w: 40%; background: rgba(42,165,245,.4); }
@keyframes type { to { width: var(--w, 60%); } }

.ide-term { position: relative; }
.ide-term .caret {
  position: absolute; left: 11px; top: 11px;
  width: 7px; height: 12px; background: var(--accent); border-radius: 1px;
}
.band.in .ide-term .caret { animation: blink 1.1s steps(1) infinite 1s; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ── nav: the current section is marked ── */
.nav-links a { position: relative; transition: color .2s ease; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1.5px;
  background: var(--accent); border-radius: 2px;
  transition: right .28s cubic-bezier(.22,.7,.3,1);
}
.nav-links a:hover::after { right: 0; }
.nav-links a.here { color: var(--ink); }
.nav-links a.here::after { right: 0; }

/* ── buttons get a sheen on hover ── */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg); opacity: 0;
}
.btn-primary:hover::after { animation: sheen .75s ease-out; }
@keyframes sheen {
  from { left: -60%; opacity: 1; }
  to   { left: 115%; opacity: 0; }
}

/* ── nothing moves for anyone who asked for stillness ── */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .ticks li,
  .ide-side, .ide-editor, .ide-term {
    opacity: 1 !important; transform: none !important;
  }
  .ide-editor .ln { width: 60% !important; }
  .glow, .spark, .caret,
  .wires.in .wire-hosts .wire-node,
  .wires.in .wire-phone::after { animation: none !important; }
  .wire-rail .spark { opacity: 0 !important; }
  .progress i { transition: none; }
}

/* ───────────── agents ───────────── */
.agents { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }

.notes {
  margin: 0; padding: 26px; display: grid; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r);
}
.notes .note {
  display: grid; grid-template-columns: 32px 1fr; gap: 0 13px; align-items: center;
  padding: 13px 15px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-s);
}
.notes .note-txt b { display: block; font-weight: 550; font-size: .92rem; }
.notes .note-txt small { display: block; color: var(--ink-3); font-size: .8rem; margin-top: 2px; }
.notes .note-ic {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent-dim); color: var(--accent); font-size: .8rem;
}
.notes figcaption {
  margin-top: 6px; color: var(--ink-3); font-size: .84rem; line-height: 1.5;
}

/* each one slides in as the section arrives, like notifications landing */
.notes .note { opacity: 0; transform: translateY(10px); }
.notes.in .note {
  opacity: 1; transform: none;
  transition: opacity .5s cubic-bezier(.22,.7,.3,1) calc(var(--n) * 180ms + 120ms),
              transform .5s cubic-bezier(.22,.7,.3,1) calc(var(--n) * 180ms + 120ms);
}
.notes.in .note-ic { animation: ping 2.6s ease-out calc(var(--n) * 180ms + 420ms) 2; }
@keyframes ping {
  0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(42,165,245,0); }
  12%           { box-shadow: 0 0 0 5px rgba(42,165,245,.22); }
  28%           { box-shadow: 0 0 0 9px rgba(42,165,245,0); }
}

@media (prefers-reduced-motion: reduce) {
  .notes .note { opacity: 1; transform: none; }
  .notes.in .note-ic { animation: none; }
}

/* ───────────── language toggle ───────────── */
.lang {
  display: inline-flex; gap: 2px; padding: 3px; flex: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 100px;
}
.lang a {
  display: inline-flex; align-items: center;
  padding: .28rem .58rem; border-radius: 100px;
  color: var(--ink-3); font-size: .78rem; font-weight: 500; line-height: 1.15;
  transition: color .16s ease, background .16s ease;
}
.lang a:hover { color: var(--ink); background: rgba(255,255,255,.06); text-decoration: none; }
.lang a.is-on { background: var(--accent-dim); color: var(--accent); }

@media (max-width: 720px) { .lang { margin-left: auto; } }
@media (max-width: 560px) { .lang a { padding: .26rem .5rem; font-size: .74rem; } }

/* ═════════════════════════════════════════════
   Phones: a shorter, tighter version of the page
   ═════════════════════════════════════════════ */

/* the hero glow used to stick out to the sides and gave the page a
   horizontal scroll on narrow screens */
body { overflow-x: clip; }
.glow { inset: -20% 0 auto 0; }

@media (max-width: 700px) {
  .hero { padding: 34px 0 44px; }
  .hero-in { gap: 30px; }

  h1 { font-size: clamp(2rem, 8.6vw, 2.5rem); line-height: 1.08; letter-spacing: -.03em; }

  .lede { font-size: 1rem; margin-bottom: 12px; }
  .sub  { font-size: .91rem; margin-bottom: 24px; }

  /* full-width buttons sit better under a thumb */
  .cta { gap: 10px; }
  .cta .btn { flex: 1 1 0; min-width: 0; min-height: 46px; padding: .7rem 1rem; }

  /* the whole screen */
  .hero-shot .phone { max-width: 236px; padding: 6px; border-radius: 26px; }
  .hero-shot .phone img { border-radius: 19px; }

  .section-title    { font-size: clamp(1.45rem, 5.6vw, 1.8rem); }
  .section-title.sm { font-size: clamp(1.3rem, 5vw, 1.6rem); }
  .section-lede     { font-size: .96rem; margin-bottom: 26px; }


  .machines, .agents, .start { padding: 46px 0; }
  .wide { padding-bottom: 46px; }
  .band { padding: 22px; }
  .start { padding-bottom: 56px; }

  .ticks { gap: 11px; }
  .ticks li { font-size: .93rem; padding-left: 24px; }

  .wires, .notes { padding: 15px; }
  .wire-node, .notes .note { padding: 11px 13px; }
  .wires figcaption, .notes figcaption { font-size: .8rem; margin-top: 13px; }
  .notes .note-txt b { font-size: .88rem; }
  .notes .note-txt small { font-size: .77rem; }

  .foot { padding: 30px 0; }
  .foot-in { gap: 18px; }
}

@media (max-width: 420px) {
  .hero-shot .phone { max-width: 216px; }
  .tab { font-size: .66rem; gap: 4px; padding: 9px 2px 7px; }
  .tab svg { width: 18px; height: 18px; }
  .tabbar { padding: 6px; border-radius: 15px; }
}

/* ───────────── tablet: iPad screenshots ───────────── */
/* a section like the others, with the iPad taking the wider side */
.wide { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.wide .split { grid-template-columns: .8fr 1.2fr; }
.wide .section-lede { margin-bottom: 0; }
.tablet {
  padding: 9px; border-radius: 22px;
  border: 1px solid var(--line-2);
  background: linear-gradient(170deg, #1a1f27, #0a0c10);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.95), 0 0 90px -45px rgba(42,165,245,.4);
  margin-bottom: 16px;
}
.tablet .screen { border-radius: 14px; }
.track-3 { width: 300%; }
.track-3 img { width: 33.3334%; flex: 0 0 33.3334%; }
.tabbar-3 { grid-template-columns: repeat(3, 1fr); max-width: 330px; }
.band-art .tabbar { margin: 0 auto; }

@media (max-width: 920px) {
  .wide .split { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .wide { padding: 46px 0; }
  .tablet { padding: 6px; border-radius: 16px; margin-bottom: 12px; }
  .tablet .screen { border-radius: 11px; }
}

/* ───────────── nav: six links stay on one line ───────────── */
.nav-links a { white-space: nowrap; }
@media (max-width: 1000px) { .nav-links { gap: 18px; } }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .lang { margin-left: auto; }
}

/* ───────────── hero: the app, playing ─────────────
   Four silent clips of the iPhone app at the pace of the Get started video, one after another,
   each with its captions (main.js), the screen always whole. */
.reel-screen { position: relative; aspect-ratio: 660 / 1434; }
.reel-clip {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: cover; background: #000;
  opacity: 0; transition: opacity .35s ease;
}
.reel-clip.is-on { opacity: 1; }

.reel-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px;
  max-width: 320px; margin: 18px auto 0; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.reel-tab {
  position: relative; overflow: hidden;
  padding: 7px 4px; border: 0; border-radius: 9px; background: transparent;
  color: var(--ink-3); font-family: var(--sans); font-size: .76rem; font-weight: 500;
  cursor: pointer; transition: background .16s ease, color .16s ease;
}
.reel-tab:hover { color: var(--ink-2); background: rgba(255,255,255,.035); }
.reel-tab.is-on { color: var(--accent); background: var(--accent-dim); }
/* how far the clip has played */
.reel-tab .bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--accent); opacity: .9;
  transform: scaleX(0); transform-origin: left;
}

/* one line at a time, in the same place, the room of two lines kept */
.reel-captions {
  position: relative; max-width: 320px; margin: 12px auto 0;
  min-height: 2.8em; font-size: .86rem; line-height: 1.4; text-align: center;
  color: var(--ink-2);
}
.reel-lines { display: none; margin: 0; padding: 0; list-style: none; }
.reel-lines.is-on { display: block; }
.reel-lines li {
  position: absolute; inset: 0 0 auto 0;
  opacity: 0; transform: translateY(4px);
  transition: opacity .3s ease, transform .3s ease;
}
.reel-lines li.is-on { opacity: 1; transform: none; }

@media (max-width: 700px) {
  .hero-shot .screen { border-radius: 21px; }
  .reel-tabs { margin-top: 14px; max-width: 300px; }
  .reel-tab { font-size: .72rem; padding: 6px 2px; }
  .reel-captions { font-size: .82rem; max-width: 300px; }
}

/* ─────────────────────────────────────────────
   Agents: a chat panel instead of a list, and the
   picture on the left so it doesn't mirror Machines
   ───────────────────────────────────────────── */
@media (min-width: 921px) {
  .agents .split { grid-template-columns: 1fr 1fr; }
  .agents .split > .chat { order: -1; }
}
.chat { position: relative; margin: 0; padding-top: 48px; }
.chat-panel {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 30px 70px -40px rgba(0,0,0,.9);
}
.chat-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.chat-host {
  font-family: var(--mono); font-size: .78rem; color: var(--ink-2);
  padding: .22rem .6rem; border: 1px solid var(--line-2); border-radius: 100px;
}
.chat-pick {
  margin-left: auto; display: inline-flex; gap: 2px; padding: 3px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 100px;
}
.chat-pick span { padding: .2rem .6rem; border-radius: 100px; font-size: .74rem; color: var(--ink-3); font-weight: 500; }
.chat-pick .is-on { background: var(--accent-dim); color: var(--accent); }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chat-chips span {
  font-size: .72rem; color: var(--ink-3); padding: .16rem .55rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px;
}
.msg { margin: 0; font-size: .88rem; line-height: 1.5; }
.msg-me {
  margin-left: auto; max-width: 82%; width: fit-content;
  padding: .6rem .85rem; background: var(--accent); color: #04121d;
  border-radius: 14px 14px 4px 14px; font-weight: 500;
}
.steps { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 6px; }
.steps li {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: .45rem .65rem; font-size: .8rem; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
}
.steps code { background: none; border: 0; padding: 0; color: var(--ink); font-size: .78rem; }
.st-ic { width: 16px; text-align: center; color: var(--accent); font-family: var(--mono); }
.diff { margin-left: auto; font-family: var(--mono); font-size: .74rem; }
.diff i { font-style: normal; }
.diff .add { color: #3fb950; }
.diff .del { color: #f0716a; }
.pass { margin-left: auto; color: #3fb950; font-size: .76rem; font-weight: 500; }
.msg-agent {
  max-width: 88%; padding: .6rem .85rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
}
.chat-toast {
  position: absolute; z-index: 2; top: 0; right: -14px; width: min(300px, 78%);
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px;
  background: rgba(22,26,33,.92); backdrop-filter: blur(10px);
  border: 1px solid rgba(42,165,245,.35); border-radius: 12px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.95);
}
.chat-toast .note-ic {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-dim); color: var(--accent); font-size: .72rem;
}
.toast-txt b { display: block; font-size: .82rem; font-weight: 550; }
.toast-txt small { display: block; font-size: .74rem; color: var(--ink-3); line-height: 1.35; }
.toast-time { align-self: start; font-size: .68rem; color: var(--ink-3); }
.chat figcaption { margin-top: 14px; color: var(--ink-3); font-size: .84rem; line-height: 1.5; }

/* The chat plays out once it scrolls into view. */
.chat .msg-me, .chat .steps li, .chat .msg-agent { opacity: 0; transform: translateY(8px); }
.chat .chat-toast { opacity: 0; transform: translateY(-10px) scale(.97); }
.chat.in .msg-me, .chat.in .steps li, .chat.in .msg-agent, .chat.in .chat-toast {
  opacity: 1; transform: none;
  transition: opacity .45s cubic-bezier(.22,.7,.3,1), transform .45s cubic-bezier(.22,.7,.3,1);
}
.chat.in .msg-me { transition-delay: .25s; }
.chat.in .steps li { transition-delay: calc(.75s + var(--s) * .45s); }
.chat.in .msg-agent { transition-delay: 2.2s; }
.chat.in .chat-toast { transition-delay: 3s; }
@media (prefers-reduced-motion: reduce) {
  .chat .msg-me, .chat .steps li, .chat .msg-agent, .chat .chat-toast { opacity: 1; transform: none; }
}
@media (max-width: 700px) {
  .chat { padding-top: 70px; }
  .chat-panel { padding: 14px; }
  .chat-toast { right: 8px; }
  .msg { font-size: .84rem; }
}

/* ─────────────────────────────────────────────
   Machines: each host gets its own colour
   (border and icon); the pulse brightens it
   ───────────────────────────────────────────── */
.wire-hosts .wire-node:nth-child(1) { --c: #3fb950; }  /* workstation: green */
.wire-hosts .wire-node:nth-child(2) { --c: #a371f7; }  /* gpu-box: violet */
.wire-hosts .wire-node:nth-child(3) { --c: #e3a33a; }  /* server: amber */
.wire-hosts .wire-node { border-color: color-mix(in srgb, var(--c) 42%, transparent); }
.wire-hosts .wire-ic {
  color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent);
}
.wires.in .wire-hosts .wire-node { animation-name: answer-own; }
@keyframes answer-own {
  0%, 55%, 100% { border-color: color-mix(in srgb, var(--c) 42%, transparent); background: var(--surface-2); }
  22%           { border-color: color-mix(in srgb, var(--c) 90%, transparent); background: color-mix(in srgb, var(--c) 7%, var(--surface-2)); }
}
