/* ==========================================================================
   Synqit — editorial design system
   Reference language: Emergence Magazine (whitespace, tracked micro-labels,
   full-bleed media, hover-reveal index) adapted for a hardware tool.
   ========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */

/*  Design language — taken from "Data driven.pdf".
    White ground, near-black monospace body, and one accent: Signal Yellow.
    The signature is the RGB chromatic split on display type — a yellow glyph
    with a pure-red copy behind it one way and a pure-cyan copy the other,
    the way a misconverged CRT tears a character apart.

    Yellow #FFD21F is 1.5:1 on white. It is an accent for DARK grounds, for
    fills, and for the glitch stack — never functional text on white. Ink
    carries every text-weight accent. This is the one rule the palette
    depends on.                                                             */

:root {
  /* Brand */
  --yellow:    #FFD21F;   /* Signal Yellow — the single accent */
  --glitch-r:  #FF0000;   /* chromatic split, red channel  */
  --glitch-c:  #00FFFF;   /* chromatic split, cyan channel */

  /* Surfaces — the ground is white, full stop */
  --paper:        #FFFFFF;
  --paper-deep:   #F4F4F5;   /* hover only */
  --sheet:        #FFFFFF;
  --ink-surface:  #0A080B;   /* hero and footer ground */

  /* Ink */
  --ink:          #0B0B0C;
  --ink-soft:     #3A3A3E;
  --ink-mute:     #63636B;
  --ink-faint:    #9A9AA2;
  --on-dark:      #F4F4F5;
  --on-dark-mute: #9A9AA2;

  /* Accent — ink carries text-weight accents; yellow is the graphic mark. */
  --accent:       #0B0B0C;
  --accent-flare: #FFD21F;
  --signal:       #1F7A4D;   /* verification pass */
  --warn:         #8A6A00;   /* verification warn — the yellow, taken to text */
  --fail:         #C81616;   /* verification fail — the glitch red, taken to text */

  /* Chart — its own semantic set, tuned for a white ground */
  --c-web:      #0E7180;   /* websites online, measured */
  --c-git:      #5C6068;   /* GitHub repositories, measured */
  --c-hw:       #ED7A2C;   /* hardware designs — the one measured point */
  --c-hw-ink:   #B8500C;   /* the same orange, taken to text weight */
  --c-grid:     rgba(11, 11, 12, 0.10);

  /* Lines */
  --rule:         rgba(11, 11, 12, 0.16);
  --rule-soft:    rgba(11, 11, 12, 0.08);
  --rule-dark:    rgba(244, 244, 245, 0.18);

  /* Type — everything is monospaced or bitmap. There is no proportional
     face in this system, which is the point: it reads as a terminal.
     Jersey 25 stands in for Joint, Martian Mono for Disket Mono Bold;
     JetBrains Mono is the real face from the source. */
  --pixel:   "Jersey 25", "Silkscreen", monospace;
  --stat:    "Martian Mono", "JetBrains Mono", ui-monospace, monospace;
  --display: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --gutter: clamp(20px, 4.2vw, 68px);
  --stack:  clamp(72px, 11vh, 148px);
  --maxw:   1560px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --slow: 900ms;
}

/* --- 2. Reset ----------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.62;
  font-weight: 400;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--yellow); color: var(--ink); }

/* No italics anywhere. Also blocks the browser from synthesising an oblique
   for faces we ship without an italic cut. */
em, i, cite, var, address, dfn, blockquote, figcaption, q {
  font-style: normal;
  font-synthesis-style: none;
}
/* Titles of works still need to read as titles. Weight does the job a slant
   used to do. */
i, cite { font-weight: 500; }

:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
}

/* --- 2b. The chromatic split -------------------------------------------- */
/* A yellow glyph with a pure-red copy behind it to one side and a pure-cyan
   copy to the other. Built from two ::before/::after clones reading the text
   out of data-text, blended so the overlaps go green and white the way a
   misconverged tube does it. The clones are aria-hidden by construction —
   generated content is not announced — so a screen reader hears the word once. */
