/* PhoneDock site. Real recordings of an agent driving a real phone, on dark show bands, with the rest of the page in
   dark or light. Colours follow the Mac app's tokens (design/DESIGN.md): accent indigo, agent purple, needs-you orange. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations"), url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 850;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2-variations"), url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ground: light-dark(#e8e8ec, #0a0a0f);
  --ground-deep: light-dark(#dedee4, #07070b);
  --paper: light-dark(#ffffff, #12121a);
  --paper-2: light-dark(#f6f6f8, #171722);
  --ink: light-dark(#111114, #eeeef4);
  --ink-2: light-dark(#55555b, #a9a9b9);
  --ink-3: light-dark(#66666e, #7c7c8c);
  --line: light-dark(rgb(17 17 20 / 0.11), rgb(255 255 255 / 0.085));
  --line-2: light-dark(rgb(17 17 20 / 0.2), rgb(255 255 255 / 0.16));
  --accent: light-dark(#5856d6, #5e5ce6);
  --accent-ink: light-dark(#5856d6, #a5a3ff);
  --agent: light-dark(#af52de, #bf5af2);
  --agent-ink: light-dark(#7a2fa8, #d08cff);
  --you: light-dark(#5856d6, #7d7aff);
  --handoff: light-dark(#c2410c, #ff9f0a);
  --handoff-ink: light-dark(#9a3d00, #ff9f0a);
  --ok: light-dark(#248a3d, #30d158);
  --booth: light-dark(rgb(88 86 214 / 0), rgb(94 92 230 / 0.13));
  --pool: light-dark(rgb(255 255 255 / 0.9), rgb(206 210 255 / 0.13));

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

  --wrap: 1240px;
  --gutter: 56px;
  --r-control: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 420;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--ink-3) var(--ground); scrollbar-width: thin; }
p { margin: 0; }
p, li, blockquote, summary, figcaption { text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 760; text-wrap: balance; }
code, .mono { font-family: var(--f-mono); font-size: 0.86em; font-weight: 450; letter-spacing: -0.01em; }
p code, li code { padding: 0.12em 8px; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; background: var(--line); color: var(--ink); }
strong { font-weight: 650; }
/* Components set their own display, which would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 56px; padding-right: 56px; }

/* ---------- Keys: buttons are cue-light keys ---------- */
.key {
  --lamp: var(--ink-3);
  display: inline-flex; align-items: center; gap: 0.65em;
  min-height: 48px; padding: 0 20px 0 16px;
  border-radius: var(--r-control);
  border: 1px solid var(--line-2);
  background: color-mix(in oklab, var(--paper) 72%, transparent);
  color: var(--ink);
  font: 620 1rem/1 var(--f-sans); font-stretch: 104%;
  text-decoration: none; cursor: pointer;
  transition: border-color 0.18s var(--ease-out), background-color 0.18s var(--ease-out), transform 0.12s var(--ease-out);
}
.key:hover { border-color: var(--ink-2); text-decoration: none; }
.key:active { transform: translateY(1px); }
.lamp {
  width: 12px; height: 12px; padding: 2px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--lamp-ring, var(--line-2));
  background: var(--lamp) content-box;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.key:hover .lamp, .key:focus-visible .lamp { --lamp: var(--accent-ink); --lamp-ring: var(--accent-ink); }
