/* ==========================================================================
   HQFlow landing page

   The page is drawn on the product's own surface: a dot-grid canvas, one
   continuous wire down the left, and node cards in the canvas notation.

   Radius scale (only these three, no exceptions):
     --r-1  markers, chips, badges, segmented controls
     --r-2  buttons, cards, code blocks, node cards
     --r-3  large surfaces (canvas frame, command blocks)

   Colour: the interface itself is achromatic. Every neutral is pure grey
   (zero chroma) and the dots are black ink held back by opacity, never a
   tinted grey. Blue / green / red / amber are not accents, they are the
   product's step-category encoding and are only ever used to mean the same
   thing they mean inside the canvas.
   ========================================================================== */

:root {
  --paper: #fff;
  --paper-2: #f4f4f4;
  --dark: oklch(0.16 0 0);
  --dark-2: oklch(0.23 0 0);
  --ink: oklch(0.13 0 0);
  --ink-2: oklch(0.36 0 0);
  --ink-3: oklch(0.48 0 0);
  --line: oklch(0.9 0 0);
  --line-strong: oklch(0.74 0 0);
  --wire: oklch(0.52 0 0);

  /* black ink, opacity does the work: page grid, canvas grid, hero pool */
  --dot: rgba(0, 0, 0, .17);
  --dot-2: rgba(0, 0, 0, .2);
  --dot-3: rgba(0, 0, 0, .26);

  --amber: oklch(0.69 0.095 76);
  --amber-ink: oklch(0.48 0.085 72);
  --green: oklch(0.585 0.095 158);
  --blue: oklch(0.545 0.135 264);
  --red: oklch(0.545 0.115 38);
  --violet: oklch(0.51 0.085 300);

  --sans: "Segoe UI Variable Text", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Segoe UI Variable Display", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  --r-1: 2px;
  --r-2: 6px;
  --r-3: 12px;

  --small: 13px;
  --body: 15.5px;
  --head-h: 72px;
  --shell: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(72px, 5.5vw, 108px);
  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);

  /* the spine rail: x offset from the content shell, and the matching indent */
  --rail: 30px;
  --rail-gap: 108px;
  --branch: 60px;
  --sp-x: calc(var(--rail) - var(--rail-gap) - 6.5px);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .05), 0 12px 28px -20px rgba(0, 0, 0, .3);
  --shadow-panel: 0 1px 2px rgba(0, 0, 0, .06), 0 32px 72px -48px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--paper);
  /* the whole page sits on graph paper, like the canvas it sells */
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.3px);
  background-size: 30px 30px;
  font: var(--body)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { border: 0; color: inherit; background: none; cursor: pointer; font: inherit; }
a { color: inherit; text-decoration: none; }
code, pre { font-family: var(--mono); }
svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { color: var(--paper); background: var(--ink); }

.head-inner, .hero-inner, .section, .foot-inner {
  width: min(calc(100% - 2 * var(--gutter)), var(--shell));
  margin-inline: auto;
}
.mono { font-family: var(--mono); font-size: var(--small); }
.dim { color: var(--ink-3); }