.glitch {
  position: relative;
  display: inline-block;
  color: var(--yellow);
  isolation: isolate;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.glitch::before { color: var(--glitch-r); transform: translate( 0.026em, -0.020em); z-index: -1; }
.glitch::after  { color: var(--glitch-c); transform: translate(-0.026em,  0.020em); z-index: -2; }

/* On a dark ground multiply would eat the clones — screen instead. */
.section--dark .glitch::before, .section--dark .glitch::after,
.hero .glitch::before, .hero .glitch::after,
.foot .glitch::before, .foot .glitch::after { mix-blend-mode: screen; }

/* Ink-first variant: the glyph reads black and only tears on hover/focus.
   Used wherever the text has a job to do — nav links, small labels — because
   yellow on white is 1.5:1 and unreadable at UI sizes. */
.glitch--ink { color: var(--ink); }
.glitch--ink::before, .glitch--ink::after { opacity: 0; transition: opacity 200ms var(--ease); }
.glitch--ink:hover, .glitch--ink:focus-visible { color: var(--yellow); }
.glitch--ink:hover::before, .glitch--ink:focus-visible::before,
.glitch--ink:hover::after,  .glitch--ink:focus-visible::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .glitch--ink::before, .glitch--ink::after { transition: none; }
}

/* --- 3. Type primitives ------------------------------------------------- */

/* The tiny tracked uppercase label — the most-used element in the reference */
.label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1;
}
.label--ink   { color: var(--ink); }
.label--light { color: rgba(255, 255, 255, 0.82); }

/* Chip form of the label, as seen over the hero media */
.chip {
  display: inline-block;
  padding: 5px 9px 4px;
  background: transparent;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
}

.display {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: -0.045em;
  font-size: clamp(30px, 4.6vw, 74px);
}
/* No italics in this system. Emphasis is a highlighter block, never a slant
   and never yellow text — yellow on white is 1.5:1. */
