/* ==========================================================================
   Parallel Machines / pages/home.css
   The homepage (site/index.html, assets/js/pages/home.js):
     1 hero      c10 footage (two arms in step: the machine and its record) on a deep band
     2 live      four KPI tiles on the same band
     3 atlas     seven sector tiles (treated footage stills) + the way into the atlas
     4 machines  the procedural twin stage, the machine passport, "Print a twin"
     5 research  three issue cards
     6 closing   "Follow the record."
   Solid = the machine / now; dots = the twin / the record. Reads the tokens and
   semantic surface variables; adds nothing to the shared files.
   ========================================================================== */

/* the film's own backdrop (sampled from the treated c10 frames): the band behind the
   footage and the live strip continue it, so the frame dissolves into the page */
.home-top {
  --film-0: #0E1A49;
  --film-1: #112256;
  --film-2: #13214F;
  --film-3: #0C1846;
  background: var(--film-2);
}

/* ==========================================================================
   1. HERO
   ========================================================================== */
/* 100svh between 640 and 940 px (spec), but never shorter than its copy (short laptop screens) */
.home-hero.hero-frame { height: auto; min-height: clamp(640px, 100svh, 940px); max-height: none; }
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, var(--film-0) 0%, var(--film-1) 56%, var(--film-2) 100%);
  color: var(--fg);
}
.home-hero > .grain { z-index: 0; }
.home-hero > .grain::before { opacity: .55; }

/* the film: right of the copy, full height, feathered into the band on the left and at the bottom */
.home-hero__film.footage--fill { left: 34%; right: 0; z-index: 0; margin: 0; }
.home-hero__film .footage__stage {
  background: transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 21%), linear-gradient(180deg, #000 74%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 21%), linear-gradient(180deg, #000 74%, transparent 100%);
  mask-composite: intersect;
}
/* subtle parallax (home.js writes --hero-p 0..1 while the hero scrolls away) */
.home-hero__film { transform: translate3d(0, calc(var(--hero-p, 0) * 9%), 0); will-change: transform; }
.home-hero__copy { transform: translate3d(0, calc(var(--hero-p, 0) * -5%), 0); opacity: calc(1 - var(--hero-p, 0) * .55); }
/* keyboard focus back in the hero (Shift+Tab up from the strip) lifts the scroll fade: a focused CTA is never faint */
.home-hero:focus-within .home-hero__copy { opacity: 1; transform: none; }

/* registration marks around the film, like a printed plate */
.home-hero__marks {
  position: absolute;
  z-index: 1;
  top: calc(var(--header-h) + 28px);
  bottom: 34px;
  left: 50%;
  right: var(--page-margin);
  pointer-events: none;
  --m: rgba(255,255,255,.42);
  background:
    linear-gradient(var(--m), var(--m)) 0 0 / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 0 / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 0 / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 0 / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 100% / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 100% / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 100% / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 100% / 1px 14px no-repeat;
}

/* the caption: a mono fig. line on the film's dark lower edge */
.home-hero__fig {
  position: absolute;
  z-index: 2;
  right: var(--page-margin);
  bottom: 44px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 0;
  max-width: 94%;                 /* of the film (66% of the hero) */
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .04em;
  color: rgba(255,255,255,.78);
  text-align: right;
}
.home-hero__fig > * + *::before { content: "\00B7"; margin: 0 .6em; opacity: .6; }
.home-hero__fig b { font-weight: 500; color: var(--white); font-variant-numeric: tabular-nums; }
.home-hero__tc[hidden] { display: none; }

.home-hero__inner { position: relative; z-index: 2; }
.home-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 2.4vh, 28px);
  width: min(100%, 35rem);
  padding-top: calc(var(--header-h) + 8px);
  padding-bottom: 24px;
}
.home-hero__chip { min-height: 30px; }
/* the staircase: Every / machine / has a step .75em; "twin." skips a step. The lockup (dot-text.js): its dot twin
   prints over the word, then splits off up and to the right and settles one row up, on the "has a" baseline right of
   "has a" (data-dot-offset="0.18,-1.04": -1.04 em = --scatter-row), about 0.26 em clear of the serif's ink top, its
   right edge about 0.15 em past the word's. Keep --scatter-row and that offset equal. */