/* small mono labels. deliberately few: no section eyebrows anywhere. */
.head-note, .demo-repo, .demo-stats, .install-cue,
.install-compat, .foot-tag, .foot-c, .demo-caption,
.live, .d-section > span, .d-foot {
  color: var(--ink-3);
  font: 11px/1.4 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.brand-mark { display: inline-grid; flex: none; width: 27px; height: 27px; place-items: center; border-radius: var(--r-1); color: white; background: var(--ink); font: 700 12px var(--mono); }
.brand-mark.sm { width: 20px; height: 20px; font-size: 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-word { display: flex; flex-direction: column; line-height: 1.15; }
.brand-word strong { font-size: 14px; letter-spacing: .02em; }
.brand-sub { color: var(--ink-3); font: 9.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.live { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.live-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: var(--r-2); font-size: var(--small); font-weight: 600; line-height: 1.2; white-space: nowrap; transition: background 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.btn-solid { color: white; background: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 18px -12px rgba(0, 0, 0, .5); }
.btn-solid:hover { background: var(--dark-2); }
.btn-solid:active { transform: translateY(1px); box-shadow: none; }
.icon-btn { display: inline-grid; width: 26px; height: 26px; place-items: center; border: 1px solid var(--line); border-radius: var(--r-1); color: var(--ink-3); }

.progress { position: fixed; z-index: 80; inset: 0 0 auto; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.site-head { position: sticky; z-index: 70; top: 0; border-bottom: 1px solid transparent; background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color 220ms; }
.site-head.is-scrolled { border-bottom-color: var(--line); }
.head-inner { display: flex; height: var(--head-h); align-items: center; gap: 24px; }
.head-nav { display: flex; align-items: center; gap: 26px; margin-left: 26px; }
.head-nav a { color: var(--ink-2); font-size: var(--small); font-weight: 500; transition: color 160ms; }
.head-nav a:hover { color: var(--ink); }
.head-right { display: flex; align-items: center; gap: 18px; margin-left: auto; }

/* ==========================================================================
   THE SPINE
   One continuous wire down the page in the canvas notation: solid for the
   real path, red dashes for dead ends, amber for stale, drawn on the grid.
   ========================================================================== */

main { position: relative; }
.spine { position: absolute; z-index: 0; inset: 0; overflow: visible; width: 100%; height: 100%; pointer-events: none; }
.sp-path { fill: none; stroke: var(--wire); stroke-width: 1.5; }
.sp-path.is-fail { stroke: var(--red); stroke-width: 1.25; stroke-dasharray: 5 5; opacity: .85; }
.sp-path.is-return { stroke: var(--wire); stroke-width: 1.25; stroke-dasharray: 3 4; opacity: .75; }
.sp-dot { fill: var(--wire); }
.sp-text { fill: var(--ink-3); stroke: var(--paper); stroke-width: 5px; paint-order: stroke; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }

.hero, .section { position: relative; z-index: 1; }
.section { padding-block: var(--section-y); padding-left: var(--rail-gap); }

.sp-node { position: absolute; z-index: 2; left: var(--sp-x); width: 13px; height: 13px; border: 1px solid var(--wire); border-radius: var(--r-1); background: white; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.sp-node::after { content: ""; position: absolute; inset: 3px; border-radius: 1px; background: var(--node-c, var(--line-strong)); }
.sp-node.is-entry { --node-c: var(--blue); border-color: var(--blue); }
.sp-node.is-out { --node-c: var(--green); border-color: var(--green); }
.sp-node.is-terminal { --node-c: var(--ink); border-color: var(--ink); }
.sp-node.is-dead { border-color: var(--red); }
.sp-node.is-dead::after { display: grid; place-items: center; inset: 0; background: none; color: var(--red); content: "×"; font: 700 11px/1 var(--mono); }

/* ==========================================================================
   HERO
   The headline sits directly on the canvas. The preview beside it is the
   real node component rendering real workflow data.
   ========================================================================== */

.hero { overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--dot-3) 1.2px, transparent 1.6px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(70% 90% at 68% 42%, black 30%, transparent 78%);
  mask-image: radial-gradient(70% 90% at 68% 42%, black 30%, transparent 78%);
  pointer-events: none;
}
/* the section below carries its own generous top padding, so the hero only
   needs enough tail for the wire to leave the frame */
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 3.5vw, 56px); align-items: start; padding-block: clamp(52px, 5.5vw, 80px) clamp(24px, 2.4vw, 36px); padding-left: var(--rail-gap); }
.hero-title { grid-column: 1 / -1; margin-bottom: clamp(20px, 2.5vw, 34px); font-size: clamp(40px, 3.8vw, 70px); font-weight: 750; line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.hero-title > span { display: block; }
.t-dim { color: var(--ink-3); }
.hero-lede { position: relative; align-self: center; }
.hero-lede .sp-node { bottom: 30px; }
.hero-sub { max-width: 44ch; color: var(--ink-2); font-size: 17.5px; line-height: 1.6; }
.hero-cta { margin-top: 30px; }

.hero-graph { position: relative; width: 100%; aspect-ratio: 10 / 6.2; }
.hero-edges, .hero-nodes { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-nodes .node { pointer-events: none; }
.hero-edges .edge-label { stroke: var(--paper); }

.cmd { position: relative; display: flex; width: min(100%, 430px); flex-direction: column; padding: 11px 54px 11px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-3); color: var(--ink); background: white; box-shadow: var(--shadow-panel); }
.cmd-line { display: flex; min-height: 33px; align-items: baseline; gap: 12px; padding-block: 6px; font: 13.5px var(--mono); white-space: nowrap; }
.cmd-line code { user-select: text; }
.cmd-line + .cmd-line { border-top: 1px solid var(--line); }
.cmd-prompt { color: var(--ink-3); user-select: none; }
.cmd-comment { margin-left: 16px; color: var(--ink-3); font-size: 11.5px; }
.cmd-copy { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: var(--r-1); color: var(--ink-3); font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.cmd-copy.is-copied { border-color: var(--green); color: var(--green); }
.cmd-lg { width: 100%; padding: 20px 120px 20px 20px; border-color: var(--dark-2); border-radius: var(--r-3); color: white; background: var(--dark); }
.cmd-lg .cmd-line { font-size: 14.5px; }
.cmd-lg .cmd-prompt { color: #8c8c8c; }
.cmd-lg .cmd-line + .cmd-line { border-top-color: var(--dark-2); }

/* ==========================================================================
   SECTION HEADS
   ========================================================================== */

.section-head { position: relative; margin-bottom: clamp(40px, 4.5vw, 60px); }
.section-title { max-width: 24ch; font-size: clamp(2rem, 3.4vw, 3.1rem); font-weight: 740; line-height: 1.04; letter-spacing: -.038em; }
.section-lede { max-width: 60ch; margin-top: 18px; color: var(--ink-2); font-size: 16.5px; line-height: 1.62; }
.section-lede code, .station-copy code { padding: 1px 5px; border: 1px solid var(--line); border-radius: var(--r-1); background: white; font-size: .85em; }

/* ==========================================================================
   WHY: a fork. two branches dead-end, one continues as a real node.
   ========================================================================== */

.fork { position: relative; display: flex; flex-direction: column; gap: 28px; }
.fork-row { position: relative; padding-block: 4px; }
.fork-row.is-dead { padding-left: var(--branch); }
.fork-row.is-dead .sp-node { left: calc(var(--sp-x) + var(--branch)); }
.fork-row .sp-node { top: 6px; }
.fork-row h3 { font-size: 20px; font-weight: 680; letter-spacing: -.02em; }
.fork-row p { max-width: 56ch; margin-top: 6px; color: var(--ink-2); }
.fork-row.is-dead h3 { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in oklch, var(--red) 45%, transparent); text-decoration-thickness: 1.5px; }
.fork-row.is-dead p { color: var(--ink-3); }

/* the surviving path is an actual node card, in the canvas notation */
.fork-row.is-live { margin-top: 16px; max-width: 620px; padding: 22px 28px 24px; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: white; box-shadow: var(--shadow-card); }
.fork-row.is-live::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; border-radius: var(--r-2) 0 0 var(--r-2); background: var(--green); }
.fork-row.is-live .sp-node { top: 30px; }
.fork-row.is-live h3 { font-size: 24px; color: var(--ink); }
.fork-row.is-live p { color: var(--ink-2); font-size: 16px; }

/* ==========================================================================
   LOOP: a hub above three stations. The spine fans out into each card,
   then leaves through Observe into the canvas.
   ========================================================================== */

.cycle { position: relative; padding-top: 96px; }
.cycle-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: stretch; }
.sp-node.is-hub { left: 50%; top: 0; width: 14px; height: 14px; transform: translateX(-50%); --node-c: var(--ink); border-color: var(--ink); }
.station { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px 22px 20px; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: white; box-shadow: var(--shadow-card); }
.station .sp-node { left: 50%; top: 0; transform: translate(-50%, -50%); }
.sp-anchor { position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; pointer-events: none; }
.station-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.station h3 { font-size: 21px; font-weight: 680; letter-spacing: -.02em; }
.station-copy h3 { margin-bottom: 8px; }
.cycle-repeat { flex: none; color: var(--amber-ink); font: 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.station-copy p { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.station-copy p em { color: var(--amber-ink); font-style: normal; padding: 1px 5px; border-radius: var(--r-1); background: color-mix(in oklch, var(--amber) 14%, white); }
.station .mini { margin-top: auto; width: 100%; overflow: auto; padding: 14px 14px; border: 1px solid var(--line); border-radius: var(--r-2); color: var(--ink-2); background: var(--paper-2); box-shadow: none; font-size: 11px; line-height: 1.7; white-space: pre; }

/* ==========================================================================
   CANVAS DEMO
   ========================================================================== */

.demo { position: relative; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--r-3); background: white; box-shadow: var(--shadow-panel); }
.demo-bar, .demo-foot { display: flex; align-items: center; gap: 16px; padding: 11px 16px; background: white; }
.demo-bar { border-bottom: 1px solid var(--line); }
.demo-brand { display: inline-flex; align-items: center; gap: 8px; font-size: var(--small); }
.demo-repo { letter-spacing: .04em; }
.demo-spacer { flex: 1; }
.demo-bar .live { font-size: 10px; }
.demo-body { position: relative; }
.demo-canvas { overflow: auto hidden; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.demo-pan {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 560;
  background-color: var(--paper);
  background-image: radial-gradient(circle, var(--dot-2) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
.demo-edges, .demo-nodes { position: absolute; inset: 0; width: 100%; height: 100%; }
.edge { fill: none; stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.edge.is-failure { opacity: .8; stroke: var(--red); stroke-dasharray: 5 5; }
.edge.is-conditional { opacity: .9; stroke: var(--amber); stroke-dasharray: 5 4; }
.edge-label { fill: var(--ink-3); stroke: var(--paper); stroke-width: 6px; paint-order: stroke; font: 11px var(--mono); }
.edge-label.is-failure { fill: var(--red); }
.edge-label.is-conditional { fill: var(--amber-ink); }

.node { position: absolute; display: flex; width: 20%; min-height: 11.4%; flex-direction: column; gap: 4px; padding: 8px 10px 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-2); text-align: left; background: white; box-shadow: var(--shadow-card); transition: transform 220ms var(--ease), box-shadow 220ms var(--ease); }
.node::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; border-radius: var(--r-2) 0 0 var(--r-2); background: var(--cat, var(--ink-3)); }
.node.is-inferred::before { background: repeating-linear-gradient(to bottom, var(--cat) 0 3px, transparent 3px 6px); }
.node:hover { z-index: 2; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 16px 32px -20px rgba(0, 0, 0, .45); }
.node.is-selected { z-index: 2; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow-card); }
.node-head { display: flex; min-width: 0; align-items: baseline; gap: 8px; }
.node-idx, .node-meta { flex: none; color: var(--ink-3); font: 9px var(--mono); }
.node-name { flex: 1; overflow: hidden; font-size: clamp(9px, .9vw, 11.5px); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.node-sub { overflow: hidden; color: var(--ink-2); font: clamp(7.5px, .85vw, 10.5px) var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.node-conf { color: var(--amber-ink); font: 8.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; }

/* hero preview reuses the node component at a larger, calmer scale */
.node-mini { width: 42%; min-height: 13%; padding: 9px 12px 9px 15px; }
.node-mini .node-name { font-size: clamp(10px, .85vw, 12.5px); }
.node-mini .node-sub { font-size: clamp(8.5px, .7vw, 11px); }

.demo-hint { position: absolute; z-index: 4; bottom: 16px; left: 16px; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: var(--r-1); color: var(--ink-2); background: white; font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; transition: opacity 220ms, transform 220ms; }
.demo-hint.is-hidden { opacity: 0; transform: translateY(6px); pointer-events: none; }

.drawer { position: absolute; z-index: 5; top: 0; right: 0; bottom: 0; display: flex; width: min(340px, 88%); flex-direction: column; border-left: 1px solid var(--line-strong); background: white; box-shadow: -18px 0 40px -30px rgba(0, 0, 0, .4); transform: translateX(102%); transition: transform 320ms var(--ease); }
.drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer-idx { padding-top: 4px; color: var(--ink-3); font: 11px var(--mono); }
.drawer-title { flex: 1; min-width: 0; }
.drawer-title h3 { font-size: 17px; font-weight: 680; }
.drawer-badges, .d-io { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-badges { margin-top: 8px; }
.badge { padding: 2px 7px; border: 1px solid color-mix(in oklch, var(--badge-c, var(--ink-3)) 30%, white); border-radius: var(--r-1); color: color-mix(in oklch, var(--badge-c, var(--ink-3)) 80%, var(--ink)); background: color-mix(in oklch, var(--badge-c, var(--ink-3)) 12%, white); font: 9.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.badge-conf { --badge-c: var(--green); }
.badge-conf.is-inferred { --badge-c: var(--amber); }
.drawer-body { display: flex; overflow-y: auto; flex-direction: column; gap: 20px; padding: 16px; }
.d-section > span { display: block; margin-bottom: 8px; }
.d-purpose, .d-note { color: var(--ink-2); font-size: var(--small); line-height: 1.6; }
.d-src, .d-chip { padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-1); color: var(--ink-2); background: var(--paper-2); font: 11px var(--mono); overflow-wrap: anywhere; }
.d-src { margin-bottom: 6px; }
.d-chip { padding: 2px 7px; background: white; }
.d-chip.out { border-color: var(--green); }
.d-edge { margin-bottom: 12px; padding-left: 12px; border-left: 2px solid var(--amber); }
.d-edge strong { display: block; font-size: var(--small); }
.d-hand { margin-top: 4px; color: var(--ink-3); font: 11px var(--mono); }
.d-test { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; color: var(--ink-2); font: 11px var(--mono); }
.d-test .dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.d-test .dot.unknown { background: var(--ink-3); }
.d-test .file { display: block; color: var(--ink-3); font-size: 10px; }
.d-note { padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--r-1); }
.d-foot { font-size: 10px; }

.demo-foot { border-top: 1px solid var(--line); background: var(--paper-2); }
.demo-caption { margin-top: 14px; text-align: right; text-transform: none; letter-spacing: .02em; }
.demo-caption code { font-size: 10.5px; }

/* ==========================================================================
   PRINCIPLES: the spine runs straight, four taps hang off it.
   ========================================================================== */

.bus { display: flex; flex-direction: column; gap: 34px; }
.tap { position: relative; display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 8px clamp(20px, 3vw, 44px); align-items: baseline; }
.tap .sp-node { top: 6px; }
.tap h3 { font-size: 20px; font-weight: 680; letter-spacing: -.02em; }
.tap p { max-width: 58ch; color: var(--ink-2); }

/* ==========================================================================
   INSTALL
   ========================================================================== */

.install .section-head .sp-node { top: 12px; }
.install-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 4vw, 52px); align-items: start; }
.install-cue { margin-bottom: 12px; }
.install-quote { margin-bottom: 16px; padding-left: 20px; border-left: 2px solid var(--ink); font-size: 17px; line-height: 1.6; }
.install-compat { text-transform: none; letter-spacing: .02em; }

.site-foot { position: relative; z-index: 1; border-top: 1px solid var(--line); background: white; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; padding-block: 40px; }
.foot-brand { display: flex; align-items: flex-start; gap: 12px; }
.foot-tag { margin-top: 4px; }
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--ink-2); font-size: var(--small); }
.foot-c { width: 100%; text-align: right; }

/* ==========================================================================
   MOTION
   Every animation reveals structure in the order the page argues it.
   Nothing loops, nothing hijacks the scroll.
   ========================================================================== */

@keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .hero .reveal { animation: rise .9s var(--ease) both; }
  .hero-title .reveal + .reveal { animation-delay: .07s; }
  .hero-sub.reveal { animation-delay: .14s; }
  .hero-cta.reveal { animation-delay: .2s; }
  .hero-graph.reveal { animation-delay: .16s; }
  main .section .reveal { opacity: 0; translate: 0 14px; transition: opacity .7s var(--ease), translate .7s var(--ease); }
  main .section .reveal.in { opacity: 1; translate: 0; }

  /* solid segments draw themselves; dashed segments cannot (the dash array is
     already carrying meaning) so they fade in just after. */
  .sp-path.is-draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease); }
  .sp-group.in .sp-path.is-draw { stroke-dashoffset: 0; }
  .sp-path.is-fade, .sp-text, .sp-dot { opacity: 0; transition: opacity .55s var(--ease) .4s; }
  .sp-group.in .sp-path.is-fade, .sp-group.in .sp-text, .sp-group.in .sp-dot { opacity: 1; }
  .sp-group.in .sp-path.is-fail { opacity: .85; }
  .sp-group.in .sp-path.is-return { opacity: .75; }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress { animation: progress-x linear both; animation-timeline: scroll(root); }
    @keyframes progress-x { to { transform: scaleX(1); } }
  }
}

