/* Scroll lab, shared: tokens copied from tokens.css / site.css (not imported: other sessions edit those),
 * the stub page every variant runs on, the variant plate, and the small interface objects the variants move. */
@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-xl: 1.5625rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-short: 220ms;
  --content: 1280px; --gutter: 64px; --gap-columns: 32px;
  --color-paper: oklch(98.9% 0.004 90); --color-paper-2: oklch(96.6% 0.006 88); --color-paper-3: oklch(93.6% 0.008 86);
  --color-card: oklch(99.7% 0.002 90);
  --color-ink: oklch(19% 0.008 85); --color-ink-2: oklch(33% 0.010 85); --color-muted: oklch(48% 0.012 85);
  --color-rule: oklch(90% 0.007 85); --color-grid: oklch(87.5% 0.008 85);
  --color-accent: oklch(92% 0.185 108); --color-focus: oklch(19% 0.008 85);
  --color-success: oklch(50% 0.12 150);
  --shadow-card: 0 1px 2px oklch(20% 0.01 85 / 0.05), 0 12px 32px -16px oklch(20% 0.02 85 / 0.18);
  --shadow-hair: 0 1px 2px oklch(20% 0.01 85 / 0.07);
  --font-body: "Geist", ui-sans-serif, system-ui, sans-serif;
  --radius-window: 20px; --radius-card: 16px; --radius-inner: 10px; --radius-chip: 6px; --radius-pill: 999px;
  /* lab only */
  --track: oklch(83% 0.009 85);
  --roller: oklch(74% 0.01 85);
  --ph: var(--color-paper-3);
  --line-art: oklch(40% 0.012 85);
}
@media (max-width: 64rem) { :root { --gutter: 24px; } }
@media (max-width: 47.5rem) { :root { --gutter: 16px; --gap-columns: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { position: relative; margin: 0; background: var(--color-paper); color: var(--color-ink); font: 400 var(--text-md)/1.5 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: var(--color-accent); color: var(--color-ink); }

/* ---------- variant plate ---------- */
.plate { position: fixed; top: 12px; left: 50%; z-index: 400; display: flex; align-items: center; gap: 2px; max-width: calc(100% - 24px); padding: 4px; border-radius: var(--radius-pill); background: oklch(19% 0.008 85 / 0.94); color: var(--color-paper); font-size: var(--text-xs); line-height: 1; transform: translateX(-50%); box-shadow: var(--shadow-card); }
.plate a, .plate button { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 0 10px; border: 0; border-radius: var(--radius-pill); background: transparent; color: inherit; font: 500 var(--text-xs)/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.plate a:hover, .plate button:hover { background: oklch(100% 0 0 / 0.1); }
.plate a[aria-current="page"], .plate button[aria-pressed="true"] { background: var(--color-paper); color: var(--color-ink); }
.plate a:focus-visible, .plate button:focus-visible { outline: 2px solid var(--color-paper); outline-offset: 2px; }
.plate__sep { width: 1px; height: 20px; margin-inline: 6px; background: oklch(100% 0 0 / 0.2); }
.plate__name { padding-inline: 8px 10px; color: oklch(82% 0.01 85); white-space: nowrap; }
@media (max-width: 47.5rem) { .plate .plate__name, .plate .plate__sub { display: none; } .plate a, .plate button { min-width: 30px; padding: 0 8px; } }

/* ---------- stub page ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto; }
.sec { position: relative; display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding-block: 22vh; padding-block: 22svh; }
.sec > .container { width: min(100% - 2 * var(--gutter), var(--content)); }
.sec--well > .container > .grid { padding: var(--space-xl); border-radius: var(--radius-window); background: var(--color-paper-2); }
.sec--foot { align-items: flex-start; background: var(--color-paper-3); --ph: oklch(89% 0.009 86); }

/* lanes name where the animation lives; content keeps the rest.
   L: columns 1-3 on the left. R: 10-12 on the right. W: the right half. */
.stub { grid-column: 1 / -1; display: grid; gap: var(--space-md); align-content: start; }
[data-lane="L"] .stub { grid-column: 4 / -1; }
[data-lane="R"] .stub { grid-column: 1 / 10; }
[data-lane="W"] .stub, [data-lane="W"] .case-text { grid-column: 1 / 7; }

.sec__name { color: var(--color-muted); font-size: var(--text-sm); }
.ph { display: block; height: 12px; border-radius: var(--radius-chip); background: var(--ph); }
.ph--h1 { height: 52px; border-radius: var(--radius-inner); }
.ph--h2 { height: 34px; border-radius: var(--radius-inner); }
.ph--h3 { height: 20px; }
.ph--btn { height: 48px; border-radius: var(--radius-pill); }
.ph--quote { height: 30px; border-radius: var(--radius-inner); }
.ph--fig { height: 44px; border-radius: var(--radius-inner); }
.ph-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
.ph-lines { display: grid; gap: 10px; }
.gap-l { margin-top: var(--space-md); }

.logos { display: flex; flex-wrap: wrap; gap: var(--space-lg) var(--space-xl); margin-top: var(--space-sm); }
.logos .ph { height: 28px; }
.split { display: grid; grid-template-columns: 4fr 5fr; gap: var(--gap-columns); align-items: center; }
[data-lane="R"] .split { grid-template-columns: 5fr 4fr; }
[data-lane="R"] .split > :first-child { order: 2; }
[data-lane="W"] .split { grid-template-columns: 1fr; }
[data-lane="W"] .plate-ph { display: none; }
.plate-ph { aspect-ratio: 5 / 4; border-radius: var(--radius-window); background: var(--color-paper-2); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }
.pcard { display: grid; gap: var(--space-sm); padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-card); box-shadow: var(--shadow-card); }
.price-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); padding-top: var(--space-lg); border-top: 1px solid var(--color-ink); }
.price-cols > div { display: grid; gap: var(--space-sm); }
.faq-rows > .ph-row { padding-block: 22px; border-top: 1px solid var(--color-grid); }