.key-primary { --lamp: rgb(255 255 255 / 0.45); --lamp-ring: rgb(255 255 255 / 0.35); background: var(--accent); border-color: transparent; color: #fff; }
.key-primary:hover { background: color-mix(in oklab, var(--accent) 88%, #fff); border-color: transparent; }
.key-primary:hover .lamp, .key-primary:focus-visible .lamp { --lamp: #fff; --lamp-ring: #fff; }
.key:disabled { opacity: 0.45; cursor: default; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions-center { justify-content: center; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  height: 64px; padding-inline: var(--gutter);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: color-mix(in oklab, var(--ground) 90%, transparent); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 720; font-stretch: 112%; font-size: 1.0625rem; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 4px; margin: 0 auto; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; font-weight: 520; }
.nav-links a:hover { color: var(--ink); background: var(--line); }
.nav-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-links + .nav-end { margin-left: 0; }
.theme-toggle, .nav-gh {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 9px; background: transparent; color: var(--ink);
  font: 560 0.875rem/1 var(--f-sans); text-decoration: none; cursor: pointer;
}
.theme-toggle { width: 36px; padding: 0; }
.theme-toggle:hover, .nav-gh:hover { border-color: var(--ink-2); text-decoration: none; }
.theme-toggle .i-moon, :root[data-resolved="light"] .theme-toggle .i-sun { display: none; }
:root[data-resolved="light"] .theme-toggle .i-moon { display: block; }
:root:not(.js) .theme-toggle { display: none; }

/* ---------- Show bands: dark in both themes (the hero, the real runs, the handoff) ---------- */
.show { color-scheme: dark; color: var(--ink); }
/* Over the hero the bar reads in the show band's ink; once it has its own ground it follows the page theme. */
.nav:not(.is-scrolled) { color-scheme: dark; }

/* ---------- Hero: a real phone playing real runs, and the agent's calls beside it ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--ground); }
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
/* A scrim for the copy on the left, a fade into the band below, and a fine grain so the defocused plate reads as film. */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(7 7 11 / 0.94) 0%, rgb(7 7 11 / 0.74) 32%, rgb(7 7 11 / 0.2) 60%, rgb(7 7 11 / 0.42) 100%),
    linear-gradient(180deg, rgb(7 7 11 / 0.6) 0%, transparent 16%, transparent 72%, var(--ground) 100%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero-inner {
  position: relative; max-width: 1480px; min-height: max(700px, 100svh); margin: 0 auto;
  padding: 104px var(--gutter) 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(32px, 4vw, 72px);
}
.hero-copy { max-width: 36rem; }
.hero h1 {
  font-size: clamp(2.5rem, 4.7vw, 4.875rem);
  line-height: 0.98;
  max-width: 9.5em;
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: -0.034em;
}
.hero-sub { margin-top: 28px; max-width: 34rem; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); line-height: 1.55; color: var(--ink-2); }
.hero .actions { margin-top: 32px; }
.hero-meta { margin-top: 18px; color: var(--ink-2); font-size: 0.875rem; font-stretch: 92%; }

.demo { margin: 0; display: flex; align-items: center; gap: clamp(20px, 2.4vw, 36px); }
.demo-side { width: clamp(300px, 25vw, 380px); display: grid; gap: 12px; }
.demo-note { padding: 0 2px; color: var(--ink-2); font-size: 0.8125rem; line-height: 1.5; }

/* Task tabs: one per recording, each with a rail that fills as its run plays. */
.tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.task { display: grid; gap: 9px; padding: 6px 2px 4px; border: 0; background: none; color: var(--ink-2); font: 620 0.8125rem/1.2 var(--f-sans); font-stretch: 104%; text-align: left; cursor: pointer; border-radius: 6px; }
.task:hover { color: var(--ink); }
.task[aria-pressed="true"] { color: var(--ink); }
.task-rail { display: block; height: 2px; border-radius: 2px; background: rgb(255 255 255 / 0.14); overflow: hidden; }
.task-rail span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.task[aria-pressed="true"] .task-rail span { background: var(--agent); }

/* The agent card: the site's own dark terminal card, titled Claude Code. */
.term {
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.1);
  background: rgb(13 13 19 / 0.84);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 40px 80px -40px rgb(0 0 0 / 0.9);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
}
.term-bar { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); }
.term-lamp { width: 12px; height: 12px; padding: 2px; flex: none; border-radius: 50%; border: 1.5px solid var(--agent); background: var(--agent) content-box; }
.term-name { color: var(--ink); font-weight: 650; font-size: 0.875rem; font-stretch: 104%; }
.term-clock { margin-left: auto; color: var(--ink-2); font-size: 0.75rem; }
.term-clock .mono { color: var(--ink); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.term-hold { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: 560 0.75rem/1 var(--f-sans); cursor: pointer; }
.term-hold:hover { color: var(--ink); background: var(--line); }
.term-hold .i-play, .term-hold[data-paused] .i-pause { display: none; }
.term-hold[data-paused] .i-play { display: block; }
.term-log {
  list-style: none; margin: 0; padding: 14px 16px 16px; height: 236px;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 9px; overflow: hidden;
}
.term-log.is-full {
  justify-content: flex-end;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 64px); mask-image: linear-gradient(180deg, transparent 0, #000 64px);
}
.term-prompt { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 10px; align-items: baseline; min-height: calc(3 * 1.45 * 0.9375rem + 28px); padding: 14px 16px; border-bottom: 1px solid var(--line); }
.term-prompt p { color: var(--ink); font-size: 0.9375rem; font-weight: 560; line-height: 1.45; }
.ln { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 10px; align-items: baseline; flex: none; }
.ln-mark { color: var(--accent-ink); font-family: var(--f-mono); font-size: 0.8125rem; font-weight: 600; }
.ln-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); justify-self: center; transform: translateY(-1px); transition: background-color 0.3s; }
.ln-call code { display: block; padding: 0; background: none; color: var(--ink-2); font-size: 0.75rem; line-height: 1.55; overflow-wrap: anywhere; }
.ln-call .ns { color: var(--ink-3); }
.ln-call .fn { color: var(--ink); }
/* A running call wears the cue-light ring: a purple ring around a purple core. */
.ln-call.is-run .ln-dot { width: 11px; height: 11px; padding: 1.5px; border: 1.5px solid var(--agent); background: var(--agent) content-box; transform: translateY(0); }
.ln-call.is-run code { color: var(--ink); }
.ln-more { color: var(--ink-3); font-size: 0.75rem; }
.ln-more .ln-dot { background: transparent; }
.ln-answer .ln-dot { background: var(--ok); }
.ln-answer p { color: var(--ink); font-size: 0.9375rem; line-height: 1.5; }
.caret { display: inline-block; width: 0.5em; height: 1.05em; margin-left: 2px; vertical-align: -0.16em; background: currentColor; opacity: 0.7; }
@media (prefers-reduced-motion: no-preference) {
  .ln.is-new { animation: ln-in 0.42s var(--ease-out) both; }
  .caret { animation: blink 1s steps(1) infinite; }
  .hero-bg img { animation: settle 2.4s var(--ease-out) both; }
}
@keyframes ln-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes settle { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }

/* ---------- The phone: a plain black slab with no brand marks ---------- */
.phone {
  --pw: 240px; --bz: calc(var(--pw) * 0.03);
  position: relative; flex: none; width: var(--pw); padding: var(--bz);
  border-radius: calc(var(--pw) * 0.15); background: #050507;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06), 0 0 0 2px #2a2a31, 0 0 0 3px #0b0b0e, 0 44px 70px -40px rgb(0 0 0 / 0.9);
}
.phone-screen { position: relative; aspect-ratio: 1072 / 2400; border-radius: calc(var(--pw) * 0.12); overflow: hidden; background: #000; }
/* The recordings start below the status bar: a black strip with the camera stands in for it. */
.phone-screen::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4.4%; z-index: 1; background: radial-gradient(circle at 50% 56%, #17171c 0 calc(var(--pw) * 0.018), #000 calc(var(--pw) * 0.02)); }
.phone-screen video { position: absolute; left: 0; bottom: 0; width: 100%; height: 95.6%; object-fit: cover; }
.phone-ios .phone-screen::before { background: #000; }
.phone-ios .phone-screen video { height: 96.6%; }
.phone-hero { --pw: clamp(250px, 32vh, 324px); }
.phone-hero::before { content: ""; position: absolute; z-index: -1; inset: -12% -55% -6%; background: radial-gradient(closest-side, rgb(110 96 255 / 0.3), transparent 72%); pointer-events: none; }
.phone-hero video { opacity: 0; transition: opacity 0.5s var(--ease-out); }
.phone-hero video.is-on { opacity: 1; }

/* ---------- Sections ---------- */
.sec { padding-top: 112px; padding-bottom: 112px; position: relative; }
.sec-head { max-width: 44rem; margin-bottom: clamp(40px, 4.4vw, 64px); }
.sec h2 { font-size: clamp(2rem, 3.9vw, 3.5rem); line-height: 1.02; font-stretch: 112%; letter-spacing: -0.028em; }
.sec-sub { margin-top: 20px; font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 38rem; }
.beta { display: inline-block; vertical-align: 0.12em; margin-left: 4px; padding: 4px 8px; border-radius: 6px; border: 1px solid currentColor; font-size: 0.6875rem; line-height: 1.3; font-weight: 650; font-stretch: 85%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--handoff-ink); }

/* What it is */
.sec.what { padding-top: 128px; }
.what-lede { font-size: clamp(1.5rem, 2.6vw, 2.25rem) !important; line-height: 1.24 !important; font-weight: 620 !important; font-stretch: 104% !important; letter-spacing: -0.016em !important; max-width: 44ch; }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); margin-top: clamp(40px, 5vw, 72px); padding-top: 28px; border-top: 1px solid var(--line); }
.role { position: relative; padding-left: 26px; color: var(--ink-2); max-width: 30ch; }
.role strong { display: block; color: var(--ink); margin-bottom: 4px; }
.role-light { position: absolute; left: 0; top: 0.42em; width: 14px; height: 14px; padding: 2.5px; border-radius: 50%; border: 1.5px solid var(--c); background: var(--c) content-box; }
.role-agent .role-light { --c: var(--agent); }
.role-handoff .role-light { --c: var(--handoff); }
.role-you .role-light { --c: var(--you); }

/* How it works: the chain */
.chain { position: relative; margin: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 0; min-height: 300px; }
.chain-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wire { fill: none; stroke: var(--line-2); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wire-live { stroke: var(--agent); stroke-width: 2; stroke-dasharray: 14 200; stroke-dashoffset: 14; opacity: 0; }
.chain.is-on .wire-live { opacity: 1; animation: packet 2.6s var(--ease-out) infinite; }
.chain.is-on .wire-live-2 { animation-delay: 0.9s; stroke: var(--accent-ink); }
@keyframes packet { from { stroke-dashoffset: 14; } to { stroke-dashoffset: -100; } }
.chain-col { position: relative; z-index: 1; }
.chain-label { font-size: 0.75rem; font-weight: 660; font-stretch: 80%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.chain-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chain-agents { justify-self: start; align-self: start; }
.chain-agents li, .chain-devices li { font-size: 1.125rem; font-weight: 560; padding: 6px 0; }
.chain-devices { justify-self: end; align-self: start; min-width: 13rem; }
.chain-devices li { padding-left: 20px; position: relative; }
.chain-devices li::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 2px; background: var(--ink-3); }
.chain-hub { justify-self: center; text-align: center; padding: 28px 30px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--paper); box-shadow: 0 24px 60px -36px rgb(0 0 0 / 0.5); min-width: 15rem; }
.hub-name { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 1.5rem; font-weight: 760; font-stretch: 112%; letter-spacing: -0.01em; }
.hub-name img { border-radius: 10px; }
.hub-detail { margin-top: 12px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.6; }

.calls { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); counter-reset: call; }
.calls li { padding-top: 22px; border-top: 1px solid var(--line-2); color: var(--ink-2); counter-increment: call; }
.calls li strong { color: var(--ink); }
.call { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; color: var(--ink); }
.call::before { content: counter(call); font-size: 0.8125rem; font-weight: 700; font-stretch: 80%; color: var(--agent-ink); font-variant-numeric: tabular-nums; }
.call .mono { font-size: 0.9375rem; }

