/* Aviocube — one page, one cube.
   Paper and ink, one accent (International Orange), a single grotesk that
   stretches, a mono for anything measured, and a serif italic for the voice. */

@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans-var.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #eeede8;
  --paper-2: #e4e3dc;
  --ink: #111110;
  --ink-2: #3a3935;
  --mute: #5f5e57;
  --rule: rgb(17 17 16 / 0.16);
  --orange: #ff4f00;
  --orange-text: #b83600; /* 5:1 on paper, for small orange text */
  --night: #0e0e0d;
  --night-2: #1b1b19;
  --on-night: #eeede8;
  --on-night-mute: #9a9990;
  --rule-night: rgb(238 237 232 / 0.16);

  --f-sans: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-voice: "Instrument Serif", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 3vw, 44px);
  --bar-h: 64px;
  --ease-flight: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-mech: cubic-bezier(0.7, 0, 0.3, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--bar-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 18px;
  line-height: 1.55;
  font-stretch: 100%;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a { color: inherit; }
/* Links that open a new tab say so. The Cookies link opens the card instead. */
a[target="_blank"]:not([data-consent-open]):not(.block-btn)::after {
  content: "\2197"; content: "\2197" / "";
  display: inline-block; margin-left: 0.18em; font-size: 0.82em; line-height: 1;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--orange); color: var(--ink); }