.home-hero__title {
  --scatter-size: min(clamp(3.75rem, 7.4vw, 7.25rem), 11.6svh);
  --scatter-col: .75em;
  --scatter-row: 1.04em;
  margin-top: 2px;
}
.home-hero__sub {
  max-width: 31em;
  font-size: var(--fs-lead);
  line-height: 1.45;
  letter-spacing: -.005em;
  color: var(--fg);
  text-wrap: pretty;
}
.home-hero__cta { margin-top: 4px; gap: 14px 26px; }
.home-hero .link-arrow { font-size: 1.0625rem; }
/* the proof line under the CTAs: what the atlas is made of (counts and date bound from ecosystem.json) */
.home-hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin-top: -2px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .04em;
  color: var(--fg-2);
}
.home-hero__proof > * + *::before { content: "\00B7"; margin: 0 .6em; opacity: .6; }
.home-hero__proof b { font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; }

/* tablets in landscape and small laptops (900-1099.98 px): the two-column hero stays, with a narrower copy column
   and the film from 38%, so the subline and "Open the atlas" sit above the fold (1024x768, 1024x600, 960x640) */
@media (min-width: 900px) and (max-width: 1099.98px) {
  .home-hero.hero-frame { min-height: clamp(640px, 100svh, 940px); justify-content: center; }
  .home-hero__film.footage--fill { inset: 0 0 0 38%; }
  .home-hero__marks { left: 48%; }
  .home-hero__copy { width: min(100%, 26rem); gap: clamp(14px, 2.2vh, 24px); padding-bottom: 16px; }
  .home-hero__title { --scatter-size: min(clamp(3.5rem, 7.4vw, 6rem), 10.6svh); }
  .home-hero__sub { font-size: 1.0625rem; }
  .home-hero__fig { bottom: 40px; max-width: 56%; }
  .home-hero__fig > :nth-child(3) { display: none; }                  /* the timecode: one caption line */
}
/* where the proof line cannot hold one line (the narrow copy column, phones), the date takes the second line, with no
   orphan separator in front of it */
@media (min-width: 900px) and (max-width: 1099.98px), (max-width: 599.98px) {
  .home-hero__proof > :last-child { flex-basis: 100%; }
  .home-hero__proof > :last-child::before { content: none; }
}

/* phones and portrait tablets (< 900 px): the film is a shorter band on top, the copy below it */
@media (max-width: 899.98px) {
  .home-hero { --band-h: clamp(200px, 34svh, 400px); }
  .home-hero.hero-frame { height: auto; max-height: none; min-height: 0; justify-content: flex-start; padding-bottom: 40px; }
  .home-hero__film.footage--fill {
    position: relative;
    inset: auto;
    width: 100%;
    height: var(--band-h);
    transform: none;
  }
  .home-hero__film .footage__stage {
    -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  }
  .home-hero__marks { display: none; }
  .home-hero__fig {
    position: absolute;
    top: calc(var(--band-h) - 30px);   /* on the band's faded lower edge, clear of the machines */
    bottom: auto;
    right: var(--page-margin);
    left: var(--page-margin);
    max-width: none;
    font-size: 10px;
  }
  .home-hero__fig > :nth-child(3) { display: none; }
  .home-hero__copy { padding-top: 0; margin-top: 2px; width: 100%; gap: 18px; transform: none; opacity: 1; }
  .home-hero__title { --scatter-size: min(clamp(3rem, 11.6vw, 5.5rem), 7.4svh); }
  .home-hero__sub { font-size: 1.125rem; max-width: 34em; }
}
@media (max-width: 599.98px) {
  .home-hero__fig > :nth-child(2) { display: none; }                  /* one line on phones: fig. 01 · dots: its record */
  /* the live chip moves below the CTAs (and the proof line), so the subline and the first CTA stay above the fold */
  .home-hero__chip { order: 1; margin-top: -4px; }
  .home-hero__sub { font-size: 1.0625rem; line-height: 1.42; }
  .home-hero__proof { margin-top: -6px; }
}
@media (max-width: 767.98px) {
  .home-hero__title.scatter { --scatter-step: var(--scatter-col); }   /* keep the stair step (components.css narrows it under 768) */
  .home-hero__cta .btn--lg { --btn-h: 50px; padding: 0 20px; }
}

/* ==========================================================================
   2. LIVE STRIP
   ========================================================================== */
