/* Homepage project deck, Lab and contact composition. Hero: prism-hero.css. */
/* Selected Works is the first post-hero Refraction surface: a Klein field,
   black sheets that are nothing but the project's still, and the words set
   straight on the field beside them. The sheet never carries type — on the
   deck the sheets slide over one another, and a sentence on a sheet is a
   sentence the next sheet covers. */
.works { background: var(--ref-klein); color: var(--ref-white); }
.works__inner {
  width: min(100%, 1440px);
  margin: 0 auto;
  /* The first line clears the distance the hero's wave bites into Works. */
  padding: calc(var(--ref-wave-bleed) * 1px + var(--ref-space-5)) var(--ref-gutter) clamp(72px, 10vh, 120px);
}
.works__eyebrow {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  color: var(--label-ink);
  font: var(--label-weight) 11px/1.5 var(--ref-font-label);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.works__rule { flex: 1; height: 1px; background: var(--ref-line-on-klein); }
.works__h {
  max-width: 15ch;
  margin: clamp(20px, 3vh, 36px) 0 clamp(40px, 6vh, 72px);
  color: var(--ref-white);
  font-family: var(--ref-font-display);
  font-size: clamp(44px, 6.4vw, 96px);
  font-weight: var(--ref-display-weight);
  letter-spacing: var(--ref-heading-tracking);
  line-height: .9;
  text-wrap: balance;
}
.works :focus-visible { outline-color: var(--ref-white); }

/* ---- the rail ----
   A plain list of the projects, with no rules around it. From 1100px it
   stands in the left margin beside the work; below that it is a strip of
   44px cells under the heading. On the deck it marks the sheet on stage and
   is the only way to reach a covered one, which the deck makes inert. */
.works__gallery { position: relative; display: grid; gap: clamp(28px, 4vw, 48px); }
.works__index {
  display: flex;
  flex-wrap: wrap;
}
.works__index a {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding-right: clamp(18px, 2.6vw, 36px);
  color: var(--ref-white);
  font: var(--label-weight) 11px/1.4 var(--ref-font-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color var(--ref-hover-duration) ease, padding var(--ref-hover-duration) ease;
}
.works__index span { flex: 0 0 auto; color: var(--label-ink); }
@media (min-width: 1100px) {
  .works__gallery { grid-template-columns: minmax(150px, 180px) minmax(0, 1fr); column-gap: clamp(32px, 3.4vw, 56px); }
  .works__index { position: sticky; top: 110px; align-self: start; flex-direction: column; flex-wrap: nowrap; }
}

/* ---- a project ----
   Two columns wherever there is room for them: the sheet, then the words,
   head level with the sheet's top edge and the call to action level with its
   foot. One column on a phone. */
.wlist { display: grid; min-width: 0; gap: clamp(56px, 8vw, 112px); list-style: none; }
.wrow { min-width: 0; scroll-margin-top: 110px; }
.wrow__link {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(280px, 1fr);
  column-gap: clamp(28px, 4vw, 64px);
  row-gap: var(--ref-space-4);
  color: var(--ref-white);
}
.wrow__link:not(a) { cursor: default; }
/* The sheet: the still, edge to edge, in the covers' own 16:9 so a cover
   is shown whole, never cropped to fit the frame. --dim is the veil the
   deck draws over a sheet as it is pushed back under the next one. */
.wrow__sheet {
  --dim: 0;
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0;
  background: var(--ref-black);
  container-type: inline-size;
}
.wrow__sheet::after {
  position: absolute;
  inset: 0;
  background: var(--ref-black);
  content: '';
  opacity: var(--dim);
  pointer-events: none;
}
.wrow__shot {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--shot-zoom, 1));
  transition: transform .7s var(--ease-out);
}
/* The words, on the field. */
.wrow__body {
  --glyph-ink: var(--ref-white);
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--ref-space-4);
}
.wrow__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  color: var(--label-ink);
  font: var(--label-weight) 11px/1.5 var(--ref-font-label);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.wrow__num { color: var(--ref-white); }
