@font-face { font-family: "Geist"; font-weight: 400; font-display: swap; src: url("assets/fonts/geist-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 600; font-display: swap; src: url("assets/fonts/geist-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 700; font-display: swap; src: url("assets/fonts/geist-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-weight: 400; font-display: swap; src: url("assets/fonts/geist-mono-latin-400-normal.woff2") format("woff2"); }

/* Tokens: neutral grey like the app, one orange, one dark stage */
:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --ink: #18181b;
  --muted: #52525b;
  --line: #dcdce0;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-text: #c2410c;
  --stage: #0d0d10;
  --stage-2: #18181c;
  --stage-ink: #f4f4f5;
  --stage-muted: #a8a8b3;
  --stage-line: rgb(255 255 255 / .12);
  --warn: #fb7a5c;
  --ok: #15803d;
  --shot-edge: rgb(24 24 27 / .12);
  --shot-shadow: 0 1px 2px rgb(24 24 27 / .06), 0 24px 48px -24px rgb(24 24 27 / .28);
  --gutter: 16px;
  --bleed: calc(-1 * max(var(--gutter), (100vw - 1240px) / 2));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d10;
    --surface: #17171b;
    --ink: #ececef;
    --muted: #a1a1aa;
    --line: #2a2a31;
    --accent: #c2410c;
    --accent-text: #fb923c;
    --ok: #4ade80;
    --stage: #050507;
    --stage-2: #141418;
    --shot-edge: rgb(255 255 255 / .1);
    --shot-shadow: 0 24px 48px -24px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -.008em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent-text); }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p, dl, dd, figure, ol { margin: 0; }
b { font-weight: 600; }
code, pre { font-family: "Geist Mono", ui-monospace, Consolas, monospace; }
p code { font-size: .88em; padding: .1em .35em; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }

.frame { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 6px; }
.skip:focus { top: 12px; }

/* Header: stays on screen, opaque so nothing shows through */
:root { --top-h: 68px; }
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.top.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px rgba(0, 0, 0, .45); }
.top.is-scrolled .top-inner { border-bottom-color: transparent; }
@media (prefers-reduced-motion: no-preference) { .top { transition: box-shadow .2s ease; } }
.top-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.top-nav { display: none; gap: 28px; margin-left: auto; font-size: 15px; color: var(--muted); }
.top-nav a, .top-gh { text-decoration: none; }
.top-nav a:hover, .top-gh:hover { color: var(--ink); text-decoration: underline; }
.top-gh { font-size: 15px; font-weight: 600; }
.top-demo {
  margin-left: auto; display: inline-flex; align-items: center; gap: .3em; min-height: 36px; padding: 0 12px;
  border-radius: 7px; background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.top-demo:hover { background: #a8380a; }
.top-demo-long { display: none; }
@media (max-width: 419px) { .top-inner { gap: 16px; } }
@media (min-width: 420px) { .top-demo-long { display: inline; } }
.demo-note { font-size: 14.5px; color: var(--muted); max-width: 32rem; padding-left: 12px; border-left: 3px solid var(--accent); }
.demo-note code { font-size: .9em; }
@media (min-width: 820px) {
  .top-nav { display: flex; }
  .top-demo { margin-left: 8px; }
  .top-gh { padding-left: 24px; border-left: 1px solid var(--line); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 8px; font-weight: 600; font-size: 16px; text-decoration: none; letter-spacing: -.01em; }
.btn-main { background: var(--accent); color: var(--accent-ink); }
.btn-main:hover { background: #a8380a; }
.btn-plain { border: 1px solid var(--line); background: var(--surface); }
.btn-plain:hover { border-color: var(--muted); }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 112px); }
.hero-grid { display: grid; gap: 28px; }
.hero h1 {
  font-size: clamp(2.6rem, 1.2rem + 6.4vw, 6.75rem);
  line-height: .94;
  letter-spacing: -.055em;
  font-weight: 600;
  max-width: 11ch;
}
.hero-copy { display: grid; gap: 20px; align-content: start; max-width: 36rem; }
.hero-answer { font-size: clamp(1.25rem, 1rem + .8vw, 1.5rem); line-height: 1.4; letter-spacing: -.02em; font-weight: 400; }
.hero-lead { color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.hero-note { font-size: 14.5px; color: var(--muted); max-width: 30rem; }

.hero-shot { margin-top: 12px; }
.shot-crop { overflow: hidden; border-radius: 10px; border: 1px solid var(--shot-edge); box-shadow: var(--shot-shadow); background: var(--surface); }
.shot-inner { position: relative; }
/* On small screens: crop away the sidebar so the table stays readable */
@media (max-width: 899px) {
  .shot-inner { width: 175%; margin-left: -30%; margin-top: -9%; margin-bottom: -2%; }
}
.mark {
  position: absolute;
  left: 19%; top: 82.9%; width: 52.4%; height: 7.4%;
  border: 2px solid var(--accent);
  border-radius: 5px;
  box-shadow: 0 0 0 4px rgb(194 65 12 / .14);
}
.hero-shot figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(300px, 4fr) 8fr; column-gap: clamp(32px, 4vw, 64px); row-gap: 44px; }
  .hero h1 { grid-column: 1 / -1; max-width: 13ch; }
  .hero-copy { grid-column: 1; padding-top: 6px; }
  .hero-shot { grid-column: 2; margin-top: 0; margin-right: var(--bleed); }
  .hero-shot .shot-crop { border-radius: 10px 0 0 10px; border-right: 0; }
  .hero-shot figcaption { padding-right: var(--gutter); }
}

@media (prefers-reduced-motion: no-preference) {
  .mark { animation: mark-in .7s cubic-bezier(.2, .7, .2, 1) .5s both; }
  @keyframes mark-in {
    from { opacity: 0; transform: scale(1.06); box-shadow: 0 0 0 14px rgb(194 65 12 / 0); }
    to { opacity: 1; transform: none; box-shadow: 0 0 0 4px rgb(194 65 12 / .14); }
  }
}

/* Run sheet: the course of one event */
.run { padding-bottom: clamp(48px, 8vw, 104px); }
.run-head { display: grid; gap: 14px; padding-block: 36px 8px; border-top: 1px solid var(--line); }
.run-head h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.25rem); line-height: 1.04; letter-spacing: -.045em; max-width: 18ch; }
.run-head p { color: var(--muted); max-width: 40rem; }
@media (min-width: 900px) {
  .run-head { grid-template-columns: 4fr 8fr; column-gap: clamp(32px, 4vw, 64px); row-gap: 20px; padding-top: 48px; }
  .run-head h2 { grid-column: 1 / -1; max-width: 24ch; }
  .run-head p { grid-column: 2; }
}