.home-live {
  position: relative;
  padding-block: clamp(20px, 2.6vw, 36px) clamp(24px, 2.2vw, 32px);
  background: linear-gradient(180deg, var(--film-2) 0%, var(--film-3) 100%);
}
.home-live__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "index more" "title meta";
  align-items: end;
  gap: 12px var(--gutter);
  margin-bottom: 20px;
  padding-top: 12px;
  border-top: var(--hair) solid var(--line-strong);
}
.home-live__index { grid-area: index; border-top: 0; padding-top: 0; }
.home-live__title { grid-area: title; font-size: clamp(1.75rem, 2.6vw, 2.5rem); line-height: 1.05; }
.home-live__more { grid-area: more; justify-self: end; align-self: center; padding: 0; }
.home-live__meta { grid-area: meta; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 28px; padding-bottom: 4px; }
.home-live__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .04em;
  color: var(--fg-2);
}
.home-live__legend > span { display: inline-flex; align-items: center; gap: 8px; }
.home-live__legend .sw { color: var(--fg); }
.home-live__source { font-size: var(--fs-micro); }
.home-live__source .live-status { font-size: var(--fs-micro); }

.home-live .kpi-strip { border-top-color: var(--line-strong); }
.home-live .kpi { padding: 18px 22px 14px; }
.home-live .kpi-strip > .kpi:first-child { padding-left: 0; }
.home-live__kpis[aria-busy="true"] { min-height: 214px; }
/* one neutral line under the strip: the 30-day record next to peaq's own count, and where the gap is explained */
.home-live__context {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 0;
  margin-top: 12px;
  padding-top: 10px;
  border-top: var(--hair) solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .03em;
  line-height: 1.5;
  color: var(--fg-2);
}
.home-live__context > * + *::before { content: "\00B7"; margin: 0 .7em; opacity: .6; }
.home-live__context b { font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; }
.home-live__context a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.home-live__context a:hover { text-decoration-color: currentColor; }
.home-live__why { display: inline-flex; align-items: center; gap: .45em; white-space: nowrap; text-decoration: none !important; }
.home-live__why .i { width: .9em; height: .9em; transition: transform var(--dur-1) var(--ease); }
.home-live__why:hover .i { transform: translateX(3px); }
@media (max-width: 767.98px) {
  .home-live__context { flex-direction: column; align-items: flex-start; gap: 4px; }
  .home-live__context > * + *::before { content: none; }
}

@media (max-width: 899.98px) {
  .home-live__head { grid-template-areas: "index more" "title title" "meta meta"; }
  .home-live__meta { justify-content: flex-start; gap: 8px 20px; }
}
/* phones: two tiles per row (the shared strip goes to one column under 480 px) */
@media (max-width: 479.98px) {
  .home-live .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-live .kpi-strip > .kpi { padding: 14px 10px 12px 12px; border-left: var(--hair) solid var(--line); }
  .home-live .kpi-strip > .kpi:nth-child(odd) { border-left: 0; padding-left: 0; }
  .home-live .kpi-strip > .kpi + .kpi { border-top: 0; }
  .home-live .kpi-strip > .kpi:nth-child(n+3) { border-top: var(--hair) solid var(--line); }
  .home-live .kpi__label { font-size: var(--fs-micro); letter-spacing: .06em; }
  .home-live .kpi__note { display: none; }
  .home-live .kpi[data-kpi] .kpi__num { font-size: min(2rem, 15.5cqi); }
  .home-live .kpi__spark { height: 34px; }
}

/* ==========================================================================
   3. ATLAS PREVIEW
   ========================================================================== */
.home-atlas { padding-block: clamp(48px, 5.2vw, 76px); }
.home-atlas__head { margin-bottom: clamp(24px, 2.8vw, 40px); }
.home-atlas__title { --scatter-col: 1.6em; --scatter-row: 1em; }
.home-atlas__intro { font-size: 1rem; }