/* Handoff: the heading, then the steps and the real recording */
.handoff { padding-top: 0; background: var(--ground-deep); border-block: 1px solid var(--line); overflow: hidden; }
.handoff-top { position: relative; display: flex; align-items: flex-end; padding-top: clamp(72px, 9vw, 128px); padding-bottom: clamp(32px, 4vw, 56px); margin-bottom: clamp(8px, 1vw, 16px); }
.handoff-top .wrap { width: 100%; }
.handoff-top .sec-head { margin-bottom: 0; max-width: 40rem; }
/* The three steps run across as the recording's timeline, and the real recording below them gets the full width. */
.handoff-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 52px); }
.steps-cue { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 44px); }
.steps-cue li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink-2); transition: color 0.3s; }
.step-title { color: var(--ink); font-weight: 650; margin-bottom: 2px; }
.step-light { --c: var(--ink-3); width: 14px; height: 14px; padding: 2.5px; margin-top: 0.45em; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--c) content-box; transition: background-color 0.3s, border-color 0.3s; }
.steps-cue li.is-lit .step-handoff { --c: var(--handoff); border-color: var(--handoff); }
.steps-cue li.is-lit .step-you { --c: var(--you); border-color: var(--you); }
.steps-cue li.is-lit .step-agent { --c: var(--agent); border-color: var(--agent); }
.steps-cue li.is-lit .step-title { color: var(--ink); }