/* stages: sections where the animation docks into the page */
.stage { position: relative; z-index: 2; }
.stub--head { grid-column: 1 / 6; }
.stage--center { grid-column: 1 / -1; justify-self: center; }
.case-text { grid-column: 1 / 7; display: grid; gap: var(--space-md); align-content: center; }
.case-dock { grid-column: 8 / -1; display: grid; place-items: center; }
.foot-head { grid-column: 8 / -1; display: grid; gap: var(--space-md); }
.foot-head--left { grid-column: 1 / 6; }
.stage--foot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.stage--foot-right { position: absolute; top: 50%; left: calc(50% + min(var(--content), 100vw - 2 * var(--gutter)) / 4); transform: translate(-50%, -50%); }
.foot-links { position: absolute; left: 0; right: 0; bottom: 8vh; }
.foot-links .container { display: flex; gap: var(--space-lg); }
.foot-links .ph { width: 72px; }

/* station frame: a dashed bay with its name under it */
.bay { position: relative; display: grid; place-items: center; width: var(--bay-w, 300px); height: var(--bay-h, 200px); border: 1px dashed var(--color-grid); border-radius: var(--radius-window); background: oklch(98.9% 0.004 90 / 0.6); }
.bay__name { position: absolute; top: calc(100% + 12px); left: 50%; display: inline-flex; align-items: center; gap: var(--space-xs); transform: translateX(-50%); font-size: var(--text-sm); white-space: nowrap; }
.bay__name b { font-weight: 500; }
.bay__name span { color: var(--color-muted); }
.bay__systems { position: absolute; top: -18px; right: 16px; display: flex; gap: 6px; }

/* ---------- track ---------- */
.track { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; overflow: visible; }
.track__line { fill: none; stroke: var(--track); stroke-width: 1.5; }
.track__rollers { fill: none; stroke: var(--roller); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 0 32; }

/* fixed scene layer (C, D, E) */
.scene { position: fixed; inset: 0; z-index: 5; pointer-events: none; visibility: hidden; }
.is-ready .scene { visibility: visible; }
.scene--still { position: absolute; inset: auto; left: 0; width: 100%; visibility: visible; z-index: 3; }