:focus-visible { outline: 2px solid var(--orange-text); outline-offset: 3px; }
.contact :focus-visible, .end :focus-visible { outline-color: var(--orange); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: var(--gutter); top: 8px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: var(--paper);
  font: 500 14px/1 var(--f-mono); text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

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

.label {
  font: 500 12px/1.4 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.label i { font-style: normal; color: var(--orange); padding: 0 0.3em; }

.voice {
  font-family: var(--f-voice);
  font-style: italic;
  font-size: clamp(1.6rem, 2.5vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.body { max-width: 34rem; color: var(--ink-2); font-size: clamp(17px, 1.25vw, 19px); }

/* Words that settle from blur to sharp. --p (0..1) is driven by scroll in JS;
   without JS it stays 1, so text is always readable. */
[data-settle] .w {
  --wp: clamp(0, calc(var(--p, 1) * 1.7 - var(--i) * 0.09), 1);
  display: inline-block;
  filter: blur(calc((1 - var(--wp)) * 12px));
  opacity: calc(0.12 + var(--wp) * 0.88);
  transform: translateY(calc((1 - var(--wp)) * 0.18em));
  will-change: filter, opacity, transform;
}
[data-settle="load"] .w {
  animation: settle 1100ms var(--ease-flight) both;
  animation-delay: calc(180ms + var(--i) * 55ms);
  filter: none; opacity: 1; transform: none;
}
@keyframes settle {
  from { filter: blur(14px); opacity: 0; transform: translateY(0.22em); }
}

/* ---------- bar ---------- */

.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--bar-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  color: var(--ink);
  transition: color 300ms ease;
}
.bar::before {
  /* progressive blur under the bar, sharplink-style, instead of a solid strip */
  content: ""; position: absolute; inset: 0 0 -24px; z-index: -1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(#000 55%, transparent);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  background: linear-gradient(rgb(238 237 232 / 0.85), rgb(238 237 232 / 0));
  transition: background 300ms ease, opacity 200ms ease;
}
.bar.is-night { color: var(--on-night); }
.bar.is-night::before { background: linear-gradient(rgb(14 14 13 / 0.85), rgb(14 14 13 / 0)); }

.bar__brand { display: block; position: relative; width: 132px; height: 26px; }
.bar__logo { position: absolute; inset: 0; width: 100%; height: auto; transition: opacity 300ms ease; }
.bar__logo--paper, .bar.is-night .bar__logo--ink { opacity: 0; }
.bar.is-night .bar__logo--paper { opacity: 1; }

.bar__clock {
  justify-self: center;
  display: flex; gap: 20px;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mute);
}
.bar.is-night .bar__clock { color: var(--on-night-mute); }

.bar__nav { display: flex; align-items: center; gap: 2px; }
.bar__nav a {
  position: relative;
  padding: 9px 12px;
  font: 500 14px/1 var(--f-sans);
  text-decoration: none;
}
.bar__nav a::before {
  content: ""; position: absolute; left: 1px; top: 50%;
  width: 5px; height: 5px; margin-top: -3px;
  background: var(--orange);
  transform: scale(0); transition: transform 220ms var(--ease-flight);
}
.bar__nav a[aria-current="true"]::before, .bar__nav a:hover::before { transform: scale(1); }
.bar__nav sup { font: 500 9px/1 var(--f-mono); margin-left: 2px; vertical-align: 6px; }
.bar__nav .bar__cta {
  margin-left: 10px; padding: 10px 14px;
  background: var(--ink); color: var(--paper);
  transition: background 200ms ease;
}
.bar__nav .bar__cta::before { display: none; }
.bar__nav .bar__cta:hover { background: var(--orange); color: var(--ink); }
.bar.is-night .bar__cta { background: var(--on-night); color: var(--ink); }
.bar.is-night .bar__cta:hover { background: var(--orange); }

main, .end { position: relative; z-index: 1; }

/* ---------- deck: index + chapters, with the sticky cube on the right ---------- */

.deck {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: var(--gutter);
  padding: 0 var(--gutter);
}
.deck > .index, .deck > .chapter { grid-column: 1; }

.stage {
  grid-column: 2; grid-row: 1 / span var(--rows, 6); /* index + every chapter; set by site.js */
  align-self: start;
  position: sticky; top: 0;
  height: 100svh;
  display: grid; place-items: center;
  pointer-events: none;
}
.stage__scene {
  --s: clamp(200px, min(25vw, 38svh), 380px);
  perspective: 7000px;
  width: var(--s); height: var(--s);
  margin-top: calc(var(--bar-h) * 0.5);
}
.stage__caption {
  position: absolute; bottom: 7svh; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 14px;
  font: 500 11px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mute); white-space: nowrap;
}
.stage__caption span:first-child { color: var(--orange-text); }
/* The phone band's heights, registered so site.js can read them in px.
   Left at 0 on wide screens, where the stage is a column and nothing docks. */
@property --hero-h { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --dock-h { syntax: "<length>"; inherits: true; initial-value: 0px; }

/* ---------- index ---------- */

.index {
  min-height: 100svh;
  padding: calc(var(--bar-h) + 7svh) 0 7svh;
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(22px, 3.6svh, 40px);
}
.statement {
  font-size: clamp(2.5rem, min(5.4vw, 9.5svh), 6.4rem);
  font-weight: 540;
  font-stretch: 104%;
  line-height: 0.96;
  letter-spacing: -0.042em;
  max-width: 12.5em;
  text-wrap: balance;
}

.ledger { border-bottom: 1px solid var(--rule); max-width: 50rem; }
.ledger li { border-top: 1px solid var(--rule); }
.ledger__head, .ledger a {
  display: grid;
  grid-template-columns: 3.2ch minmax(8.5ch, 11rem) 1fr auto;
  align-items: baseline;
  gap: 16px;
}
.ledger__head {
  padding: 8px 0;
  font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mute);
}
.ledger a {
  position: relative;
  padding: 13px 0;
  text-decoration: none;
  transition: background 200ms ease;
}
.ledger a::before {
  content: ""; position: absolute; left: -14px; top: 50%;
  width: 7px; height: 7px; margin-top: -4px; background: var(--orange);
  transform: scale(0); transition: transform 260ms var(--ease-flight);
}
.ledger .n { font: 500 12px/1 var(--f-mono); color: var(--mute); }
.ledger .nm { font-size: 20px; font-weight: 600; font-stretch: 106%; letter-spacing: -0.02em; transition: transform 260ms var(--ease-flight); }
.ledger .wh { color: var(--ink-2); font-size: 16px; line-height: 1.35; }
.ledger .nm__tag { display: block; margin-top: -1px; font-size: 14px; line-height: 1.25; font-weight: 520; font-stretch: 100%; letter-spacing: -0.01em; color: var(--ink-2); }
.ledger .st { font: 500 11.5px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); white-space: nowrap; text-align: right; }
.ledger .st em { font-style: normal; color: var(--ink); margin-left: 6px; }
.ledger .st--open { color: var(--ink); }
.ledger .st--open::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--orange); vertical-align: 0; }
/* Half-filled square: live, but by invitation. */
.ledger .st--gated::before { border: 1.5px solid var(--orange); background: linear-gradient(135deg, var(--orange) 50%, transparent 50%); }
.ledger a:hover, .ledger a:focus-visible, .ledger a.is-lit { background: linear-gradient(90deg, var(--paper-2), transparent 90%); }
.ledger a:hover::before, .ledger a:focus-visible::before, .ledger a.is-lit::before { transform: scale(1); }
.ledger a:hover .nm, .ledger a:focus-visible .nm, .ledger a.is-lit .nm { transform: translateX(6px); }