.handoff-media { margin: 0; }
.handoff-media figcaption { margin-top: 16px; color: var(--ink-2); font-size: 0.9375rem; }
.clip { position: relative; }
.clip video { display: block; width: 100%; height: auto; }
.clip-wide { border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 40px 100px -50px rgb(0 0 0 / 0.55); }
.clip-hold {
  position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px;
  border: 0; border-radius: 10px; background: rgb(18 18 20 / 0.72); color: #fff; font: 600 0.75rem/1 var(--f-sans); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background-color 0.2s;
}
.clip-hold:hover { background: rgb(18 18 20 / 0.9); }
.clip-hold svg { flex: none; max-width: none; }
.clip-hold:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent); }
.clip-hold .i-play, .clip-hold[data-paused] .i-pause { display: none; }
.clip-hold[data-paused] .i-play { display: block; }

/* Devices: the real PhoneDock window (recorded with four devices in the sidebar) on a dark stage with a soft
   indigo glow. Then the four kinds of device. */
.fleet { margin: 0; }
.fleet-stage {
  position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: center;
  padding: clamp(48px, 8vw, 112px) clamp(16px, 5vw, 72px) clamp(28px, 4vw, 56px);
  border-radius: 18px; background: radial-gradient(70% 60% at 50% 0%, rgb(106 92 245 / 0.28), transparent 72%), #07070b; box-shadow: 0 0 0 1px var(--line);
}
.fleet-stage::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(7 7 11 / 0.2) 0%, rgb(7 7 11 / 0.5) 45%, rgb(7 7 11 / 0.9) 100%); }
.fleet-app { display: block; width: min(100%, 908px); height: auto; border-radius: 12px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12), 0 0 0 7px rgb(10 10 15 / 0.55), 0 48px 90px -30px rgb(0 0 0 / 0.85); }
.fleet figcaption { max-width: 40rem; margin: 18px auto 0; color: var(--ink-2); font-size: 0.9375rem; text-align: center; }
.targets { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.targets li { padding-top: 18px; border-top: 1px solid var(--line-2); color: var(--ink-2); font-size: 0.9375rem; }
.pl-name { color: var(--ink); font-weight: 680; font-size: 1.1875rem; font-stretch: 108%; margin-bottom: 6px; }
.agents-row { margin-top: clamp(48px, 5vw, 72px); padding-top: 28px; border-top: 1px solid var(--line); }
.agents-lede { max-width: 42rem; color: var(--ink-2); font-size: clamp(1.0625rem, 1.4vw, 1.25rem); }
.agents-lede strong { color: var(--ink); font-weight: 650; }
.agents-lede .mono { font-size: 0.9em; }

/* Use cases: four real runs side by side, each with its prompt, the recording and the agent's answer */
/* The launch video: the real recordings, cut with a voice-over; native controls, so it plays with sound. */
.film { background: var(--ground); padding-bottom: 40px; }
.film-frame { margin: 0; }
.film-frame video { aspect-ratio: 16 / 9; background: #07070b; }
.uses { background: var(--ground); }
.runs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(20px, 2.6vw, 40px); row-gap: 56px; }
.run { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 14px; align-content: start; }
.run-app { padding-top: 18px; border-top: 1px solid var(--line-2); color: var(--ink); font-weight: 680; font-size: 1rem; font-stretch: 108%; }
.run-ask { margin: 0; color: var(--ink); font-size: clamp(1.0625rem, 1.2vw, 1.1875rem); line-height: 1.42; font-weight: 520; letter-spacing: -0.01em; }
.run-ask-plain { color: var(--ink-2); font-weight: 480; }
.run-media { position: relative; justify-self: start; margin-top: 12px; }
.run-media .clip-hold { right: 12px; bottom: 34px; }
.run-answer { padding-top: 4px; }
.ra-who { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 0.875rem; font-weight: 650; }
.ra-lamp { --c: var(--agent); width: 12px; height: 12px; padding: 2px; flex: none; border-radius: 50%; border: 1.5px solid var(--c); background: var(--c) content-box; }
.ra-lamp-you { --c: var(--you); }
.ra-calls { margin-left: auto; color: var(--ink-2); font-size: 0.8125rem; font-weight: 480; font-variant-numeric: tabular-nums; }
.ra-text { margin-top: 8px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; }

.more { margin-top: clamp(72px, 8vw, 112px); }
.more-title { margin-bottom: 8px; font-size: 1.25rem; font-weight: 700; font-stretch: 108%; }
.runsheet { list-style: none; margin: 0; padding: 0; }
.runsheet li { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 40px; align-items: baseline; padding: 28px 0; border-top: 1px solid var(--line-2); }
.runsheet li:last-child { border-bottom: 1px solid var(--line-2); }
.rs-kind { font-weight: 660; font-size: 1rem; font-stretch: 108%; }
.rs-ask { margin: 0; font-size: clamp(1.1875rem, 1.8vw, 1.5rem); line-height: 1.4; font-weight: 520; letter-spacing: -0.012em; text-wrap: pretty; }
.rs-what { color: var(--ink-2); font-size: 0.9375rem; }

/* Flows: an open prompt book */
.flows { background: var(--ground-deep); border-block: 1px solid var(--line); }
.book { display: grid; grid-template-columns: 1fr 1fr; border-radius: 16px; border: 1px solid var(--line-2); background: var(--paper); overflow: hidden; box-shadow: 0 40px 90px -50px rgb(0 0 0 / 0.45); }
.book-page { position: relative; padding: 40px; min-width: 0; }
.book-page + .book-page { border-left: 1px solid var(--line); background: linear-gradient(90deg, light-dark(rgb(0 0 0 / 0.045), rgb(0 0 0 / 0.35)), transparent 28px); }
.book-flow { padding-right: 200px; background: radial-gradient(120% 70% at 30% 0%, var(--booth), transparent 70%); }
.book-file { font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-2); margin-bottom: 18px; }
.code { margin: 0; font-family: var(--f-mono); font-size: clamp(0.78rem, 0.95vw, 0.875rem); line-height: 1.75; color: var(--ink); overflow-x: auto; white-space: pre; tab-size: 2; }
.code:focus-visible { outline-offset: 6px; }
.code .k { color: var(--accent-ink); }
.code .s { color: var(--agent-ink); }
.code .p { color: var(--ink-2); }
.code .ok { color: var(--ok); font-weight: 600; }
.code .dim { color: var(--ink-2); }
.pencil { position: absolute; top: 40px; right: 166px; width: 30px; height: calc(100% - 80px); overflow: visible; }
.pencil path { fill: none; stroke: var(--ink-2); stroke-width: 1.3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.margin-notes { position: absolute; top: 40px; right: 24px; width: 140px; height: calc(100% - 80px); margin: 0; padding: 30px 0 0; list-style: none; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; font-size: 0.75rem; line-height: 1.4; color: var(--ink-2); font-stretch: 92%; }
.book-note { margin-top: 18px; font-size: 0.8125rem; color: var(--ink-2); }
.flow-facts { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); }
.flow-facts li { color: var(--ink-2); font-size: 0.9375rem; }
.flow-facts strong { display: block; color: var(--ink); margin-bottom: 2px; }