/* ---------- interface objects ---------- */
.o { position: absolute; top: 0; left: 0; }
.o-card { display: grid; align-content: start; gap: 6px; width: 224px; padding: 14px 16px; border-radius: 14px; background: var(--color-card); box-shadow: 0 0 0 1px var(--color-rule), var(--shadow-card); font-size: 13px; line-height: 1.35; }
.o-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 500; }
.o-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.o-ico { display: inline-grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--color-paper-3); color: var(--color-ink); }
.o-ico svg { width: 16px; height: 16px; }
.o-k { color: var(--color-muted); }
.o-v { font-weight: 500; font-variant-numeric: tabular-nums; }
.o-kv { display: flex; justify-content: space-between; gap: 8px; }
.o-muted { color: var(--color-muted); }
.o-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--color-success); font-size: 12px; font-weight: 500; white-space: nowrap; }
.o-lines { display: grid; gap: 6px; }
.o-lines i { display: block; height: 5px; border-radius: 3px; background: oklch(88% 0.008 85); }
.o-hl { position: relative; padding: 2px 5px; margin-inline: -5px; }
.o-hl > i { position: absolute; inset: 0; border-radius: 3px; background: var(--color-accent); transform-origin: 0 50%; }
.o-hl > span { position: relative; }
.o-bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; padding-top: 4px; border-bottom: 1px solid var(--color-grid); }
.o-bars i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: var(--color-ink); transform-origin: 50% 100%; }
.o-bars i:last-child { background: var(--color-accent); box-shadow: inset 0 0 0 1px oklch(19% 0.008 85 / 0.25); }

/* the scanned PDF: tilted, folded corner, faint values */
.o-pdf { position: relative; width: 208px; height: 264px; padding: 18px 18px 16px; border-radius: 4px; background: oklch(97.6% 0.006 85); box-shadow: 0 1px 2px oklch(20% 0.01 85 / 0.08), 0 18px 36px -18px oklch(20% 0.02 85 / 0.3); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); font-size: 11px; line-height: 1.3; color: var(--color-ink-2); }
.o-pdf::before { content: ""; position: absolute; top: 0; right: 0; width: 22px; height: 22px; background: oklch(90% 0.008 85); clip-path: polygon(0 0, 0 100%, 100% 100%); }
.o-pdf__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; margin-right: 14px; border-bottom: 1px solid oklch(86% 0.008 85); }
.o-pdf__head b { font-weight: 600; font-size: 12px; color: var(--color-ink); }
.o-pdf .o-lines { margin-block: 10px; }
.o-pdf__stamp { position: absolute; right: 16px; bottom: 18px; padding: 4px 8px; border: 1.5px solid oklch(55% 0.03 60 / 0.55); border-radius: 4px; color: oklch(50% 0.03 60 / 0.7); font-size: 10px; font-weight: 600; line-height: 1.2; text-align: center; transform: rotate(-12deg); }

/* chaos objects (C, F) */
.bit { position: absolute; top: 0; left: 0; display: grid; place-items: center; }
.bit > * { grid-area: 1 / 1; }
.bit__raw { display: grid; gap: 6px; padding: 10px 12px; border-radius: 6px; background: var(--color-card); box-shadow: 0 0 0 1px var(--color-rule), 0 10px 24px -14px oklch(20% 0.02 85 / 0.35); font-size: 12px; line-height: 1.3; white-space: nowrap; }
.bit__raw--sticky { background: oklch(95% 0.07 100); box-shadow: 0 10px 24px -14px oklch(20% 0.02 85 / 0.35); }
.bit__raw--cell { padding: 0; gap: 0; grid-template-columns: repeat(3, auto); border-radius: 2px; overflow: hidden; }
.bit__raw--cell span { padding: 5px 6px; border-right: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule); font-variant-numeric: tabular-nums; }
.bit__raw--dot { width: 36px; height: 36px; padding: 0; place-items: center; border-radius: 50%; }
.bit__clean { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 4px; border-radius: var(--radius-pill); background: var(--color-card); box-shadow: 0 0 0 1px var(--color-rule), var(--shadow-hair); font-size: 12px; font-weight: 500; white-space: nowrap; }
.bit__clean .o-ico { width: 24px; height: 24px; border-radius: 50%; }
.bit__clean .o-ico svg { width: 14px; height: 14px; }
.lane-label { position: absolute; top: 0; left: 0; font-size: 12px; font-weight: 500; white-space: nowrap; }