.display em, .page-head h1 em, .subhead em {
  font-style: normal;
  background: var(--yellow);
  color: var(--ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.1em;
}
.section--dark .display em, .section--dark .subhead em,
.foot .display em {
  background: transparent;
  color: var(--yellow);
  padding: 0;
}
/* The source wraps its display lines in angle brackets and quotes, as if the
   sentence were a tag being written. The brackets are decoration, so they are
   drawn rather than typed and never reach a screen reader. */
.display--tag::before, .display--tag::after {
  color: var(--ink-faint);
  font-weight: 400;
}
.display--tag::before { content: "<\201C"; }
.display--tag::after  { content: "\201D>"; }

.headline {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(17px, 1.6vw, 23px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.subhead {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.5vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.lede {
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.56;
  color: var(--ink-soft);
  max-width: 44ch;
}

.prose p + p { margin-top: 1.05em; }
.prose { max-width: 62ch; color: var(--ink-soft); }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.measure { max-width: 46ch; }

/* --- 4. Layout ---------------------------------------------------------- */

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--stack); }
.section--tight { padding-block: clamp(48px, 6vh, 84px); }
.section--sheet { background: var(--sheet); }
.section--dark  { background: var(--ink-surface); color: var(--on-dark); }
.section--dark .label { color: var(--on-dark-mute); }
.section--dark .prose, .section--dark .lede { color: var(--on-dark-mute); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* Section head: micro-label above a hairline, as in the reference */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(40px, 6vh, 84px);
}
.sec-head__n { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.section--dark .sec-head { border-color: var(--rule-dark); }

.cols {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 2.4vw, 40px);
}
.cols > * { min-width: 0; }
.index > *, .statement > *, .block, .chart, .era > * { min-width: 0; }

/* --- 5. Navigation ------------------------------------------------------ */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: border-color 400ms var(--ease), padding 400ms var(--ease),
              background 400ms var(--ease);
}
.nav[data-scrolled="true"] {
  padding-block: 12px;
  border-bottom-color: var(--rule);
}

.nav__mark {
  font-family: var(--pixel);
  font-weight: 400;
  font-synthesis-weight: none;
  font-size: 34px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.nav__mark sup {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  vertical-align: super;
  margin-left: 6px;
  font-weight: 500;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 42px);
}

/* The scramble link from the navbar reference. Idle = muted; on hover the
   glyphs shuffle through noise and resolve to accent-dark. */
.slink {
  position: relative;
  font-family: var(--pixel);
  font-size: 19px;
  font-weight: 400;
  font-synthesis-weight: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 260ms var(--ease);
  white-space: nowrap;
  /* lock width so scrambling glyphs never reflow the bar */
  display: inline-block;
}
.slink:hover, .slink:focus-visible { color: var(--yellow); }
.slink[aria-current="page"] { color: var(--ink); }
.slink[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}
/* Per-character cells for the scramble. pointer-events:none makes every
   hit-test resolve to the <a> itself, so a press and release always share a
   target no matter what the animation is doing to the glyphs. */
.slink > span { pointer-events: none; }
.slink .gl-noise { color: var(--glitch-r); }
.slink .gl-mid   { color: var(--glitch-c); }

.nav__cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 320ms var(--ease), color 320ms var(--ease),
              border-color 320ms var(--ease);
}
.btn:hover { background: var(--yellow); border-color: var(--ink); color: var(--ink); }
.btn--solid {
  background: var(--yellow);
  border-color: var(--ink);
  color: var(--ink);
}
.btn--solid:hover { background: var(--ink); border-color: var(--ink); color: var(--yellow); }
.btn--ghost { border-color: var(--rule); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn--light {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}
.btn--light:hover { background: transparent; color: var(--yellow); border-color: var(--yellow); }

.nav__burger { display: none; }

/* --- 6. Hero ------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--ink-surface);
  color: var(--yellow);
}
.hero__media {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.9;
  filter: contrast(1.2) saturate(0.5) brightness(0.46);
  transform: scale(1.02);
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,8,11,0.72) 0%, rgba(10,8,11,0.40) 34%,
                    rgba(10,8,11,0.58) 68%, rgba(10,8,11,0.95) 100%),
    rgba(10,8,11,0.30);
}
/* Fine grain over the hero — hides upscaling artefacts in the source footage */
.hero__scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__inner {
  position: relative;
  padding: 0 var(--gutter) clamp(38px, 6vh, 76px);
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
}
.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4.9vw, 80px);
  line-height: 1.2;
  letter-spacing: -0.05em;
  color: var(--yellow);
  margin: 18px 0 0;
  max-width: 22ch;
}
.hero__title em { font-style: normal; color: inherit; }
/* The angle brackets and quotes are drawn, not typed, so the headline stays
   one clean string for a screen reader and for the page title. */
.hero__title::before { content: "<\201C"; color: rgba(255, 210, 31, 0.42); }
.hero__title::after  { content: "\201D>"; color: rgba(255, 210, 31, 0.42); }
.hero__sub {
  margin-top: clamp(18px, 2.4vh, 30px);
  max-width: 50ch;
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: clamp(26px, 4vh, 48px);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__caption {
  max-width: 34ch;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.56);
}

/* thin scroll hint */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: 1px; height: 46px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.5));
  animation: hintPulse 2.6s var(--ease) infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.25; transform: translateX(-50%) scaleY(0.6); }
  50%      { opacity: 0.9;  transform: translateX(-50%) scaleY(1); }
}

/* A bracketed line, <like this>. The brackets are generated so they never
   land in the copy or in a screen reader. */
.tag {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--yellow);
}
.tag::before { content: "<"; opacity: 0.45; }
.tag::after  { content: ">"; opacity: 0.45; }

.hero__tag {
  display: block;
  margin-top: clamp(16px, 2.4vh, 30px);
  font-size: clamp(13px, 1.5vw, 22px);
  letter-spacing: 0.01em;
}

/* Hero calls to action are bracket text, not boxes — as in the source. */
.cta-tag {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(13px, 1.25vw, 17px);
  letter-spacing: 0.02em;
  color: var(--yellow);
  display: inline-block;
  padding: 2px 0;
  border-bottom: 1.5px solid transparent;
  transition: border-color 240ms var(--ease), opacity 240ms var(--ease);
}
.cta-tag::before { content: "<"; opacity: 0.45; }
.cta-tag::after  { content: ">"; opacity: 0.45; }
.cta-tag:hover, .cta-tag:focus-visible { border-bottom-color: var(--yellow); }
.hero__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

