/* Tensoit: the site as a technical drawing set.
   Drafting-film ground, ink linework, cyanotype sheets for the banner and contact,
   one dark green that only ever marks the feature in flight. Light and dark themes. */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --film: #f1f3f4;
  --film-2: #e5e9ed;
  --ink: #15203b;
  --ink-2: #47536e;
  --rule: #c7ced8;
  --rule-strong: #8f9ab0;

  --bp: #1a4c80;
  --bp-cell-t: #4d80b9;
  --bp-cell-l: #2c5d93;
  --bp-cell-r: #1b4979;
  --bp-line: #dce8fa;
  --bp-soft: #b9d0e9;
  --bp-frame: rgba(220, 232, 250, .5);
  --bp-grid: rgba(220, 232, 250, .07);
  --ink-hover: #2c3d68;

  /* feature green: one set of block faces, shared by the logo and every drawing */
  --green-t: #2f8a60;
  --green: #1f6b48;
  --green-r: #154d33;
  --green-ink: #1c6645;
  --green-light: #93e0b8;
  /* errors stay red: green means done */
  --err-light: #ffb4a3;
  --err-pale: #ffc7ba;
  --focus: var(--green-ink);
  --lift-shadow: rgba(8, 16, 35, .28);

  --mark-t: #3a4f82;
  --mark-l: #1f2d52;
  --mark-r: var(--ink);
  --bp-placeholder: #a9c2df;
  --bp-heading: #f5f8fd;
  /* white-card model faces on film */
  --model-t: #fff;
  --model-l: #dfe4eb;
  --model-r: #c3ccd8;

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

/* Dark theme: the same drawing set on a night desk. Blueprint sheets keep their blue. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --film: #0f1522;
  --film-2: #172033;
  --ink: #e3e9f3;
  --ink-2: #a5b1c6;
  --rule: #2b3650;
  --rule-strong: #55627e;
  --ink-hover: #c3cee2;
  --mark-t: #7b97cf;
  --mark-l: #5372ad;
  --mark-r: #3b5a92;
  --model-t: #24314d;
  --model-l: #1b2640;
  --model-r: #141d33;
  --green-ink: #7fd3a8;
  --lift-shadow: rgba(0, 0, 0, .55);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  scrollbar-color: var(--rule-strong) var(--film);
}

body {
  margin: 0;
  background: var(--film);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  font-stretch: 100%;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--focus);
  transition: background-color .4s ease, color .4s ease;
}

::selection { background: var(--ink); color: var(--film); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 650; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.75rem); line-height: 1.02; letter-spacing: -.03em; font-stretch: 108%; }
h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.025em; font-stretch: 106%; }
h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -.01em; font-stretch: 104%; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sheet :focus-visible { outline-color: var(--green-light); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
/* Parts drift in from the side while scrolling; never let that widen the page. */
main { overflow-x: clip; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Title-block lettering: condensed caps. */
.tb-label, .titleblock dt, .revs th, .bom thead th, .compare thead th,
.field label, .gate, .sheet-ref, .section-label, .loop span, .detail strong, .iso-callout, .iso-dimlabel {
  font-stretch: 72%;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
  line-height: 1.3;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--film); padding: .6em 1em; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Buttons and links ---------- */

.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.btn {
  display: inline-flex; align-items: center; gap: .65em;
  padding: .85em 1.25em;
  background: var(--ink); color: var(--film);
  border: 0; border-radius: 2px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.btn .icon { transition: transform .35s var(--ease); }
.btn:hover { background: var(--ink-hover); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .6em 1em; font-size: .9rem; }
.btn-invert { background: var(--bp-heading); color: var(--bp); }
.btn-invert:hover { background: #fff; color: var(--bp); }
.btn:disabled { opacity: .6; cursor: progress; }

.tlink { font-weight: 550; color: var(--bp-line); text-decoration: underline; text-decoration-color: var(--bp-soft); }
.tlink:hover { color: #fff; text-decoration-color: #fff; }
.tlink-dark { color: var(--ink); text-decoration-color: var(--rule-strong); }
.tlink-dark:hover { text-decoration-color: currentColor; }

/* ---------- Masthead: centered mark, nav split either side ---------- */

.masthead {
  /* Fixed-height slot in the flow; the bar inside shrinks, so the page never jumps. */
  position: sticky; top: 0; z-index: 20;
  height: 84px; pointer-events: none;
}
.masthead-bar::after {
  /* A drafting scale along the bottom edge. */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; z-index: 1;
  background:
    linear-gradient(var(--rule-strong), var(--rule-strong)) bottom / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--rule-strong) 0 1px, transparent 1px 60px) bottom / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 12px) bottom / 100% 4px no-repeat;
  pointer-events: none;
}

.masthead-bar {
  position: relative; pointer-events: auto;
  height: 84px;
  padding-inline: max(var(--gutter), calc((100% - 1440px) / 2));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: var(--film);
  transition: height .5s var(--ease), background-color .4s ease, box-shadow .5s var(--ease);
}
.is-condensed .masthead-bar { height: 56px; box-shadow: 0 6px 14px -10px var(--lift-shadow); }

.brand {
  position: relative; z-index: 2;
  grid-column: 2; grid-row: 1;
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
  transition: gap .5s var(--ease);
}
.mark { width: 40px; height: 40px; transform-origin: 50% 0; transition: transform .6s var(--ease), filter .6s var(--ease); }
.mark-t { fill: var(--mark-t); } .mark-l { fill: var(--mark-l); } .mark-r { fill: var(--mark-r); }
.mark-f-t { fill: var(--green-t); } .mark-f-l { fill: var(--green); } .mark-f-r { fill: var(--green-r); }
.mark-grid, .mark-f path { stroke: var(--film); stroke-width: 1.3; stroke-linejoin: round; }
.mark-grid { fill: none; }
/* The feature block lifts out of the cube on hover, slowly, and settles back. */
.mark-f { transition: transform .7s var(--ease-soft); }
.brand:hover .mark-f, .brand:focus-visible .mark-f { transform: translateY(-4.5px); }
.wordmark {
  display: inline-block; max-width: 6em; overflow: hidden;
  font-size: 1.75rem; font-weight: 700; font-stretch: 112%; letter-spacing: -.02em; line-height: 1.1;
  transition: max-width .55s var(--ease), opacity .35s ease, transform .55s var(--ease);
}

/* Scrolled: the wordmark folds away and the mark grows and hangs out of the
   slimmer bar, above the ruler and the page. */
.is-condensed .brand { gap: 0; }
.is-condensed .wordmark { max-width: 0; opacity: 0; transform: translateX(-14px); }
.is-condensed .masthead-bar .mark { transform: translateY(-2px) scale(1.7); filter: drop-shadow(0 7px 9px var(--lift-shadow)); }

.menu { display: contents; }
.menu-nav { grid-column: 1; grid-row: 1; display: flex; gap: clamp(1rem, 2.4vw, 2.2rem); }
.menu-nav a, .lang a { text-decoration: none; font-weight: 550; font-size: .95rem; }
.menu-nav a:hover { text-decoration: underline; }
.menu-actions { grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 1.4rem; }
.lang { display: flex; gap: .15rem; font-stretch: 80%; }
.lang a { padding: .3em .4em; color: var(--ink-2); font-size: .85rem; letter-spacing: .06em; }
.lang a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink); text-decoration-thickness: 2px; }
.lang a:hover { color: var(--ink); }

