/* supermux.dev — warm paper, heavy black type, product-true teal + coral
   (sampled from the app itself), dark code islands. Zero webfonts.
   Motion: opt-in under prefers-reduced-motion: no-preference; scroll reveals
   additionally require JS (html.anim) so content is never hidden without it. */

:root {
  --bg: #faf9f6;
  --bg-band: #f3efe6;
  --ink: #131210;
  --ink-2: #54514b;
  --ink-3: #99948a;
  --line: #e8e2d4;
  --teal: #0d7d6a;
  --teal-deep: #0a5f52;
  --teal-soft: #e2efeb;
  --coral: #e0694d;
  --coral-deep: #c4502f;
  --coral-soft: #faeae3;
  --amber: #d99a06;
  --green: #1f9d55;
  --code-bg: #111111;
  --code-border: #333333;
  --code-green: #7cfc9a;
  --radius: 12px;
  --radius-lg: 18px;
  --maxw: 1080px;
  --shadow-md: 0 10px 30px -8px rgba(28, 25, 23, 0.18);
  --shadow-lg: 0 30px 70px -18px rgba(28, 25, 23, 0.28);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; }

/* decorative pseudo-elements (stage dots/glow, tour glows) reach past the
   viewport on phones; clip sideways overflow where they live */
main { overflow-x: clip; }

::selection { background: var(--teal-soft); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 99;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.svg-defs { position: absolute; }
.mark { width: 11px; height: 11px; flex: none; fill: currentColor; }

/* ── buttons ── */
.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 6px 18px -6px rgba(13, 125, 106, 0.55); }
.btn-teal:hover { background: var(--teal-deep); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-small { padding: 6px 14px; font-size: 0.85rem; }

/* ── nav ── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 1.05rem; text-decoration: none;
}
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav a { font-size: 0.92rem; text-decoration: none; color: var(--ink-2); }
.nav nav a:hover { color: var(--ink); }
.nav nav .btn { color: var(--ink); }

/* ── section eyebrows ── */
.eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-size: 0.76rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 14px;
}
.eyebrow.left { justify-content: flex-start; }

/* ── section heads: ghost numerals, left-aligned ── */
.section-head { position: relative; margin-bottom: 28px; }
.section-head .eyebrow { justify-content: flex-start; margin-bottom: 6px; }
.section .section-head h2 { text-align: left; margin-bottom: 0; position: relative; z-index: 1; }
.ghost {
  position: absolute; left: -14px; top: -56px; z-index: 0;
  font-weight: 900; line-height: 1; letter-spacing: -0.04em;
  font-size: clamp(5rem, 10vw, 8rem);
  color: color-mix(in srgb, var(--ink) 7%, transparent);
  user-select: none; pointer-events: none;
}
@supports (-webkit-text-stroke: 1px black) {
  .ghost {
    color: transparent;
    -webkit-text-stroke: 1.5px color-mix(in srgb, var(--ink) 17%, transparent);
  }
  .install .ghost, .problem .ghost { -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.2); }
}
.install .ghost, .problem .ghost { color: rgba(255, 255, 255, 0.08); }
.section-head.center .eyebrow { justify-content: center; }
.section .section-head.center h2 { text-align: center; }
.section-head.center .ghost { left: 50%; translate: -50% 0; }