/* --- 7. Hover-reveal index (the "Selected Stories" pattern) ------------- */
/* Left column holds the expanded entry; right column is the card grid.
   Hovering a card fades every sibling far back and swaps the left copy. */

.index {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: start;
}

.index__stage {
  position: sticky;
  top: 128px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.index__panel {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease),
              visibility 0s linear 520ms;
  max-width: 46ch;
}
.index__panel[data-active="true"] {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s, 0s, 0s;
}
.index__panel h3 { margin-bottom: 4px; }
.index__panel .byline {
  font-family: var(--sans);
  font-size: clamp(15px, 1.5vw, 20px);
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.24;
}
.index__panel .body { margin-top: clamp(22px, 3.4vh, 40px); }
.index__panel .body .label { display: block; margin-bottom: 12px; }

.index__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.4vw, 22px);
}
@media (max-width: 520px) { .index__grid { grid-template-columns: repeat(2, 1fr); } }

.card {
  display: block;
  text-align: left;
  width: 100%;
  opacity: 0.38;
  filter: saturate(0.4);
  transition: opacity 460ms var(--ease), filter 460ms var(--ease);
}
.index:not(:hover) .card,
.card[data-active="true"] { opacity: 1; filter: none; }
.index:hover .card[data-active="true"] { opacity: 1; filter: none; }

.card__kicker { display: block; margin-bottom: 9px; }
.card__frame img { display: block; }
.card__frame {
  display: block;
  position: relative;
  border: 1px solid var(--rule);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper-deep);
}
.card__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}
.card[data-active="true"] .card__frame img { transform: scale(1.035); }
.card__meta {
  display: block;
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-mute);
}
.card__meta b { font-weight: 500; color: var(--ink); }

/* --- 8. Editorial statement & four-block grid --------------------------- */

.statement {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 80px);
}
.statement__body {
  max-width: 54ch;
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.48;
  color: var(--ink);
}
.statement__body .drop { display: inline-block; width: 3.2em; }

.blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}
.block {
  background: var(--paper);
  padding: clamp(26px, 3vw, 44px) clamp(20px, 2vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 420ms var(--ease);
}
.section--sheet .block { background: var(--sheet); }
.block:hover { background: var(--paper-deep); }
.section--sheet .block:hover { background: var(--paper); }
.block h3 {
  font-family: var(--display);
  font-size: clamp(21px, 1.9vw, 29px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.026em;
}
.block p { color: var(--ink-soft); font-size: 13.5px; }
.block__n { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.blocks--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 620px) { .blocks--2 { grid-template-columns: 1fr; } }

/* --- 9. Proof / verification readout ------------------------------------ */

.readout {
  border: 1px solid var(--rule);
  overflow-wrap: anywhere;
  background: var(--sheet);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
}
.readout__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-mute);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.readout__rows { padding: 6px 0; }
.row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 7px 16px;
  border-left: 2px solid transparent;
  transition: background 300ms var(--ease), border-color 300ms var(--ease);
}
.row:hover { background: rgba(11,11,12,0.025); }
.row__tag { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.row--pass { border-left-color: var(--signal); }
.row--pass .row__tag { color: var(--signal); }
.row--warn { background: rgba(255, 210, 31, 0.16); border-left-color: var(--yellow); }
.row--warn .row__tag { color: var(--warn); }
.row--fail { background: rgba(200, 22, 22, 0.055); border-left-color: var(--fail); }
.row--fail .row__tag { color: var(--fail); }
.row__cite { color: var(--ink-mute); font-size: 10.5px; white-space: nowrap; }
.row__detail {
  grid-column: 2 / -1;
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(11,11,12,0.04);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}
.row__detail b { color: var(--ink); font-weight: 500; }

/* --- 10. Figures, full-bleed media -------------------------------------- */

.bleed { position: relative; overflow: hidden; }
.bleed__media { width: 100%; height: clamp(360px, 74vh, 760px); object-fit: cover; }
.bleed__over {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(24px, 4vh, 54px) var(--gutter);
  background: linear-gradient(180deg, rgba(10,8,11,0) 0%, rgba(10,8,11,0.55) 45%, rgba(10,8,11,0.92) 100%);
  color: #fff;
}
.bleed__over .wrap { padding-inline: 0; }

.figure { display: grid; gap: 12px; }
.figure img { width: 100%; }
.figure figcaption {
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 46ch;
}
.figure figcaption b { font-weight: 500; color: var(--ink-soft); }

/* Media that pans very slowly — keeps still images alive without motion noise */
.kenburns { animation: kb 26s var(--ease) infinite alternate; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.07); } }