.menu-toggle { display: none; }

.theme-toggle {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  background: none; color: var(--ink); border: 1px solid var(--rule-strong); border-radius: 2px;
  cursor: pointer; transition: border-color .25s var(--ease), color .25s var(--ease);
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle .icon { width: 18px; height: 18px; transition: transform .6s var(--ease-soft); }
.theme-toggle:hover .icon { transform: rotate(-20deg); }
.i-sun, [data-theme="dark"] .i-moon { display: none; }
[data-theme="dark"] .i-sun { display: block; }
.theme-toggle-bar { display: none; }

@media (max-width: 900px) {
  .masthead { height: 68px; }
  .masthead-bar { grid-template-columns: 44px 1fr 44px; height: 68px; }
  .is-condensed .masthead-bar { height: 52px; }
  .is-condensed .masthead-bar .mark { transform: translateY(-2px) scale(1.55); }
  .mark { width: 34px; height: 34px; }
  .theme-toggle-bar { display: grid; grid-column: 3; grid-row: 1; justify-self: end; }
  .theme-toggle-menu { display: none; }
  .wordmark { font-size: 1.45rem; }
  .brand { justify-self: center; }
  .menu-toggle {
    grid-column: 1; grid-row: 1;
    display: grid; place-content: center; gap: 7px;
    width: 44px; height: 44px; margin-left: -10px;
    background: none; border: 0; cursor: pointer;
  }
  .menu-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

  .menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--film); border-bottom: 1px solid var(--ink);
    padding: 12px var(--gutter) 28px;
    flex-direction: column; gap: 24px;
  }
  .menu.is-open { display: flex; }
  .menu-nav { flex-direction: column; gap: 0; }
  .menu-nav a { padding: .9rem 0; border-bottom: 1px solid var(--rule); font-size: 1.15rem; }
  .menu-actions { justify-content: space-between; }
}

/* ---------- Sheets: cyanotype drawing frames ---------- */

