/*
 * Landing page styles. No framework, no build step.
 * Scene: a tech lead at a small startup opens a link a teammate pasted into
 * chat, on a laptop next to three agent terminals, in the evening, deciding
 * whether this is worth a curl. Dark-first to sit next to those terminals and
 * to match the product; the light theme follows the system or the toggle.
 * Palette is the product's own: graphite ink, signal green for "live",
 * amber for "a human is needed", red for "stuck".
 */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-stretch: 100% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --font-display: "Archivo", "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --section-y: clamp(72px, 9vw, 136px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.32, 0.72, 0, 1);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  /* dark (default) */
  --bg: oklch(0.158 0.005 265);
  --bg-alt: oklch(0.138 0.005 265);
  --surface: oklch(0.188 0.006 265);
  --surface-2: oklch(0.218 0.007 265);
  --line: oklch(0.262 0.006 265);
  --line-soft: oklch(0.225 0.006 265);
  --line-strong: oklch(0.34 0.008 265);
  --shell: oklch(1 0 0 / 0.035);
  --shell-line: oklch(1 0 0 / 0.08);
  --inner-hi: inset 0 1px 0 oklch(1 0 0 / 0.06);

  --text: oklch(0.955 0.004 265);
  --text-2: oklch(0.8 0.008 265);
  --text-3: oklch(0.68 0.01 265);
  --text-4: oklch(0.52 0.01 265);

  --signal: oklch(0.83 0.16 155);
  --signal-text: oklch(0.83 0.16 155);
  --signal-ink: oklch(0.2 0.045 155);
  --signal-soft: oklch(0.83 0.16 155 / 0.11);
  --signal-line: oklch(0.83 0.16 155 / 0.32);
  --amber: oklch(0.84 0.13 78);
  --amber-soft: oklch(0.84 0.13 78 / 0.12);
  --amber-line: oklch(0.84 0.13 78 / 0.4);
  --red: oklch(0.74 0.15 24);
  --red-soft: oklch(0.72 0.16 24 / 0.13);

  --glow: oklch(0.83 0.16 155 / 0.10);
  --shadow: 0 30px 80px -30px oklch(0.05 0.01 265 / 0.9), 0 8px 24px -12px oklch(0.05 0.01 265 / 0.6);

  /* terminals stay dark in both themes */
  --term-bg: oklch(0.135 0.006 265);
  --term-line: oklch(0.27 0.007 265);
  --term-text: oklch(0.93 0.004 265);
  --term-2: oklch(0.8 0.008 265);
  --term-dim: oklch(0.64 0.01 265);
  --term-green: oklch(0.83 0.16 155);
  --term-amber: oklch(0.84 0.13 78);
  --term-red: oklch(0.74 0.15 24);
  --term-blue: oklch(0.78 0.09 235);

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: oklch(0.985 0.002 265);
    --bg-alt: oklch(0.962 0.003 265);
    --surface: oklch(0.995 0.001 265);
    --surface-2: oklch(0.955 0.003 265);
    --line: oklch(0.9 0.004 265);
    --line-soft: oklch(0.935 0.003 265);
    --line-strong: oklch(0.82 0.006 265);
    --shell: oklch(0.2 0.01 265 / 0.035);
    --shell-line: oklch(0.2 0.01 265 / 0.08);
    --inner-hi: inset 0 1px 0 oklch(1 0 0 / 0.9);
    --text: oklch(0.205 0.01 265);
    --text-2: oklch(0.38 0.01 265);
    --text-3: oklch(0.48 0.01 265);
    --text-4: oklch(0.62 0.008 265);
    --signal: oklch(0.5 0.13 155);
    --signal-text: oklch(0.47 0.12 155);
    --signal-ink: oklch(0.985 0.01 155);
    --signal-soft: oklch(0.6 0.14 155 / 0.1);
    --signal-line: oklch(0.54 0.13 155 / 0.35);
    --amber: oklch(0.52 0.12 65);
    --amber-soft: oklch(0.75 0.14 75 / 0.18);
    --amber-line: oklch(0.62 0.13 70 / 0.5);
    --red: oklch(0.52 0.19 25);
    --red-soft: oklch(0.6 0.19 25 / 0.1);
    --glow: oklch(0.7 0.14 155 / 0.12);
    --shadow: 0 30px 70px -34px oklch(0.3 0.02 265 / 0.35), 0 6px 18px -10px oklch(0.3 0.02 265 / 0.16);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: oklch(0.985 0.002 265);
  --bg-alt: oklch(0.962 0.003 265);
  --surface: oklch(0.995 0.001 265);
  --surface-2: oklch(0.955 0.003 265);
  --line: oklch(0.9 0.004 265);
  --line-soft: oklch(0.935 0.003 265);
  --line-strong: oklch(0.82 0.006 265);
  --shell: oklch(0.2 0.01 265 / 0.035);
  --shell-line: oklch(0.2 0.01 265 / 0.08);
  --inner-hi: inset 0 1px 0 oklch(1 0 0 / 0.9);
  --text: oklch(0.205 0.01 265);
  --text-2: oklch(0.38 0.01 265);
  --text-3: oklch(0.48 0.01 265);
  --text-4: oklch(0.62 0.008 265);
  --signal: oklch(0.5 0.13 155);
  --signal-text: oklch(0.47 0.12 155);
  --signal-ink: oklch(0.985 0.01 155);
  --signal-soft: oklch(0.6 0.14 155 / 0.1);
  --signal-line: oklch(0.54 0.13 155 / 0.35);
  --amber: oklch(0.52 0.12 65);
  --amber-soft: oklch(0.75 0.14 75 / 0.18);
  --amber-line: oklch(0.62 0.13 70 / 0.5);
  --red: oklch(0.52 0.19 25);
  --red-soft: oklch(0.6 0.19 25 / 0.1);
  --glow: oklch(0.7 0.14 155 / 0.12);
  --shadow: 0 30px 70px -34px oklch(0.3 0.02 265 / 0.35), 0 6px 18px -10px oklch(0.3 0.02 265 / 0.16);
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }

/* theme-specific images */
.theme-light-only { display: none; }
:root[data-theme="light"] .theme-light-only { display: block; }
:root[data-theme="light"] .theme-dark-only { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-light-only { display: block; }
  :root:not([data-theme="dark"]) .theme-dark-only { display: none; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font-family: var(--font-mono); font-size: 0.9em; }
:not(pre) > code:not(.install-cmd) {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.84em;
  white-space: nowrap;
}
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection { background: var(--signal-soft); color: var(--text); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  padding: 10px 16px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 500; text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.muted { color: var(--text-3); }

/* ---------- nav ---------- */
.nav-wrap {
  position: fixed; inset: 12px 0 auto; z-index: 20;
  display: flex; justify-content: center;
  padding-inline: var(--gutter);
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 6px;
  width: min(880px, 100%);
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--shell-line);
  border-radius: 999px;
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--inner-hi);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  margin-right: auto;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.mark { width: 26px; height: 26px; flex: none; }
.mark rect { fill: var(--surface-2); stroke: var(--line-strong); }
.mark path { stroke-width: 2.6; stroke-linecap: round; fill: none; }
.mark .m1 { stroke: var(--text); }
.mark .m2 { stroke: var(--signal); }
.nav-links { display: flex; gap: 2px; margin-right: 6px; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 999px;
  color: var(--text-3); font-size: 0.9rem; text-decoration: none;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--shell); }
.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none; border-radius: 999px;
  color: var(--text-2);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.icon-btn:hover { background: var(--shell); color: var(--text); }