.wrow__year { color: var(--ref-paper); }
.wrow__tag { flex-basis: 100%; }
.wrow__name {
  display: block;
  color: var(--ref-white);
  font-family: var(--ref-font-display);
  font-size: clamp(38px, 4.4vw, 72px);
  font-weight: var(--ref-display-weight);
  letter-spacing: var(--ref-heading-tracking);
  line-height: .92;
  text-wrap: balance;
}
/* The figures, each with its label — they used to be three bare numbers
   and a caption that did not line up with them. */
.wrow__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ref-line-on-klein);
}
.wrow__stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--ref-line-on-klein);
}
.wrow__stat:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--ref-line-on-klein); }
.wrow__stat-n {
  color: var(--ref-white);
  font: 800 clamp(26px, 2.3vw, 36px)/1 var(--ref-font-display);
  letter-spacing: -.05em;
}
.wrow__stat-l { color: var(--label-ink); font: var(--label-weight) 11px/1.4 var(--ref-font-label); letter-spacing: .03em; }
.wrow__role {
  margin-top: auto;
  color: var(--label-ink);
  font: var(--label-weight) 11px/1.5 var(--ref-font-label);
  letter-spacing: .04em;
}
/* Rendered, not revealed: the one solid block on the field, so a phone
   without hover still sees where the row leads. */