.sectors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 2.6vw, 40px) var(--gutter);
  margin: 0;
  padding: 0;
  list-style: none;
}
.sector { min-width: 0; }
.sector__link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  color: var(--fg);
  border-radius: var(--r-1);
}
.sector__link:focus-visible { outline-offset: 6px; }
.sector__plate {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-1);
  background: var(--print-1);
  transition: transform var(--dur-2) var(--ease);
}
.sector__img,
.sector__twin {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* two layers rendered through the footage shader (assets/img/home/<clip>-print.webp + -twin.webp, 800x450): they
   stack into the treated still; on hover or focus the twin steps out ("the twin moves") */
.sector__img { transition: transform var(--dur-3) var(--ease); }
.sector__twin {
  z-index: 1;
  opacity: .94;
  transform: translate(0, 0);
  transition: transform var(--dur-3) var(--ease), opacity var(--dur-2) var(--ease);
  pointer-events: none;
}
.sector__link:hover .sector__twin,
.sector__link:focus-visible .sector__twin { opacity: 1; transform: translate(var(--twin-step-lg), calc(-1 * var(--twin-step-lg))); }
.sector__link:hover .sector__img,
.sector__link:focus-visible .sector__img { transform: scale(1.025); }
.sector__link:hover .sector__plate,
.sector__link:focus-visible .sector__plate { transform: translateY(-2px); }
/* plate corner marks + index */
.sector__plate::before, .sector__plate::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 10px; height: 10px;
  border: 0 solid rgba(255,255,255,.7);
  pointer-events: none;
}
.sector__plate::before { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; }
.sector__plate::after { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; }
.sector__no {
  position: absolute;
  z-index: 2;
  top: 9px; left: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  color: rgba(255,255,255,.88);
}
.sector__text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 12px;
}
.sector__name {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.8vw, 1.875rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.sector__count {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
}
.sector__count b { font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; }
.sector__names {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: var(--hair) solid var(--line);
  font-size: .875rem;
  line-height: 1.45;
  color: var(--fg-2);
}
.sector__names:empty::before { content: "\00a0"; }

/* the eighth cell: the way in */
.sector--cta .sector__link {
  justify-content: flex-end;
  gap: 10px;
  min-height: 100%;
  padding: 22px 22px 20px;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  transition: background-color var(--dur-1) var(--ease);
}
.sector--cta .sector__link::before {
  /* a field of the record's dots, top right */
  content: "";
  position: absolute;
  z-index: -1;
  top: 18px; right: 18px;
  width: 58%; height: 48%;
  background: var(--white);
  opacity: .16;
  -webkit-mask: radial-gradient(circle at 100% 0, #000 0, #000 30%, transparent 72%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='3' height='3'/%3E%3C/svg%3E") 0 0 / 8px 8px repeat;
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle at 100% 0, #000 0, #000 30%, transparent 72%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='3' height='3'/%3E%3C/svg%3E") 0 0 / 8px 8px repeat;
  mask-composite: intersect;
  transition: transform var(--dur-3) var(--ease), opacity var(--dur-2) var(--ease);
}
.sector--cta .sector__link:hover { background: var(--ultramarine); }
.sector--cta .sector__link:hover::before { transform: translate(var(--twin-step), calc(-1 * var(--twin-step))); opacity: .28; }
.sector--cta .sector__link:focus-visible { outline-color: var(--electric); }
.sector__cta-k { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: var(--tr-label); text-transform: uppercase; color: rgba(255,255,255,.72); }
.sector__cta-t { display: inline-flex; align-items: center; gap: .3em; font-family: var(--font-serif); font-size: clamp(2rem, 2.5vw, 2.5rem); line-height: 1; letter-spacing: -.01em; }
.sector__cta-t .i { width: .62em; height: .62em; transition: transform var(--dur-1) var(--ease); }
.sector--cta .sector__link:hover .i { transform: translateX(5px); }
.sector__cta-s { max-width: 26ch; font-size: .875rem; line-height: 1.45; color: rgba(255,255,255,.78); }
/* the tile holds two links: the way into the atlas (the whole tile) and, on its foot, a suggestion on X */
.sector--cta { position: relative; }
.sector--cta .sector__link { padding-bottom: 54px; }
.sector__suggest {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding-top: 10px;
  border-top: var(--hair) solid rgba(255,255,255,.22);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .04em;
  color: rgba(255,255,255,.86);
  border-radius: 0;
}
.sector__suggest .i { width: .95em; height: .95em; transition: transform var(--dur-1) var(--ease); }
.sector__suggest:hover { color: var(--white); }
.sector__suggest:hover .i { transform: translate(2px, -2px); }
.sector__suggest:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

@media (max-width: 1023.98px) {
  .sectors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sectors > .sector--cta { grid-column: span 2; }
}
@media (max-width: 767.98px) {
  .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .sectors > .sector--cta { grid-column: auto; }
  .sector__link { gap: 10px; }
  .sector__text { grid-template-columns: 1fr; gap: 4px; }
  .sector__name { font-size: 1.3125rem; }
  .sector__names { font-size: .8125rem; padding-top: 6px; }
  .sector__count { order: 3; }
  .sector--cta .sector__link { padding: 16px 14px 14px; }
  .sector__cta-t { font-size: 1.625rem; }
  .sector__cta-s { font-size: .8125rem; }
  .sector--cta .sector__link { padding-bottom: 66px; }
  .sector__suggest { left: 14px; right: 14px; bottom: 12px; font-size: 10px; letter-spacing: .02em; }
}

/* ==========================================================================
   4. MACHINES & TWINS
   ========================================================================== */
.home-machines {
  padding-block: clamp(48px, 4.5vw, 64px) clamp(40px, 3.6vw, 52px);
  overflow: hidden;
}
.home-machines__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas: "copy copy copy copy copy stage stage stage stage stage stage stage"
                       "card card card card card stage stage stage stage stage stage stage";
  grid-template-rows: auto 1fr;
  column-gap: var(--gutter);
  row-gap: clamp(24px, 2.2vw, 30px);
  position: relative;
  z-index: 2;
}
.home-machines__copy { grid-area: copy; display: flex; flex-direction: column; gap: 18px; }
.home-machines__title { font-size: var(--fs-h2); line-height: 1.02; }
.home-machines__body { max-width: 40ch; color: var(--fg-2); }

.home-machines__stage { grid-area: stage; position: relative; margin: 0 calc(var(--page-margin) * -.5) 0 0; min-height: 560px; display: flex; flex-direction: column; }
.home-machines__stage .twin-stage { position: relative; flex: 1; min-height: 420px; container-type: size; }
/* before the stage starts (it is created when the section nears the viewport) its framed still holds the place */
.home-machines__stage .twin-stage:not([data-twin-state]) .twin-stage__fallback,
.home-machines__stage .twin-stage[data-twin-state="loading"] .twin-stage__fallback {
  inset: auto;
  left: 50%;
  top: 50%;
  width: min(160cqh, calc(160cqw / var(--twin-frame-aspect, .96)));
  height: min(100cqh, calc(100cqw / var(--twin-frame-aspect, .96)));
  object-fit: fill;
  transform: translate(-50%, -50%);
}
.home-machines__meta { padding-top: 12px; border-top: var(--hair) solid var(--line); }
/* on the light lower sky the fig. index, the device names and the caption switch to ink: full ink keeps them at 4.5:1
   or more on the lightest sky (ink-2 measured 3.1-3.9:1 there); the active fig is marked by its filled bar and weight */
@media (min-width: 1024px) {
  .home-machines__meta {
    --fg: var(--ink); --fg-2: var(--ink); --fg-3: var(--ink);
    --line: var(--line-on-paper); --line-strong: var(--line-on-paper-strong); --focus: var(--ink);
    color: var(--fg);
  }
  .home-machines__meta .twin-fig[aria-pressed="true"] { font-weight: 500; }
}

/* the passport: a paper document on the sky */
.passport {
  grid-area: card;
  align-self: end;
  position: relative;
  --bg: var(--paper); --fg: var(--ink); --fg-2: var(--ink-2); --fg-3: var(--ink-3);
  --line: var(--line-on-paper); --line-strong: var(--line-on-paper-strong); --focus: var(--electric); --accent: var(--electric);
  --btn-bg: var(--ink); --btn-fg: var(--white); --btn-bg-hover: var(--electric); --btn-fg-hover: var(--white);
  --well: rgba(7,14,58,.035); --dot-color: var(--ink);
  max-width: 34rem;
  padding: 18px 22px 18px;
  border-radius: var(--r-2);
  background: var(--paper);
  color: var(--fg);
  box-shadow: var(--shadow-float);
}
/* its dotted twin, a step behind (the record of the document) */
.passport::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--white);
  opacity: .5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='5'%3E%3Crect width='2' height='2'/%3E%3C/svg%3E") 0 0 / 5px 5px repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='5'%3E%3Crect width='2' height='2'/%3E%3C/svg%3E") 0 0 / 5px 5px repeat;
  transform: translate(12px, -12px);
  transition: transform var(--dur-3) var(--ease);
}
.passport:hover::before, .passport:focus-within::before { transform: translate(16px, -16px); }
.passport__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: var(--hair) solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-2);
}
.passport__id { color: var(--fg); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.passport__name {
  margin: 12px 0 4px;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 2.2vw, 2.25rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.01em;
}
.passport__rows { margin: 8px 0 0; }
.passport__row {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr);
  gap: 10px;
  padding: 5px 0;
  border-bottom: var(--hair) solid var(--line);
}
.passport__row dt {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--fg-3);
}
.passport__row dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: .9375rem; line-height: 1.35; min-width: 0; }
.passport__sub { font-size: .8125rem; color: var(--fg-3); }
.passport__did {
  font-family: var(--font-mono);
  font-size: .8125rem;
  letter-spacing: 0;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.passport__flag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg-2);
  background-image:
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 3px),
    repeating-linear-gradient(180deg, currentColor 0 1px, transparent 1px 3px),
    repeating-linear-gradient(180deg, currentColor 0 1px, transparent 1px 3px);
  background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: no-repeat;
}
[data-mod] { font-weight: 500; }
[data-mod][data-status]::after,
[data-mod-status][data-status]::after {
  content: attr(data-status);
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.passport__foot { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 16px; padding-top: 14px; }
.passport__fine { font-size: .8125rem; line-height: 1.4; color: var(--fg-2); }
.passport__src { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .03em; color: var(--fg-3); }
.passport__v b { font-weight: 500; }
/* the example DID on its own line, cut with an ellipsis (the full value is in its title) */
.passport__didrow { display: flex; align-items: center; gap: 8px; flex-basis: 100%; min-width: 0; }
.passport__didrow .passport__did { min-width: 0; flex: 0 1 auto; }
.passport__didrow .passport__flag { flex: none; }
.passport__off {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .03em;
  color: var(--fg-3);
}
.passport__print[aria-busy="true"] { opacity: .7; pointer-events: none; }

@media (max-width: 1023.98px) {
  .home-machines__grid { grid-template-areas: "copy" "stage" "card"; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .home-machines__stage { margin: 0; min-height: 0; }
  .home-machines__stage .twin-stage { flex: none; height: clamp(300px, 62vw, 520px); min-height: 0; }
  .passport { max-width: none; justify-self: stretch; align-self: start; }
}
@media (max-width: 767.98px) {
  .home-machines__body { font-size: 1rem; }
  .passport { padding: 14px 14px 16px; }
  .passport::before { transform: translate(8px, -8px); }
  .passport__row { grid-template-columns: 5.2rem minmax(0, 1fr); }
  .passport__foot { grid-template-columns: 1fr; }
}

/* ==========================================================================
   "Print a twin": the drawer with the card
   ========================================================================== */
.home-print.drawer { width: min(640px, 100%); }
.home-print__card { margin: 4px 0 16px; }
.home-print__card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 675;
  border-radius: var(--r-1);
  background: var(--sky);
  box-shadow: 0 1px 0 var(--line), 0 18px 36px -24px rgba(7,14,58,.6);
}
.home-print__card.is-printing img { animation: home-print-out 1.1s var(--ease) both; }
@keyframes home-print-out {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-14px); }
  to { clip-path: inset(0 0 0 0); transform: none; }
}
.home-print__cap { margin-top: 10px; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .03em; color: var(--fg-3); }
.home-print__note { margin-top: 4px; }
.home-print__status { min-height: 1.4em; margin-top: 10px; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: .03em; color: var(--fg-2); }
.home-print .drawer__foot { flex-wrap: wrap; }
.home-print .drawer__title { font-size: clamp(1.75rem, 3vw, 2.25rem); }