.steps { list-style: none; padding: 0; }
.step { display: grid; gap: 14px; padding-top: clamp(48px, 7vw, 96px); }
.when {
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
  display: flex; align-items: center; gap: 12px;
}
.when::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.step-body { display: grid; gap: 16px; }
.step-body > p { color: var(--muted); max-width: 38rem; }
.step h3 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.1; letter-spacing: -.035em; max-width: 22ch; }
.step-body .shot { margin-top: 16px; }

.shot img { border-radius: 10px; border: 1px solid var(--shot-edge); box-shadow: var(--shot-shadow); background: var(--surface); }
.shot figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

@media (min-width: 900px) {
  .step { grid-template-columns: 4fr 8fr; column-gap: clamp(32px, 4vw, 64px); }
  .when { position: sticky; top: calc(var(--top-h) + 24px); align-self: start; padding-top: 10px; }
  .when::after { display: none; }
  .when::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--accent); flex: none; }
  .shot-offset { margin-left: clamp(-120px, -8vw, -48px); }
}

/* Phone step */
.step-split { gap: 28px; }
.step-split > div { display: grid; gap: 16px; }
.step-split > div > p { color: var(--muted); max-width: 38rem; }
.phone { justify-self: start; width: min(260px, 72%); }
.phone img { border-radius: 26px; border: 1px solid var(--shot-edge); box-shadow: var(--shot-shadow); }
@media (min-width: 700px) {
  .step-split { grid-template-columns: 1fr auto; align-items: start; column-gap: 48px; }
  .phone { width: 250px; }
}

/* Stage: the one dark band */
.step.step-stage {
  display: block;
  margin-top: clamp(48px, 7vw, 96px);
  padding-block: clamp(48px, 7vw, 96px);
  background: var(--stage);
  color: var(--stage-ink);
  --accent-text: #fb923c;
}
.stage-inner { display: grid; gap: 14px; }
.step-stage .step-body > p { color: var(--stage-muted); }
.step-stage .step-body b { color: var(--stage-ink); }
.step-stage .when::after { background: var(--stage-line); }
.stage-shot { margin-top: 28px; }
.stage-shot img { border-radius: 10px; border: 1px solid var(--stage-line); }
.readout { display: grid; gap: 0; margin-top: 20px; border-top: 1px solid var(--stage-line); }
.readout div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--stage-line); }
.readout dt { color: var(--stage-muted); font-size: 15px; }
.readout dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.readout dd.warn { color: var(--warn); }
.readout-note { display: block; margin-top: 14px; font-size: 14px; color: var(--stage-muted); max-width: 40rem; }