.sheet {
  --sx: clamp(28px, 5.5vw, 80px);
  position: relative;
  max-width: 1440px; margin-inline: auto;
  padding: clamp(56px, 7vw, 96px) var(--sx) 14px;
  background-color: var(--bp);
  background-image:
    linear-gradient(var(--bp-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px),
    linear-gradient(rgba(220, 232, 250, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 232, 250, .05) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  color: var(--bp-line);
}
.sheet::before {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid var(--bp-frame);
  pointer-events: none;
}
.sheet a:not(.btn) { color: var(--bp-line); }

.zones { position: absolute; display: flex; color: var(--bp-soft); font-size: 9px; font-weight: 600; letter-spacing: .1em; pointer-events: none; }
.zones span { flex: 1; display: grid; place-items: center; }
.zones-x { top: 0; left: 14px; right: 14px; height: 14px; }
.zones-x span + span { border-left: 1px solid var(--bp-frame); }
.zones-y { top: 14px; bottom: 14px; left: 0; width: 14px; flex-direction: column; }
.zones-y span + span { border-top: 1px solid var(--bp-frame); }

.banner { padding: 20px var(--gutter) 0; }

.banner-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 4vw, 64px); align-items: center;
}
.banner h1 { color: var(--bp-heading); }
.banner .lead { margin-top: 1.5rem; max-width: 44ch; font-size: 1.15rem; color: var(--bp-soft); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2.25rem; }

.banner-drawing { margin: 0; }
.iso-hero { width: 100%; height: auto; overflow: visible; }

.iso path { stroke-linejoin: round; }
:is(.iso-hero, .iso-contact) .c-t { fill: var(--bp-cell-t); }
:is(.iso-hero, .iso-contact) .c-l { fill: var(--bp-cell-l); }
:is(.iso-hero, .iso-contact) .c-r { fill: var(--bp-cell-r); }
:is(.iso-hero, .iso-contact) :is(.c-t, .c-l, .c-r) { stroke: var(--bp-line); stroke-width: 1.1; }
.iso .f-t { fill: var(--green-t); } .iso .f-l { fill: var(--green); } .iso .f-r { fill: var(--green-r); }
.iso .f-t, .iso .f-l, .iso .f-r { stroke: #fff; stroke-width: 1.1; }
.iso-ghost { fill: none; stroke: var(--green-light); stroke-width: 1.2; stroke-dasharray: 5 4; opacity: 0; }
.iso-guide { fill: none; stroke: var(--green-light); stroke-width: 1; stroke-dasharray: 2 5; opacity: 0; }
.iso-leader { fill: none; stroke: var(--bp-line); stroke-width: 1; }
/* The growing model (site.js): shipped blocks fade from green to blueprint; the next slot
   is shown as a dashed hidden-line outline; the callout rides along with the block being built (site.js, per frame). */
.iso-hero .iso-body path { transition: fill .9s ease, stroke .9s ease; }
.iso-hero .slot-ghost { opacity: 0; }
.iso-hero .slot-shadow { fill: rgba(4, 14, 34, .62); }
.iso-hero .slot-wire { fill: none; stroke: var(--green-light); stroke-width: 1.6; stroke-dasharray: 6 4; }

.iso-dot { fill: var(--bp-line); }
.iso-callout { fill: #fff; font-family: var(--font); font-size: 13px; }
.iso-dim { stroke: var(--bp-soft); stroke-width: 1; }
.iso-ext { stroke: var(--bp-soft); stroke-width: .8; opacity: .7; }
.arw { fill: var(--bp-soft); }
.iso-dimlabel { fill: var(--bp-soft); font-family: var(--font); font-size: 12px; text-transform: none; letter-spacing: .06em; }

/* Signature: one endless cycle. The feature lifts out of its slot (building),
   hangs, and settles back (shipped). site.js writes the revision rows off its phase. */
.iso-feature { transform-box: view-box; }
@keyframes float {
  0%, 14% { transform: translateY(0); }
  42%, 64% { transform: translateY(-58px); }
  92%, 100% { transform: translateY(0); }
}
@keyframes lifted {
  0%, 14% { opacity: 0; }
  32%, 74% { opacity: 1; }
  92%, 100% { opacity: 0; }
}

.revs {
  width: min(100%, 440px); margin: 8px 0 0 auto;
  border-collapse: collapse;
  font-size: .85rem; font-variant-numeric: tabular-nums;
  color: var(--bp-line);
}
.revs caption { caption-side: bottom; text-align: right; padding-top: .5rem; font-size: .75rem; font-style: italic; color: var(--bp-soft); }
.revs th, .revs td { border: 1px solid var(--bp-frame); padding: .45rem .7rem; text-align: left; }
.revs th { color: var(--bp-soft); font-size: .68rem; }
.revs td:first-child { width: 3.2rem; }
.revs td:last-child { width: 7.5rem; white-space: nowrap; }
.revs tr.is-live td { color: var(--green-light); }
.revs tr.is-live td:last-child::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: .5em;
  background: var(--green-light); transform: rotate(45deg) translateY(-1px);
}
.revs tr.is-new { animation: write .6s var(--ease) both; }
@keyframes write { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0); } }