/* ── hero: asymmetric split, stage bleeds right ── */
.hero {
  position: relative;
  max-width: 1280px; margin: 0 auto;
  padding: 72px 24px 104px;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 40px; align-items: center;
}
.hero-copy { text-align: left; }
.hero h1 {
  font-size: clamp(2.6rem, 4.9vw, 4.1rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.hero-sub {
  max-width: 520px; margin: 18px 0 26px;
  font-size: 1.08rem; color: var(--ink-2);
}
.hero-sub strong { color: var(--ink); }

.code-island {
  display: inline-flex; align-items: center; gap: 10px;
  max-width: 100%;
  background: var(--code-bg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--code-green);
  text-align: left;
  box-shadow: 0 16px 40px -14px rgba(17, 17, 17, 0.5);
}
/* one line, always: overflow scrolls sideways; the copy button stays pinned */
.code-island .cmdline {
  min-width: 0;                /* let the flex item shrink so it scrolls instead of widening the page */
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.code-island .cmdline::-webkit-scrollbar { display: none; }
.code-island .prompt { color: #666; user-select: none; }
.copy-btn {
  flex: none;
  font: inherit; font-size: 0.72rem;
  background: none; border: 1px solid #444; border-radius: 5px;
  color: #999; padding: 3px 9px; cursor: pointer;
}
.copy-btn:hover { color: #fff; border-color: #777; }

.cta-row { display: flex; gap: 12px; justify-content: flex-start; margin-top: 22px; flex-wrap: wrap; }
.trust-line { margin-top: 16px; font-size: 0.82rem; color: var(--ink-3); }

/* ── hero stage: layered devices over dot grid + glow ── */
.stage {
  position: relative;
  margin: 0 -5% 0 0;
  text-align: left;
}
.stage::before {
  /* dot grid */
  content: ""; position: absolute; inset: -48px -24px;
  background-image: radial-gradient(circle, var(--ink-3) 1.2px, transparent 1.4px);
  background-size: 24px 24px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(75% 80% at 50% 45%, #000 30%, transparent 78%);
  mask-image: radial-gradient(75% 80% at 50% 45%, #000 30%, transparent 78%);
  z-index: 0;
}
.stage::after {
  /* soft product-colored glow */
  content: ""; position: absolute; inset: -10% -6%;
  background:
    radial-gradient(46% 56% at 30% 42%, rgba(13, 125, 106, 0.13), transparent 70%),
    radial-gradient(40% 52% at 76% 64%, rgba(224, 105, 77, 0.13), transparent 70%);
  z-index: 0;
}

.shot { display: block; width: 100%; height: auto; }

.browser-frame {
  background: #fff; border: 1px solid #ddd; border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden; text-align: left;
}
.frame-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 13px; border-bottom: 1px solid #eee;
  background: #fff;
}
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #e3ddd2; }
.frame-bar i:nth-child(1) { background: #f0b8ab; }
.frame-bar i:nth-child(2) { background: #f0d9a5; }
.frame-bar i:nth-child(3) { background: #b5d9c9; }
.frame-bar span { margin-left: auto; font-family: var(--mono); font-size: 0.65rem; color: #aaa; }

.phone-frame {
  background: #fff; border: 1px solid #ddd; border-radius: 26px;
  box-shadow: var(--shadow-lg);
  overflow: hidden; text-align: left; padding: 10px;
}
.phone-frame .shot { border-radius: 16px; }
.phone-notch { width: 44px; height: 5px; background: #e8e3d9; border-radius: 99px; margin: 3px auto 9px; }

/* landscape tablet: even bezel, big corner radius, camera dot — no window chrome */
.tablet-frame {
  position: relative;
  background: #fff; border: 1px solid #ddd; border-radius: 26px;
  box-shadow: var(--shadow-lg);
  padding: 22px 18px 18px;
  overflow: hidden;
}
.tablet-frame .shot { border-radius: 12px; }
.tablet-cam {
  position: absolute; top: 8px; left: 50%;
  width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: #ddd6c8;
}

/* no tilt/rotation on the shots: any 3D resample blurs 1px UI text */
.stage-tablet {
  position: relative; z-index: 1;
  width: 96%;
}
.stage-phone {
  position: absolute; z-index: 2;
  right: -1%; bottom: -38px;
  width: clamp(150px, 30%, 224px);
}

/* floating chips on the stage */
.chip {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 99px;
  padding: 9px 15px;
  font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.chip strong { color: var(--ink); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--teal)); flex: none; }
.dot-teal { --c: var(--teal); }
.dot-green { --c: var(--green); }
.dot-amber { --c: var(--amber); }
.dot-coral { --c: var(--coral); }


/* ── marquee ── */
.marquee {
  overflow: hidden;
  background: #fff;
  border-block: 1px solid var(--line);
  padding: 13px 0;
}
.marquee-track { display: flex; width: max-content; }
.marquee-group {
  display: flex; align-items: center; gap: 36px;
  padding-right: 36px;
  font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2);
  white-space: nowrap;
}
.marquee-group .sep { color: var(--ink-3); opacity: 0.7; }

/* ── shared section scaffolding ── */
.section { padding: 84px 24px; }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.section h2 {
  font-size: clamp(1.8rem, 3.8vw, 2.4rem);
  font-weight: 850; letter-spacing: -0.025em;
  text-align: center; margin-bottom: 22px;
  line-height: 1.15;
}
.band { background: var(--bg-band); }

/* ── footer ── */
.footer { border-top: 1px solid var(--line); padding: 26px 24px; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--ink-3);
}
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--teal-deep); }
.footer-links { display: flex; gap: 16px; }

/* ── problem band: the page goes dark for the bad part ── */
.prose { color: var(--ink-2); font-size: 1.05rem; }
.prose strong { color: var(--ink); }

.problem { background: #141310; color: #efeae0; }
.problem h2 { color: #f4efe6; }
.problem .eyebrow { color: #a39c8f; }
.problem-grid {
  display: grid; grid-template-columns: 1.25fr 0.75fr;
  gap: 56px; align-items: center;
  max-width: 940px; margin: 6px auto 0;
}
.vs-label {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #7d7869;
  margin-bottom: 16px;
}
.dot-dead { --c: #6e6a5e; }
.dead-card {
  background: #0d0c0a;
  border-radius: 14px;
  padding: 22px 26px;
  font-family: var(--mono); font-size: 0.84rem; line-height: 2.2;
  color: #8b867c;
  box-shadow: inset 0 0 0 1px #262420;
}
.dead-card .t { color: #57534a; margin-right: 10px; }
.dead-card .bad { color: #ff9b87; }
.dead-card .dim { color: #6e6a62; }
.loss-list { list-style: none; display: grid; gap: 22px; }
.loss-list li { border-left: 2px solid #2c2a25; padding-left: 18px; }
.loss-list strong {
  display: block;
  font-size: 1.55rem; font-weight: 850; letter-spacing: -0.02em;
  color: #e89a86; line-height: 1.2;
}
.loss-list span { color: #8b867c; font-size: 0.9rem; }
.problem-kicker {
  text-align: center; margin-top: 46px;
  color: #b9b2a4; font-size: 1.05rem;
}
.problem-kicker strong { color: #fff; }

.push-meta {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3);
}
.push-meta .dot { width: 7px; height: 7px; }

/* ── feature bento ── */
.bento {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 16px;
}
.feature-card.big { grid-column: span 2; display: flex; flex-direction: column; }
.feature-card.big p { max-width: 42ch; }

.mini-push {
  margin-top: auto; padding-top: 18px;
  display: flex; gap: 11px; align-items: flex-start;
  align-self: flex-start;
}
.mini-push > .t-icon {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px -4px rgba(28, 25, 23, 0.18);
}
.mini-push .mark { width: 14px; height: 14px; }
.mini-push p { font-size: 0.84rem; }
.mini-push .push-meta { font-size: 0.68rem; }

.mini-diff {
  margin-top: auto;
  background: var(--code-bg); border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--mono); font-size: 0.76rem; line-height: 1.75;
  overflow: hidden;
}
.mini-diff .dl { white-space: nowrap; color: #bbb; }
.mini-diff .dl.del { color: #ff9b87; }
.mini-diff .dl.add { color: var(--code-green); }
.mini-diff .dl.cmt { color: #8d8d8d; font-style: italic; }
.feature-card {
  position: relative;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 24px 22px 22px;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card::before {
  content: ""; position: absolute; top: -1px; left: 18px; right: 18px; height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  border-radius: 2px;
  opacity: 0; transition: opacity 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #ddd6c6;
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal-deep);
  margin-bottom: 14px;
}
.feature-card:nth-child(even) .feature-icon { background: var(--coral-soft); color: var(--coral-deep); }
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 1.02rem; font-weight: 750; margin-bottom: 5px; }
.feature-card p { font-size: 0.89rem; color: var(--ink-2); }

/* ── product tour ── */
.tour-row {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: 56px; align-items: center;
  max-width: 1000px; margin: 72px auto 0;
}
.tour-row:first-of-type { margin-top: 48px; }
.tour-row.reverse .tour-copy { order: 2; }
.tour-row.reverse .tour-shot { order: 1; }
.tour-copy h3 { font-size: 1.45rem; font-weight: 820; letter-spacing: -0.02em; margin-bottom: 9px; line-height: 1.25; }
.tour-copy p { color: var(--ink-2); font-size: 1rem; }
.tour-copy code {
  font-family: var(--mono); font-size: 0.85em;
  background: var(--teal-soft); color: var(--teal-deep);
  padding: 1px 6px; border-radius: 5px;
}
.tour-kicker {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal-deep); margin-bottom: 10px;
}

.tour-shot { position: relative; }
.tour-shot::before {
  content: ""; position: absolute; inset: -9% -7%; z-index: 0;
  background: radial-gradient(58% 58% at 50% 50%, var(--glow, rgba(13, 125, 106, 0.16)), transparent 72%);
}
.tour-shot.glow-coral { --glow: rgba(224, 105, 77, 0.16); }
.tour-shot.glow-ink { --glow: rgba(28, 25, 23, 0.12); }
.tour-shot .browser-frame,
.tour-shot .phone-frame {
  position: relative; z-index: 1;
  transition: transform 0.35s ease;
}
.tour-shot:hover .browser-frame,
.tour-shot:hover .phone-frame { transform: translateY(-4px); }
.tour-shot.is-phone { display: flex; justify-content: center; }
.tour-shot .phone-frame { width: min(310px, 86%); }
.tour-shot .browser-frame { width: 100%; }
.tour-shot .chip { z-index: 2; }
.chip-tools { top: 30%; left: -2%; }
.chip-comment { top: 56%; left: -4%; }
.chip-pty { bottom: 12%; right: -3%; }

/* ── agents strip ── */
.section-inner.narrow { max-width: 640px; text-align: center; }
.agent-strip { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.agent-pill {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); background: #fff; border-radius: 99px;
  padding: 9px 20px; font-weight: 600; font-size: 0.95rem;
}
.agent-logo { width: 16px; height: 16px; flex: none; fill: currentColor; }
.agent-caption { margin-top: 16px; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); }

/* ── how it works ── */
.arch {
  display: flex; align-items: stretch; justify-content: center; gap: 0;
  margin-top: 36px;
}
.arch-box {
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: #fff; padding: 18px 20px;
  font-size: 0.8rem; text-align: center; line-height: 1.45;
  display: flex; flex-direction: column; justify-content: center;
}
.arch-box strong { display: block; font-size: 0.92rem; margin-bottom: 3px; }
.arch-box span { color: var(--ink-2); }
.arch-box.accent { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.arch-box.accent strong { color: var(--teal-deep); }
.arch-link { position: relative; width: 92px; flex: none; align-self: center; height: 24px; }
.arch-link::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: 50%;
  height: 0; border-top: 2px dashed #cdc6b6;
  transform: translateY(-50%);
}
.arch-dot {
  display: none;
  position: absolute; left: 0; top: 50%;
  width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--teal);
}
.arch-dot.back { background: var(--coral); }
.arch-notes {
  display: flex; gap: 20px; justify-content: center;
  max-width: 900px; margin: 32px auto 0;
}
.arch-notes p { flex: 1; font-size: 0.84rem; color: var(--ink-2); }
.arch-notes strong { color: var(--ink); }

/* ── install band ── */
.install { background: var(--code-bg); color: #fff; }
.install h2 { color: #fff; }
.install .eyebrow { color: var(--code-green); }
.install-sub { text-align: center; color: #aaa; font-size: 0.95rem; margin-bottom: 26px; }
.install-island-wrap { text-align: center; }
.install .code-island { border: 1px solid var(--code-border); background: #1d1d1d; box-shadow: none; }
.install .code-island .cmd::after {
  content: "▋"; color: var(--code-green); margin-left: 2px;
}
.install-note { text-align: center; margin-top: 14px; font-size: 0.82rem; color: #888; }
.install-note a { color: #bbb; }
.install-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  max-width: 760px; margin: 32px auto 0;
}
.install-card {
  border: 1px solid var(--code-border); border-radius: var(--radius);
  padding: 18px; font-size: 0.83rem; color: #bbb;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.install-card:hover { border-color: #4d4d4d; transform: translateY(-2px); }
.install-card svg { width: 20px; height: 20px; color: var(--code-green); margin-bottom: 9px; }
.install-card strong { color: #fff; display: block; margin-bottom: 4px; }
.install-card a { color: #ddd; }
.install-reqs { text-align: center; margin-top: 22px; font-size: 0.78rem; color: #888; }

/* ── tmux status bar ── */
.muxbar {
  display: flex; align-items: center; gap: 18px;
  background: var(--code-bg);
  padding: 9px 20px;
  font-family: var(--mono); font-size: 0.72rem;
  color: #6e6e6e;
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
}
.muxbar::-webkit-scrollbar { display: none; }
.muxbar .mb-app { color: var(--code-green); }
.muxbar .mb-win.on { color: #e8e3d9; }
.muxbar .mb-right { margin-left: auto; padding-left: 18px; }

/* ── dogfood ── */
.dogfood { position: relative; overflow: hidden; }
.dogfood .water {
  position: absolute; right: -60px; top: 50%;
  width: 300px; height: 300px;
  color: var(--ink); opacity: 0.05;
  transform: translateY(-50%);
  pointer-events: none;
}
.dogfood-quote {
  position: relative;
  font-style: italic; color: var(--ink-2); font-size: 1.18rem; line-height: 1.55;
}
.dogfood-chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px;
  background: var(--coral-soft); color: var(--coral-deep);
  border-radius: 99px; padding: 5px 16px;
  font-size: 0.8rem; font-weight: 600;
}
.dogfood-chip .mark { width: 10px; height: 10px; }

/* ════ motion (opt-in) ════ */
@media (prefers-reduced-motion: no-preference) {

  /* hero load-in: pure CSS, no JS required */
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } }
  .hero h1        { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .hero-sub       { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.08s backwards; }
  .hero .code-island { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.16s backwards; }
  .cta-row        { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.22s backwards; }
  .trust-line     { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.26s backwards; }
  .stage          { animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s backwards; }

  /* device + chip float: `translate` property, independent of transform tilt */
  @keyframes bob { to { translate: 0 -11px; } }
  .stage-phone { animation: bob 6.5s ease-in-out infinite alternate; }
  .tour-shot .chip { animation: bob 5.4s ease-in-out infinite alternate; }

  /* pulsing status dots */
  @keyframes dot-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c, var(--teal)) 18%, transparent); } }
  .dot.pulse { animation: dot-pulse 2.6s ease-in-out infinite; }

  /* marquee */
  @keyframes marquee { to { transform: translateX(-50%); } }
  .marquee-track { animation: marquee 38s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }

  /* agent pills take turns lighting up */
  @keyframes agent-turn {
    0%, 22%, 100% { border-color: var(--line); background: #fff; color: var(--ink); transform: none; }
    5%, 16% { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-deep); transform: translateY(-2px); }
  }
  .agent-pill { animation: agent-turn 12s linear infinite; animation-delay: calc(var(--i) * 3s); }

  /* architecture: request/response pulses travel the dashed links */
  .arch-dot {
    display: block;
    offset-path: path("M 8 0 L 84 0");
    offset-rotate: 0deg;
    animation: travel 2.6s linear infinite;
  }
  .arch-dot.back { animation-direction: reverse; animation-delay: -1.3s; }
  @keyframes travel {
    from { offset-distance: 0%; opacity: 0; }
    12% { opacity: 1; }
    88% { opacity: 1; }
    to { offset-distance: 100%; opacity: 0; }
  }

  /* broker box breathes */
  @keyframes ring { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--teal) 10%, transparent); } }
  .arch-box.accent { animation: ring 3.4s ease-in-out infinite; }

  /* install prompt cursor blink */
  @keyframes blink { 50% { opacity: 0; } }
  .install .code-island .cmd::after { animation: blink 1.1s steps(1) infinite; }

  /* scroll reveals: only when JS confirms (html.anim), never hide otherwise */
  html.anim .rv {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--d, 0s);
  }
  html.anim .rv-l { transform: translateX(-26px); }
  html.anim .rv-r { transform: translateX(26px); }
  html.anim .rv.in { opacity: 1; transform: none; }
}

/* ── responsive ── */
@media (max-width: 1020px) {
  .hero { padding-bottom: 88px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hero-copy { text-align: center; }
  .hero-sub { margin: 18px auto 26px; }
  .cta-row { justify-content: center; }
  .stage { margin: 48px 0 0; }
  .stage-tablet { width: 100%; }
}

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .problem-grid { grid-template-columns: 1fr; gap: 30px; max-width: 560px; }
  .loss-list { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .loss-list strong { font-size: 1.2rem; }
  .tour-row, .tour-row.reverse { grid-template-columns: 1fr; gap: 26px; max-width: 560px; margin-top: 56px; }
  .tour-row.reverse .tour-copy { order: 0; }
  .tour-row.reverse .tour-shot { order: 0; }
  .tour-copy { text-align: center; }
  .tour-kicker { justify-content: center; }
  .arch { flex-direction: column; align-items: center; gap: 10px; }
  .arch-link { width: 24px; height: 44px; }
  .arch-link::before {
    left: 50%; right: auto; top: 6px; bottom: 6px; height: auto; width: 0;
    border-top: none; border-left: 2px dashed #cdc6b6;
    transform: translateX(-50%);
  }
  .arch-dot { left: 50%; top: 6px; margin: 0 0 0 -4px; }
  .arch-notes { flex-direction: column; gap: 12px; }
  .install-grid { grid-template-columns: 1fr; max-width: 420px; }
  .chip-comment { left: 0; }
  .chip-pty { right: 0; }
}
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .arch-dot { offset-path: path("M 0 0 L 0 32"); }
  /* horizontal pre-reveal offsets create sideways scroll on phones —
     transforms count as scrollable overflow. Reveal vertically only. */
  html.anim .rv-l, html.anim .rv-r { transform: translateY(20px); }
}

@media (max-width: 600px) {
  .nav nav { gap: 14px; }
  .nav nav a:not(.btn) { display: none; }   /* keep brand + GitHub button */
  .hero { padding: 56px 18px 72px; }
  .section { padding: 56px 18px; }
  .code-island { font-size: 0.78rem; padding: 12px 14px; }
  .bento { grid-template-columns: 1fr; }
  .feature-card.big { grid-column: auto; }
  .ghost { font-size: 4.4rem; top: -44px; left: -8px; }
  .why-copy .ghost { top: -52px; left: -10px; }
  .dead-term { font-size: 0.72rem; }
  .muxbar { font-size: 0.66rem; gap: 12px; }

  .stage { margin-top: 48px; }
  .stage-tablet { width: 100%; padding: 14px 12px 12px; }
  .stage-phone { width: 38%; right: -4px; bottom: -30px; }
  .chip { font-size: 0.68rem; padding: 8px 11px; }

  .tour-shot .phone-frame { width: min(270px, 88%); }
  .chip-comment { top: 60%; }
  .dogfood .water { width: 230px; height: 230px; right: -90px; }

  .footer-inner { flex-direction: column; text-align: center; }
}