.dash { display: grid; gap: var(--space-md); width: 640px; max-width: calc(100vw - 32px); padding: var(--space-lg); border-radius: var(--radius-window); background: var(--color-card); box-shadow: var(--shadow-card); }
.dash__head { display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.dash__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm); }
.dash__col { display: grid; align-content: start; gap: 8px; min-height: 196px; padding: 12px; border-radius: var(--radius-inner); background: var(--color-paper-2); }
.dash__col > b { font-size: 12px; font-weight: 500; }
.dash__slot { height: 32px; border-radius: var(--radius-pill); border: 1px dashed var(--color-grid); }

/* ---------- reduced motion / phone ---------- */
.m-slot { display: none; grid-column: 1 / -1; }
@media (max-width: 47.5rem) {
  .track { display: none; }
  .sec { padding-block: 72px; }
  [data-lane] .stub, [data-lane] .case-text, .stub--head, .case-text, .case-dock, .foot-head, .foot-head--left { grid-column: 1 / -1; }
  .split, [data-lane="R"] .split { grid-template-columns: 1fr; }
  [data-lane="R"] .split > :first-child { order: 0; }
  .cards, .price-cols { grid-template-columns: 1fr; }
  .sec--well > .container > .grid { padding: var(--space-lg); }
  .sec--foot > .container > .grid { row-gap: var(--space-lg); }
  .stage--center { justify-self: stretch; }
  .stage--foot, .stage--foot-right { position: relative; left: auto; top: auto; transform: none; grid-column: 1 / -1; justify-self: center; margin-top: 24px; }
  .foot-links { bottom: 24px; }
  .bay { --bay-w: 100%; max-width: 300px; }
  .dash__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .is-reduced .m-slot { display: block; position: relative; min-height: 160px; }
}

/* ---------- index ---------- */
.index { width: min(100% - 2 * var(--gutter), var(--content)); margin: 0 auto; padding: 96px 0 var(--space-3xl); }
.index h1 { margin: 0 0 8px; font-size: clamp(2rem, 2.4vw + 1rem, 3.25rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.index > p { max-width: 60ch; margin: 0 0 var(--space-xl); color: var(--color-ink-2); text-wrap: pretty; }
.vgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
@media (max-width: 64rem) { .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .vgrid { grid-template-columns: 1fr; } }
.vcard { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--radius-card); background: var(--color-card); box-shadow: var(--shadow-card); transition: transform var(--dur-short) var(--ease-out); }
.vcard:hover { transform: translateY(-2px); }
.vcard img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--color-paper-2); border-bottom: 1px solid var(--color-rule); }
.vcard__body { display: grid; align-content: start; gap: 6px; padding: var(--space-lg); }
.vcard h2 { margin: 0; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; }
.vcard p { margin: 0; color: var(--color-ink-2); font-size: var(--text-sm); text-wrap: pretty; }
.vcard a { color: var(--color-ink); font-weight: 500; text-decoration: none; }
.vcard a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.vcard a:focus-visible { outline: none; }
.vcard:has(a:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.vcard .vcard__open { margin-top: 6px; font-size: var(--text-sm); text-decoration: underline; text-underline-offset: 0.22em; }
@media (prefers-reduced-motion: reduce) { .vcard { transition: none; } .vcard:hover { transform: none; } }

/* ---------- the rider (F): a 0x0 wrapper on the line, layers centred on it ---------- */
.rider { position: absolute; top: 0; left: 0; z-index: 5; width: 0; height: 0; pointer-events: none; visibility: hidden; will-change: transform; }
.is-ready .rider { visibility: visible; }
.rider__inner { position: absolute; top: 0; left: 0; }
.lp { position: absolute; top: 0; left: 0; transform: translate(-50%, -50%); }
.layer { will-change: transform, opacity; }
.rider--static { visibility: visible; will-change: auto; z-index: 3; }
.rider--static .layer { will-change: auto; }
@media (max-width: 47.5rem) {
  .rider { position: fixed; top: auto; left: auto; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); }
  .rider__inner { transform: scale(0.55); transform-origin: 0 0; }
  .lp { transform: translate(-100%, -100%); }
  .rider--static { position: absolute; right: 0; bottom: 0; }
}