.titleblock {
  display: grid; grid-template-columns: repeat(5, auto);
  width: min(900px, calc(100% + var(--sx) - 14px));
  margin: clamp(40px, 5vw, 72px) calc(14px - var(--sx)) 0 auto;
  border-top: 1px solid var(--bp-frame);
}
.titleblock > div { padding: 12px 18px 14px; border-left: 1px solid var(--bp-frame); }
.titleblock dt { color: var(--bp-soft); font-size: .66rem; }
.titleblock dd { margin: .2rem 0 0; font-weight: 600; color: #fff; font-size: .95rem; white-space: nowrap; }

@media (max-width: 960px) {
  .banner-grid { grid-template-columns: 1fr; }
  .banner-drawing { max-width: 640px; }
}
@media (max-width: 640px) {
  .banner { padding: 12px 12px 0; }
  .sheet { --sx: 28px; padding-top: 44px; }
  .zones-x span:nth-child(n+5) { display: none; }
  .revs td:last-child { width: auto; }
  .iso-hero .iso-dimlabel { font-size: 19px; }
  .iso-hero .iso-callout { font-size: 20px; }
  .titleblock { grid-template-columns: 1fr 1fr; width: calc(100% + 2 * var(--sx) - 28px); }
  .titleblock > div:nth-child(odd) { border-left: 0; }
  .titleblock > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .titleblock > div:nth-child(n+3) { border-top: 1px solid var(--bp-frame); }
  .titleblock dd { white-space: normal; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(80px, 11vw, 144px) 0; }
.section:last-of-type { padding-bottom: clamp(80px, 11vw, 144px); }

.section-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px 48px; align-items: end;
  padding-bottom: 32px; margin-bottom: 8px;
  background: linear-gradient(var(--ink), var(--ink)) left bottom / 100% 1px no-repeat;
  position: relative;
}
.section-head::before, .section-head::after {
  /* extension ticks at both ends of the rule */
  content: ""; position: absolute; bottom: -7px; width: 1px; height: 13px; background: var(--ink);
}
.section-head::before { left: 0; }
.section-head::after { right: 0; }
.sheet-ref {
  /* sheet reference set on the rule, like a drawing set's cross-reference */
  position: absolute; right: 28px; bottom: 0; transform: translateY(50%);
  padding: 0 .7em; background: var(--film); color: var(--ink-2);
}
.section-head p { margin: 0; color: var(--ink-2); font-size: 1.1rem; max-width: 46ch; }

/* Bill of materials */
.bom { width: 100%; border-collapse: collapse; }
.bom thead th { text-align: left; color: var(--ink-2); padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.bom thead th:first-child { width: 64px; }
.bom td, .bom tbody th { padding: 28px 16px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.bom tbody th { width: 28%; font-size: 1.3rem; font-weight: 650; font-stretch: 104%; letter-spacing: -.01em; line-height: 1.25; }
.bom td { color: var(--ink); max-width: 52ch; }
.bom .bom-for { width: 24%; color: var(--ink-2); font-size: .95rem; }
.balloon {
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--ink); border-radius: 50%;
  font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.bom tbody tr:hover .balloon { background: var(--ink); color: var(--film); }

@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; }
  .bom thead { display: none; }
  .bom tbody tr { display: grid; grid-template-columns: 48px 1fr; padding: 24px 0; border-bottom: 1px solid var(--rule); }
  .bom td, .bom tbody th { display: block; width: auto; padding: 0; border: 0; }
  .bom td:first-child { grid-row: span 3; }
  .bom tbody th { margin-bottom: .4rem; }
  .bom .bom-for { width: auto; margin-top: .5rem; }
}

/* Stations */
.stations {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.station { position: relative; padding-right: 32px; }
.station:not(:last-child)::before {
  content: ""; position: absolute; top: 22px; left: 52px; right: 8px; height: 1px; background: var(--ink);
}
.station:not(:last-child)::after {
  content: ""; position: absolute; top: 18px; right: 8px; width: 9px; height: 9px;
  border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); transform: rotate(45deg);
}
.station-no {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--ink); background: var(--film);
  font-weight: 650; font-variant-numeric: tabular-nums;
}
.station h3 { margin: 24px 0 .5rem; }
.station p { color: var(--ink-2); margin: 0; max-width: 30ch; }
.gate {
  position: absolute; top: 22px; left: calc(50% + 26px); transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: .45em;
  padding: 0 .6em; background: var(--film); color: var(--ink); white-space: nowrap;
}
.gate .icon { width: .9em; height: .9em; stroke-width: 1.8; }