.hello {
  align-self: flex-start;
  display: inline-flex; align-items: baseline; gap: 10px;
  font-size: 18px; text-decoration: none; color: var(--ink-2);
}
.hello b { font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--orange); }
.hello i { font-style: normal; color: var(--orange-text); transition: transform 240ms var(--ease-flight); }
.hello:hover i { transform: translateX(5px); }

/* ---------- chapters ---------- */

.chapter {
  min-height: 100svh;
  padding: 16svh 0;
  display: flex; flex-direction: column; justify-content: center;
  gap: 26px;
  scroll-margin-top: 0;
}
.chapter__n {
  display: flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mute);
}
.chapter__n i { font-style: normal; opacity: 0.5; }
.chip { display: none; }
.chapter__name {
  font-size: clamp(3.4rem, 8.6vw, 9.5rem);
  font-weight: 580;
  font-stretch: 100%;
  line-height: 0.86;
  letter-spacing: -0.055em;
  margin-left: -0.05em;
}
.chapter__tag { display: block; margin-top: 0.2em; font-size: 0.34em; font-weight: 620; line-height: 1; letter-spacing: -0.04em; }
.chapter .voice { max-width: 18em; }

.spec { max-width: 36rem; border-bottom: 1px solid var(--rule); margin-top: 6px; }
.spec > div {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 16px;
  padding: 12px 0; border-top: 1px solid var(--rule);
  align-items: baseline;
}
.spec dt { font: 500 11px/1.5 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.spec dd { font-size: 16px; line-height: 1.45; }
.soon, .live {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 560;
}
.soon::before, .live::before { content: ""; width: 7px; height: 7px; border: 1.5px solid var(--orange); }
.live::before { background: var(--orange); }
.live--gated::before { background: linear-gradient(135deg, var(--orange) 50%, transparent 50%); }
.spec dd a { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.spec dd a:hover { color: var(--orange-text); }
.flap {
  margin-left: 10px; padding: 3px 7px;
  font: 500 13px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  white-space: pre;
}

.stairs { max-width: 36rem; border-bottom: 1px solid var(--rule); }
.stairs li {
  padding: 11px 0 11px calc(var(--i) * clamp(10px, 1.6vw, 26px));
  border-top: 1px solid var(--rule);
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 480;
  letter-spacing: -0.01em;
}
.stairs li::before { content: "→" / ""; margin-right: 12px; color: var(--orange-text); font-family: var(--f-mono); font-size: 0.8em; }

.block-btn {
  align-self: flex-start;
  display: inline-flex; align-items: stretch; gap: 3px;
  padding: 0; border: 0; background: none; cursor: pointer;
  text-decoration: none;
  font: 560 16px/1 var(--f-sans);
}
.block-btn span { padding: 16px 20px; background: var(--ink); color: var(--paper); }
.block-btn i {
  display: grid; place-items: center; width: 50px; min-height: 48px;
  font-style: normal; background: var(--orange); color: var(--ink);
  transition: width 260ms var(--ease-flight);
}
.block-btn:hover i { width: 62px; }
.block-btn--light span { background: var(--on-night); color: var(--ink); }

/* ---------- the cube ---------- */

.cube {
  --rx: -30deg; --ry: 45deg; --tx: 0px; --tz: 0px; --scale: 1;
  position: relative;
  width: var(--s); height: var(--s);
  transform-style: preserve-3d;
  transform: translate3d(var(--tx), 0, var(--tz)) scale(var(--scale)) rotateX(var(--rx)) rotateY(var(--ry));
}
.face {
  --fold: 1;
  position: absolute; left: 0; top: 0;
  width: var(--s); height: var(--s);
  transform-style: preserve-3d;
}
.face--root { transform: translateZ(calc(var(--s) / 2)); }
.face--left { left: -100%; transform-origin: 100% 50%; transform: rotateY(calc(var(--fold) * -90deg)); }
.face--right { left: 100%; transform-origin: 0 50%; transform: rotateY(calc(var(--fold) * 90deg)); }
.face--top { top: -100%; transform-origin: 50% 100%; transform: rotateX(calc(var(--fold) * 90deg)); }
.face--bottom { top: 100%; transform-origin: 50% 0; transform: rotateX(calc(var(--fold) * -90deg)); }

@property --c { syntax: "<number>"; inherits: true; initial-value: 0; }
.skin {
  --c: 0; --hi: 0; --lo: 0; --pop: 0;
  transition: --c 420ms var(--ease-mech);
  position: absolute; inset: calc(var(--s) * 0.018);
  display: grid; grid-template-rows: auto 1fr auto;
  padding: calc(var(--s) * 0.075);
  background: color-mix(in oklab,
    color-mix(in oklab,
      color-mix(in oklab, var(--orange) calc(var(--c) * 100%), #151514),
      #fff calc(var(--hi) * 100%)),
    #000 calc(var(--lo) * 100%));
  color: color-mix(in oklab, var(--ink) calc(var(--c) * 100%), var(--paper));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(calc(var(--pop) * var(--s) * 0.16));
  font-size: calc(var(--s) * 0.1);
  overflow: hidden;
}
.skin.is-on { --c: 1; }
.skin__n { font: 500 max(8px, 0.42em)/1 var(--f-mono); letter-spacing: 0.08em; opacity: 0.7; }
.skin__name { align-self: end; font-weight: 600; font-stretch: 104%; line-height: 0.95; letter-spacing: -0.04em; }
.skin__meta { margin-top: 0.5em; font: 500 max(7.5px, 0.36em)/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.skin__mark { align-self: center; justify-self: center; width: 46%; }
.skin__mark polygon:not(.o) { fill: currentColor; }

/* Load: the six faces fly in from an exploded state and assemble. */
.cube.is-assembling .skin { animation: assemble 1300ms var(--ease-flight) backwards; animation-delay: calc(250ms + var(--k) * 90ms); }
@keyframes assemble {
  from { transform: translateZ(calc(var(--s) * 0.9)); opacity: 0; }
}

/* ---------- connections: the cube unfolds into its net ---------- */

.connect { position: relative; height: 290svh; padding: 0 var(--gutter); }
.connect__pin {
  position: sticky; top: 0; height: 100svh;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: var(--gutter);
  align-items: center;
  padding-top: var(--bar-h);
}
.connect__text { display: grid; gap: 18px; align-content: center; }
@media (min-width: 961px) {
  .connect { scroll-margin-top: calc(-1 * var(--bar-h)); }
}
@media (min-width: 961px) and (max-height: 900px) {
  .connect__text { gap: 12px; }
  .connect__title { font-size: clamp(2.2rem, min(4.6vw, 7.5svh), 5.2rem); }
  .connect .body { font-size: 15px; line-height: 1.45; }
  .edges li { padding: 6px 0; }
  .edges p { font-size: 13px; line-height: 1.35; }
}
.connect__title {
  font-size: clamp(2.4rem, 4.6vw, 5.2rem);
  font-weight: 560; line-height: 0.95; letter-spacing: -0.045em;
}
.connect .body { font-size: 16px; }
.edges { margin-top: 6px; border-bottom: 1px solid var(--rule); }
.edges li {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px;
  padding: 9px 0; border-top: 1px solid var(--rule);
  opacity: calc(0.35 + var(--seen, 1) * 0.65);
  transition: opacity 300ms ease;
}
.edges b, .net__marks b {
  display: grid; place-items: center;
  width: 20px; height: 20px;
  font: 600 11px/1 var(--f-mono);
  background: var(--orange); color: var(--ink);
}
.edges h3 { font-size: 15px; font-weight: 620; line-height: 1.3; letter-spacing: -0.005em; }
.edges p { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.tag {
  display: inline-block; margin-left: 4px; padding: 2px 5px;
  font: 500 11px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--rule); color: var(--mute); vertical-align: 1px;
}
.edges li:hover, .edges li.is-lit { opacity: 1; }
.edges li:hover b, .edges li.is-lit b { background: var(--ink); color: var(--paper); }

.connect__stage { display: grid; place-items: center; height: 100%; }
.net {
  --s: clamp(64px, min(11.5vw, 17svh), 190px);
  position: relative;
  width: calc(var(--s) * 4); height: calc(var(--s) * 3);
}
.net__scene {
  position: absolute; left: 50%; top: 50%;
  width: var(--s); height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  perspective: 7000px;
}
.net__marks { position: absolute; inset: 0; pointer-events: none; }
.net__marks b {
  position: absolute;
  left: calc(var(--x) * var(--s)); top: calc(var(--y) * var(--s));
  translate: -50% -50%;
  opacity: var(--marks, 1);
  scale: calc(0.4 + var(--marks, 1) * 0.6);
  box-shadow: 0 0 0 3px var(--paper);
}

/* ---------- contact: the page climbs into night ---------- */

.contact {
  --dusk: 20svh; /* paper fades into night inside the section, never over the one above */
  position: relative;
  padding: calc(var(--dusk) + 8svh) var(--gutter) 12svh;
  background: linear-gradient(to bottom, var(--paper), var(--night) var(--dusk)) var(--night);
  color: var(--on-night);
  display: grid; gap: 28px;
  justify-items: start;
}
.contact .label { color: var(--on-night-mute); }
.contact__title {
  font-size: clamp(2.6rem, 6.8vw, 8rem);
  font-weight: 540; line-height: 0.95; letter-spacing: -0.045em;
  max-width: 11em;
}
.contact .body { color: var(--on-night-mute); }
.contact__grid {
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px var(--gutter); align-items: start;
  margin-top: 4svh;
}
.contact__mail { display: grid; gap: 22px; justify-items: start; }
.mail {
  font-size: clamp(1.7rem, 4.2vw, 4.4rem);
  font-weight: 500; letter-spacing: -0.035em; line-height: 1.1;
  text-decoration: none;
  background: linear-gradient(var(--orange), var(--orange)) 0 100% / 100% 3px no-repeat;
  padding-bottom: 6px;
  transition: background-size 400ms var(--ease-flight), color 200ms ease;
}
.mail:hover { color: var(--orange); }
.brief { display: grid; gap: 14px; justify-items: start; margin-top: 18px; padding-top: 22px; border-top: 1px dashed var(--rule-night); }
.brief__text { max-width: 26em; font-size: 15px; line-height: 1.5; color: var(--on-night-mute); }
.brief__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.brief__actions .block-btn i { font-size: 18px; }
.brief__more { font-size: 14px; line-height: 1.5; color: var(--on-night-mute); }
.brief__more a, .brief__copy { color: var(--on-night); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.brief__copy { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.brief__more a:hover, .brief__copy:hover { color: var(--orange); }
.spec--night { width: 100%; border-color: var(--rule-night); }
.spec--night > div { border-color: var(--rule-night); }
.spec--night dt { color: var(--on-night-mute); }
.dim { color: var(--on-night-mute); }

/* ---------- the form: compact, on night, no boxes inside boxes ---------- */

.form {
  display: grid; gap: 18px;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid var(--rule-night);
}
.form__title {
  font: 500 12px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-night-mute);
}
.form__title i { font-style: normal; color: var(--orange); }
.form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.form__topics { display: flex; flex-wrap: wrap; gap: 6px; }
.form__apps { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.form__apps legend { float: left; width: 100%; margin-bottom: 8px; font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-night-mute); }
/* Which-apps only matters for early access. */
.form:has(input[name="topic"]:not([value="early"]):checked) .form__apps { display: none; }

.seg, .tick { position: relative; cursor: pointer; }
.seg input, .tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span {
  display: block; padding: 9px 12px;
  border: 1px solid var(--rule-night);
  font-size: 14px; line-height: 1;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.seg:hover span { border-color: var(--on-night-mute); }
.seg input:checked + span { background: var(--on-night); color: var(--ink); border-color: var(--on-night); }
.tick span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.6; }
.tick span::before {
  content: ""; width: 12px; height: 12px; flex: none;
  border: 1.5px solid var(--on-night-mute);
  transition: background 160ms ease, border-color 160ms ease;
}
.tick input:checked + span::before { background: var(--orange); border-color: var(--orange); }
.seg input:focus-visible + span, .tick input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span { font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-night-mute); }
.field em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: 0.8; }
.field input, .field textarea {
  width: 100%; padding: 6px 0 8px;
  border: 0; border-bottom: 1px solid rgb(238 237 232 / 0.32); border-radius: 0;
  background: transparent; color: var(--on-night);
  font: 16px/1.4 var(--f-sans); /* 16px keeps iOS from zooming */
  transition: border-color 160ms ease;
}
.field textarea { resize: vertical; min-height: 2.9em; field-sizing: content; max-height: 12em; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--orange); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; box-shadow: 0 1px 0 0 var(--orange); }

.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form__foot .block-btn[disabled] { opacity: 0.6; cursor: progress; }
.form__status { font-size: 14px; line-height: 1.4; color: var(--on-night); }
.form__status.is-error, .form__flash--error { color: #ff8a5c; }
.form__flash { display: none; font-size: 14px; }
.form__flash:target { display: block; }
.form__note { font-size: 12.5px; line-height: 1.45; color: var(--on-night-mute); }
.form__note a { color: var(--on-night); text-underline-offset: 2px; }
.form__note a:hover { color: var(--orange); }

/* ---------- ending ---------- */

.end {
  background: var(--night);
  color: var(--on-night);
  padding: 8svh var(--gutter) 28px;
  overflow: hidden;
}
.end__word {
  --c: 1; /* 0 = halves apart, 1 = converged */
  display: flex; justify-content: center;
  font-size: 19.5vw; font-weight: 640; font-stretch: 112%;
  line-height: 0.8; letter-spacing: -0.055em;
  white-space: nowrap;
}
.end__word span { display: inline-block; }
.end__word span:first-child { transform: translateX(calc((1 - var(--c)) * -34vw)); }
.end__word span:last-child { transform: translateX(calc((1 - var(--c)) * 34vw)); color: color-mix(in oklab, var(--orange) calc(var(--c) * 100%), var(--on-night)); }
.end__cols {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px;
  margin-top: 6svh; padding-top: 20px;
  border-top: 1px solid var(--rule-night);
}
.end__cols h2 {
  margin-bottom: 14px;
  font: 500 11px/1.5 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-night-mute);
}
.end__cols li { font-size: 15px; line-height: 1.4; padding: 3px 0; }
.end__cols a { text-decoration: none; color: var(--on-night); background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 1px no-repeat; transition: background-size 240ms var(--ease-flight), color 200ms ease; }
.end__cols a:hover, .end__cols a:focus-visible { color: var(--orange); background-size: 100% 1px; }
.end__cols a[href$=".txt"]:not([data-ask]) { font: 500 13px/1.4 var(--f-mono); }
.end__cols p { margin-top: 10px; max-width: 16em; font-size: 13px; line-height: 1.45; color: var(--on-night-mute); }
.end__row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  margin-top: 40px; padding-top: 16px;
  border-top: 1px solid var(--rule-night);
  font: 500 11px/1.5 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-night-mute);
}
.end__row a { text-decoration: none; color: var(--on-night); }
.end__row a:hover, .end__row a[aria-current] { color: var(--orange); }

/* ---------- cookie consent: a work card you stamp, or don't ---------- */

.consent {
  position: fixed; left: var(--gutter); bottom: var(--gutter); z-index: 60;
  width: min(480px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100svh - var(--bar-h) - 2 * var(--gutter)); overflow: auto;
  padding: 16px 22px 16px;
  background: var(--night-2); color: var(--on-night);
  border: 1px solid var(--rule-night); border-top: 3px solid var(--orange);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.45);
  opacity: 0; transform: translateY(24px);
  transition: opacity 420ms var(--ease-flight), transform 520ms var(--ease-flight);
}
.consent.is-in { opacity: 1; transform: none; }
.consent.is-leaving { opacity: 0; transform: translateY(16px) rotate(-1deg); transition-duration: 300ms; }
.consent :focus-visible { outline-color: var(--orange); }
.consent__ref {
  display: flex; justify-content: space-between; gap: 12px;
  font: 500 10.5px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-night-mute);
}
.consent__ref i { font-style: normal; color: var(--orange); }
.consent__title { margin-top: 12px; font-size: 24px; font-weight: 620; line-height: 1.1; letter-spacing: -0.03em; outline: none; }
.consent__body { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--on-night-mute); }
.consent__tools { margin-top: 12px; border-bottom: 1px solid var(--rule-night); }
.consent__tools li { border-top: 1px solid var(--rule-night); }
.consent__tool {
  position: relative; cursor: pointer;
  display: grid; grid-template-columns: 22px 2.4ch 1fr auto; align-items: baseline; gap: 10px;
  padding: 8px 0;
}
.consent__tool input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent__tool::before {
  content: ""; align-self: center; width: 13px; height: 13px;
  border: 1.5px solid var(--on-night-mute);
  transition: background 160ms ease, border-color 160ms ease;
}
.consent__tool:has(input[hidden])::before { visibility: hidden; }
.consent__tool:has(input:checked)::before { background: var(--orange); border-color: var(--orange); }
.consent__tool:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 2px; }
.consent__tool:hover::before { border-color: var(--on-night); }
.consent__tool .n { font: 500 11px/1 var(--f-mono); color: var(--on-night-mute); }
.consent__tool .nm { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.consent__tool .wh { font-size: 13px; color: var(--on-night-mute); text-align: right; }
.consent__actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--rule-night); /* the tear-off line */
}
.consent__actions .block-btn { flex: 1 1 0; min-width: max-content; }
.consent__actions .block-btn span { flex: 1; padding: 14px 16px; }
.consent__actions .block-btn i { width: 44px; min-height: 44px; }
.consent__actions .block-btn:hover i { width: 52px; }
.consent__foot { margin-top: 12px; font-size: 12.5px; line-height: 1.45; color: var(--on-night-mute); }
.consent__foot a { color: var(--on-night); text-underline-offset: 2px; }
.consent__foot a:hover { color: var(--orange); }