/* ==========================================================================
   5. RESEARCH
   ========================================================================== */
.home-research { padding-block: clamp(48px, 5.2vw, 76px); }
.home-research__head { margin-bottom: clamp(24px, 2.6vw, 36px); }
.home-research__head .section-head__intro { max-width: 58ch; }
.home-research__all { margin-left: 4px; white-space: nowrap; }
.issues {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 40px) var(--gutter);
}
.home-research .issue-card { gap: 12px; }
.home-research .issue-card__cover { aspect-ratio: 16 / 9; }
.home-research .issue-card__abstract {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 1023.98px) {
  .issues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* phones: compact rows (thumbnail + text), so three issues fit in one screen */
@media (max-width: 767.98px) {
  .issues { grid-template-columns: 1fr; gap: 0; }
  .home-research .issue-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-areas: "cover kicker" "cover title" "cover meta";
    align-content: start;
    gap: 4px 14px;
    padding: 16px 0;
    border-top: var(--hair) solid var(--line);
  }
  .home-research .issue-card:last-child { border-bottom: var(--hair) solid var(--line); }
  .home-research .issue-card__cover { grid-area: cover; aspect-ratio: 1 / 1; align-self: start; }
  .home-research .issue-card__no { top: 6px; left: 6px; font-size: 10px; padding: 2px 5px 1px; }
  .home-research .issue-card__kicker { grid-area: kicker; }
  .home-research .issue-card__title { grid-area: title; font-size: 1.5rem; }
  .home-research .issue-card__abstract { display: none; }
  .home-research .issue-card__meta { grid-area: meta; border-top: 0; padding-top: 2px; }
}