@media (min-width: 900px) {
  .stage-inner { grid-template-columns: 4fr 8fr; column-gap: clamp(32px, 4vw, 64px); }
  .stage-shot { grid-column: 1 / -1; display: grid; grid-template-columns: 4fr 8fr; column-gap: clamp(32px, 4vw, 64px); margin-top: 40px; }
  .stage-shot img { grid-column: 2; grid-row: 1; }
  .stage-shot figcaption { grid-column: 1; grid-row: 1; align-self: end; }
  .readout { margin-top: 0; }
}

/* Team / operations */
.ops { padding-block: clamp(56px, 8vw, 112px); border-top: 1px solid var(--line); }
.ops-grid { display: grid; gap: 40px; }
.ops h2, .plugins h2, .install h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.25rem); line-height: 1.04; letter-spacing: -.045em; }
.ops-text { display: grid; gap: 18px; align-content: start; }
.ops-text > p { color: var(--muted); max-width: 36rem; }
.facts { display: grid; gap: 0; margin-top: 8px; }
.facts div { display: grid; gap: 2px; padding: 16px 0; border-top: 1px solid var(--line); }
.facts dt { font-weight: 600; }
.facts dd { color: var(--muted); }
@media (min-width: 600px) {
  .facts div { grid-template-columns: 13rem 1fr; gap: 20px; }
}
@media (min-width: 1000px) {
  .ops-grid { grid-template-columns: 5fr 7fr; column-gap: clamp(40px, 5vw, 80px); align-items: center; }
  .ops-shot { margin-right: var(--bleed); }
  .ops-shot img { border-radius: 10px 0 0 10px; border-right: 0; }
  .ops-shot figcaption { padding-right: var(--gutter); }
}

/* Plugins */
.plugins { padding-block: clamp(56px, 8vw, 104px); background: var(--surface); border-block: 1px solid var(--line); }
.plugins-grid { display: grid; gap: 36px; }
.plugins-grid > div { display: grid; gap: 18px; align-content: start; justify-items: start; }
.plugins-grid > div > p { color: var(--muted); max-width: 36rem; }
.plugins-grid .plugins-status { color: var(--ink); font-weight: 600; padding-left: 14px; border-left: 3px solid var(--accent); }
.tree {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink);
}
.tree-root { font-weight: 400; color: var(--muted); }
.tree-c { color: var(--muted); }
.tree-slot { color: var(--accent-text); }
@media (max-width: 599px) {
  .tree { font-size: 12.5px; padding: 18px; }
}
@media (min-width: 900px) {
  .plugins-grid { grid-template-columns: 5fr 7fr; column-gap: clamp(40px, 5vw, 80px); align-items: center; }
}

/* Installation */
.install { padding-block: clamp(56px, 8vw, 112px); }
.install-grid { display: grid; gap: 32px; }
.install-text { display: grid; gap: 16px; align-content: start; }
.install-text p { color: var(--muted); max-width: 34rem; }
.term { min-width: 0; border-radius: 10px; background: var(--stage); color: #e4e4e7; border: 1px solid var(--stage-line); }
.term pre { margin: 0; padding: 22px 24px; overflow-x: auto; font-size: 14px; line-height: 1.8; }
.term-c { color: #9b9ba6; }
@media (max-width: 599px) { .term pre { font-size: 12.5px; padding: 18px; } }
.specs { display: grid; gap: 0; border-top: 1px solid var(--line); }
.specs div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 600; }
@media (min-width: 900px) {
  .install-grid { grid-template-columns: 5fr 7fr; column-gap: clamp(40px, 5vw, 80px); }
  .install-text { grid-row: 1 / span 2; }
  .term { grid-column: 2; }
  .specs { grid-column: 2; }
}

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 36px 44px; font-size: 15px; color: var(--muted); }
.foot-inner { display: grid; gap: 10px; }
.foot .brand { color: var(--ink); margin-bottom: 4px; }
.foot-small { font-size: 13.5px; }
@media (min-width: 900px) {
  .foot-inner { grid-template-columns: 4fr 8fr; column-gap: clamp(32px, 4vw, 64px); }
  .foot .brand { grid-row: 1 / span 2; align-self: start; }
}

/* Live demo status (filled in by assets/demo-status.js) */
.demo-status { display: flex; align-items: baseline; gap: 10px; font-size: 14.5px; max-width: 32rem; }
.demo-status[hidden] { display: none; }
.demo-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); transform: translateY(-1px); }
.demo-status[data-state="ready"] .demo-dot { background: var(--ok); }
.demo-status[data-state="ready"] { font-weight: 600; }
.demo-status[data-state="down"] .demo-dot { background: var(--accent); }
.demo-status[data-state="down"] { color: var(--ink); }
.demo-status code { font-size: .88em; padding: .1em .35em; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) {
  .demo-status[data-state="waking"] .demo-dot { animation: demo-wake 1.4s ease-in-out infinite; }
  @keyframes demo-wake { 50% { opacity: .25; } }
}