/* Setup */
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.setup-steps > li { counter-increment: step; display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 16px; padding: 28px 0; border-top: 1px solid var(--line-2); color: var(--ink-2); }
.setup-steps > li:last-child { border-bottom: 1px solid var(--line-2); }
.setup-steps > li::before { content: counter(step); grid-row: 1 / span 3; font-size: 2rem; line-height: 1; font-weight: 800; font-stretch: 120%; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.setup-steps > li > * { grid-column: 2; }
.ss-title { color: var(--ink); font-weight: 680; font-size: 1.25rem; font-stretch: 108%; margin-bottom: 6px; }
.ss-main::before { color: var(--accent-ink) !important; }
.cmd { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; padding: 14px 14px 14px 20px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line-2); }
.cmd code { flex: 1; min-width: 0; padding: 0; background: none; color: var(--ink); font-size: clamp(0.8125rem, 1.15vw, 1rem); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.cmd-prompt code { font-family: var(--f-sans); font-size: clamp(0.9375rem, 1.2vw, 1.0625rem); letter-spacing: 0; white-space: normal; }
.copy { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--paper-2); color: var(--ink); font: 600 0.8125rem/1 var(--f-sans); cursor: pointer; }
.copy:hover { border-color: var(--ink-2); }
.copy.is-done { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 50%, transparent); }
.ss-note { font-size: 0.9375rem; max-width: 32rem; }
.ss-note strong { color: var(--ink); }
.setup-req { margin-top: 28px; color: var(--ink-2); font-size: 0.9375rem; max-width: 32rem; }

