/* Dither Studio publicity site.
   One stylesheet, the console's own house style: void ground, ivory type,
   lapis for data, hairlines for structure. The page opens on the film, then
   makes its claim and its ask, then shows the press one station at a time. */

/* ---------- type ----------
   Instrument Serif for display, Instrument Sans for text, IBM Plex Mono for the
   labels and data. All three are OFL and stored in assets/fonts/, so the page
   still asks no third party for anything. */

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/InstrumentSans-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/IBMPlexMono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/IBMPlexMono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --void: #0B0D12;
  --panel: #121722;
  --panel-2: #0E131C;
  --edge: #293244;
  --line: #1C2434;
  --ivory: #EFEADF;
  --paper: #EFEADF;
  --ink: #0B0D12;
  --muted: #A1A9B8;
  --lapis: #7E93BE;
  --lapis-deep: #4D607F;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Cascadia Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --measure: 62ch;
}

* { box-sizing: border-box; }

html {
  background: var(--void);
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ivory);
  font: 400 17px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: a scroll container on the body breaks ScrollTrigger's pin */
  overflow-x: clip;
}

[hidden] { display: none !important; }

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--ivory); text-decoration-color: var(--edge); text-underline-offset: 0.22em; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  /* a headline sets as a block, not as a rag */
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

::selection { background: var(--lapis); color: var(--void); }

:focus-visible {
  outline: 2px solid var(--lapis);
  outline-offset: 3px;
  border-radius: 2px;
}

section[tabindex="-1"]:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--ivory);
  color: var(--void);
  font: 500 14px/1 var(--sans);
  text-decoration: none;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

/* ---------- masthead ---------- */

/* fixed, not sticky: the film has to start at the top edge of the window */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--gutter);
  background: var(--void);
  border-bottom: 1px solid var(--line);
}

.masthead__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font: 400 17px/1 var(--serif);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex: none;
}

/* the film's own mark, in the tile the close card gives it */
.masthead__logo {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 9px;
  border: 1px solid var(--line);
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.45rem, 1.5vw, 1.35rem);
  scroll-target-group: auto;
}

.masthead__nav a {
  font: 400 13.5px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.55rem 0.15rem;
  white-space: nowrap;
  transition: color 140ms var(--ease-out);
}

.masthead__nav a:is(:target-current, [aria-current="location"]) {
  color: var(--ivory);
  box-shadow: inset 0 -1.5px 0 var(--lapis);
}

.masthead__take {
  color: var(--void) !important;
  background: var(--ivory);
  padding: 0.6rem 0.95rem !important;
  border-radius: 3px;
  transition: background 140ms var(--ease-out);
}
.masthead__take:active { transform: scale(0.98); }

/* ---------- the stage: the film is the first thing on the page ---------- */

.stage {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

.stage__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

/* The second encode sits exactly over the first and is hidden until the
   playhead passes the intro's end; one of the two is ever visible. */
.stage__video[data-part="rest"] {
  position: absolute;
  inset: 0;
  visibility: hidden;
}

.stage__video[data-part="rest"].is-live { visibility: visible; }

.stage__spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* deslop-ignore-next-line 06 */
  background: radial-gradient(120% 90% at 50% 42%, transparent 34%, rgba(4, 6, 10, 0.72) 100%);
}

/* type over an ordered dither needs a floor to sit on */
.stage__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* a floor for the type, not atmosphere: no caption survives a dither
     without it, and the vignette above is what gives the frame its depth */
  /* deslop-ignore-next-line 06 */
  background: linear-gradient(to top,
    rgba(4, 6, 10, 0.94) 0%,
    rgba(4, 6, 10, 0.72) 22%,
    rgba(4, 6, 10, 0.2) 46%,
    transparent 64%);
}

.beats {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  padding: 0 var(--gutter) clamp(3rem, 9vh, 5.4rem);
  pointer-events: none;
}

/* one caption at a time: every beat shares a cell, so the stack never grows
   and the type never lands on top of another beat */
.beat {
  grid-area: 1 / 1;
  align-self: end;
  max-width: 46ch;
}

.beat h1 {
  font-size: clamp(2.7rem, 7.2vw, 5.6rem);
  line-height: 0.96;
  margin: 0 0 0.9rem;
  max-width: 15ch;
}

.beat h2 {
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  line-height: 1.02;
  margin: 0 0 0.7rem;
}

.beat p {
  margin: 0;
  color: var(--ivory);
  opacity: 0.84;
  max-width: 42ch;
}

.beat__lede { font-size: clamp(1rem, 1.4vw, 1.14rem); }

.stage__hint {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(2.2rem, 5.5vh, 3.4rem);
  margin: 0;
  font: 400 13px/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: opacity 320ms var(--ease-out);
}
.stage__hint.is-gone { opacity: 0; }

/* ---------- still mode: no film, the poster and the captions in flow ----------
   Set by site.js for phones, reduced motion and save-data; the no-JS page gets
   the same treatment. */