.loop { position: relative; margin: 36px 0 0; height: 40px; }
.loop-line { width: calc(100% - 32px); height: 40px; margin-left: 0; fill: none; stroke: var(--ink); stroke-width: 1; }
.loop-line path { vector-effect: non-scaling-stroke; }
.loop span {
  position: absolute; left: 50%; top: 38px; transform: translate(-50%, -50%);
  padding: 0 .8em; background: var(--film); color: var(--green-ink);
}

@media (max-width: 900px) {
  .stations { grid-template-columns: 1fr; gap: 0; }
  .station { padding: 0 0 40px 72px; min-height: 44px; }
  .station-no { position: absolute; left: 0; top: 0; }
  .station h3 { margin-top: 8px; }
  .station:not(:last-child)::before { top: 52px; bottom: 8px; left: 22px; right: auto; width: 1px; height: auto; }
  .station:not(:last-child)::after { top: auto; bottom: 8px; left: 18px; right: auto; transform: rotate(135deg); }
  .gate { position: static; transform: none; padding: 0; margin-top: .9rem; }
  .loop { display: flex; align-items: center; gap: .8em; height: auto; margin: 0 0 0 72px; }
  .loop-line { display: none; }
  .loop span { position: static; transform: none; padding: 0; }
  .loop::before { content: ""; width: 12px; height: 12px; border-left: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: rotate(135deg); }
}

/* Section view comparison */
.section-view { margin-top: 48px; }
.section-label { display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px; color: var(--ink-2); }
.section-label span {
  display: grid; place-items: center; width: 28px; height: 28px;
  background: var(--ink); color: var(--film); font-size: .8rem; letter-spacing: 0;
}
.compare { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.compare thead th { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--ink); color: var(--ink-2); }
.compare thead th:last-child {
  color: var(--ink);
  background: repeating-linear-gradient(45deg, var(--rule) 0 1px, transparent 1px 7px);
}
.compare tbody th, .compare td { padding: 22px 20px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.compare tbody th { width: 18%; font-weight: 650; }
.compare .was { width: 36%; color: var(--ink-2); }
.compare .now { font-weight: 560; }
.compare .now span { display: flex; gap: .7em; }
.compare .now .icon { color: var(--ink); margin-top: .3em; stroke-width: 2; }
.compare tbody tr:hover td.now { background: var(--film-2); }

@media (max-width: 760px) {
  .compare thead { display: none; }
  .compare tbody tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--rule); padding: 18px 0; }
  .compare tbody th { grid-column: 1 / -1; width: auto; padding: 0 0 .5rem; border: 0; }
  .compare td { padding: 0 12px 0 0; border: 0; width: auto !important; font-size: .95rem; }
}

/* AI, and the part of the drawing we keep to ourselves */
.section-ai .ai-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px 80px; align-items: center;
  padding-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--ink);
  position: relative;
}
.ai-grid > .sheet-ref { top: 0; bottom: auto; transform: translateY(-50%); }
.ai-copy h2 { margin-bottom: 1.5rem; }
.ai-copy > p { max-width: 58ch; color: var(--ink-2); font-size: 1.1rem; }
.ai-copy h3 { margin: 2.25rem 0 1rem; font-size: 1.05rem; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 2rem; }
.ticks li { position: relative; padding-left: 1.6rem; font-weight: 550; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 8px; height: 8px;
  border: 1.5px solid var(--ink); transform: rotate(45deg);
}

.detail { margin: 0; display: grid; justify-items: center; gap: 22px; }
.detail-lens {
  width: min(100%, 360px); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid var(--ink);
  box-shadow: 0 0 0 12px var(--film), 0 0 0 13px var(--rule-strong);
  position: relative;
}
.detail-lens::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 1px, transparent 1px 10px);
}
.detail-lens::after {
  /* the detail's tag, set on the rim like a callout balloon */
  content: "B"; position: absolute; right: 6%; top: 6%; z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--film); border: 1px solid var(--ink);
  font-weight: 700; font-size: 1.1rem;
}
.detail figcaption { text-align: center; color: var(--ink-2); max-width: 30ch; }
.detail strong { display: block; color: var(--ink); font-size: .8rem; margin-bottom: .3rem; }

@media (max-width: 900px) {
  .section-ai .ai-grid { grid-template-columns: 1fr; }
  .detail-lens { width: min(70%, 280px); }
}
@media (max-width: 520px) { .ticks { grid-template-columns: 1fr; } }