/* Plain facts */
.plain-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.plain-col h3 { font-size: 1.1875rem; font-weight: 700; font-stretch: 108%; margin-bottom: 14px; }
.plain-col p { color: var(--ink-2); }
.plain-col p + p { margin-top: 14px; }
.plain-col p + h3 { margin-top: 28px; }
.limits { margin: 0; padding: 0; list-style: none; color: var(--ink-2); }
.limits li { position: relative; padding: 0 0 10px 18px; }
.limits li::before { content: ""; position: absolute; left: 0; top: calc(0.72em - 1px); width: 8px; height: 2px; border-radius: 1px; background: var(--handoff); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.faq details { border-top: 1px solid var(--line-2); }
.faq details:last-child { border-bottom: 1px solid var(--line-2); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 2px; cursor: pointer; list-style: none; font-weight: 620; font-size: 1.125rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 1.75px solid var(--ink-2); border-bottom: 1.75px solid var(--ink-2); transform: translateY(-3px) rotate(45deg); transition: transform 0.25s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary:hover { color: var(--accent-ink); }
.faq details p { padding: 0 2px 22px; color: var(--ink-2); max-width: 62ch; }

/* Curtain call */
.sec.curtain { text-align: center; overflow: hidden; padding-top: 144px; padding-bottom: 144px; }
.call-pool { position: absolute; left: 50%; bottom: -30%; width: min(1100px, 140vw); aspect-ratio: 2.4 / 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, var(--pool), transparent); opacity: 0.25; transition: opacity 1.6s var(--ease-out); pointer-events: none; }
.curtain.is-lit .call-pool { opacity: 1; }
.call-inner { position: relative; }
.call-icon { margin: 0 auto 28px; width: 112px; height: 112px; filter: drop-shadow(0 24px 30px rgb(0 0 0 / 0.35)); }
.curtain h2 { font-size: clamp(2.5rem, 5.2vw, 4.75rem); font-stretch: 116%; font-weight: 800; letter-spacing: -0.035em; }
.curtain .sec-sub { margin-inline: auto; }
.curtain .actions { margin-top: 36px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 32px 40px; font-size: 0.875rem; color: var(--ink-2); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--ink); }
.foot-credits { margin-left: auto; color: var(--ink-2); }