.stage[data-mode="still"],
body.no-js .stage {
  height: auto;
  min-height: 0;
  overflow: visible;
  background: var(--void);
}

.stage[data-mode="still"] .stage__video,
.stage[data-mode="still"] .stage__spot,
.stage[data-mode="still"] .stage__scrim,
.stage[data-mode="still"] .stage__hint,
body.no-js .stage__video,
body.no-js .stage__spot,
body.no-js .stage__scrim,
body.no-js .stage__hint { display: none; }

.stage[data-mode="still"]::before,
body.no-js .stage::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 9;
  background: #000 url(assets/poster.jpg) center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.stage[data-mode="still"] .beats,
body.no-js .beats {
  position: static;
  display: block;
  padding: clamp(2.2rem, 6vh, 3.6rem) var(--gutter) clamp(2rem, 6vh, 3.2rem);
}

.stage[data-mode="still"] .beat,
body.no-js .beat {
  margin: 0 0 2rem;
  max-width: var(--measure);
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
.stage[data-mode="still"] .beat:last-child,
body.no-js .beat:last-child { margin-bottom: 0; }

/* ---------- the claim, with the ask ---------- */

.claim {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) var(--gutter) clamp(3rem, 8vh, 5rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: 4.75rem;
}

.claim__title {
  max-width: 18ch;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.98;
  margin: 0 0 1.4rem;
}

.claim__body {
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 2.4rem;
}

.claim__take {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 2rem;
}

.claim__fine {
  margin: 0;
  font: 400 13px/1.65 var(--mono);
  color: var(--muted);
  max-width: 34ch;
}

.claim__demo {
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--lapis);
  color: var(--ivory);
  font: 500 11px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- the web demo ---------- */

.demo {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) var(--gutter) clamp(3.2rem, 8vh, 5.2rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: 4.75rem;
}

.demo__head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.2rem clamp(1.5rem, 5vw, 4.5rem);
  align-items: end;
  margin-bottom: clamp(1.8rem, 4vh, 2.8rem);
}

.demo__head h2 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.4rem, 5.4vw, 4.8rem);
  line-height: 0.96;
}

.demo__lede {
  margin: 0 0 0.25rem;
  max-width: 44ch;
  color: var(--muted);
}

.demo__lede a {
  color: var(--ivory);
  text-decoration: none;
  border-bottom: 1px solid var(--lapis);
}

.demo__window {
  position: relative;
  border: 1px solid var(--edge);
  background: var(--panel-2);
}

.demo__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 39px;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 400 11px/1.35 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.demo__bar--foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.demo__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ivory);
}

.demo__dot {
  display: block;
  width: 5px;
  height: 5px;
  background: var(--lapis);
}

.demo__bar-meta {
  margin-left: auto;
  margin-right: 0.6rem;
}

.demo__close {
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--ivory);
  padding: 0.4rem 0.55rem;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.demo__stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}

.demo__stage > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.demo__stage iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--void);
}

.demo__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 2rem;
  /* the app shot is busier than the film: a floor for the start card, not
     atmosphere, so the card keeps its contrast wherever the proof lands */
  /* deslop-ignore-next-line 06 */
  background: linear-gradient(180deg, rgba(4, 6, 10, 0.38), rgba(4, 6, 10, 0.8));
  transition: opacity 240ms var(--ease-out);
}

.demo__start {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.05rem 1.45rem 1.15rem;
  background: var(--ivory);
  color: var(--void);
  text-decoration: none;
  box-shadow: 6px 6px 0 var(--lapis);
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}

.demo__start-label {
  font: 400 clamp(1.5rem, 2.4vw, 2.1rem)/1 var(--serif);
  letter-spacing: -0.01em;
}

.demo__start-meta {
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4A5366;
}

.demo__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.9rem;
  margin: 0;
  text-align: center;
  color: rgba(239, 234, 223, 0.72);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo__loading {
  padding: 0.85rem 1rem;
  border: 1px solid var(--edge);
  background: var(--void);
  color: var(--ivory);
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.demo[data-state="loading"] .demo__start,
.demo[data-state="live"] .demo__start {
  display: none;
}

.demo[data-state="live"] .demo__veil {
  opacity: 0;
  pointer-events: none;
}

.demo__bar--foot a {
  color: var(--ivory);
  text-decoration: none;
  border-bottom: 1px solid var(--edge);
}

.demo__bar a:focus-visible,
.demo__start:focus-visible,
.demo__close:focus-visible {
  outline: 2px solid var(--lapis);
  outline-offset: 3px;
}

/* ---------- panels ---------- */

.panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6rem) var(--gutter);
  border-top: 1px solid var(--line);
  scroll-margin-top: 4.75rem;
}

.panel--flip .panel__body { order: 2; }
.panel--flip .panel__figure { order: 1; }

.panel__body h2 {
  max-width: 15ch;
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
}

.panel__body p { color: var(--muted); max-width: 48ch; margin-bottom: 1em; }