/* --- 11. Era timeline (History) ----------------------------------------- */

.era {
  display: grid;
  grid-template-columns: 92px minmax(0, 0.86fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 56px);
  padding-block: clamp(34px, 5vh, 68px);
  border-top: 1px solid var(--rule);
  align-items: start;
}
.era__year {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  padding-top: 4px;
}
.era__title {
  font-family: var(--display);
  font-size: clamp(23px, 2.5vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.era__body { font-size: 13.5px; color: var(--ink-soft); max-width: 44ch; }
.era__figure { overflow: hidden; background: var(--paper-deep); }
.era__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04);
  transition: filter 900ms var(--ease), transform 1200ms var(--ease);
}
.era:hover .era__figure img { filter: grayscale(0) contrast(1); transform: scale(1.02); }
.era__figure--contain img { object-fit: contain; background: var(--sheet); }
.era__placeholder {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border: 1px dashed var(--rule);
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 9px,
    rgba(11,11,12,0.035) 9px, rgba(11,11,12,0.035) 10px);
  text-align: center;
  padding: 20px;
}

/* --- 12. Charts --------------------------------------------------------- */

.charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 780px) { .charts { grid-template-columns: repeat(2, 1fr); } }
.chart {
  background: var(--sheet);
  padding: clamp(20px, 2.2vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chart__head { display: flex; flex-direction: column; gap: 6px; }
.chart__title { font-size: 13px; font-weight: 500; letter-spacing: 0.005em; }
.chart__note { font-size: 11px; color: var(--ink-mute); line-height: 1.45; }
.chart__plot { width: 100%; height: auto; overflow: visible; }
.chart__src { font-family: var(--mono); font-size: 9.5px; color: var(--ink-faint); }
.chart--wide { grid-column: 1 / -1; }

/* --- 13. Team ----------------------------------------------------------- */

.team {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 46px) clamp(14px, 1.8vw, 28px);
}
@media (min-width: 680px)  { .team { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .team { grid-template-columns: repeat(4, 1fr); } }
.member__frame {
  aspect-ratio: 1;
  background: var(--paper-deep);
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
}
.member__frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter 700ms var(--ease); }
.member:hover .member__frame img { filter: none; }
.member__initials {
  font-family: var(--display);
  font-weight: 500;
  font-size: 36px;
  color: var(--ink-faint);
  letter-spacing: -0.03em;
}
.member__name { margin-top: 14px; font-size: 14px; font-weight: 500; }
.member__role { font-size: 11px; color: var(--ink-mute); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 3px; }
.member__bio { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }

/* --- 14. Vignettes (Vision) --------------------------------------------- */

.vignette {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: clamp(26px, 3vw, 42px) 0;
  border-top: 1px solid var(--rule);
}
.vignette__who {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(21px, 2.3vw, 33px);
  line-height: 1.12;
  letter-spacing: -0.028em;
}
.vignette__text { font-size: 13.5px; color: var(--ink-soft); max-width: 52ch; }
.vignettes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 clamp(24px, 4vw, 72px); }

/* --- 15. Footer --------------------------------------------------------- */

.foot {
  background: var(--ink-surface);
  color: var(--on-dark);
  padding-block: clamp(56px, 8vh, 100px) 34px;
}
.foot a { color: var(--on-dark-mute); transition: color 260ms var(--ease); }
.foot a:hover { color: var(--accent-flare); }
.foot__top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(28px, 4vw, 64px);
  padding-bottom: clamp(40px, 6vh, 72px);
  border-bottom: 1px solid var(--rule-dark);
}
.foot__mark { font-family: var(--display); font-weight: 600; font-size: clamp(36px, 5.6vw, 76px); line-height: 0.96; letter-spacing: -0.036em; }
.foot__col { display: flex; flex-direction: column; gap: 11px; font-size: 12.5px; }
.foot__col .label { margin-bottom: 6px; color: var(--on-dark-mute); }
.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  padding-top: 26px;
  font-size: 11px;
  color: var(--on-dark-mute);
}