.icon-btn svg, .footer-gh svg { width: 19px; height: 19px; fill: currentColor; }
.footer-nav .footer-gh { display: inline-flex; align-items: center; gap: 7px; }
.faq .ans a { color: var(--signal-text); text-underline-offset: 3px; }
.theme-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 999px; background: transparent; color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.theme-btn:hover { background: var(--shell); color: var(--text); }
.theme-btn:active { transform: scale(0.94); }
.theme-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: block; }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .i-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-btn .i-moon { display: block; }
}
.nav-cta {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 0 18px; border-radius: 999px;
  background: var(--signal); color: var(--signal-ink);
  font-weight: 600; font-size: 0.92rem; text-decoration: none;
  transition: transform 0.3s var(--ease-soft), filter 0.3s var(--ease);
}
.nav-cta:hover { filter: brightness(1.06); }
.nav-cta:active { transform: scale(0.97); }
@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ---------- type ---------- */
h1, h2, .h3-lg, .step-n {
  font-family: var(--font-display);
  font-weight: 760;
  font-stretch: 116%;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
h1 {
  max-width: 15ch;
  font-size: clamp(2.3rem, 0.9rem + 4.8vw, 5.4rem);
  line-height: 0.98;
}
h2 {
  max-width: 20ch;
  font-size: clamp(1.95rem, 1.1rem + 3.1vw, 3.6rem);
  line-height: 1.04;
}
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.h3-lg { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); line-height: 1.1; font-weight: 720; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
  color: var(--signal-text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.kicker::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.sec-head { max-width: 760px; }
.sec-lead { max-width: 62ch; margin-top: 22px; color: var(--text-2); font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem); line-height: 1.65; }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(112px, 12vw, 168px); }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 900px; z-index: -1;
  background:
    radial-gradient(60% 50% at 78% 62%, var(--glow), transparent 70%),
    radial-gradient(40% 40% at 10% 0%, oklch(0.84 0.13 78 / 0.05), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; gap: 28px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; justify-self: start;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--shell-line); border-radius: 999px;
  background: var(--shell);
  color: var(--text-2); font-size: 0.84rem;
}
.live-dot {
  position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--signal);
}
.live-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--signal);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.hero-side { display: grid; gap: 32px; }
.hero-side .install { max-width: 1080px; }
.lead { max-width: 60ch; color: var(--text-2); font-size: clamp(1.1rem, 1rem + 0.45vw, 1.35rem); line-height: 1.6; }

.install { display: grid; gap: 12px; }
.install-shell {
  padding: 5px;
  border: 1px solid var(--shell-line);
  border-radius: var(--r-md);
  background: var(--shell);
}
.install-core {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 18px;
  border-radius: calc(var(--r-md) - 5px);
  background: var(--term-bg);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.06), 0 0 0 1px var(--term-line);
}
.install-cmd {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow-x: auto; scrollbar-width: thin;
  color: var(--term-text);
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.install-cmd .p { color: var(--term-green); user-select: none; }
.copy {
  display: inline-flex; align-items: center; gap: 8px; flex: none; align-self: center;
  min-height: 40px; padding: 0 14px 0 12px;
  border: 1px solid oklch(1 0 0 / 0.12); border-radius: 10px;
  background: oklch(1 0 0 / 0.06); color: var(--term-text);
  font: 500 0.86rem/1 var(--font-sans);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease-soft), border-color 0.25s var(--ease);
}
.copy:hover { background: oklch(1 0 0 / 0.1); }
.copy:active { transform: scale(0.96); }
.copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.copy.is-done { border-color: oklch(0.83 0.16 155 / 0.5); color: var(--term-green); }
.install-note { color: var(--text-3); font-size: 0.95rem; }

/* framed screenshots: outer shell + inner core */
.shot { margin: 0; }
.bezel {
  padding: 7px;
  border: 1px solid var(--shell-line);
  border-radius: var(--r-lg);
  background: var(--shell);
  box-shadow: var(--shadow);
}
.bezel-core {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--r-lg) - 7px);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.hero-shot {
  width: min(1320px, 100% - 2 * var(--gutter));
  margin: clamp(40px, 5vw, 72px) auto 0;
}
.shot figcaption { margin-top: 16px; color: var(--text-3); font-size: 0.9rem; text-align: center; }

/* ---------- sections ---------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }
.hero + .section { padding-top: clamp(88px, 11vw, 160px); }

/* steps */
.steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(48px, 6vw, 80px);
  counter-reset: step;
}
.step { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.step-n { color: var(--text-4); font-size: clamp(2.4rem, 1.8rem + 2vw, 3.6rem); line-height: 1; }
.step h3 { font-size: 1.3rem; }
.step p { color: var(--text-2); }

/* what you get */
.features {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}
.feature {
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(22px, 2.6vw, 30px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--inner-hi);
}
.f-icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 8px;
  border-radius: 12px; background: var(--signal-soft); color: var(--signal-text);
}
.f-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--text-2); }

/* private */
.private-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}
.private-list li {
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--signal-line); border-radius: var(--r-lg);
  background: var(--signal-soft); color: var(--text-2);
}
.private-list b { display: block; margin-bottom: 6px; color: var(--text); font-weight: 600; }