/* ==========================================================================
   RESPONSIVE
   The rail never disappears, it just moves into the left gutter and the
   branches shorten.
   ========================================================================== */

@media (max-width: 1080px) {
  :root { --rail-gap: 84px; --branch: 44px; }
  .tap { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-graph { max-width: 560px; }
  .cycle-row { grid-template-columns: 1fr; gap: 28px; }
  .sp-node.is-hub { left: var(--sp-x); transform: none; }
  .station .sp-node { left: var(--sp-x); top: 30px; transform: none; }
  .station { padding: 22px 20px 18px 28px; }
  .cycle { padding-top: 8px; }
  .install-grid { grid-template-columns: 1fr; }
  .tap { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 900px) {
  .head-nav { display: none; }
}

@media (max-width: 720px) {
  :root {
    --gutter: 20px;
    --section-y: 68px;
    --head-h: 64px;
    --rail: 6px;
    --rail-gap: 32px;
    --branch: 0px;
  }
  body { background-size: 24px 24px; }
  .hero-inner { padding-block: 48px 20px; gap: 32px; }
  .hero-title { font-size: clamp(34px, 9.4vw, 42px); }
  .hero-sub { font-size: 16px; }
  .hero-cta { margin-top: 26px; }
  .head-right .head-note { display: none; }
  .cmd { max-width: 100%; }
  .cmd-lg { padding-right: 20px; }
  .cmd-lg .cmd-comment { display: none; }
  .fork-row.is-live { padding: 18px 20px 20px; }
  .fork-row.is-live .sp-node { top: 26px; }
  .fork-row.is-live h3 { font-size: 21px; }
  .demo-bar { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .demo-brand { min-width: 0; }
  .demo-repo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .demo-bar .live, .demo-spacer { display: none; }
  .demo-pan { width: max(100%, 720px); }
  .demo-foot { display: grid; grid-template-columns: auto 1fr; }
  .demo-caption { text-align: left; }
  .foot-c { text-align: left; }
}

@media (max-width: 380px) {
  .cmd { padding-right: 40px; }
  .cmd-line { gap: 8px; font-size: 12px; }
  .cmd-copy { padding-inline: 6px; }
  .cmd-copy span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; translate: none !important; transition: none !important; animation: none !important; }
}