/* Growth: the same model, bigger */
.grow {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
}
.grow-art { height: 260px; display: flex; align-items: flex-end; padding-bottom: 24px; border-bottom: 1px solid var(--ink); margin-bottom: 24px; }
.iso-grow .c-t { fill: var(--model-t); } .iso-grow .c-l { fill: var(--model-l); } .iso-grow .c-r { fill: var(--model-r); }
.iso-grow path { stroke: var(--ink); stroke-width: 1; }
.iso-grow .f-t, .iso-grow .f-l, .iso-grow .f-r { stroke: var(--ink); }
.iso-grow { height: auto; overflow: visible; }
.iso-grow .cube { transform-box: view-box; }
.iso-grow .iso-dim, .iso-grow .iso-ext { stroke: var(--ink-2); }
.iso-grow .iso-ext { opacity: .6; }
.iso-grow .arw { fill: var(--ink-2); stroke: none; }
.iso-grow .iso-dimlabel { fill: var(--ink-2); font-size: 11px; }
.iso-grow .iso-leader { stroke: var(--ink); }
.iso-grow .iso-dot { fill: var(--ink); stroke: none; }
.iso-grow .iso-callout { fill: var(--ink); font-size: 11px; }
.grow h3 { margin-bottom: .5rem; }
.grow p { color: var(--ink-2); margin: 0; max-width: 34ch; }

@media (max-width: 760px) {
  .grow { grid-template-columns: 1fr; gap: 48px; }
  .grow-art { height: auto; }
}

/* ---------- Contact sheet ---------- */

@property --unrolled { syntax: '<number>'; inherits: true; initial-value: 1; }

.contact { position: relative; padding: 0 var(--gutter); margin-top: clamp(80px, 11vw, 144px); }
.sheet-contact { clip-path: inset(0 0 calc((1 - var(--unrolled)) * 100%) 0); }
.contact::after {
  /* the rolled-up rest of the sheet, lit from above, casting onto the table */
  content: ""; position: absolute; pointer-events: none;
  left: max(var(--gutter), calc((100% - 1440px) / 2));
  right: max(var(--gutter), calc((100% - 1440px) / 2));
  top: calc(var(--unrolled) * 100%);
  height: calc(12px + (1 - var(--unrolled)) * 36px);
  transform: translateY(-50%);
  border-radius: 999px / 50%;
  background: linear-gradient(to bottom, #0d2d52 0%, #2a64a0 30%, #7aa7d6 46%, #3b74b0 58%, #16406f 82%, #0b2747 100%);
  box-shadow: 0 12px 16px -10px rgba(0, 0, 0, .45);
  opacity: calc((1 - var(--unrolled)) * 25);
}
.sheet-contact { padding-bottom: clamp(56px, 7vw, 96px); }
.sheet-contact > .sheet-ref { top: 14px; bottom: auto; right: 40px; transform: translateY(-50%); background: var(--bp); color: var(--bp-soft); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px clamp(40px, 6vw, 96px); }
.contact h2 { color: var(--bp-heading); }
.contact .lead { margin-top: 1.25rem; color: var(--bp-soft); font-size: 1.1rem; max-width: 40ch; }
.direct { margin-top: 2rem; color: var(--bp-soft); }
.direct a { font-weight: 600; }

/* The first feature hovers over its empty slot; it lands when the message is sent. */
.contact-copy { display: flex; flex-direction: column; }
.contact-art { margin-top: auto; padding-top: 48px; }
.iso-contact { overflow: visible; }
.iso-contact .slot { fill: none; stroke: var(--green-light); stroke-width: 1.2; stroke-dasharray: 5 4; transition: opacity .6s ease .5s; }
.contact-f { transform-box: view-box; transform: translateY(-42px); }
.is-sent .contact-f { transform: none; animation: settle 1s var(--ease-soft) both; }
.is-sent .slot { opacity: 0; }
@keyframes settle { from { transform: translateY(-42px); } to { transform: none; } }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; align-content: start; }
.field { display: grid; gap: .45rem; }
.field-wide, .form-foot, .notice { grid-column: 1 / -1; }
.field label { color: var(--bp-soft); }
.opt { text-transform: none; letter-spacing: 0; font-weight: 400; font-style: italic; font-stretch: 100%; }
.field input, .field textarea {
  width: 100%; padding: .55rem 0 .6rem;
  background: transparent; color: #fff;
  border: 0; border-bottom: 1px solid var(--bp-soft); border-radius: 0;
  font: inherit; font-size: 1.05rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 8.5rem; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--bp-placeholder); }
.field input:hover, .field textarea:hover { border-bottom-color: var(--bp-line); }
.field input, .field textarea { caret-color: var(--green-light); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--green-light); box-shadow: 0 1px 0 var(--green-light); }
.field input:user-invalid, .field textarea:user-invalid { border-bottom-color: var(--err-light); }
.field input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: inset 0 0 0 40px var(--bp); }