.panel__figure { margin: 0; }

.panel__figure img {
  width: 100%;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: var(--panel);
}

.panel__figure figcaption {
  margin-top: 0.85rem;
  font: 400 13px/1.6 var(--mono);
  color: var(--muted);
  max-width: 54ch;
  text-wrap: pretty;
}

/* ---------- plugins ---------- */

.panel--full { grid-template-columns: minmax(0, 1fr); }
.panel--full .panel__body { max-width: 100%; }
.panel--full .panel__body > p { max-width: 68ch; }

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.2rem);
  margin-top: 2rem;
}

.plugin-card {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.plugin-card h3 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 2.1vw, 1.8rem);
  line-height: 1.05;
}

.plugin-card p {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}

.plugin-packs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.2rem);
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.plugin-packs__col h3 {
  margin: 0 0 0.45rem;
  color: var(--lapis);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plugin-packs__col p {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.panel--full .plugin-note {
  max-width: 72ch;
  margin: 1.8rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 400 13px/1.6 var(--mono);
}

/* =====================================================================
   The paper proof sheet
   The film and the console stay dark. The catalogue section becomes the
   sheet: full-bleed ivory, display-scale numbers, hard lapis shadows, and a
   loupe that lets a fine pointer inspect a proof in place.
   ===================================================================== */

.proofs {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--ivory);
  background: var(--paper);
  color: var(--ink);
  scroll-margin-top: 4.75rem;
}

.proofs__inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 7rem) var(--gutter) clamp(3.5rem, 9vh, 6rem);
}

.proofs__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.2rem clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.6rem, 6vh, 4.2rem);
}

.proofs__head h2 {
  max-width: 11ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
}

.proofs__head p {
  max-width: 36ch;
  margin: 0 0 0.5rem;
  color: #4D5564;
  font-size: 17px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 clamp(2.8rem, 7vh, 4.8rem);
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(11, 13, 18, 0.45);
  border-bottom: 1px solid rgba(11, 13, 18, 0.45);
}

.stats > div {
  padding: 1.2rem clamp(0.7rem, 1.6vw, 1.35rem) 1.45rem;
  border-left: 1px solid rgba(11, 13, 18, 0.18);
  background: transparent;
}

.stats > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.stats dt {
  margin-bottom: 1.05rem;
  color: var(--lapis-deep);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stats dd {
  margin: 0;
  color: var(--ink);
  font: 400 clamp(2.8rem, 5.2vw, 4.8rem)/0.86 var(--serif);
  font-variant-numeric: tabular-nums;
}

.proofs__shelf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem 3rem;
  margin: 0 0 1.8rem;
  padding-top: clamp(2rem, 5vh, 3.2rem);
  border-top: 1px solid rgba(11, 13, 18, 0.24);
}

.proofs__shelf-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: end;
  gap: 1.2rem 3rem;
  flex: 1 1 auto;
  min-width: 0;
}