/* The impression: lands with a thud, a little crooked, like a real one. */
.consent__stamp {
  position: absolute; left: 50%; top: 46%; z-index: 2;
  display: grid; justify-items: center; gap: 4px;
  padding: 12px 20px 10px;
  border: 3px solid var(--orange); outline: 1.5px solid var(--orange); outline-offset: 3px;
  color: var(--orange); background: rgb(27 27 25 / 0.82);
  transform: translate(-50%, -50%) rotate(-9deg) scale(1.7);
  opacity: 0; pointer-events: none;
}
.consent__stamp b { font-size: 34px; font-weight: 800; font-stretch: 118%; line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap; }
.consent__stamp small { font: 600 11px/1.2 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.consent.is-stamped .consent__stamp { animation: thud 260ms cubic-bezier(0.5, 0, 0.75, 0) forwards; }
.consent.is-stamped > :not(.consent__stamp) { opacity: 0.45; transition: opacity 200ms ease 120ms; }
@keyframes thud {
  to { opacity: 1; transform: translate(-50%, -50%) rotate(-9deg) scale(1); }
}

/* ---------- plain pages (privacy) ---------- */

.page { max-width: 46rem; padding: calc(var(--bar-h) + 10svh) var(--gutter) 16svh; }
.page h1 { margin: 18px 0 22px; font-size: clamp(2.8rem, 6.4vw, 5.2rem); font-weight: 580; line-height: 0.92; letter-spacing: -0.05em; margin-left: -0.04em; }
.page__lede { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.45; color: var(--ink-2); max-width: 34em; }
.page__meta { margin-top: 18px; font: 500 11.5px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.page h2 { margin-top: 56px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 22px; font-weight: 620; line-height: 1.25; letter-spacing: -0.02em; }
.page h2 + p, .page h2 + ul { margin-top: 14px; }
.page p + p, .page ul + p, .page p + ul { margin-top: 14px; }
.page li, .page h2 ~ p { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.page ul { list-style: square; padding-left: 1.15em; }
.page li + li { margin-top: 10px; }
.page li::marker { color: var(--orange); }
.page b { font-weight: 620; color: var(--ink); }
.page a { text-decoration-color: var(--orange); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.page a:hover { color: var(--orange-text); }
.page code { font: 500 0.86em/1 var(--f-mono); background: var(--paper-2); padding: 2px 5px; }
.tools { margin-top: 18px; border-bottom: 1px solid var(--rule); }
.tools > div { display: grid; grid-template-columns: 12rem 1fr; gap: 6px 20px; padding: 14px 0; border-top: 1px solid var(--rule); }
.tools dt { font-size: 17px; font-weight: 620; line-height: 1.35; }
.tools dt span { display: block; margin-top: 3px; font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.tools dd { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.tools > div[hidden] { display: none; }

/* ---------- smaller screens ---------- */

@media (max-width: 1180px) {
  .bar__clock span:first-child { display: none; }
}

@media (max-width: 960px) {
  :root { --bar-h: 58px; }
  .bar { grid-template-columns: auto 1fr; }
  .bar__clock { display: none; }
  .bar__nav { justify-self: end; }
  .bar__nav a:not(.bar__cta) { display: none; }

  /* The stage becomes a band across the top. The cube opens large above the
     headline, shrinks into the bar as the hero scrolls away (--dock, 0..1, set
     by site.js) and stays there, turning, until the last chapter is read. */
  :root {
    --s-hero: clamp(120px, min(44vw, 25svh), 200px);
    --k-dock: 0.44; /* the docked cube, as a share of the hero cube */
    --dock-x: 24px; /* centres it between the logo and Contact */
    --hero-h: calc(var(--bar-h) + var(--s-hero) * 1.6);
    --dock-h: calc(var(--s-hero) * var(--k-dock) * 1.5 + 30px);
  }
  .deck { display: flex; flex-direction: column; }
  .stage {
    --dock: 0;
    order: -1; z-index: 2; align-self: stretch;
    display: block;
    /* Only the docked band takes part in the flow, so the band leaves with
       the last chapter instead of lingering over the next section. */
    height: var(--hero-h); margin-bottom: calc(var(--dock-h) - var(--hero-h));
  }
  .stage::before {
    /* paper that the text slides under, with a soft lower edge */
    content: ""; position: absolute; top: 0; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter));
    height: calc(var(--hero-h) + (var(--dock-h) - var(--hero-h)) * var(--dock));
    background: var(--paper);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mask-image: linear-gradient(#000 calc(100% - 26px), transparent);
    -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent);
    pointer-events: auto; /* hidden text underneath can't be tapped */
  }
  .stage__scene {
    --s: var(--s-hero);
    position: absolute; left: 50%; top: calc(var(--bar-h) + var(--s) * 0.8);
    margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
    transform:
      translate(
        calc(var(--dock-x) * var(--dock)),
        calc((var(--dock-h) / 2 - var(--bar-h) - var(--s) * 0.8) * var(--dock)))
      scale(calc(1 - (1 - var(--k-dock)) * var(--dock)));
  }
  .stage__caption {
    left: 0; top: calc(var(--bar-h) + 6px); bottom: auto;
    transform: none;
    flex-direction: column; gap: 6px;
    opacity: calc(var(--dock) * 2 - 1);
  }
  .bar.is-docked::before { opacity: 0; } /* the band is the bar's backdrop now */

  .index { min-height: 0; padding-top: calc(var(--hero-h) - var(--dock-h) + 2svh); padding-bottom: 0; }
  .statement { font-size: clamp(2.3rem, 10.5vw, 4.4rem); }

  .ledger__head { display: none; }
  .ledger a {
    grid-template-columns: 3.2ch 1fr auto;
    grid-template-areas: "n nm st" ". wh wh";
    row-gap: 4px;
    padding: 14px 0;
  }
  .ledger .n { grid-area: n; }
  .ledger .nm { grid-area: nm; }
  .ledger .wh { grid-area: wh; font-size: 15px; }
  .ledger .st { grid-area: st; }
  .ledger a::before { display: none; }
  .ledger a.is-lit .nm { transform: none; }

  .chapter {
    min-height: 0; padding: 12svh 0 4svh; gap: 20px;
    scroll-margin-top: calc(var(--dock-h) + 16px - 12svh - var(--bar-h)); /* land below the docked cube */
  }
  .chip {
    display: inline-block; width: 12px; height: 12px; background: var(--orange);
  }
  .chapter__name { font-size: clamp(3rem, 15vw, 6rem); }

  .connect { height: auto; padding-top: 14svh; padding-bottom: 8svh; }
  .connect__pin { position: relative; height: auto; grid-template-columns: minmax(0, 1fr); row-gap: 36px; padding-top: 0; }
  .connect__stage { order: -1; padding: 6svh 0; }
  .connect__text { order: 0; }
  .net { --s: clamp(60px, 20.5vw, 150px); }

  .contact { --dusk: 16svh; }
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .end__word { font-size: 21vw; }
  .end__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .consent { left: 12px; bottom: 12px; width: calc(100vw - 24px); padding: 14px 16px 16px; }
  .consent__actions { gap: 8px; }
  .consent__actions .block-btn span { padding: 13px 10px; font-size: 15px; }
  .consent__actions .block-btn i, .consent__actions .block-btn:hover i { width: 40px; }
  .consent__tool .wh { display: none; }
  .tools > div { grid-template-columns: 1fr; }
  .net .skin__meta { display: none; }
  .net__marks b { width: 16px; height: 16px; font-size: 9.5px; }
  .ledger .st em { display: block; margin: 5px 0 0; }
  .spec > div { grid-template-columns: 5.6rem 1fr; }
  .block-btn span { padding: 15px 16px; }
}

/* ---------- reduced motion: every device has a still end state ---------- */

@media (prefers-reduced-motion: reduce) {
  [data-settle] .w, [data-settle="load"] .w { animation: none; filter: none; opacity: 1; transform: none; }
  .cube.is-assembling .skin { animation: none; }
  .consent, .consent.is-leaving { transform: none; }
  .consent.is-stamped .consent__stamp { animation: none; opacity: 1; transform: translate(-50%, -50%) rotate(-9deg); }
  .connect { height: auto; }
  .connect__pin { position: relative; height: auto; min-height: 100svh; }
  :root { --hero-h: var(--dock-h); } /* on a phone the cube starts docked */
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