.form-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 32px; margin: 8px 0 0; }
.fine { font-size: .875rem; color: var(--bp-soft); max-width: 46ch; }
.notice { margin: 0; padding: 14px 18px; border: 1px solid var(--bp-line); color: #fff; }
.notice-err { border-color: var(--err-light); color: var(--err-pale); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-art { display: none; }
}
@media (max-width: 640px) {
  .contact { padding: 0 12px; }
  .contact::after { left: 12px; right: 12px; }
  .form { grid-template-columns: 1fr; }
}

/* ---------- Footer: the title block ---------- */

.footer { padding: clamp(56px, 7vw, 88px) 0 40px; }
.tblock {
  display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  border: 1.5px solid var(--ink);
}
.tblock > * { padding: 22px 24px; }
.tblock > * + * { border-left: 1px solid var(--ink); }
.tblock-brand .brand { margin-bottom: 1rem; }
.tblock-brand .mark { width: 32px; height: 32px; }
.tblock-brand .wordmark { font-size: 1.4rem; }
.tblock-brand p { margin: 0; color: var(--ink-2); max-width: 36ch; font-size: .95rem; }
.tblock-cell { display: flex; flex-direction: column; gap: .45rem; font-size: .95rem; }
.tblock-cell a { text-decoration: none; width: fit-content; }
.tblock-cell a:hover { text-decoration: underline; }
.tb-label { color: var(--ink-2); font-size: .68rem; margin-bottom: .35rem; }
.tblock-meta { color: var(--ink-2); }

@media (max-width: 900px) {
  .tblock { grid-template-columns: 1fr 1fr; }
  .tblock-brand { grid-column: 1 / -1; border-bottom: 1px solid var(--ink); }
  .tblock > :nth-child(2) { border-left: 0; }
  .tblock-meta { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--ink); }
}

/* ---------- Plain pages ---------- */

.page { padding-block: clamp(56px, 8vw, 112px); }
.prose { max-width: 70ch; }
.prose h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin-bottom: .75rem; }
.prose h2 { font-size: 1.35rem; margin: 2.2em 0 .6em; font-stretch: 104%; }
.prose .fine { color: var(--ink-2); }
.prose a:not(.btn) { color: var(--ink); text-decoration-color: var(--rule-strong); }
.prose a:not(.btn):hover { text-decoration-color: currentColor; }
.page-404 .nf-art { margin-bottom: 32px; }

/* ---------- Motion ----------
   Every rule below only adds movement; the base styles above are the finished state,
   which is what reduced-motion visitors and browsers without scroll timelines see. */