/* story rows: copy beside a screenshot */
.story {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
.section .story:not(:first-child), .steps + .story { margin-top: clamp(56px, 7vw, 96px); }
.story-flip .story-text { order: 2; }
.story-text { display: grid; gap: 22px; align-content: start; }
.story-text .sec-lead { margin-top: 0; }
.story-shot { margin-top: clamp(40px, 5vw, 64px); }
.points { display: grid; gap: 14px; }
.points li { position: relative; padding-left: 28px; color: var(--text-2); }
.points li::before {
  content: ""; position: absolute; left: 0; top: 0.36em; width: 16px; height: 16px;
  background: var(--signal-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.points b { color: var(--text); font-weight: 600; }
.phone-shot { justify-self: center; width: min(340px, 100%); }
.phone-shot .bezel { border-radius: 36px; }
.phone-shot .bezel-core { border-radius: 29px; }

/* integrations */
.tools {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin-top: clamp(40px, 5vw, 64px);
}
.tool {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 20px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
}
.tool-tag { align-self: flex-start; color: var(--signal-text); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; }
.tool h3 { font-size: 1.12rem; }
.tool p { color: var(--text-2); font-size: 0.95rem; }

/* faq */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 1.12rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(var(--text-2), var(--text-2)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--text-2), var(--text-2)) center / 1.5px 10px no-repeat;
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover::after { background-color: var(--shell); }
.faq .ans { padding: 0 44px 24px 0; color: var(--text-2); max-width: 68ch; }

.footer { padding-block: clamp(64px, 8vw, 112px) 40px; border-top: 1px solid var(--line); background: var(--bg-alt); }
.footer-cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: clamp(56px, 7vw, 88px); }
.footer-title { font-size: clamp(1.8rem, 1.1rem + 2.4vw, 3rem); }
.footer-grid { padding-top: 32px; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: start; }
.footer-brand p { margin-top: 8px; color: var(--text-3); font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-nav a { color: var(--text-2); font-size: 0.95rem; text-decoration: none; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.footer-fine { grid-column: 1 / -1; color: var(--text-3); font-size: 0.86rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font: 600 0.95rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease-soft), filter 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--signal); color: var(--signal-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--line-strong); background: var(--shell); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-4); background: var(--surface-2); }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* ---------- pricing ---------- */
.price-controls {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px;
  margin-top: clamp(40px, 5vw, 64px);
}
html:not(.js) .price-controls { display: none; }
.seg {
  display: inline-flex; padding: 4px; gap: 4px;
  border: 1px solid var(--shell-line); border-radius: 999px; background: var(--shell);
}
.seg button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 0; border-radius: 999px; background: transparent; color: var(--text-2);
  font: 500 0.92rem/1 var(--font-sans); cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.seg button[aria-checked="true"] { background: var(--surface-2); color: var(--text); box-shadow: var(--inner-hi), 0 0 0 1px var(--line); }