.proofs__shelf-head h3 {
  margin: 0;
  max-width: 14ch;
  color: var(--ink);
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.proofs__shelf-head p {
  margin: 0;
  max-width: 40ch;
  color: #4D5564;
  font-size: 16px;
}

.proofs__shelf-head a {
  color: var(--ink);
  text-decoration-color: var(--lapis-deep);
}

.proofs__controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.proofs__controls[hidden] { display: none; }

.proofs__controls button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(11, 13, 18, 0.32);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 18px/1 var(--sans);
  cursor: pointer;
  transition: background 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.proofs__controls button:disabled {
  opacity: 0.28;
  cursor: default;
}

.proofs__controls button:focus-visible,
.proofs__rail:focus-visible,
.examples__rail:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (pointer: coarse) {
  .proofs__controls button { width: 44px; height: 44px; }
}

.proofs__count {
  min-width: 4.6rem;
  color: var(--lapis-deep);
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.proofs__rail {
  display: flex;
  gap: clamp(1rem, 2.2vw, 1.6rem);
  margin-inline: calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 1.1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) rgba(11, 13, 18, 0.16);
}

.proofs__rail::-webkit-scrollbar { height: 3px; }
.proofs__rail::-webkit-scrollbar-track { background: rgba(11, 13, 18, 0.16); }
.proofs__rail::-webkit-scrollbar-thumb { background: var(--ink); }

.proof { margin: 0; }

.proofs__rail .proof {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  scroll-snap-align: start;
}

.proof__open {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.proof__open:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.proofs__rail .proof img {
  width: auto;
  height: clamp(290px, 34vw, 460px);
  max-width: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  box-shadow: 10px 10px 0 var(--lapis);
}

.proofs__rail figcaption {
  max-width: 34ch;
  margin-top: 0.8rem;
  font-size: 14.5px;
  color: #4D5564;
}

.proofs__rail figcaption b {
  color: var(--ink);
  font-weight: 500;
}

.proof__spec {
  display: block;
  margin-top: 0.35rem;
  color: var(--lapis-deep);
  font: 400 11px/1.5 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.proof__note {
  display: block;
  margin-top: 0.3rem;
  color: #4D5564;
}

.proofs__hint {
  margin: 0.9rem 0 0;
  color: #4D5564;
  font: 400 12px/1.6 var(--mono);
  letter-spacing: 0.02em;
}

/* ---------- the loupe ---------- */

.proof-loupe {
  display: none;
  position: fixed;
  z-index: 80;
  left: var(--x, 0px);
  top: var(--y, 0px);
  width: clamp(130px, 14vw, 190px);
  aspect-ratio: 1;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 160ms var(--ease-out);
}

.proof-loupe.is-visible { opacity: 1; }

.proof-loupe__lens {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background-color: var(--ink);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 340% auto;
  image-rendering: pixelated;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--ink);
}

.proof-loupe__label {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* ---------- the one-page proof shelf ---------- */

.examples {
  margin-top: clamp(3rem, 7vh, 5rem);
  padding-top: clamp(2rem, 5vh, 3.2rem);
  border-top: 1px solid rgba(11, 13, 18, 0.3);
  scroll-margin-top: 4.75rem;
}

.examples__head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1rem clamp(2rem, 4.5vw, 4rem);
  align-items: end;
  margin-bottom: 1.6rem;
}

.examples__head h3 {
  max-width: 16ch;
  margin: 0.55rem 0 0;
  color: var(--ink);
  font: 400 clamp(2.1rem, 4.2vw, 3.8rem)/0.95 var(--serif);
  letter-spacing: -0.035em;
}

.examples__head p {
  max-width: 42ch;
  margin: 0 0 0.35rem;
  color: #4D5564;
  font-size: 15.5px;
}

.examples__head a { color: var(--ink); text-decoration-color: var(--lapis-deep); }
.examples__head code {
  padding: 0.12em 0.35em;
  border: 1px solid rgba(11, 13, 18, 0.2);
  background: rgba(11, 13, 18, 0.06);
  font: 400 0.9em/1 var(--mono);
}

.examples__tally {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.5rem !important;
}

.examples__tally-num {
  color: var(--ink);
  font: 400 clamp(1.8rem, 3vw, 2.5rem)/1 var(--serif);
  font-variant-numeric: tabular-nums;
}

.examples__tally-label {
  color: var(--lapis-deep);
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.examples__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  margin: 1.6rem 0 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(11, 13, 18, 0.3);
  border-bottom: 1px solid rgba(11, 13, 18, 0.3);
}

.examples__filters { display: flex; gap: 0.4rem; }

.examples__filters button {
  padding: 0.52rem 0.75rem;
  border: 1px solid rgba(11, 13, 18, 0.24);
  border-radius: 3px;
  background: transparent;
  color: #4D5564;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 140ms var(--ease-out), background 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.examples__filters button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.examples__bar-tools {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-left: auto;
}

.examples__bar-note {
  margin: 0;
  color: #4D5564;
  font: 400 11.5px/1.4 var(--mono);
}

.examples__controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.examples__controls[hidden] { display: none; }

.examples__controls button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(11, 13, 18, 0.32);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 17px/1 var(--sans);
  cursor: pointer;
  transition: background 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.examples__controls button:disabled {
  opacity: 0.28;
  cursor: default;
}

.examples__count {
  min-width: 4.8rem;
  margin: 0;
  color: var(--lapis-deep);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.examples__rail {
  margin: clamp(1.6rem, 3.2vw, 2.4rem) 0 0;
  padding: 0 0 1.15rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-left: 0;
  scrollbar-width: none;
}

.examples__rail::-webkit-scrollbar { display: none; }

.examples__grid {
  display: flex;
  align-items: flex-start;
  gap: clamp(1rem, 2.2vw, 1.6rem);
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  background: none;
  border: 0;
}

.examples__grid:empty { display: none; }

.examples__grid .shelf__item {
  flex: 0 0 clamp(260px, 30vw, 390px);
  width: clamp(260px, 30vw, 390px);
  min-width: 0;
  margin: 0;
  padding: 0;
  background: none;
  scroll-snap-align: start;
}

.examples__grid .shelf__link {
  display: block;
  height: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  text-decoration: none;
  transform: none;
}

.examples__grid .shelf__link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.examples__grid .shelf__plate {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(280px, 32vw, 390px);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  background-color: var(--ink);
}

.examples__grid .shelf__plate img,
.examples__grid .shelf__plate video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 600ms var(--ease-out);
}

.examples__grid .shelf__tag {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  padding: 0.42rem 0.55rem;
  border: 0;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.examples__grid .shelf__tag.is-new {
  background: var(--lapis-deep);
  color: var(--paper);
}

.examples__grid .shelf__meta {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0 0.7rem;
  padding: 0.75rem 0 0;
  border: 0;
  background: none;
}

.shelf__index {
  padding-top: 0.18rem;
  color: var(--lapis-deep);
  font: 400 1.3rem/0.9 var(--serif);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.shelf__copy {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.examples__grid .shelf__meta b {
  color: var(--ink);
  font: 400 clamp(1.2rem, 1.65vw, 1.45rem)/1.05 var(--serif);
  letter-spacing: -0.02em;
}

.examples__grid .shelf__spec {
  color: #4D5564;
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.02em;
}

.examples__grid .shelf__note {
  display: -webkit-box;
  max-width: 38ch;
  margin: 0;
  overflow: hidden;
  color: #3F4857;
  font: 400 12.5px/1.45 var(--sans);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.examples__status {
  margin: 1.2rem 0 0;
  color: #4D5564;
  font: 400 12.5px/1.6 var(--mono);
}

.examples__status a { color: var(--ink); }

@media (pointer: coarse) {
  .examples__controls button { width: 42px; height: 42px; }
}

/* ---------- facts: the press needs nothing else ---------- */

.facts {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

.facts__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(2.4rem, 6vw, 6rem);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) var(--gutter);
}

.facts__title {
  max-width: 9ch;
  margin: 0 0 1.5rem;
  font-size: clamp(2.9rem, 5.4vw, 5.4rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
}

.facts__lede {
  max-width: 35ch;
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15.5px;
}

.facts__row { border-top: 1px solid var(--line); }

.fact {
  display: grid;
  grid-template-columns: clamp(3.8rem, 5vw, 5.6rem) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: start;
  padding: clamp(1.35rem, 3vh, 1.9rem) 0;
  border-bottom: 1px solid var(--line);
}

.fact__num {
  display: block;
  margin: 0;
  color: var(--lapis);
  font: 400 clamp(3.2rem, 5.2vw, 5rem)/0.78 var(--serif);
  font-variant-numeric: tabular-nums;
}

.fact h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); margin: 0 0 0.45rem; }
.fact p { color: var(--muted); font-size: 15.5px; margin: 0; max-width: 48ch; }

/* ---------- installation notes: the paper inside the box ---------- */

.asks {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ivory);
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
}

.asks__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2.2rem, 6vw, 6rem);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) var(--gutter);
}