/* ==========================================================================
   6. CLOSING
   ========================================================================== */
/* the band runs deep to ultramarine (the ultra surface flipped), so it meets the footer's ink without a bright seam */
.home-close {
  background-image: linear-gradient(180deg, #0B3A9C 0%, #0B1A8C 100%);
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 4.8vw, 70px);
}
.home-close__inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.home-close__index { width: min(100%, 36rem); }
.home-close__title {
  font-size: clamp(3.25rem, 7vw, 6.75rem);
  line-height: .92;
  letter-spacing: var(--tr-display);
  max-width: 9em;
}
.home-close__sub { font-size: var(--fs-lead); color: var(--fg-2); }
.home-close .btn-row { margin-top: 8px; }
.home-close__work {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .04em;
  color: var(--fg-2);
}
.home-close__work a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.home-close__work a:hover { text-decoration-color: currentColor; }
.home-close__work .sep { opacity: .6; }

/* the mark at scale: the solid square (the machine) and its 3x3 dot twin (the record). The twin drifts with
   scroll (home.js writes --close-p 0..1). */
.home-close__mark {
  position: absolute;
  z-index: 1;
  right: calc(max(var(--page-margin), (100% - var(--max)) / 2) + var(--mark) * .3);
  top: 50%;
  display: flex;
  align-items: flex-end;
  gap: calc(var(--mark) * .26);
  --mark: clamp(64px, 6.4vw, 96px);
  transform: translateY(-50%);
  pointer-events: none;
}
.home-close__solid,
.home-close__twin { width: var(--mark); height: var(--mark); }
.home-close__solid { background: var(--white); }
.home-close__twin {
  --c: calc(var(--mark) / 4);
  background:
    linear-gradient(var(--white), var(--white)) 0 0 / var(--c) var(--c) no-repeat,
    linear-gradient(var(--white), var(--white)) 50% 0 / var(--c) var(--c) no-repeat,
    linear-gradient(var(--white), var(--white)) 100% 0 / var(--c) var(--c) no-repeat,
    linear-gradient(var(--white), var(--white)) 0 50% / var(--c) var(--c) no-repeat,
    linear-gradient(var(--white), var(--white)) 50% 50% / var(--c) var(--c) no-repeat,
    linear-gradient(var(--white), var(--white)) 100% 50% / var(--c) var(--c) no-repeat,
    linear-gradient(var(--white), var(--white)) 0 100% / var(--c) var(--c) no-repeat,
    linear-gradient(var(--white), var(--white)) 50% 100% / var(--c) var(--c) no-repeat,
    linear-gradient(var(--white), var(--white)) 100% 100% / var(--c) var(--c) no-repeat;
  /* the record follows the machine: it trails below and settles level as the band scrolls in */
  transform: translate3d(calc((1 - var(--close-p, 1)) * 18%), calc((1 - var(--close-p, 1)) * 42%), 0);
  opacity: .9;
}
/* tablets: the mark sits low on the right at a size that stays clear of the copy: its left edge lands at about
   75% of the band, past the subline and the "Check our work" line (a 120 px mark ran into both at 768) */
@media (max-width: 1023.98px) {
  .home-close__mark { --mark: clamp(48px, 8vw, 72px); top: auto; bottom: clamp(40px, 7vw, 72px); transform: none; }
}
@media (max-width: 767.98px) {
  .home-close__mark { display: none; }
  .home-close__inner { gap: 16px; }
  .home-close .btn--lg { --btn-h: 52px; padding: 0 18px; font-size: 1rem; white-space: normal; text-align: left; }
}

/* ==========================================================================
   Reduced motion: no parallax, the twin sits still
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .home-hero__film, .home-hero__copy { transform: none !important; opacity: 1 !important; }
  .home-close__twin { transform: none !important; }
  .sector__twin, .sector__img, .sector__plate, .passport::before { transition: none; }
  .home-print__card.is-printing img { animation: none; }
}