@media (prefers-reduced-motion: no-preference) {

  /* The revision loop: one continuous cycle, never restarted. */
  .iso-feature { animation: float 7s ease-in-out .8s infinite both; }
  .iso-ghost, .iso-guide { animation: lifted 7s ease-in-out .8s infinite both; }
  .js-intro .iso-feature, .js-intro .iso-ghost, .js-intro .iso-guide { animation-delay: 3s; }

  /* Intro, first viewport: guides are ruled, the title is sketched then inked,
     the model is drawn cell by cell, then the call to action arrives. */
  .js-intro .banner .zones { animation: fade .8s ease-out .1s both; }

  .js-intro .banner h1:not(.is-split) { opacity: 0; animation: appear 0s 2.5s forwards; }
  .banner h1.is-split { position: relative; }
  .banner h1.is-split::before {
    /* baseline guides, like pencil lines ruled before lettering */
    content: ""; position: absolute; inset: 0 -18px; pointer-events: none;
    background: repeating-linear-gradient(to bottom,
      transparent 0 .8em, var(--bp-frame) .8em calc(.8em + 1px), transparent calc(.8em + 1px) 1.02em);
    transform-origin: left center;
    animation: guides 3.2s ease-out both;
  }
  .banner h1 .w { white-space: nowrap; }
  .banner h1 .c { animation: sketch 1.2s ease-out var(--d, 0ms) both; }

  .js-intro .banner .lead { animation: rise-in .9s var(--ease) 1.6s both; }
  .js-intro .banner .actions { animation: rise-in 1s var(--ease) 2.4s both; }
  .js-intro .banner .btn-invert { position: relative; }
  .js-intro .banner .btn-invert::after {
    content: ""; position: absolute; inset: -7px; pointer-events: none;
    border: 1px solid var(--bp-line); border-radius: 2px;
    animation: ping 1.5s ease-out 3s 2 both;
  }
  .js-intro .banner .titleblock { animation: fade 1s ease-out 2.6s both; }

  .js-intro .iso-hero .iso-body g:not(.live) path,
  .js-intro .iso-hero .iso-feature path { stroke-dasharray: 1; animation: build 1s ease-out var(--d, 0ms) both; }
  .js-intro .iso-hero .iso-feature path { --d: 1800ms; }
  .js-intro .iso-hero :is(.iso-dim, .iso-ext, .iso-leader) { stroke-dasharray: 1; animation: trace .9s ease-out 1.9s both; }
  .js-intro .iso-hero :is(.iso-dimlabel, .iso-callout, .iso-dot) { animation: fade .8s ease-out 2.3s both; }
  .js-intro .revs caption, .js-intro .revs thead tr { animation: fade .6s ease-out 2s both; }
  .js-intro .revs tbody tr:not(.is-new) { animation: write .6s var(--ease) both; }
  .js-intro .revs tbody tr:nth-child(1):not(.is-new) { animation-delay: 2.1s; }
  .js-intro .revs tbody tr:nth-child(2):not(.is-new) { animation-delay: 2.2s; }
  .js-intro .revs tbody tr:nth-child(3):not(.is-new) { animation-delay: 2.3s; }
  .js-intro .revs tbody tr:nth-child(4):not(.is-new) { animation-delay: 2.4s; }

  /* Scroll-driven: parts move at their own pace and arrive in place. */
  @supports (animation-timeline: view()) {
    .section-head { animation: rule-draw linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; }

    .bom tbody tr { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    .bom tbody tr:nth-child(1) { --dx: 24px; }
    .bom tbody tr:nth-child(2) { --dx: 56px; }
    .bom tbody tr:nth-child(3) { --dx: 88px; }
    .bom tbody tr:nth-child(4) { --dx: 120px; }

    .station-no { animation: drop linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .station:nth-child(1) .station-no { --dy: -16px; }
    .station:nth-child(2) .station-no { --dy: -34px; }
    .station:nth-child(3) .station-no { --dy: -52px; }
    .station:nth-child(4) .station-no { --dy: -70px; }

    .detail-lens { view-timeline-name: --lens; }
    .detail-lens::before { animation: turn linear both; animation-timeline: --lens; animation-range: cover 0% cover 100%; }
  }

  /* The contact sheet waits rolled up, then is unrolled like a blueprint on a table:
     the roll travels down the sheet, getting thinner as the paper comes off it (site.js). */
  .contact.is-rolled { --unrolled: 0; }
  .contact.is-unrolling { animation: unroll 1.8s cubic-bezier(.45, .05, .25, 1) both; }

  .contact-art:not(.is-sent) .contact-f { animation: hover-bob 4.5s ease-in-out infinite; }

  /* Growth models build themselves, block by block, when they come into view (site.js). */
  .js-intro .grow li:not(.is-built) :is(.cube, .iso-dim, .iso-ext, .iso-dimlabel, .iso-leader, .iso-dot, .iso-callout) { opacity: 0; }
  .grow li.is-built .cube { animation: stack .7s var(--ease) var(--d, 0ms) both; }
  .grow li.is-built .cube-f { animation: stack .9s var(--ease) var(--d, 0ms) both, bob 5s ease-in-out calc(var(--d, 0ms) + 1.2s) infinite; }
  .grow li.is-built :is(.iso-dim, .iso-ext, .iso-dimlabel, .iso-leader, .iso-dot, .iso-callout) { animation: fade .6s ease-out var(--after, 800ms) both; }
}

@keyframes fade { from { opacity: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes guides {
  0% { transform: scaleX(0); opacity: 1; }
  22% { transform: scaleX(1); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
@keyframes sketch {
  0% { color: transparent; -webkit-text-stroke: 1px transparent; }
  30% { color: transparent; -webkit-text-stroke: 1px var(--bp-line); }
  65% { color: rgba(245, 248, 253, .2); -webkit-text-stroke: 1px var(--bp-line); }
  100% { color: var(--bp-heading); -webkit-text-stroke: 1px transparent; }
}
@keyframes ping { 0% { opacity: 0; transform: scale(.92); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.18); } }
@keyframes build {
  0% { stroke-dashoffset: 1; fill-opacity: 0; }
  55% { stroke-dashoffset: 0; fill-opacity: 0; }
  100% { stroke-dashoffset: 0; fill-opacity: 1; }
}
@keyframes trace { from { stroke-dashoffset: 1; opacity: 0; } 20% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes rule-draw { from { background-size: 0% 1px; } to { background-size: 100% 1px; } }
@keyframes drift { from { transform: translateX(var(--dx, 60px)); opacity: .15; } to { transform: none; opacity: 1; } }
@keyframes drop { from { transform: translateY(var(--dy, -60px)); } to { transform: none; } }
@keyframes turn { from { transform: rotate(-35deg); } to { transform: rotate(35deg); } }
@keyframes stack { from { transform: translateY(-46px); opacity: 0; } 40% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes hover-bob { 0%, 100% { transform: translateY(-42px); } 50% { transform: translateY(-50px); } }
@keyframes bob { 0%, 20%, 100% { transform: none; } 50%, 70% { transform: translateY(-9px); } }
@keyframes unroll { from { --unrolled: 0; } to { --unrolled: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