.asks h2 {
  max-width: 9ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.9rem, 5.4vw, 5.2rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
}

.asks__list {
  list-style: none;
  counter-reset: ask;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(11, 13, 18, 0.52);
}

.asks__list li {
  counter-increment: ask;
  position: relative;
  padding: 1.35rem 0 1.5rem 3.1rem;
  border-bottom: 1px solid rgba(11, 13, 18, 0.22);
}

.asks__list li::before {
  content: "0" counter(ask);
  position: absolute;
  top: 1.72rem;
  left: 0;
  color: var(--lapis-deep);
  font: 400 11px/1.3 var(--mono);
  letter-spacing: 0.06em;
}

.asks__list li h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.asks__list li p {
  color: #4D5564;
  font-size: 15.5px;
  margin: 0;
  max-width: 62ch;
}

/* ---------- take it ---------- */

.take {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) var(--gutter) clamp(4rem, 10vh, 6rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: 4.75rem;
}

.take h2 {
  max-width: 11ch;
  font-size: clamp(3.6rem, 8.4vw, 8rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  margin: 0 0 0.8rem;
}

.take__lede { color: var(--muted); max-width: 46ch; margin-bottom: 2rem; }

.take__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }

.button {
  display: inline-flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.05rem 1.6rem 1.15rem;
  background: var(--ivory);
  color: var(--void);
  text-decoration: none;
  border-radius: 4px;
  font: 500 18px/1 var(--sans);
  transition: transform 140ms var(--ease-out), background 140ms var(--ease-out);
}
.button:active { transform: scale(0.97); }

.button__meta {
  font: 400 12.5px/1 var(--mono);
  letter-spacing: 0.04em;
  color: #4A5366;
}

.sub {
  font: 400 14px/1.5 var(--sans);
  color: var(--muted);
  border-bottom: 1px solid var(--edge);
  padding-bottom: 0.12rem;
}

.take__fine { margin-top: 1.6rem; font-size: 14px; color: var(--muted); max-width: 58ch; }

/* ---------- byline ---------- */

.byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.7rem, 4vh, 2.6rem) var(--gutter) clamp(2.2rem, 5vh, 3.2rem);
  border-top: 1px solid var(--line);
}

.byline p {
  margin: 0 auto 0 0;
  color: var(--muted);
  font: 400 13px/1.7 var(--mono);
}

.byline__link {
  color: var(--ivory);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.byline__link:focus-visible {
  color: var(--ivory);
  border-color: var(--lapis);
  outline: 2px solid var(--lapis);
  outline-offset: 3px;
}

.byline__github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.byline__github:focus-visible {
  color: var(--ivory);
  border-color: var(--lapis);
  outline: 2px solid var(--lapis);
  outline-offset: 3px;
}

.byline__github svg { display: block; }

/* ---------- native modal proof lightbox ---------- */

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
}