/* --- 16. Scroll reveal -------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* --- 17. Responsive ----------------------------------------------------- */

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .cols > * { grid-column: 1 / -1 !important; }
}

@media (max-width: 1080px) {
  .index { grid-template-columns: 1fr; }
  .index__stage { position: static; min-height: 0; margin-bottom: 32px; }
  .statement { grid-template-columns: 1fr; }
  .era { grid-template-columns: 72px 1fr; }
  .era__figure { grid-column: 2 / -1; margin-top: 20px; max-width: 520px; }
}

@media (max-width: 760px) {
  body { font-size: 13.5px; }
  .nav { padding: 14px var(--gutter); }
  /* .nav carries backdrop-filter, which makes it the containing block for any
     fixed descendant — so this panel is anchored to the bar, not the viewport,
     and is hidden by visibility rather than by moving it off-screen. */
  .nav__links {
    position: absolute;
    inset: 100% 0 auto 0;
    height: 100svh;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    background: var(--paper);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 420ms var(--ease), transform 520ms var(--ease),
                visibility 0s linear 520ms;
  }
  .nav[data-open="true"] .nav__links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s, 0s, 0s;
  }
  .nav[data-open="true"] .nav__links .slink { font-size: 24px; color: var(--ink); }
  .nav__cta .btn:not(.btn--solid) { display: none; }
  .nav__burger {
    display: grid;
    gap: 4px;
    padding: 8px 0 8px 8px;
  }
  .nav__burger span {
    display: block;
    width: 20px; height: 1px;
    background: var(--ink);
    transition: transform 380ms var(--ease), opacity 380ms var(--ease);
  }
  .nav[data-open="true"] .nav__burger span:nth-child(1) { transform: translateY(2.5px) rotate(45deg); }
  .nav[data-open="true"] .nav__burger span:nth-child(2) { opacity: 0; }
  .nav[data-open="true"] .nav__burger span:nth-child(3) { transform: translateY(-2.5px) rotate(-45deg); }

  .index__grid { grid-template-columns: repeat(2, 1fr); }
  .card { opacity: 1; filter: none; }
  .era { grid-template-columns: 1fr; gap: 16px; }
  .era__year { padding-top: 0; }
  .era__figure { grid-column: 1; margin-top: 6px; }
  .row { grid-template-columns: 62px 1fr; }
  .row__cite { grid-column: 1 / -1; }
  .foot__top { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* --- 18. Interior page heads -------------------------------------------- */

.page-head {
  padding-top: clamp(112px, 15vh, 176px);
  padding-bottom: clamp(44px, 7vh, 92px);
  border-bottom: 1px solid var(--rule);
}
.page-head__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
}
.page-head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 72px);
  line-height: 1.24;
  letter-spacing: -0.05em;
  margin-top: 16px;
}

.page-head__note { padding-bottom: 8px; }

@media (max-width: 860px) {
  .page-head__row { grid-template-columns: 1fr; align-items: start; }
  .page-head__note { padding-bottom: 0; }
}

/* --- 19. Utilities ------------------------------------------------------ */

.stack-sm > * + * { margin-top: 14px; }
.stack-md > * + * { margin-top: 26px; }
.tac { text-align: center; }
.mt-l { margin-top: clamp(28px, 4vh, 52px); }
.dim  { color: var(--ink-mute); }