.seg-save {
  padding: 3px 8px; border-radius: 999px; background: var(--signal-soft); color: var(--signal-text);
  font-size: 0.74rem; font-weight: 600;
}
.stepper { display: grid; gap: 8px; }
.stepper label { color: var(--text-3); font-size: 0.86rem; }
.stepper-core {
  display: inline-flex; align-items: center;
  border: 1px solid var(--shell-line); border-radius: 999px; background: var(--shell); padding: 4px;
}
.stepper-core button {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--text); font: 500 1.2rem/1 var(--font-sans); cursor: pointer;
  transition: transform 0.2s var(--ease-soft), background-color 0.2s var(--ease);
}
.stepper-core button:hover { background: var(--line); }
.stepper-core button:active { transform: scale(0.94); }
.stepper-core input {
  width: 4.5ch; min-height: 40px; border: 0; background: transparent; color: var(--text);
  font: 600 1.05rem/1 var(--font-mono); text-align: center; -moz-appearance: textfield; appearance: textfield;
}
.stepper-core input::-webkit-outer-spin-button, .stepper-core input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.plans {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch;
  margin-top: 24px;
}
.plan {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: clamp(24px, 2.6vw, 32px); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--inner-hi);
}
.plan-featured { border-color: var(--signal-line); background: linear-gradient(180deg, var(--signal-soft), transparent 60%), var(--surface); }
.plan-flag {
  position: absolute; top: -13px; left: clamp(24px, 2.6vw, 32px);
  padding: 4px 12px; border-radius: 999px; background: var(--signal); color: var(--signal-ink);
  font-size: 0.78rem; font-weight: 600;
}
.plan-name { font-size: 1.15rem; }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.plan-price .amt {
  font-family: var(--font-display); font-weight: 760; font-stretch: 116%; letter-spacing: -0.03em;
  font-size: clamp(2.4rem, 1.9rem + 1.6vw, 3.2rem); line-height: 1; font-variant-numeric: tabular-nums;
}
.plan-price .per { color: var(--text-3); font-size: 0.95rem; }
.plan-sub { color: var(--text-2); font-size: 0.95rem; min-height: 3em; }
.plan-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.plan-ctas .btn { flex: 1 1 auto; }
.plan > .btn { align-self: stretch; }
.plan-total { color: var(--text-3); font-family: var(--font-mono); font-size: 0.82rem; min-height: 1.4em; }
.plan-total.warn { color: var(--amber); }
.plan-list { display: grid; gap: 10px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.plan-list li { position: relative; padding-left: 28px; color: var(--text-2); font-size: 0.97rem; }
.plan-list li::before {
  content: ""; position: absolute; left: 0; top: 0.38em; width: 16px; height: 16px;
  background: var(--signal-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.price-fine { margin-top: 20px; color: var(--text-3); font-size: 0.9rem; max-width: 72ch; }

/* ---------- welcome ---------- */
.welcome { min-height: 100vh; padding: clamp(120px, 14vw, 180px) 0 96px; }
.welcome .hero::before { display: none; }
.welcome-card {
  max-width: 860px; margin-inline: auto;
  padding: clamp(24px, 4vw, 48px); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.welcome-card h1 { max-width: 20ch; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); line-height: 1.04; }
.welcome-card .lead { margin-top: 16px; }
.state { display: none; }
.state.is-on { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.state-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--signal-soft); color: var(--signal-text);
}
.state-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.state-icon.amber { background: var(--amber-soft); color: var(--amber); }
.state-icon.red { background: var(--red-soft); color: var(--red); }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--signal-line); border-top-color: var(--signal);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text-2); font-size: 0.88rem;
}
.fact b { color: var(--text); font-weight: 600; }
.welcome .install-cmd { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.state h1:focus { outline: none; }
.welcome-steps { display: grid; gap: 10px; counter-reset: s; color: var(--text-2); }
.welcome-steps.from-2 { counter-reset: s 1; }
.welcome-steps li { counter-increment: s; position: relative; padding-left: 36px; }
.welcome-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0.1em;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--text-2); font: 600 0.78rem/1 var(--font-mono);
}
.welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.welcome-note { color: var(--text-3); font-size: 0.92rem; }
.welcome .welcome-note code { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }

.consent { min-width: 0; margin: 10px 0 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.consent legend { padding: 0; margin: 0 0 8px; width: 100%; color: var(--text); font-weight: 600; font-size: 0.98rem; }
.consent-option { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 0.95rem; cursor: pointer; }
.consent-option input { width: 18px; height: 18px; accent-color: var(--signal); flex: none; }
.consent-hint { color: var(--text-3); font-size: 0.86rem; }
.consent-max {
  margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2); display: grid; gap: 8px;
}
.consent-max label { color: var(--text); font-weight: 500; font-size: 0.92rem; }
.consent-max input {
  width: 6ch; min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: 600 1rem/1 var(--font-mono);
}
.consent-max .welcome-note { margin: 0; }
.consent-option input:focus-visible, .consent-max input:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
@media (max-width: 480px) {
  .consent { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance: transform only, so the hero is readable in any capture taken before it finishes. */
  .load { animation: lift 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
  @keyframes lift { from { transform: translateY(22px); } to { transform: none; } }
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  /* Reveals: visible by default (no JS, crawlers, previews, full-page captures). site.js adds .in only to an element
     still below the fold, just before it scrolls into view, so it rises in once. */
  .reveal.in { animation: rise 0.9s var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot::after { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .plans { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .features, .private-list, .footer-cta, .story { grid-template-columns: minmax(0, 1fr); }
  .story-flip .story-text { order: 0; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-sub { min-height: 0; }
}
@media (max-width: 640px) {
  .price-controls { align-items: stretch; flex-direction: column; }
  .seg { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .nav { padding-left: 12px; }
  .brand { font-size: 1rem; }
  .install-core { flex-direction: column; align-items: stretch; padding: 14px; }
  .copy { justify-content: center; align-self: stretch; }
  .install-cmd { font-size: 0.8rem; white-space: normal; overflow-wrap: anywhere; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .tools, .features { grid-template-columns: minmax(0, 1fr); }
  .shot figcaption { text-align: left; }
}