.lightbox {
  width: min(1120px, calc(100vw - 2rem));
  max-width: 1120px;
  max-height: calc(100svh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--edge);
  background: var(--void);
  color: var(--ivory);
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
}

.lightbox::backdrop {
  background: rgba(6, 8, 12, 0.88);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.lightbox__count {
  color: var(--lapis);
  font: 400 11.5px/1 var(--mono);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.lightbox__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lightbox__actions form {
  margin: 0;
}

.lightbox__btn,
.lightbox__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--ivory);
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.lightbox__btn[aria-pressed="true"] {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--void);
}

.lightbox__close {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--void);
}

.lightbox__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.lightbox__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  max-height: 70svh;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: auto;
  background: #06080c;
}

.lightbox__stage img,
.lightbox__stage video {
  max-width: 100%;
  max-height: calc(70svh - 2rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line);
}

.lightbox__stage[data-zoom="pixel"] {
  place-items: start center;
}

.lightbox__stage[data-zoom="pixel"] img {
  max-width: none;
  max-height: none;
  image-rendering: pixelated;
}

.lightbox__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

.lightbox__title {
  margin: 0 0 0.25rem;
  color: var(--ivory);
  font: 400 clamp(1.3rem, 2.2vw, 1.8rem)/1.1 var(--serif);
}

.lightbox__spec {
  margin: 0 0 0.25rem;
  color: var(--lapis);
  font: 400 11px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lightbox__note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 60ch;
}

.lightbox__raw {
  flex: none;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--lapis);
  color: var(--ivory);
  font: 400 11px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .lightbox {
    opacity: 0;
    transition: opacity 180ms var(--ease-out), display 180ms allow-discrete, overlay 180ms allow-discrete;
  }
  .lightbox[open] { opacity: 1; }
  @starting-style {
    .lightbox[open] { opacity: 0; }
  }
  .lightbox::backdrop {
    opacity: 0;
    transition: opacity 180ms var(--ease-out), display 180ms allow-discrete, overlay 180ms allow-discrete;
  }
  .lightbox[open]::backdrop { opacity: 1; }
  @starting-style {
    .lightbox[open]::backdrop { opacity: 0; }
  }
}

/* ---------- motion: the page sets itself as it is read ----------
   The head adds .motion only when motion is allowed, so a page with no script,
   a visitor who asked for less motion, or a page whose GSAP never arrived shows
   every word already printed. Nothing here is opacity-only decoration: the
   headings are clipped like a sheet leaving the press, the copy rises a few
   pixels, and the plates wipe in. */

html.motion [data-reveal] { opacity: 0; }

html.motion [data-clip] { clip-path: inset(0 0 100% 0); }

/* a heading keeps its descenders once it has arrived */
html.motion h2[data-clip] { clip-path: inset(0 0 108% 0); }

html[data-motion="reduce"] [data-reveal] { opacity: 1; }
html[data-motion="reduce"] [data-clip] { clip-path: none; }

/* ---------- the mobile masthead and controls ---------- */

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--ivory);
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.menu-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
}