.slot {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
  border: 1px dashed var(--rule);
  background: repeating-linear-gradient(-45deg, transparent, transparent 9px,
              rgba(11,11,12,0.03) 9px, rgba(11,11,12,0.03) 10px);
  aspect-ratio: 16 / 10;
}
.slot__id { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.slot p { font-size: 12px; color: var(--ink-mute); max-width: 34ch; }


/* Registered so the browser treats them as real numbers rather than token
   soup — which makes the clamp() arithmetic below reliable and keeps --t
   inheriting down into each group's children. */
@property --p   { syntax: '<number>'; inherits: true;  initial-value: 0; }
@property --t   { syntax: '<number>'; inherits: true;  initial-value: 0; }
@property --in  { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --out { syntax: '<number>'; inherits: false; initial-value: 1; }

/* --- 19. Company statement + the scroll-drawn chart ---------------------- */
/* The statement is the one block in the system set in the heavy squared face.
   It is uppercase, black, and deliberately hard to skim past. */

.cstatement {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: start;
}
@media (max-width: 1080px) { .cstatement { grid-template-columns: 1fr; } }

.cstatement__head {
  font-family: var(--pixel);
  font-weight: 400;
  font-synthesis-weight: none;
  font-size: clamp(26px, 3.1vw, 46px);
  line-height: 1;
  letter-spacing: 0.01em;
  margin-bottom: clamp(20px, 3vh, 38px);
}
.cstatement__body {
  font-family: var(--stat);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(13px, 1.32vw, 21px);
  line-height: 1.34;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 24ch;
}

/* The chart is sticky inside a tall track: scrolling the track scrubs the
   drawing rather than just triggering it once. --p is the progress, 0 to 1,
   written by the observer in synqit.js. */
.chartscroll { position: relative; }
.chartscroll__track { height: 320vh; }
.chartscroll__stage {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: clamp(72px, 10vh, 120px) clamp(32px, 5vh, 60px);
}
@media (max-width: 1080px) {
  .chartscroll__track { height: 260vh; }
  .chartscroll__stage { min-height: 100svh; align-items: flex-start; }
}

.sc { --p: 0; width: 100%; }
.sc__plot { width: 100%; height: auto; overflow: visible; display: block; }
.sc__cap {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 14px;
}

/* Everything inside the plot reveals off --p. Each element carries its own
   --in (the progress at which it starts) and --out (where it is fully there);
   `--t` is that span normalised and clamped, which is what actually drives
   opacity and dash offset. No JavaScript touches individual nodes. */
.sc [data-step] {
  --t: clamp(0, calc((var(--p) - var(--in)) / (var(--out) - var(--in))), 1);
}
.sc .sc-fade { opacity: var(--t); }
.sc .sc-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--t));
  opacity: clamp(0, calc(var(--t) * 14), 1);
}
.sc .sc-pop {
  opacity: var(--t);
  transform: scale(calc(0.4 + 0.6 * var(--t)));
  transform-origin: center;
  transform-box: fill-box;
}

/* Chart furniture */
.sc-grid   { stroke: var(--c-grid); stroke-width: 1; }
.sc-axis   { stroke: rgba(11,11,12,0.34); stroke-width: 1; }
.sc-tick   { font-family: var(--mono); font-size: 11px; font-weight: 500; fill: var(--ink-faint); }
.sc-era    { font-family: var(--mono); font-size: 10.5px; font-weight: 700; fill: var(--ink-mute);
             letter-spacing: 0.14em; text-transform: uppercase; }
.sc-erasub { font-family: var(--mono); font-size: 10px; fill: var(--ink-faint); }
.sc-eraline{ stroke: rgba(11,11,12,0.16); stroke-width: 1; stroke-dasharray: 2 4; }

.sc-web    { stroke: var(--c-web); stroke-width: 2.2; fill: none;
             stroke-linejoin: round; stroke-linecap: round; }
.sc-git    { stroke: var(--c-git); stroke-width: 2;   fill: none;
             stroke-linejoin: round; stroke-linecap: round; }
.sc-hwray  { stroke: var(--c-hw);  stroke-width: 1.6; fill: none; stroke-dasharray: 5 4; }
.sc-hwband { fill: var(--c-hw); opacity: 0.16; }

.sc-corridor { fill: rgba(237,122,44,0.055); stroke: var(--c-hw);
               stroke-width: 1.2; stroke-dasharray: 6 5; }
.sc-projband { fill: rgba(11,11,12,0.035); }