.wrow__go {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  padding: 0 18px;
  background: var(--ref-white);
  color: var(--ref-klein);
  font: 600 11px/1.5 var(--ref-font-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--ref-hover-duration) ease, color var(--ref-hover-duration) ease;
}
.wrow__go .ph { width: 1.1em; height: 1.1em; fill: currentColor; transition: transform var(--ref-hover-duration) ease; }
.wrow__status {
  align-self: flex-start;
  margin-top: auto;
  padding: 5px 9px;
  border: 1px solid var(--ref-line-on-klein);
  color: var(--label-ink);
  font: var(--label-weight) 11px/1.5 var(--ref-font-label);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.wrow__link:focus-visible { outline: none; }
.wrow__link:focus-visible .wrow__sheet { outline: 2px solid var(--ref-white); outline-offset: 4px; }
.wrow__link:focus-visible .wrow__go { background: var(--ref-black); color: var(--ref-white); }
@media (hover: hover) and (pointer: fine) {
  .works__index a:hover { color: var(--ref-white); padding-left: 6px; }
  .wrow__link:hover .wrow__shot { transform: scale(calc(var(--shot-zoom, 1) * 1.035)); }
  .wrow__link:hover .wrow__go { background: var(--ref-black); color: var(--ref-white); }
  .wrow__link:hover .wrow__go .ph { transform: translateX(3px); }
}

/* ---- the deck ----
   buildWorks adds .is-deck from 1100 × 760 with motion. Three columns: the
   rail in the margin; the sheets stacked in the middle, each one rising from
   the foot of the screen — in view the whole way up, nothing clips it — over
   the one before; the current project's words on the right, changing in
   place. The row's own grid repeats the last two tracks of the gallery's, so
   the sheet and the words land exactly on them. JS owns the sheets'
   transform.
   The sheet keeps its 16:9 on stage, so it is shorter than the stage: the
   row is three tracks, `1fr auto 1fr`, the sheet alone in the middle one.
   Only the sheet sizes that track, so every project's sheet lands on the
   same spot whatever the length of its words, which start level with the
   sheet's top and may run on into the track below it. */
.works__gallery.is-deck {
  height: calc(100svh - 104px);
  min-height: 656px;
  max-height: 800px;
  grid-template-columns: minmax(150px, 180px) minmax(0, 2.1fr) minmax(300px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  column-gap: clamp(32px, 3.4vw, 56px);
  row-gap: 0;
}
.is-deck .wlist { position: relative; grid-column: 2 / -1; grid-row: 1; height: 100%; }
.is-deck .works__index { position: static; grid-column: 1; grid-row: 1; align-self: center; }
.is-deck .works__index a { color: var(--label-ink); }
/* No bar, no underline: the project on stage is the one in white, stepped
   in from the margin. */
.is-deck .works__index a[aria-current] { padding-left: 12px; color: var(--ref-white); font-weight: 700; }
.is-deck .works__index a[aria-current] span { color: var(--ref-white); }
.is-deck .wrow { position: absolute; inset: 0; pointer-events: none; }
.is-deck .wrow__link {
  position: absolute;
  inset: 0;
  grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr);
  grid-template-rows: 1fr auto 1fr;
  column-gap: clamp(32px, 3.4vw, 56px);
  pointer-events: none;
}
.is-deck .wrow__sheet { grid-column: 1; grid-row: 2; transform-origin: 50% 0; pointer-events: auto; }
/* Words that are not on stage stay in the DOM (the row is inert) and only
   stop painting; the next project's scramble in over the same spot. */
.is-deck .wrow__body {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: start;
  gap: var(--ref-space-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.is-deck .wrow.is-current .wrow__body { opacity: 1; pointer-events: auto; }
.is-deck .wrow__role { margin-top: var(--ref-space-1); }
.is-deck .wrow__name { font-size: clamp(36px, 3.6vw, 60px); }
.is-deck .wrow__stat { padding-block: 10px; }
/* What I do — seven plates, one per ray the prism throws. Sharp corners,
   spectrum grounds and halftone artwork built from gradients, so the deck
   costs no image bytes and stays in the hero's own printed vocabulary.

   The section stands a full viewport tall and centres itself, so the Klein
   Works surface above and the paper process step below cannot crowd into
   the same screen as the fan.

   The wrapped grid is the resting state: it is what no-JS, narrow screens
   and a torn-down fan all get. buildDeck adds .is-fanned to deal the cards
   into one overlapping hand, and owns their transform from there. */
#lab {
  display: grid;
  align-content: center;
  min-height: 100svh;
  padding: clamp(72px, 9vh, 116px) 0;
  background: var(--ref-black);
  color: var(--ref-text);
  overflow: hidden;
}
.deck__lede { max-width: 1280px; margin: 0 auto; padding: 0 var(--ref-gutter); text-align: center; }
.deck__kicker {
  margin: 0;
  color: var(--label-ink);
  font: var(--label-weight) 11px/1.4 var(--ref-font-label);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.deck__h {
  margin: 16px auto 0;
  max-width: 20ch;
  color: var(--ref-white);
  font-family: var(--ref-font-display);
  font-size: clamp(38px, 4.4vw, 66px);
  font-weight: var(--ref-display-weight);
  letter-spacing: var(--ref-heading-tracking);
  line-height: .94;
  text-wrap: balance;
}
.deck__note { margin: 18px auto 0; max-width: 46ch; color: var(--ref-text-meta); font-size: 14px; line-height: 1.6; }
.deck__strip { margin-top: clamp(40px, 6vh, 76px); }
.deck__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 0 var(--ref-gutter);
  list-style: none;
}
/* Dealt: one row, no wrapping, the cards sharing the width between them and
   overlapping. No transform here — buildDeck writes the fan's pose, its
   entrance and its hover to the same property, and two owners would fight. */
.deck__row.is-fanned { flex-wrap: nowrap; justify-content: center; align-items: flex-start; gap: 0; }
.is-fanned .card { flex: 1 1 0; min-width: 0; max-width: 238px; margin-right: clamp(-38px, -2.6vw, -20px); }
.is-fanned .card:last-child { margin-right: 0; }
/* The plate in front covers the margin plus whatever the rotation spills —
   at 7 degrees a 250px-tall card reaches about 15px further than its own
   box. The words give that whole strip back rather than disappearing under
   it; the artwork is happy to be overlapped. */
.is-fanned .card__h, .is-fanned .card__p { padding-right: clamp(36px, calc(2.6vw + 22px), 62px); }
.card {
  position: relative;
  flex: none;
  width: clamp(178px, 15.5vw, 236px);
  padding: 12px 12px 18px;
  background: var(--card-bg);
  color: var(--card-ink);
}
/* Dealt left to right, so a card is never covered by one it sits before; the
   hovered plate leaves the order entirely and comes to the front. */
.is-fanned .card:nth-child(1) { z-index: 1; }
.is-fanned .card:nth-child(2) { z-index: 2; }
.is-fanned .card:nth-child(3) { z-index: 3; }
.is-fanned .card:nth-child(4) { z-index: 4; }
.is-fanned .card:nth-child(5) { z-index: 5; }
.is-fanned .card:nth-child(6) { z-index: 6; }
.is-fanned .card:nth-child(7) { z-index: 7; }
.is-fanned .card:hover { z-index: 20; }
/* One plate per ray, in the order the prism throws them. This is the one
   place the spectrum inks leave the artwork and ink a surface: the deck is
   the dispersion, so the grounds have to be the dispersion's own colours.
   Ink 0 is the only one dark enough to need white type on it. */
.card:nth-child(1) { --card-bg: var(--ref-spectrum-0); --card-ink: var(--ref-white); }
.card:nth-child(2) { --card-bg: var(--ref-spectrum-1); }
.card:nth-child(3) { --card-bg: var(--ref-spectrum-2); }
.card:nth-child(4) { --card-bg: var(--ref-spectrum-3); }
.card:nth-child(5) { --card-bg: var(--ref-spectrum-4); }
.card:nth-child(6) { --card-bg: var(--ref-spectrum-5); }
.card:nth-child(7) { --card-bg: var(--ref-spectrum-6); }
.card {
  --card-ink: var(--ref-black);
  --art-ink: var(--card-ink);
  --art-bg: rgb(var(--ref-black-rgb) / .1);
}
.card:nth-child(1) { --art-bg: rgb(255 255 255 / .12); }
/* Hovering runs the screen. Every plate's pattern travels by a whole number
   of its own tiles over a second, so it arrives back in register instead of
   stopping mid-stride — a press pulling one more impression, not a loop. The
   masks stay put, so the pattern slides underneath them. */
.card__art {
  display: block;
  aspect-ratio: 4 / 3;
  background-color: var(--art-bg);
  background-position: 0 0;
}
@media (hover: hover) and (pointer: fine) {
  .card__art { transition: background-position 1.05s cubic-bezier(.33, 0, .2, 1); }
  .card:hover .card__art { background-position: var(--drift, 0 0); }
}
.card__h {
  margin: 14px 0 0;
  font-family: var(--ref-font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
}
/* Same ink as the title, deliberately, and at full opacity: a dimmed
   caption on a mid-tone spectrum ground drops under AA on half the rays.
   Weight and size carry the hierarchy instead. */
.card__p { margin: 6px 0 0; color: var(--card-ink); font: var(--label-weight) 11px/1.45 var(--ref-font-label); }
/* One screen per plate, in the same family the poster is drawn from:
   rulings, dot screens and moire, never a stock gradient blob. --drift is
   the distance that screen travels while a pointer rests on the plate: a
   whole number of tiles, along the axis the pattern is built on. */
/* Rings are the one screen that must not pan: concentric circles sliding
   sideways read as the whole plate moving, not as rings. They travel the
   only way rings can — outwards, off their own centre — so the pattern
   sits on a layer that scales about that centre and the panel clips it. */
.card[data-art="rings"] .card__art { position: relative; overflow: hidden; }
.card[data-art="rings"] .card__art::after {
  position: absolute;
  inset: 0;
  background-image: repeating-radial-gradient(circle at 32% 46%, var(--art-ink) 0 1px, transparent 1px 10px);
  content: '';
  transform-origin: 32% 46%;
}
.card[data-art="dots"] .card__art {
  --drift: 27px 27px;
  background-image: radial-gradient(var(--art-ink) 1.4px, transparent 1.6px);
  background-size: 9px 9px;
  -webkit-mask-image: linear-gradient(112deg, #000 18%, transparent 76%);
  mask-image: linear-gradient(112deg, #000 18%, transparent 76%);
}
.card[data-art="slats"] .card__art {
  --drift: 50px 0;
  background-image: repeating-linear-gradient(97deg, var(--art-ink) 0 9px, transparent 9px 25px);
}
/* Two rulings a few degrees apart, drifting against each other: the beat
   this makes is the whole reason moire is in the set. */
.card[data-art="moire"] .card__art {
  --drift: 21px 0, -21px 0;
  background-image:
    repeating-linear-gradient(87deg, var(--art-ink) 0 1.4px, transparent 1.4px 7px),
    repeating-linear-gradient(93deg, var(--art-ink) 0 1.4px, transparent 1.4px 7px);
}
/* Half a tile, so the board comes to rest inverted. */
.card[data-art="checker"] .card__art {
  --drift: 13px 13px;
  background-image: conic-gradient(var(--art-ink) 0 25%, transparent 0 50%);
  background-size: 26px 26px;
}
.card[data-art="halftone"] .card__art {
  --drift: 30px -30px;
  background-image: radial-gradient(var(--art-ink) 2.2px, transparent 2.4px);
  background-size: 10px 10px;
  -webkit-mask-image: radial-gradient(circle at 68% 38%, #000 8%, transparent 70%);
  mask-image: radial-gradient(circle at 68% 38%, #000 8%, transparent 70%);
}
.card[data-art="contour"] .card__art {
  --drift: 0 -33px;
  background-image: repeating-radial-gradient(ellipse 120% 42% at 50% 118%, var(--art-ink) 0 1px, transparent 1px 11px);
}
@media (hover: hover) and (pointer: fine) {
  .card[data-art="rings"] .card__art::after { transition: transform 1.05s cubic-bezier(.33, 0, .2, 1); }
  .card[data-art="rings"]:hover .card__art::after { transform: scale(1.5); }
}
.stack__step {
  padding: clamp(80px, 12vh, 140px) var(--ref-gutter);
  border-radius: 0;
  box-shadow: none;
}
.stack__step--1 { background: var(--ref-paper); color: var(--ref-black); }
.stack__step--2 { background: var(--ref-black); color: var(--ref-text); border-radius: 0; box-shadow: none; }
.stack__step--3 { background: var(--ref-klein); color: var(--ref-white); border-radius: 0; box-shadow: none; }
.stack__inner {
  display: grid;
  grid-template-columns: minmax(72px, 144px) minmax(0, 1fr);
  grid-template-areas: "number heading" ". body";
  column-gap: clamp(24px, 5vw, 72px);
  width: min(100%, 1280px);
  max-width: none;
  text-align: left;
}
.stack__num {
  grid-area: number;
  margin: .55em 0 0;
  color: var(--ref-klein);
  /* Its ink changes with the plate, so it steps back by opacity instead. */
  opacity: var(--label-alpha);
  font: var(--label-weight) 12px/1.5 var(--ref-font-label);
  letter-spacing: .14em;
}
.stack__step--2 .stack__num { color: var(--ref-paper); }
.stack__step--3 .stack__num { color: var(--ref-white); }
.stack__h {
  grid-area: heading;
  color: inherit;
  font-family: var(--ref-font-display);
  font-size: clamp(56px, 8.5vw, 128px);
  font-weight: var(--ref-display-weight);
  letter-spacing: var(--ref-heading-tracking);
  line-height: .88;
  text-wrap: balance;
}
.stack__p {
  grid-area: body;
  max-width: 36ch;
  text-wrap: balance;
  margin: clamp(24px, 4vh, 44px) 0 0;
  color: inherit;
  font: 400 clamp(16px, 1.7vw, 22px)/1.45 var(--ref-font-display);
  opacity: .82;
}
.stack__step--3 .stack__p { opacity: .88; }
.finale {
  min-height: 100svh;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 72px;
  padding: 104px var(--ref-gutter) 24px;
  overflow: hidden;
  background: var(--ref-black);
  color: var(--ref-text);
}
.finale__inner {
  width: min(1280px, 100%);
  max-width: none;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
  align-items: end;
  gap: clamp(32px, 7vw, 112px);
  text-align: left;
}
.finale__pre {
  align-self: start;
  color: var(--ref-text);
  font-family: var(--ref-font-display);
  font-size: clamp(72px, 12vw, 180px);
  font-weight: var(--ref-display-weight);
  line-height: .82;
  text-transform: uppercase;
  letter-spacing: var(--ref-heading-tracking);
}
/* Stacked Vietnamese caps carry marks above and below; .82 lets them collide. */
html[lang="vi"] .finale__pre { line-height: 1.08; }
/* The note is written straight on the black, like a letter on a ruled line:
   no panel behind it. The rule under it is the field's edge, and a Klein
   stroke draws along it while the visitor is writing (--accent: Klein itself barely
   shows on black at 2px). */
.finale__inner > .prompt,
.finale__inner > .cform,
.finale__inner > .cdone {
  grid-column: 2;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.finale__inner > .prompt {
  position: relative;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ref-line-control);
}
.finale__inner > .prompt::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.finale__inner > .prompt:focus-within::after { transform: scaleX(1); }
.prompt__line {
  justify-content: flex-start;
  color: var(--ref-white);
  font-family: var(--ref-font-display);
  font-size: clamp(34px, 4.5vw, 68px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.055em;
}
.prompt__input { color: var(--ref-white); caret-color: var(--ref-white); }
.prompt__input::placeholder { color: var(--ref-text-meta); }
.prompt__cue { color: var(--label-ink); font-family: var(--ref-font-label); font-weight: var(--label-weight); opacity: 1; }
.prompt__send,
.cbtn--send {
  min-height: 48px;
  border: 1px solid var(--ref-white);
  border-radius: 0;
  background: var(--ref-white);
  color: var(--ref-black);
  font-family: var(--ref-font-label);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.prompt__send:hover,
.cbtn--send:hover { transform: none; border-color: var(--ref-klein); background: var(--ref-klein); color: var(--ref-white); }
.cform { max-width: none; gap: 22px; }
.cform__grid { gap: 22px; }
.cfield > span,
.cform__note { color: var(--label-ink); font-family: var(--ref-font-label); font-weight: var(--label-weight); }
.cfield > span { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; }
.cform__note { text-align: left; }
.cfield input,
.cfield textarea {
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--ref-line-control);
  border-radius: 0;
  background: transparent;
  color: var(--ref-white);
  font: 500 18px/1.45 var(--ref-font-display);
}
.cfield input:focus,
.cfield textarea:focus { border-bottom-color: var(--ref-white); }
.cfield textarea { min-height: 112px; }
.cfield input::placeholder,
.cfield textarea::placeholder { color: var(--ref-text-meta); }
.cbtn--ghost { padding-inline: 0; color: var(--label-ink); font-family: var(--ref-font-label); font-weight: var(--label-weight); }
.cbtn--ghost:hover { color: var(--ref-white); }
.cdone { align-items: flex-start; text-align: left; }
.cdone__check { border: 1px solid var(--ref-white); border-radius: 0; background: none; color: var(--ref-white); }
.cdone__title { color: var(--ref-white); font-family: var(--ref-font-display); font-weight: 800; }
.cdone__sub { color: var(--ref-text-note); }
.cdone__sub a { color: var(--ref-white); border-bottom: 1px solid currentColor; }
/* Footer: a row of contact cells over a quiet base line. The cells are a
   grid on a line-coloured ground, so the 1px gaps between them are the rules
   and a hover fill never has to redraw a border. The first cell is the
   email, the longest value, so it takes the widest track. */
.sitefooter {
  position: static;
  display: block;
  width: min(1280px, 100%);
  margin: 0 auto;
  color: var(--label-ink);
  font-family: var(--ref-font-label);
  font-weight: var(--label-weight);
  font-size: 12.5px;
}
.sitefooter__links {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: minmax(0, 1.7fr);
  grid-auto-columns: minmax(0, 1fr);
  gap: 1px;
  border-block: 1px solid var(--ref-line-control);
  background: var(--ref-line-control);
}
.sitefooter .fchan {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 132px;
  padding: 20px 20px 22px;
  background: var(--ref-black);
  color: var(--ref-text);
  transition: background var(--ref-hover-duration) ease;
}
.fchan__k {
  color: var(--label-ink);
  font: var(--label-weight) 11.5px/1 var(--ref-font-label);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.fchan__v {
  font: 800 clamp(20px, 2vw, 30px)/1.05 var(--ref-font-display);
  letter-spacing: -.04em;
  overflow-wrap: break-word;
}
.fchan__go {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 22px;
  height: 22px;
  fill: currentColor;
  color: var(--label-ink);
  transition: transform var(--ref-hover-duration) ease, color var(--ref-hover-duration) ease;
}
.sitefooter .fchan:hover,
.sitefooter .fchan:focus-visible { background: var(--ref-klein); color: var(--ref-white); }
.sitefooter .fchan:focus-visible { outline: 2px solid var(--ref-white); outline-offset: -2px; }
.fchan:hover .fchan__go,
.fchan:focus-visible .fchan__go { color: var(--ref-white); transform: translate(3px, -3px); }
.fchan--down:hover .fchan__go,
.fchan--down:focus-visible .fchan__go { transform: translateY(3px); }
/* The footer's CV picker: the wrapper is the grid cell, the button fills it
   and takes the cell's look; the list opens upwards over it. */
.cvpick--cell { display: flex; }
.cvpick--cell[hidden] { display: none; }
.cvpick--cell > .fchan { flex: 1; width: 100%; text-align: left; }
.cvpick--cell .fchan__lead { width: .8em; height: .8em; margin-inline-end: .25em; vertical-align: -.02em; }
.sitefooter .cvpick.is-open > .fchan { background: var(--ref-klein); color: var(--ref-white); }
.cvpick.is-open > .fchan .fchan__go { color: var(--ref-white); }
.fchan.cvpick__btn:hover .cvpick__chev,
.fchan.cvpick__btn:focus-visible .cvpick__chev { transform: translateY(3px); }
.cvpick.is-open > .fchan .cvpick__chev { transform: rotate(180deg); }
.cvpick--cell .cvpick__list { top: auto; bottom: calc(100% + 4px); left: 0; right: 0; min-width: 0; }
.sitefooter__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 10px;
}
.sitefooter__top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--label-ink);
  letter-spacing: .04em;
  transition: color var(--ref-hover-duration) ease;
}
.sitefooter__top .ph { width: 14px; height: 14px; fill: currentColor; transition: transform var(--ref-hover-duration) ease; }
.sitefooter__top:hover { color: var(--ref-white); }
.sitefooter__top:hover .ph { transform: translateY(-3px); }
@media (max-width: 999px) {
  .deck__h { max-width: 18ch; }
  /* The email keeps a full row; the rest pair up beneath it, and an odd one
     out takes the whole row rather than leaving a hole in the grid. */
  .sitefooter__links { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sitefooter__links > :first-child,
  .sitefooter__links > :last-child:nth-child(even) { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .wrow__link { grid-template-columns: minmax(0, 1fr); }
  .wrow__role { margin-top: 0; }
}
@media (max-width: 720px) {
  .works__inner { padding-inline: var(--ref-gutter-mobile); padding-bottom: 72px; }
  .works__h { margin-bottom: 32px; font-size: clamp(42px, 12.4vw, 60px); }
  .works__gallery { gap: 36px; }
  .works__index a { flex: 1 1 50%; padding-right: 12px; }
  .wlist { gap: 56px; }
  .wrow__body { gap: var(--ref-space-3); }
  .wrow__name { font-size: clamp(36px, 11vw, 52px); }
  /* Below 900 the fan never opens (buildDeck's own condition), so this is
     the grid: two plates a row, nothing overlapping, nothing rotated. */
  #lab { min-height: 0; padding: 72px 0; }
  .deck__lede { padding-inline: var(--ref-gutter-mobile); }
  .deck__h { max-width: 14ch; font-size: clamp(38px, 11vw, 54px); }
  .deck__row { padding-inline: var(--ref-gutter-mobile); gap: 14px; }
  .card { width: calc(50% - 7px); }
  .stack__step { padding-inline: var(--ref-gutter-mobile); }
  .stack__inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "number" "heading" "body"; }
  .stack__num { margin: 0 0 20px; }
  .stack__h { font-size: clamp(56px, 16vw, 76px); }
  .stack__p { margin-top: 24px; }
  .finale { min-height: 0; gap: 56px; padding: 92px var(--ref-gutter-mobile) 20px; }
  .finale__inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .finale__pre { font-size: clamp(66px, 22vw, 92px); }
  .finale__inner > .prompt, .finale__inner > .cform, .finale__inner > .cdone { grid-column: 1; }
  .prompt__line { font-size: clamp(32px, 10vw, 46px); }
  .sitefooter__links { grid-template-columns: minmax(0, 1fr); }
  .sitefooter .fchan { min-height: 0; gap: 14px; padding: 16px 16px 18px; }
  .fchan__go { top: 16px; right: 16px; }
  .sitefooter__base { align-items: flex-start; flex-direction: column; gap: 0; padding-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .fchan, .fchan__k, .fchan__go, .sitefooter__top .ph, .finale__inner > .prompt::after { transition: none; }
  .works__index a, .wrow__shot, .wrow__go, .wrow__go .ph, .card__art, .card__art::after { transition: none; }
  .card:hover .card__art { background-position: 0 0; }
  .card:hover .card__art::after { transform: none; }
  .stack__step { min-height: 0; padding-block: 96px; }
}