.menu-toggle__bars span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 160ms var(--ease-out);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:first-child { transform: translateY(5.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) { transform: scaleX(0); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:last-child { transform: translateY(-5.25px) rotate(-45deg); }

.masthead__foot { display: contents; }
.masthead__note { display: none; }

.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.15rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 400 12.5px/1 var(--mono);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 140ms var(--ease-out);
}

.motion-toggle__label { white-space: nowrap; }

.motion-toggle__track {
  position: relative;
  display: block;
  flex: none;
  width: 32px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.motion-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  transition: transform 160ms var(--ease-out), background-color 140ms var(--ease-out);
}

.motion-toggle[aria-checked="true"] { color: var(--lapis); }
.motion-toggle[aria-checked="true"] .motion-toggle__track {
  border-color: var(--lapis);
  background: var(--lapis);
}
.motion-toggle[aria-checked="true"] .motion-toggle__thumb {
  background: var(--void);
  transform: translateX(14px);
}

.stage[data-mode="scrub"] {
  background: #000 url(assets/poster.jpg) center / cover no-repeat;
}

@media (orientation: portrait) {
  .stage[data-mode="scrub"] {
    background-image: url(assets/film-phone-poster.jpg);
  }
}

.stage__skip {
  position: absolute;
  z-index: 5;
  top: clamp(4.8rem, 10vh, 6.2rem);
  right: var(--gutter);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.68rem 0.8rem;
  border: 1px solid rgba(239, 234, 223, 0.36);
  border-radius: 3px;
  background: rgba(11, 13, 18, 0.82);
  color: var(--ivory);
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.stage__skip span { color: var(--lapis); }
.stage__skip:active { transform: scale(0.98); }
.stage[data-mode="still"] .stage__skip,
body.no-js .stage__skip { display: none; }

.stage__device {
  display: none;
  max-width: 34ch;
  margin: 1rem 0 0;
  color: var(--lapis) !important;
  font: 400 11.5px/1.55 var(--mono);
  letter-spacing: 0.02em;
  opacity: 1 !important;
}

.device-note { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  html.js .menu-toggle { display: inline-flex; }

  html.js .masthead__nav {
    position: fixed;
    top: calc(40px + 1.4rem + 1px);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 39;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--void);
  }

  html.js .masthead[data-menu-open="true"] .masthead__nav { display: flex; }

  html.js .masthead__nav > a:not(.masthead__take) {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ivory);
    font: 400 clamp(1.9rem, 8vw, 2.6rem)/1.05 var(--serif);
    letter-spacing: -0.02em;
  }

  html.js .masthead__nav > a:not(.masthead__take):first-child {
    border-top: 1px solid var(--line);
  }

  html.js .masthead__nav .motion-toggle {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ivory);
    font-size: 13px;
  }

  html.js .masthead__nav .motion-toggle[aria-checked="true"] { color: var(--lapis); }

  html.js .masthead__foot {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
  }

  .masthead__note {
    display: block;
    max-width: 38ch;
    margin: 0;
    color: var(--muted);
    font: 400 12.5px/1.55 var(--mono);
  }

  html.js .masthead__nav .masthead__take {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.2rem;
    padding: 0.95rem 1rem !important;
    border-radius: 3px;
    font: 500 14px/1 var(--sans);
    letter-spacing: 0;
    text-align: center;
  }

  .masthead__word { display: inline; }
  html.js .masthead__nav > a[href="#stage"] { display: block; }
  body.menu-open { overflow: hidden; }

  .stage__device { display: block; }

  .device-note {
    display: block;
    max-width: 42ch;
    margin: 1.2rem 0 0;
    padding: 0.85rem 1rem;
    border-left: 2px solid var(--lapis);
    background: var(--panel);
    color: var(--muted);
    font: 400 12.5px/1.55 var(--mono);
  }

  .take .device-note { margin-top: 1.4rem; }

  .plugin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats > div { border-top: 1px solid rgba(11, 13, 18, 0.18); }
  .stats > div:nth-child(-n+3) { border-top: 0; }
  .stats > div:nth-child(3n+1) { padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
  .demo__head { grid-template-columns: 1fr; gap: 1.1rem; }
  .demo__head h2 { max-width: 16ch; }
  .demo__lede { max-width: 52ch; }
  .demo__bar-meta { display: none; }
  .demo__stage { aspect-ratio: 4 / 3; }

  .panel { grid-template-columns: 1fr; }
  .panel--flip .panel__body, .panel--flip .panel__figure { order: initial; }
  .panel__body h2 { max-width: 22ch; }

  .plugin-packs { grid-template-columns: 1fr; }

  .proofs__head { grid-template-columns: 1fr; gap: 1rem; }
  .proofs__head h2 { max-width: 12ch; }
  .proofs__head p { max-width: 52ch; margin-bottom: 0; }
  .proofs__shelf-head { flex-direction: column; gap: 0.7rem; align-items: flex-start; }
  .proofs__shelf-copy { grid-template-columns: 1fr; gap: 0.65rem; width: 100%; }
  .proofs__shelf-head p { max-width: 52ch; }
  .proofs__controls { margin-top: 0.4rem; }

  .examples__head { grid-template-columns: 1fr; gap: 1rem; }
  .examples__grid .shelf__item {
    flex-basis: clamp(250px, 42vw, 340px);
    width: clamp(250px, 42vw, 340px);
  }
  .examples__grid .shelf__plate { height: 300px; }

  .facts__inner { grid-template-columns: 1fr; gap: 2.2rem; }
  .facts__lede { max-width: 52ch; }
  .asks__inner { grid-template-columns: 1fr; gap: 2.2rem; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .masthead { padding: 0.6rem var(--gutter); }
  .masthead__logo { width: 36px; height: 36px; border-radius: 8px; }
  html.js .masthead__nav { top: calc(36px + 1.2rem + 1px); }
  .stage[data-mode="still"]::before,
  body.no-js .stage::before { aspect-ratio: 16 / 10; }
  .beat h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
}

@media (max-width: 640px) {
  .demo { padding-top: 3rem; }
  .demo__bar { font-size: 11px; letter-spacing: 0.06em; }
  .demo__veil { padding: 1rem; }
  .demo__start { box-shadow: 4px 4px 0 var(--lapis); }
  .demo__hint { display: none; }
  .demo__bar--foot { justify-content: flex-end; }
  .demo__bar--foot span { display: none; }

  .plugin-grid { grid-template-columns: 1fr; gap: 1.3rem; }
  .plugin-card p { max-width: 60ch; }

  .proofs__inner { padding-top: 3rem; padding-bottom: 3.5rem; }
  .proofs__head h2 { font-size: clamp(2.8rem, 13vw, 4rem); }
  .proofs__head p { font-size: 16px; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div {
    padding-left: clamp(0.7rem, 1.6vw, 1.35rem);
    border-left: 1px solid rgba(11, 13, 18, 0.18);
    border-top: 1px solid rgba(11, 13, 18, 0.18);
  }
  .stats > div:nth-child(-n+2) { border-top: 0; }
  .stats > div:nth-child(2n+1) { padding-left: 0; border-left: 0; }
  .stats dd { font-size: clamp(2.6rem, 10vw, 4rem); }

  .proofs__rail .proof img { height: 280px; box-shadow: 6px 6px 0 var(--lapis); }
  .proofs__rail figcaption { max-width: 30ch; }
  .proofs__hint { max-width: 40ch; }
  .claim__title { font-size: clamp(2.2rem, 10vw, 3.3rem); }
  .panel__body h2 { font-size: clamp(2rem, 9vw, 2.8rem); }

  .examples__grid .shelf__item {
    flex-basis: 78vw;
    width: 78vw;
  }
  .examples__grid .shelf__plate { height: 58vw; min-height: 230px; }
  .examples__grid .shelf__meta { grid-template-columns: 1.6rem minmax(0, 1fr); }
  .examples__grid .shelf__meta b { font-size: 1.35rem; }
  .examples__bar-tools { margin-left: 0; }
  .examples__bar-note { display: none; }

  .facts__inner { padding-block: 3rem; }
  .facts__title { font-size: clamp(2.7rem, 12.5vw, 4rem); }
  .fact { grid-template-columns: 3.2rem minmax(0, 1fr); gap: 0.9rem; }
  .asks__inner { padding-block: 3rem; }
  .asks h2 { font-size: clamp(2.7rem, 12.5vw, 4rem); }
  .asks__list li { padding-left: 2.5rem; }
  .asks__list li::before { top: 1.68rem; }
  .take h2 { font-size: clamp(3.2rem, 16vw, 5rem); }

  .lightbox__foot { flex-direction: column; align-items: flex-start; }
}

/* the poster follows the stage's shape: a phone should not see a 16:9 crop
   when the film is held back */
@media (orientation: portrait) {
  .stage[data-mode="still"]::before,
  body.no-js .stage::before {
    aspect-ratio: 9 / 16;
    background-image: url(assets/film-phone-poster.jpg);
  }
}

html[data-motion="reduce"] .demo__veil,
html[data-motion="reduce"] .proof-loupe,
html[data-motion="reduce"] .examples__grid .shelf__plate img,
html[data-motion="reduce"] .examples__grid .shelf__plate video,
html[data-motion="reduce"] .masthead__take,
html[data-motion="reduce"] .button,
html[data-motion="reduce"] .stage__skip,
html[data-motion="reduce"] .menu-toggle__bars span,
html[data-motion="reduce"] .motion-toggle__thumb {
  transition: none !important;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]):not([data-motion="reduce"]) .demo__veil,
  html:not([data-motion="full"]):not([data-motion="reduce"]) .proof-loupe,
  html:not([data-motion="full"]):not([data-motion="reduce"]) .examples__grid .shelf__plate img,
  html:not([data-motion="full"]):not([data-motion="reduce"]) .examples__grid .shelf__plate video {
    transition: none;
  }
}

