/* Orrery landing — precision-instrument aesthetic on the product brand tokens:
   near-monochrome ink, one coral accent, hairline rules, monoline geometry. */

:root {
  --bg: #fbfbfc;
  --surface: #ffffff;
  --inset: #f1f2f4;
  --ink: #17171a;
  --muted: #6a6b72;
  --subtle: #a0a1a9;
  --line: #e6e7eb;
  --line-strong: #cacdd5;
  --coral: #d9564a;
  --coral-hover: #c74b40;
  --coral-subtle: #fdefed;

  --dark-bg: #111113;
  --dark-panel: #0c0c0e;
  --dark-ink: #f1f1f3;
  --dark-muted: #a5a7af;
  --dark-subtle: #777a84;
  --dark-line: rgba(255, 255, 255, 0.09);
  --dark-coral: #ff8d7e;
  --dark-green: #53d18c;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;
  --serif: "Instrument Serif", Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--coral-subtle); color: var(--ink); }

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.container.narrow { max-width: 800px; }
.center { text-align: center; }

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

/* ---------- nav ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(251, 251, 252, 0.78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 2.25rem; height: 64px; }
.nav-brand { display: flex; align-items: center; }
.nav-links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); transition: color 140ms ease; }
.nav-links a:hover { color: var(--ink); }

/* ---------- type ---------- */

.kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted);
  margin-bottom: 1rem;
}
.kicker.dark { color: var(--dark-subtle); }

.display {
  font-size: clamp(2.75rem, 6.4vw, 5.1rem);
  font-weight: 500; line-height: 1.03; letter-spacing: -0.035em;
  margin: 1.4rem 0 1.6rem;
}
.display .serif { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.05em; letter-spacing: -0.015em; }

.h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  font-weight: 500; letter-spacing: -0.028em; line-height: 1.12;
}
.h2.dark { color: var(--dark-ink); }

.statement {
  font-size: clamp(1.7rem, 3.5vw, 2.8rem);
  font-weight: 500; letter-spacing: -0.03em; line-height: 1.16;
}
.statement .muted { color: var(--subtle); }
.statement-sub { margin-top: 1.75rem; font-size: 1.1rem; color: var(--muted); max-width: 42em; line-height: 1.7; }

.lede { font-size: 1.125rem; color: var(--muted); line-height: 1.68; max-width: 36em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; background: var(--surface);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }

.facts { margin-top: 1.6rem; font-family: var(--mono); font-size: 12.5px; color: var(--subtle); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 500; line-height: 1;
  padding: 13px 21px; border-radius: 8px; border: 1px solid transparent;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
  cursor: pointer;
}
.btn:active { transform: scale(0.985); }
.btn-sm { padding: 9px 15px; font-size: 13.5px; }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-hover); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--surface); border-color: var(--subtle); }

.cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 2.1rem; }
.cta-row.center { justify-content: center; }

.copy-chip {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 13.5px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); cursor: pointer;
  transition: border-color 140ms ease;
}
.copy-chip:hover { border-color: var(--line-strong); }
.copy-chip .copy-hint {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--subtle); transition: color 140ms ease;
}
.copy-chip.copied .copy-hint { color: var(--coral); }

/* ---------- hero ---------- */