/* ---------- Reveal: content is visible by default; motion only enhances ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
  .js .rv.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .chain.is-on .wire-live { animation: none; opacity: 0; }
  .call-pool, .key, .lamp, .phone-hero video, .ln-dot { transition: none; }
}

/* ---------- Responsive ---------- */
/* Below 1200px the hero stacks: the copy, then the phone with the agent card beside it. */
@media (max-width: 1199px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); row-gap: 56px; min-height: 0; padding-top: 128px; padding-bottom: 72px; }
  .hero-copy { max-width: 44rem; }
  .demo { justify-self: center; }
  .hero::before { background:
    linear-gradient(180deg, rgb(7 7 11 / 0.82) 0%, rgb(7 7 11 / 0.55) 40%, rgb(7 7 11 / 0.35) 70%, var(--ground) 100%); }
}
@media (max-width: 1080px) {
  :root { --gutter: 40px; }
  .wrap { padding-left: 40px; padding-right: 40px; }
  .sec { padding-top: 96px; padding-bottom: 96px; }
  .handoff { padding-top: 0; }
  .book-flow { padding-right: 176px; }
  .margin-notes { width: 120px; }
  .pencil { right: 146px; }
  .nav-links { display: none; }
  .nav-end { margin-left: auto !important; }
  .plain-grid { grid-template-columns: 1fr 1fr; }
  .plain-title { grid-column: 1 / -1; }
  .runs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 64px; }
  .targets { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .runsheet li { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); }
  .rs-what { grid-column: 2; }
}
@media (max-width: 820px) {
  :root { --gutter: 20px; }
  .sec.what { padding-top: 80px; }
  .sec.curtain { padding-top: 96px; padding-bottom: 96px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .sec { padding-top: 72px; padding-bottom: 72px; }
  .handoff { padding-top: 0; }
  .hero-inner { padding-top: 96px; padding-bottom: 48px; row-gap: 40px; }
  .hero-bg img { object-position: 50% 30%; }
  .hero h1 { font-size: clamp(2.125rem, 9.4vw, 2.75rem); }
  .hero-sub { margin-top: 16px; font-size: 1rem; }
  .hero .actions { margin-top: 22px; }
  /* The phone first, then the tabs, the card and the note under it, so the calls sit right below the screen. */
  .demo { flex-direction: column; gap: 20px; width: 100%; }
  .demo-side { width: min(100%, 440px); }
  .phone-hero { --pw: min(68vw, 264px); order: -1; }
  .steps-cue { grid-template-columns: minmax(0, 1fr); }
  .steps-cue li:last-child { border-bottom: 1px solid var(--line); }
  .term-log { height: 208px; }
  .roles { grid-template-columns: 1fr; gap: 20px; }
  .role { max-width: none; }
  .chain { grid-template-columns: 1fr; gap: 28px; min-height: 0; }
  .chain-wires { display: none; }
  .chain-agents, .chain-devices, .chain-hub { justify-self: stretch; }
  .chain-agents ul, .chain-devices ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .chain-devices li { padding-left: 0; }
  .chain-devices li::before { display: none; }
  .chain-hub { text-align: left; }
  .hub-name { justify-content: flex-start; }
  .calls { grid-template-columns: 1fr; }
  /* The runs become a row you swipe through, one phone at a time with the next one peeking in. */
  .runs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(80%, 320px); column-gap: 20px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 20px;
    margin-inline: -20px; padding: 0 20px 12px; scrollbar-width: none; }
  .runs::-webkit-scrollbar { display: none; }
  .run { scroll-snap-align: start; }
  .run .phone { --pw: 220px; }
  .handoff-top { padding-top: 56px; }
  .targets { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .pl-name { font-size: 1.0625rem; }
  .fleet-stage { border-radius: 14px; }
  .fleet-app { border-radius: 8px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12), 0 24px 48px -20px rgb(0 0 0 / 0.85); }
  .fleet figcaption { text-align: left; }
  .runsheet li { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .rs-what { grid-column: auto; }
  .book { grid-template-columns: 1fr; }
  .book-page + .book-page { border-left: 0; border-top: 1px solid var(--line); background: linear-gradient(180deg, light-dark(rgb(0 0 0 / 0.04), rgb(0 0 0 / 0.3)), transparent 24px); }
  .book-page { padding: 24px; }
  .book-flow { padding-right: 24px; }
  .pencil { display: none; }
  .margin-notes { position: static; width: auto; height: auto; padding: 18px 0 0; margin-top: 18px; border-top: 1px dashed var(--line-2); display: grid; gap: 6px; font-size: 0.8125rem; }
  .flow-facts { grid-template-columns: 1fr; }
  .plain-grid, .faq-grid { grid-template-columns: 1fr; }
  .setup-steps > li { grid-template-columns: 40px minmax(0, 1fr); }
  .setup-steps > li::before { font-size: 1.5rem; }
  .cmd { flex-wrap: wrap; }
  .cmd code { flex-basis: 100%; white-space: normal; word-break: normal; overflow-wrap: normal; }
  .cmd-prompt code { word-break: normal; }
  .foot-credits { margin-left: 0; }
}
@media (max-width: 600px) {
  /* Tabs, then the phone, then the card right under it, so a call lands while you watch the screen change. */
  .demo { gap: 14px; }
  .demo-side { display: contents; }
  .tasks { order: 1; width: min(100%, 440px); }
  .phone-hero { order: 2; --pw: min(56vw, 214px); }
  .term { order: 3; width: min(100%, 440px); }
  .demo-note { order: 4; width: min(100%, 440px); margin-top: 0; }
  .term-prompt { min-height: 0; padding-block: 10px; }
  .term-prompt p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 0.875rem; }
  .term-log { height: 128px; padding-block: 10px 12px; gap: 7px; }
}
@media (max-width: 480px) {
  .nav-gh span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav-gh { width: 36px; padding: 0; }
  .actions .key { flex: 1 1 auto; justify-content: center; padding-inline: 12px; }
  .key-label-long { display: none; }
  .targets { grid-template-columns: 1fr; }
}