/* hover only where a pointer can actually hover */
@media (hover: hover) and (pointer: fine) {
  .masthead__nav a:hover { color: var(--ivory); }
  .masthead__take:hover { background: #fff; }
  .menu-toggle:hover,
  .motion-toggle:hover { color: var(--ivory); border-color: var(--lapis); }
  .stage__skip:hover { border-color: var(--lapis); background: var(--void); }
  .button:hover { background: #fff; }
  .sub:hover { color: var(--ivory); border-bottom-color: var(--lapis); }
  .byline__github:hover { color: var(--ivory); border-color: var(--lapis); }
  .byline__link:hover { color: var(--ivory); border-color: var(--lapis); }

  .demo__start:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--lapis);
  }
  .demo__close:hover,
  .demo__bar--foot a:hover { border-color: var(--lapis); color: var(--lapis); }

  .proof-loupe { display: block; }
  .proofs__controls button:not(:disabled):hover,
  .examples__controls button:not(:disabled):hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
  }

  .examples__filters button:hover {
    color: var(--ink);
    border-color: var(--ink);
  }
  .examples__filters button[aria-pressed="true"]:hover {
    background: var(--lapis-deep);
    border-color: var(--lapis-deep);
    color: var(--paper);
  }

  .examples__grid .shelf__link:hover .shelf__meta b { color: var(--lapis-deep); }
  .examples__grid .shelf__link:hover .shelf__plate img,
  .examples__grid .shelf__link:hover .shelf__plate video { transform: scale(1.02); }

  .lightbox__btn:not(:disabled):hover,
  .lightbox__close:hover {
    background: var(--lapis);
    border-color: var(--lapis);
    color: var(--void);
  }
}