.hero { position: relative; padding: calc(64px + clamp(4rem, 9vw, 7.5rem)) 0 clamp(4rem, 8vw, 6.5rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(23, 23, 26, 0.055) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 62% 38%, #000 30%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 62% at 62% 38%, #000 30%, transparent 72%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 3rem; align-items: center; }

.hero-orrery { display: flex; justify-content: flex-end; margin-right: -7%; }
.orrery { width: min(580px, 44vw); height: auto; }

.orbit {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: spin var(--t, 60s) linear infinite;
}
.orbit.rev { animation-direction: reverse; }
.moon {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- load + scroll reveals ---------- */

.w {
  display: inline-block;
  opacity: 0; filter: blur(8px); transform: translateY(16px);
  animation: rise 0.85s cubic-bezier(0.22, 0.61, 0.21, 1) forwards;
  animation-delay: calc(140ms + var(--i, 0) * 75ms);
}
.reveal {
  opacity: 0; filter: blur(6px); transform: translateY(14px);
  animation: rise 0.85s cubic-bezier(0.22, 0.61, 0.21, 1) forwards;
  animation-delay: calc(560ms + var(--d, 0) * 110ms);
}
@keyframes rise { to { opacity: 1; filter: blur(0); transform: none; } }

.fx {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.75s cubic-bezier(0.22, 0.61, 0.21, 1), transform 0.75s cubic-bezier(0.22, 0.61, 0.21, 1);
  transition-delay: calc(var(--d, 0) * 85ms);
}
.fx.in { opacity: 1; transform: none; }

/* ---------- sections ---------- */

section { padding: clamp(5rem, 10vw, 8.5rem) 0; }
.hero + .problem { padding-top: clamp(3rem, 6vw, 5rem); }

/* ---------- pipeline ---------- */

.pipeline {
  list-style: none; counter-reset: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 3.25rem 2.5rem; margin-top: 3.5rem;
}
.station { position: relative; padding-top: 1.9rem; border-top: 1px solid var(--line); }
.station-dot {
  position: absolute; top: -5.5px; left: 0;
  width: 10px; height: 10px; border-radius: 50%; background: var(--ink);
}
.station-num { display: block; font-family: var(--mono); font-size: 12px; color: var(--subtle); margin-bottom: 0.8rem; }
.station h3 { font-size: 16.5px; font-weight: 550; letter-spacing: -0.012em; margin-bottom: 0.45rem; }
.station p { font-size: 14.5px; color: var(--muted); line-height: 1.62; }
.station.coral .station-dot { background: var(--coral); }
.station.coral .station-num { color: var(--coral); }

/* ---------- feature grid ---------- */

.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  margin-top: 3.5rem;
}
.card { background: var(--surface); padding: 2.1rem 2rem 2.3rem; transition: background 160ms ease; }
.card:hover { background: #fdfdfe; }
.card-icon { width: 27px; height: 27px; margin-bottom: 1.4rem; display: block; }
.card h3 { font-size: 16px; font-weight: 550; letter-spacing: -0.01em; margin-bottom: 0.55rem; }
.card p { font-size: 14.5px; color: var(--muted); line-height: 1.65; }
.card code { font-size: 12.5px; background: var(--inset); padding: 2px 6px; border-radius: 4px; }

/* ---------- terminal band ---------- */

.terminal-band { background: var(--dark-bg); color: var(--dark-ink); }
.term {
  margin-top: 3rem; background: var(--dark-panel);
  border: 1px solid var(--dark-line); border-radius: 12px; overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 13px 16px; border-bottom: 1px solid var(--dark-line);
}
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a2a2e; }
.term-bar span { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--dark-subtle); }
.term pre { padding: 1.6rem 1.7rem; overflow-x: auto; }
.term code { font-size: 13.5px; line-height: 1.75; color: var(--dark-ink); }
.term .p { color: var(--dark-coral); }
.term .ok { color: var(--dark-green); }
.term .dim { color: var(--dark-subtle); }
.term .c { color: var(--dark-subtle); font-style: italic; }
.term .cursor {
  display: inline-block; width: 8px; height: 17px; margin-left: 6px;
  vertical-align: text-bottom; background: var(--dark-coral);
  animation: blink 1.15s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* ---------- deploy tiles ---------- */

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3.5rem; }
.tile {
  border: 1px solid var(--line); border-radius: 12px; padding: 1.9rem 1.8rem;
  background: var(--surface);
  transition: transform 160ms ease, border-color 160ms ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.tile h3 { font-size: 16.5px; font-weight: 550; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.tile p { font-size: 14.5px; color: var(--muted); line-height: 1.62; }
.tile code {
  display: inline-block; margin-top: 1.3rem;
  font-size: 13px; color: var(--ink);
  background: var(--inset); padding: 9px 14px; border-radius: 8px;
}

/* ---------- oss ---------- */

.oss .h2 { margin: 1.6rem 0 1.1rem; }
.oss .lede { margin: 0 auto; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 2.4rem 0; }
.footer-inner { display: flex; align-items: center; gap: 1.25rem; }
.footer p { font-size: 13.5px; color: var(--muted); }
.footer nav { margin-left: auto; display: flex; gap: 1.5rem; }
.footer nav a { font-size: 13.5px; color: var(--muted); transition: color 140ms ease; }
.footer nav a:hover { color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1rem; }
  .hero-orrery { justify-content: center; margin: 2.5rem 0 0; }
  .orrery { width: min(460px, 82vw); }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
  .pipeline { grid-template-columns: 1fr; gap: 2.4rem; }
  .grid { grid-template-columns: 1fr; }
  .display { font-size: clamp(2.45rem, 11vw, 3.2rem); }
}

/* ---------- product mockup ---------- */

.product { padding-top: 0; }
.h2 .muted { color: var(--subtle); }
.section-sub { margin-top: 0.9rem; font-size: 15px; color: var(--muted); }

.mock {
  margin-top: 2.75rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  box-shadow: 0 32px 64px -36px rgba(23, 23, 26, 0.16);
  overflow: hidden;
}
.mock-chrome {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.mock-chrome i { width: 11px; height: 11px; border-radius: 50%; background: #dcdee3; }
.mock-url {
  margin: 0 auto; font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: var(--inset); padding: 4px 14px; border-radius: 6px;
}
.mock-demo {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--coral); background: var(--coral-subtle); padding: 3px 9px; border-radius: 999px;
}

.mock-body { display: grid; grid-template-columns: 196px 1fr; min-height: 470px; }

.mock-side { border-right: 1px solid var(--line); background: #f6f6f8; padding: 13px 9px 9px; display: flex; flex-direction: column; }
.side-nav { flex: 1; min-height: 0; }
button.side-item { background: none; border: 0; width: 100%; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.side-user { display: flex; align-items: center; gap: 9px; padding: 10px 8px 4px; border-top: 1px solid var(--line); margin-top: 10px; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--coral-subtle); color: var(--coral);
  font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.side-user-meta { display: flex; flex-direction: column; min-width: 0; }
.side-user-meta b { font-size: 12px; font-weight: 550; letter-spacing: -0.01em; }
.side-user-meta i { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--subtle); }
.side-brand { display: flex; align-items: center; gap: 8px; padding: 4px 10px 14px; }
.side-brand b { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.side-label {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--subtle);
  padding: 12px 10px 5px;
}
.side-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 6px; margin-bottom: 1px;
}
.side-item svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.side-item.active { background: #ececef; color: var(--ink); font-weight: 500; }

.mock-main { display: flex; flex-direction: column; min-width: 0; }
.mock-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 550;
}
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #1d9e75; animation: pulse 2.2s ease infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.mock-cols { display: grid; grid-template-columns: 296px 1fr; flex: 1; min-height: 0; }

.sess-list { list-style: none; border-right: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.sess { padding: 10px 12px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; transition: background 120ms ease, border-color 120ms ease; }
.sess:hover { background: #f6f6f8; }
.sess.active { background: var(--coral-subtle); border-color: rgba(217, 86, 74, 0.25); }
.sess-name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 550; }
.sess-task { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sess-meta { font-family: var(--mono); font-size: 10.5px; color: var(--subtle); margin-top: 6px; }

.sdot, .pill i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.sdot.running, .pill.running i { background: #1d9e75; }
.sdot.crashed, .pill.crashed i { background: #d13438; }
.sdot.resuming, .pill.resuming i { background: var(--coral); }

.sess-detail { display: flex; flex-direction: column; min-width: 0; }
.detail-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.detail-head strong { font-size: 13.5px; font-weight: 600; }
.detail-head code { font-size: 11px; color: var(--subtle); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}
.pill.crashed { border-color: #efc7c5; background: #fdf1f0; color: #b3261e; }
.pill.resuming { border-color: rgba(217, 86, 74, 0.35); background: var(--coral-subtle); color: var(--coral); }

.btn-kill {
  margin-left: auto; font-family: var(--sans); font-size: 12.5px; font-weight: 500;
  color: #b3261e; background: transparent; border: 1px solid #ecc8c5; border-radius: 7px;
  padding: 7px 13px; cursor: pointer; transition: background 130ms ease, opacity 130ms ease;
}
.btn-kill:hover { background: #fdf1f0; }
.btn-kill:disabled { opacity: 0.45; cursor: default; background: transparent; }

.log { flex: 1; min-height: 0; max-height: 372px; overflow-y: auto; padding: 13px 16px; background: #fcfcfd; }
.log-line { display: flex; gap: 10px; padding: 3.5px 0; font-family: var(--mono); font-size: 12px; line-height: 1.55; animation: logIn 0.3s ease; }
@keyframes logIn { from { opacity: 0; transform: translateY(4px); } }
.log-time { flex: none; width: 56px; color: var(--subtle); font-size: 10.5px; padding-top: 1.5px; }
.log-pre { flex: none; width: 12px; text-align: center; }
.log-text { white-space: pre-wrap; word-break: break-word; min-width: 0; }
.l-user { color: var(--ink); font-weight: 600; }
.l-agent { color: var(--ink); }
.l-bash { color: var(--muted); }
.l-ok { color: #157a5b; }
.l-err { color: #c22f27; }
.l-sys { color: var(--subtle); font-style: italic; }
.l-coral { color: var(--coral); }

/* views */
.view { display: none; }
.view.on { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.panel-ic { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-linecap: round; }
.mock-cols { min-height: 0; }

/* dashboard view */
.gs { padding: 20px 20px 2px; }
.gs-title { font-size: 19px; font-weight: 600; letter-spacing: -0.018em; }
.gs-sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.steps { margin: 16px 20px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.step { display: grid; grid-template-columns: 150px 1fr; gap: 1.4rem; padding: 1.35rem 1.5rem; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step-kicker { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.11em; color: var(--subtle); margin-bottom: 5px; }
.step h4 { font-size: 14.5px; font-weight: 550; letter-spacing: -0.01em; }
.step-desc { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.code-chip {
  display: inline-flex; align-items: center; gap: 11px; max-width: 100%;
  font-family: var(--mono); font-size: 12.5px;
  background: var(--inset); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px 8px 13px;
}
.code-chip code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-p { color: var(--coral); }
.cc-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--subtle); }
.mini-copy {
  width: 24px; height: 24px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 5px;
  color: var(--muted); font-size: 11px; cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.mini-copy svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.mini-copy:hover { border-color: var(--line-strong); color: var(--ink); }
.mini-copy.ok { color: #157a5b; border-color: #bfe3d4; }
.hint-note { margin-top: 9px; font-size: 12px; color: var(--subtle); }
.hint-note code { font-size: 11.5px; }
.key-wrap { display: none; margin-left: 10px; vertical-align: middle; }
.key-wrap.on { display: inline-flex; }
.mock-hint { padding: 4px 20px 18px; font-size: 12.5px; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--coral); font-weight: 500; cursor: pointer; }
.linkish:hover { color: var(--coral-hover); }

/* deploy tile link */
.tile-link { display: inline-block; margin-top: 1.3rem; font-size: 13.5px; font-weight: 500; color: var(--coral); }
.tile-link:hover { color: var(--coral-hover); }

@media (max-width: 960px) {
  .mock-side { display: none; }
  .mock-body { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .mock-cols { grid-template-columns: 1fr; }
  .sess-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sess { min-width: 200px; flex: none; }
  .log { max-height: 300px; }
  .detail-head { flex-wrap: wrap; }
  .step { grid-template-columns: 1fr; gap: 0.35rem; }
  .key-wrap { margin: 10px 0 0; }
}

/* ---------- hero orrery details ---------- */

.counter { transform-box: view-box; animation: spin var(--t, 60s) linear infinite reverse; }
.orbit.rev .counter { animation-direction: normal; }
.hub-pulse {
  transform-box: view-box; transform-origin: 50% 50%;
  animation: hubPulse 3.4s ease-out infinite;
}
@keyframes hubPulse {
  0% { transform: scale(1); opacity: 0.65; }
  75%, 100% { transform: scale(1.55); opacity: 0; }
}

/* ---------- works-with ticker ---------- */

.ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; }
.ticker-track {
  display: flex; gap: 2.75rem; width: max-content; white-space: nowrap;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--subtle);
  animation: marquee 38s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.tk-label { color: var(--ink); font-weight: 500; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- autopilot ---------- */

.mock { position: relative; }
.auto-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: auto; margin-right: 10px;
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  cursor: pointer;
}
.auto-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.auto-chip.playing { color: var(--coral); border-color: rgba(217, 86, 74, 0.35); background: var(--coral-subtle); }
.auto-chip.playing i { background: var(--coral); animation: pulse 1.6s ease infinite; }
.mock-chrome .mock-url { margin: 0 12px 0 auto; }

.ghost {
  position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; opacity: 0;
  transition: transform 0.85s cubic-bezier(0.3, 0.7, 0.25, 1), opacity 0.3s ease;
  will-change: transform;
}
.ghost.on { opacity: 1; }
.ghost-ring {
  position: absolute; left: -4px; top: -4px; width: 28px; height: 28px;
  border-radius: 50%; border: 2px solid var(--coral); opacity: 0; transform: scale(0.4);
}
.ghost.clicking .ghost-ring { animation: ghostClick 0.55s ease-out; }
@keyframes ghostClick {
  0% { opacity: 0.85; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(1.7); }
}

/* ---------- agents view ---------- */

.push-right { margin-left: auto; }
.agents-wrap { padding: 16px 20px 20px; }
.agent-form {
  display: none;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  padding: 15px 18px; margin-bottom: 14px;
}
.agent-form.on { display: block; animation: rise 0.45s cubic-bezier(0.22, 0.61, 0.21, 1) both; }
.af-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.af-row label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--subtle); width: 52px; flex: none; }
.af-row input {
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  background: var(--inset); border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 11px; width: 210px; outline: none;
}
.af-row input:focus { border-color: var(--coral); }
.af-chip { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--inset); padding: 5px 10px; border-radius: 6px; }
.agent-form .btn { margin-top: 4px; }

.agent-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.agent-card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 13px 14px; }
.ac-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.ac-head b { font-weight: 600; letter-spacing: -0.01em; }
.ac-head code { font-size: 10px; color: var(--subtle); margin-left: auto; }
.agent-card p { font-size: 12px; color: var(--muted); line-height: 1.5; min-height: 36px; }
.ac-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-family: var(--mono); font-size: 10px; color: var(--subtle); }
.agent-card.born {
  animation: born 0.8s cubic-bezier(0.2, 0.7, 0.3, 1.15) both;
  border-color: rgba(217, 86, 74, 0.5);
  box-shadow: 0 0 0 3px var(--coral-subtle);
}
@keyframes born { from { opacity: 0; transform: scale(0.92); } }

/* ---------- bento features ---------- */

.card.wide { grid-column: span 2; }
.card:has(.minilog) { display: flex; gap: 2rem; align-items: center; }
.card:has(.minilog) .card-body { flex: 1.1; }
.minilog {
  flex: 1; min-width: 220px;
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  background: var(--inset); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px;
}
.minilog span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; animation: mlCycle 9s linear infinite; }
.minilog span:nth-child(1) { animation-delay: 0.2s; }
.minilog span:nth-child(2) { animation-delay: 1s; }
.minilog span:nth-child(3) { animation-delay: 1.8s; }
.minilog span:nth-child(4) { animation-delay: 2.6s; }
.minilog span:nth-child(5) { animation-delay: 3.4s; }
.ml-coral { color: var(--coral); }
.ml-ok { color: #157a5b; }
@keyframes mlCycle {
  0% { opacity: 0; transform: translateY(3px); }
  6%, 78% { opacity: 1; transform: none; }
  90%, 100% { opacity: 0; transform: none; }
}

/* ---------- how-it-works orbit stage ---------- */

.orbit-stage { margin-top: 3rem; }
.orbit-ring { display: none; }

@media (min-width: 920px) {
  .orbit-stage { position: relative; height: 660px; }
  .orbit-ring {
    display: block; position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%); width: 620px; height: 620px;
  }
  .runner {
    transform-box: view-box; transform-origin: 50% 50%;
    animation: spin 18s linear infinite; animation-play-state: paused;
  }
  .orbit-stage.go .runner { animation-play-state: running; }
  .orbit-stage .pipeline { display: block; margin-top: 0; }
  .orbit-stage .station {
    position: absolute; width: 210px; transform: translate(-50%, -50%);
    border-top: 0; padding: 10px 14px; text-align: center;
    background: var(--bg); border-radius: 10px;
    box-shadow: 0 0 0 1px transparent;
    transition: box-shadow 0.4s ease, background 0.4s ease;
  }
  .orbit-stage .station-dot { display: none; }
  .orbit-stage .station p { font-size: 12.5px; }
  .orbit-stage .station-num { margin-bottom: 0.35rem; transition: color 0.3s ease; }
  .orbit-stage .station.lit { background: var(--surface); box-shadow: 0 0 0 1px rgba(217, 86, 74, 0.4), 0 10px 24px -14px rgba(23, 23, 26, 0.2); }
  .orbit-stage .station.lit .station-num { color: var(--coral); }
  .orbit-stage .station:nth-child(1) { left: 50%; top: calc(50% - 242px); }
  .orbit-stage .station:nth-child(2) { left: calc(50% + 210px); top: calc(50% - 121px); }
  .orbit-stage .station:nth-child(3) { left: calc(50% + 210px); top: calc(50% + 121px); }
  .orbit-stage .station:nth-child(4) { left: 50%; top: calc(50% + 242px); }
  .orbit-stage .station:nth-child(5) { left: calc(50% - 210px); top: calc(50% + 121px); }
  .orbit-stage .station:nth-child(6) { left: calc(50% - 210px); top: calc(50% - 121px); }
}

/* ---------- dark closing ---------- */

.closing { background: var(--dark-bg); }
.closing-h {
  font-size: clamp(2.4rem, 5.6vw, 4.3rem);
  font-weight: 500; letter-spacing: -0.035em; line-height: 1.05;
  color: var(--dark-ink); margin: 1.7rem 0 1.2rem;
}
.closing-h .serif { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.05em; }
.closing-sub { color: var(--dark-muted); font-size: 1.05rem; line-height: 1.65; max-width: 34em; margin: 0 auto; }
.btn-ghost.on-dark { border-color: rgba(255, 255, 255, 0.22); color: var(--dark-ink); }
.btn-ghost.on-dark:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.42); }

@media (max-width: 760px) {
  .card.wide { grid-column: auto; }
  .card:has(.minilog) { flex-direction: column; align-items: stretch; }
  .agent-cards { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .w, .reveal { animation: none; opacity: 1; filter: none; transform: none; }
  .fx { transition: none; opacity: 1; transform: none; }
  .orbit, .moon, .term .cursor { animation: none; }
  .live i, .log-line { animation: none; }
  .counter, .hub-pulse, .ticker-track, .runner, .minilog span, .auto-chip i { animation: none; }
  .minilog span { opacity: 1; }
  .ghost { display: none; }
}