.sc-val    { font-family: var(--mono); font-weight: 700; font-size: 21px; }
.sc-valsub { font-family: var(--mono); font-size: 11.5px; fill: var(--ink-mute); }
.sc-note   { font-family: var(--mono); font-size: 13px; fill: var(--ink-soft); }
.sc-note--hw { font-family: var(--mono); font-size: 11.5px; font-weight: 700;
               fill: var(--c-hw-ink); letter-spacing: 0.12em; }
.sc-foot   { font-family: var(--mono); font-size: 10.5px; fill: var(--ink-faint);
             letter-spacing: 0.08em; }

.sc-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px;
             font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft); }
.sc-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sc-legend i { width: 20px; height: 0; border-top: 2.5px solid currentColor;
               flex: none; font-style: normal; }
.sc-legend .k-web { color: var(--c-web); }
.sc-legend .k-git { color: var(--c-git); }
.sc-legend .k-hw  { color: var(--c-hw-ink); }
.sc-legend .k-hw i { border-top: 0; width: 10px; height: 10px; border-radius: 50%;
                     background: var(--c-hw); }
.sc-legend .k-cor { color: var(--c-hw-ink); }
.sc-legend .k-cor i { border-top-style: dashed; }
.sc-legend .k-prj i { border-top: 0; width: 18px; height: 11px;
                      background: rgba(11,11,12,0.12); }

/* Reduced motion: hand over the finished chart, no scrubbing. */
@media (prefers-reduced-motion: reduce) {
  .chartscroll__track { height: auto; }
  .chartscroll__stage { position: static; min-height: 0; }
  .sc { --p: 1 !important; }
  .sc .sc-draw { stroke-dashoffset: 0; }
  .sc .sc-pop  { transform: none; }
}


/* --- 20. "Say it in plain language" lead-in ----------------------------- */

.say { align-items: end; margin-bottom: clamp(44px, 7vh, 96px); }
.say__lede { margin-top: clamp(18px, 2.6vh, 28px); max-width: 52ch; }

/* The five deliverables, as a checked list — the claim the section makes. */
.say__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 10px;
  margin-top: clamp(20px, 3vh, 32px);
}
.say__list li {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 12px 6px 26px;
  border: 1.5px solid var(--ink);
  position: relative;
  background: var(--paper);
}
.say__list li::before {
  content: "";
  position: absolute;
  left: 9px; top: 50%;
  width: 8px; height: 4px;
  border-left: 1.8px solid var(--ink);
  border-bottom: 1.8px solid var(--ink);
  transform: translateY(-70%) rotate(-45deg);
}
.say__list li:nth-child(odd) { background: var(--yellow); }

.say__shot img { width: 100%; border: 1.5px solid var(--ink); background: #fff; }
@media (max-width: 900px) { .say__shot { margin-top: 28px; max-width: 420px; } }

/* Hero foot with the caption removed — the actions carry the row alone. */
.hero__foot--solo { justify-content: flex-start; }

/* Image credit under an era figure — required by the CC BY sources. */
.era__credit {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* Product-page illustrations: full-bleed inside the figure, hairline framed. */
.shot {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border: 1.5px solid var(--ink);
}

/* --- 20. Legal pages ----------------------------------------------------
   Terms, privacy, refunds, contact. Long prose in a site whose every other
   page is a grid: one column, one measure, and a hairline before each
   heading so a reader can find a clause by scanning rather than reading. */

.legal {
  padding-block: clamp(48px, 7vh, 96px) clamp(72px, 11vh, 148px);
  max-width: 74ch;
  color: var(--ink-soft);
}

.legal h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.32;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-top: clamp(40px, 5.5vh, 68px);
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
}
.legal h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

.legal p {
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.72;
  margin-top: 14px;
}

.legal strong { color: var(--ink); font-weight: 700; }

.legal a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
}
.legal a:hover, .legal a:focus-visible { text-decoration-color: var(--yellow); }

/* The date sits above the first clause, in the site's label voice. */
.legal__meta {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: clamp(32px, 4.5vh, 56px);
}

/* An unfilled placeholder that must not ship unnoticed. */
.legal__todo {
  border-left: 3px solid var(--yellow);
  background: var(--paper-deep);
  padding: 14px 18px;
  color: var(--warn);
}
