/* Ten of Us, skin A (Specimen) on Huy Phan's structure. Warm paper, warm black, one vermilion; Instrument Serif for
   the giant words, Archivo in condensed capitals for names and the menu, Plex Mono for every corner line. The home
   page is one pinned stage of finished sites on a diagonal; every inner page is Huy's project page: a spec column on
   the left, the work in the middle, a giant accent word over the first screen and a chapter rail on the right edge.
   Every colour, size and duration is a token here. */
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-normal-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-italic-400.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-wdth-wght.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Serif Fallback"; src: local("Times New Roman"); size-adjust: 92%; }

:root {
  /* Monochromatic on hue 60 to 85: 60 paper, 30 warm black, 10 vermilion (BRIEF.md PALETTE). */
  --ground: oklch(97.6% 0.008 85);
  --sheet: oklch(99.2% 0.004 85);
  --shade: oklch(93.4% 0.01 80);
  --ink: oklch(17% 0.01 60);
  --surface: oklch(16% 0.008 60);
  --mute: oklch(42% 0.012 60);
  --faint: oklch(17% 0.01 60 / 0.24);
  --rule: oklch(17% 0.01 60 / 0.16);
  --on-surface: oklch(95% 0.008 85);
  --on-surface-mute: oklch(78% 0.01 80);
  --accent: oklch(55% 0.2 33);
  --accent-deep: oklch(48% 0.19 33);

  --serif: "Instrument Serif", "Serif Fallback", "Times New Roman", serif;
  --grot: "Archivo", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --side: 20px;           /* the chrome's own margin */
  --col: 228px;           /* where Huy's content column starts */
  --gap: clamp(20px, 3vw, 48px);

  --t-tiny: 0.6875rem;    /* 11 px corner lines */
  --t-label: 0.75rem;     /* 12 px mono */
  --t-body: 1.0625rem;
  --t-lead: clamp(1.25rem, 1.1rem + 0.5vw, 1.6rem);
  --t-name: clamp(1.5rem, 1.2rem + 0.8vw, 2rem);
  --t-menu: 1.375rem;
  --t-h3: clamp(1.5rem, 1.2rem + 1vw, 2.2rem);
  --t-h2: clamp(2.6rem, 1.6rem + 3.4vw, 4.6rem);
  --t-h1: clamp(2.5rem, 1.5rem + 3.2vw, 4.4rem);
  --t-giant: clamp(5rem, 1rem + 17vw, 17rem);
  --t-count: clamp(5.5rem, 3rem + 7vw, 9.5rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-fast: 180ms;
  --t-swap: 520ms;
  --t-arrive: 900ms;
  --step: 34vh;           /* scroll length for one site on the stage */
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); font-family: var(--grot); -webkit-font-smoothing: antialiased; text-size-adjust: 100%; }
body { margin: 0; font-size: var(--t-body); font-weight: 400; line-height: 1.55; overflow-x: clip; background: var(--ground); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 400; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--side); top: -5rem; z-index: 60; background: var(--ink); color: var(--on-surface); padding: 0.75rem 1rem; font: 500 var(--t-label)/1 var(--mono); }
.skip:focus { top: var(--side); }
.token { font-family: var(--mono); font-size: 0.85em; letter-spacing: 0; background: var(--shade); padding: 0.05em 0.35em; border-radius: 2px; white-space: nowrap; }
.mono { font-family: var(--mono); }

/* ------------------------------------------------------------------ chrome */
/* Huy's corners: the vertical mark, the menu under its label, the prices where Huy keeps audio, the chapter and the
   clock where Huy keeps "Working globally", the free report where Huy keeps inquiries, and Scroll at the foot. */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 30; pointer-events: none; font: 500 var(--t-label)/1.3 var(--mono); }
.bar > * { pointer-events: auto; }
.mark { position: absolute; left: var(--side); top: var(--side); width: 56px; height: 124px; background: var(--ink); color: var(--on-surface); display: grid; place-items: center; overflow: hidden; transition: transform var(--t-swap) var(--ease); }
.mark__word { writing-mode: vertical-rl; transform: rotate(180deg); font: 800 1.375rem/1 var(--grot); font-stretch: 72%; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
/* The look toggle's slot (the three-look site, 2026-11-27): under the mark on a desktop, between the mark and the menu
   on a phone. Empty here; the site that serves all three looks mounts its switch into it. */
.looks { position: absolute; left: var(--side); top: calc(var(--side) + 140px); display: flex; flex-direction: column; gap: 6px; }
.looks:empty { display: none; }
.mark__dot { position: absolute; left: 50%; top: 10px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--accent); translate: 0 calc(var(--walk, 0) * 96px); }
.mark:hover { transform: rotate(-4deg) scale(1.03); }

.nav { position: absolute; left: var(--col); top: 24px; }
.nav__label { color: var(--mute); display: block; margin-bottom: 18px; }
.menu { display: grid; gap: 1px; }
.menu__label { display: inline-flex; align-items: baseline; gap: 0.35em; font: 700 var(--t-menu)/0.92 var(--grot); font-stretch: 70%; text-transform: uppercase; letter-spacing: -0.005em; transition: translate var(--t-fast) var(--ease), filter var(--t-fast) var(--ease), color var(--t-fast); }
.menu__label[aria-current="page"]::before, .menu__item--on > .menu__label::before { content: "→"; font-family: var(--mono); font-weight: 400; font-size: 0.8em; }
.menu:hover .menu__label { filter: blur(1px); color: var(--mute); }
.menu .menu__label:hover, .menu .menu__label:focus-visible, .has-sub.is-open > .menu__label { filter: none; color: var(--ink); translate: 6px 0; }
.has-sub { position: relative; }
.menu__label[aria-expanded]::after { content: "+"; font: 400 0.8em/1 var(--mono); }
.has-sub.is-open > .menu__label::after { content: "−"; }
.sub { position: absolute; left: calc(100% + 18px); top: -6px; min-width: 220px; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--rule); display: none; z-index: 2; box-shadow: 0 18px 40px -24px oklch(17% 0.01 60 / 0.4); }
.has-sub.is-open > .sub { display: grid; }
.sub::before { content: ""; position: absolute; right: 100%; top: 0; width: 20px; height: 100%; } /* the bridge the pointer crosses */
.sub a { display: block; padding: 5px 0; font: 600 1rem/1.1 var(--grot); font-stretch: 78%; text-transform: uppercase; transition: color var(--t-fast), translate var(--t-fast) var(--ease); }
.sub a:hover, .sub a:focus-visible, .sub a[aria-current="page"] { color: var(--accent); translate: 4px 0; }
.sub__head { color: var(--mute); font: 500 var(--t-tiny)/1.3 var(--mono); padding-bottom: 6px; }

.fare { position: absolute; left: max(38%, 440px); top: 24px; } /* 440px keeps it clear of "Your line of work" */
/* Too narrow for the menu, the prices and the ask in one row: the prices drop under the ask, into the chapter pill's place. */
@media (min-width: 861px) and (max-width: 1099px) { .fare { left: auto; right: var(--side); top: 50px; background: var(--ground); padding: 2px 0 4px 8px; } }
.fare dl { display: grid; grid-template-columns: auto auto; column-gap: 14px; row-gap: 3px; }
.fare dt { color: var(--mute); }
.fare dd { margin: 0; color: var(--ink); }
.fare .token { background: none; padding: 0; font-size: 1em; }
.fare__note { color: var(--accent); margin-top: 6px; }

.where { position: absolute; right: var(--side); top: 50px; display: grid; text-align: right; background: var(--ground); padding: 2px 0 4px 8px; }
@media (max-width: 1099px) { .where { display: none; } }
.where__chapter { display: block; height: 1.3em; overflow: hidden; color: var(--accent); }
.pill-label { display: inline-block; }
.where__clock { color: var(--mute); }

.ask { position: absolute; right: var(--side); top: 24px; text-align: right; background: var(--ground); padding-left: 8px; }
.ask__label { color: var(--mute); margin-right: 10px; }
.ask a { border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: color var(--t-fast); }
.ask a:hover { color: var(--accent); }

.foot-cues { position: fixed; inset: auto var(--side) 18px var(--side); z-index: 20; display: flex; justify-content: space-between; font: 500 var(--t-label)/1 var(--mono); pointer-events: none; }
.foot-cues > * { pointer-events: auto; }
.cue-scroll { color: var(--mute); }
.cue-all { display: inline-flex; gap: 0.5em; align-items: center; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: letter-spacing var(--t-swap) var(--ease), color var(--t-fast); }
.cue-all:hover, .cue-all:focus-visible { letter-spacing: 0.08em; color: var(--accent); }
.is-past-stage .foot-cues { opacity: 0; visibility: hidden; transition: opacity var(--t-fast), visibility 0s var(--t-fast); }

/* The burger and its sheet, under 861 px. */
.burger { display: none; }
.sheet { margin: 0; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; border: 0; padding: 88px 24px 40px; background: var(--ink); color: var(--on-surface); overflow: auto; }
.sheet a { display: block; padding: 7px 0; font: 700 2rem/1 var(--grot); font-stretch: 70%; text-transform: uppercase; }
.sheet__head { margin-top: 22px; color: var(--on-surface-mute); font: 500 var(--t-label)/1 var(--mono); }
.sheet__close { position: absolute; right: 20px; top: 22px; font: 500 var(--t-label)/1 var(--mono); color: var(--on-surface); border-bottom: 1px solid; }

/* The dock: past the stage, or once an inner page moves, the corners close and the Menu button opens the sheet. */
@media (min-width: 861px) {
  .bar .nav__label, .bar .menu, .fare, .where, .ask { transition: opacity var(--t-fast) var(--ease), visibility 0s; }
  html.is-docked .bar .nav__label, html.is-docked .bar .menu, html.is-docked .fare, html.is-docked .where, html.is-docked .ask { opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease), visibility 0s var(--t-fast); }
  html.is-docked .burger { display: inline-flex; position: absolute; left: 0; top: 0; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--ink); background: var(--ground); font: 500 var(--t-label)/1 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; transition: background var(--t-fast), color var(--t-fast); }
  html.is-docked .burger:hover { background: var(--ink); color: var(--on-surface); }
}

/* ------------------------------------------------------------------ the opening */
/* Huy opens on black, puts his name in red across a white field, and pushes the black away to the right. Ours keeps
   the black, the giant accent name and the push; no figure does the pushing (no drawn stand-ins). CSS only, so it runs
   without the module and never runs for a visitor who asked for less motion or has scripts off. */
.curtain { display: none; }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .curtain { display: grid; place-items: center; position: fixed; inset: 0; z-index: 50; background: var(--surface); color: var(--accent); pointer-events: none; animation: curtain-push 1050ms var(--ease-in-out) 650ms both; }
  .curtain__word { font: 400 clamp(4.5rem, 1rem + 15vw, 15rem)/0.9 var(--serif); letter-spacing: -0.02em; white-space: nowrap; animation: curtain-word 650ms var(--ease) both; }
  .bar, .foot-cues { animation: chrome-in 700ms var(--ease) 1250ms both; }
  .stage.is-live .stage__deck { animation: deck-in 1100ms var(--ease) 1000ms both; }
  .stage.is-live .stage__side { animation: chrome-in 800ms var(--ease) 1350ms both; }
}
@keyframes curtain-push { to { transform: translateX(101%); visibility: hidden; } }
@keyframes curtain-word { from { opacity: 0; letter-spacing: 0.06em; } }
@keyframes chrome-in { from { opacity: 0; translate: 0 -10px; } }
@keyframes deck-in { from { opacity: 0; translate: 26vw -46vh; scale: 0.7; } }

/* ------------------------------------------------------------------ the stage */
/* Without scripts, and before the module runs, the stage is a plain grid of finished sites with their captions. The
   module adds .is-live, which pins the stage and lays the cards on Huy's diagonal. */
.stage { position: relative; padding: 190px var(--side) 80px var(--col); }
.stage__lines { margin-bottom: 40px; max-width: 15ch; font: 400 var(--t-h1)/0.95 var(--serif); letter-spacing: -0.012em; }
.stage__lines h1 { font: inherit; letter-spacing: inherit; margin: 0; text-wrap: balance; }
/* The operator's sub-hero, set in the grotesque so the price reads as a fact under the serif promise. */
/* The operator's tagline (2026-11-27), set in the mono over the serif, the way Huy labels his own work. */
.stage__lines .nb { white-space: nowrap; } /* the hero never parts "3" from "days" */
.stage__kicker { margin: 0 0 0.8em; font: 500 var(--t-label)/1.35 var(--mono); letter-spacing: 0.02em; color: var(--accent); max-width: 30ch; text-wrap: balance; }
.stage__sub { margin-top: 0.9em; font: 500 clamp(1rem, 0.9rem + 0.3vw, 1.2rem)/1.35 var(--grot); letter-spacing: 0.005em; color: var(--ink); max-width: 26ch; text-wrap: balance; }
.stage__deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.card { position: relative; display: block; }
.card__frame { position: relative; display: block; background: var(--surface); padding: 6px; border-radius: var(--radius); box-shadow: 0 30px 60px -38px oklch(17% 0.01 60 / 0.55); }
.card__frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 1px; }
.card__cue { white-space: nowrap; position: absolute; left: 14px; bottom: 14px; padding: 5px 8px 4px; font: 500 var(--t-tiny)/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; background: var(--ground); color: var(--ink); }
.card__cue--live { background: var(--accent); color: var(--sheet); }
.card__cap { padding: 10px 2px 0; font: 400 var(--t-label)/1.4 var(--mono); color: var(--mute); }
.card__cap b { display: block; color: var(--ink); font: 700 1.25rem/1 var(--grot); font-stretch: 75%; text-transform: uppercase; margin: 4px 0 4px; }
a.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.stage__side, .stage__list, .stage__key, .stage__count, .stage__detail { display: none; }

.stage.is-live { height: calc(100vh + (var(--n) - 1) * var(--step)); padding: 0; }
.stage.is-live .stage__pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.stage.is-live .stage__lines { position: absolute; left: var(--col); top: 206px; margin: 0; z-index: 3; font-size: clamp(2.1rem, 1.3rem + 1.7vw, 3rem); max-width: 12ch; }
.stage.is-live .stage__deck { display: block; position: absolute; inset: 0; perspective: 1800px; perspective-origin: 52% 42%; }
.stage.is-live .stage__tilt { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 900ms var(--ease); }
.stage.is-live .card { position: absolute; left: 0; top: 0; width: var(--card-w); transform-origin: 50% 50%; will-change: transform, opacity; backface-visibility: hidden; }
.stage.is-live .card__cap { display: none; }
.stage.is-live .card:not(.is-current) .card__cue { opacity: 0; transition: opacity var(--t-fast); }
.stage.is-live .card.is-current .card__frame { box-shadow: 0 40px 80px -36px oklch(17% 0.01 60 / 0.6); }
.stage.is-live a.card { cursor: pointer; }
.stage.is-live .stage__deck.is-grab { cursor: grabbing; }

.stage.is-live .stage__side { display: block; position: absolute; inset: 0; pointer-events: none; } /* no stacking context: the passed cards travel over the count, as Huy's pass over his */
.stage.is-live .stage__deck { z-index: 1; }
/* The list down the right edge: Huy's category, NAME, dash and line, centred on the current site. */
.stage__list { position: absolute; right: 7vw; top: 0; width: min(300px, 22vw); text-align: center; z-index: 2; translate: 0 var(--list-y, 0); transition: translate 700ms var(--ease); }
.stage.is-live .stage__list { display: block; }
.stage__list li { height: 172px; display: flex; flex-direction: column; justify-content: center; opacity: 0; transition: opacity 500ms var(--ease); }
.stage__list li.is-near { opacity: 1; color: var(--mute); }
.stage__list li.is-near .n { font-weight: 400; }
.stage__list li.is-current { opacity: 1; }
.stage__list .k { font: 500 var(--t-tiny)/1 var(--mono); color: var(--mute); }
.stage__list .n { margin: 6px 0; font: 600 var(--t-name)/0.95 var(--grot); font-stretch: 72%; text-transform: uppercase; }
.stage__list .d { display: block; width: 14px; height: 1px; background: currentColor; margin: 6px auto 10px; }
.stage__list .l { font: 400 var(--t-label)/1.35 var(--mono); }
.stage.only-client .stage__list li[data-tag="Concept"], .stage.only-concept .stage__list li[data-tag="Client"] { opacity: 0.06; }

/* Huy's swatches at the far right become the key: which sites are a client's and which are concepts. */
.stage__key { position: absolute; right: var(--side); top: 50%; translate: 0 -50%; gap: 2px; z-index: 3; }
.stage.is-live .stage__key { display: grid; }
.stage__key button { display: flex; align-items: center; gap: 8px; min-height: 26px; justify-content: flex-end; font: 500 var(--t-tiny)/1 var(--mono); color: var(--mute); transition: color var(--t-fast); }
.stage__key button::after { content: ""; width: 16px; height: 16px; background: var(--ink); }
.stage__key button[data-k="Client"]::after { background: var(--accent); }
.stage__key button:hover, .stage__key button[aria-pressed="true"] { color: var(--ink); }

/* Left middle: the current site's details, blurred out and back on each change (Huy's Role, Launch, Recognition). */
/* It hangs above the count, clear of the sub-hero; a window too short for both drops it, since the list at the right
   and the card itself already carry the name, the kind and the way in. */
.stage__detail { position: absolute; left: var(--side); top: min(calc(100vh - 330px), 600px); width: min(520px, 36vw); pointer-events: auto; display: none; grid-template-columns: 64px 1fr; gap: 12px 14px; font: 500 var(--t-label)/1.35 var(--mono); z-index: 3; }
.stage.is-live .stage__detail { display: grid; }
@media (max-height: 849px) { .stage.is-live .stage__detail { display: none; } }
.stage__detail dt { color: var(--mute); }
.stage__detail dd { margin: 0; }
.stage__detail .visit { border-bottom: 1px solid currentColor; }
.stage__detail .visit:hover { color: var(--accent); }
.stage__detail.is-swapping { animation: blur-swap var(--t-swap) var(--ease); }
@keyframes blur-swap { 40% { filter: blur(6px); opacity: 0; } }

/* Bottom left: the label letter by letter, the count rolling, "/21" beside it. */
.stage__count { position: absolute; left: var(--col); bottom: 26px; z-index: 0; }
.stage.is-live .stage__count { display: block; }
.stage__count .lbl { display: inline-block; font: 500 var(--t-label)/1 var(--mono); background: var(--ground); padding: 3px 6px 3px 0; }
.stage__count .lbl span { display: inline-block; animation: letter-in 500ms var(--ease) both; animation-delay: calc(var(--i) * 28ms + 1400ms); }
@keyframes letter-in { from { opacity: 0; translate: 0 0.6em; } }
.stage__count .num { display: flex; align-items: flex-end; font: 400 var(--t-count)/0.82 var(--serif); color: var(--accent); letter-spacing: -0.03em; -webkit-text-stroke: 7px var(--ground); paint-order: stroke fill; }
.stage__count .digit { display: inline-block; height: 0.82em; overflow: hidden; }
.stage__count .reel { display: flex; flex-direction: column; translate: 0 calc(var(--v, 0) * -0.82em); transition: translate 700ms var(--ease); }
.stage__count .reel span { height: 0.82em; }
.stage__count .of { font: 500 var(--t-label)/1 var(--mono); color: var(--ink); margin: 0 0 0.6rem 0.4rem; letter-spacing: 0; -webkit-text-stroke: 0; background: var(--ground); padding: 2px 4px; }

/* The phone list under the stage; on a desktop the right column already is the list. */
.stage__all { display: none; }


/* ------------------------------------------------------------------ inner pages: Huy's project page */
.top { position: relative; min-height: 100vh; padding: 200px calc(var(--side) + 150px) 90px var(--col); display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.top--plain { min-height: 86vh; }
.top__text { position: relative; z-index: 2; }
.kicker { font: 500 var(--t-label)/1.3 var(--mono); color: var(--mute); margin-bottom: 18px; }
.top h1 { font: 400 var(--t-h1)/0.95 var(--serif); letter-spacing: -0.012em; }
.top__lede { margin-top: 26px; font-size: var(--t-lead); line-height: 1.35; max-width: 32ch; }
.top__photo { position: relative; z-index: 1; background: var(--surface); padding: 6px; }
.top__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.giant { --giant-w: calc(100vw - var(--col) - 420px - var(--gap) - var(--side) - 150px); position: relative; grid-column: 2; justify-self: end; margin-top: -0.42em; z-index: 3; font: 400 min(var(--t-giant), calc(var(--giant-w) / (var(--chars, 6) * 0.46)))/0.8 var(--serif); color: var(--accent); letter-spacing: -0.035em; white-space: nowrap; pointer-events: none; mix-blend-mode: multiply; }
.top--plain .giant { --giant-w: calc(100vw - var(--col) - var(--side) - 150px); grid-column: 1 / -1; margin-top: 40px; mix-blend-mode: normal; }

.page { position: relative; padding: 120px calc(var(--side) + 150px) 120px var(--col); border-top: 1px solid var(--rule); }
.page--sheet { background: var(--sheet); }
.page--canary { background: var(--shade); }
.page--carbon { background: var(--surface); color: var(--on-surface); border-top: 0; }
.page--carbon .kicker, .page--carbon .body { color: var(--on-surface-mute); }
.in { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); grid-auto-flow: row dense; column-gap: clamp(40px, 6vw, 110px); row-gap: 28px; align-items: start; }
.in > * { grid-column: 2; }
.in > .kicker { grid-column: 1; grid-row: 1; margin: 0; }
.in > .page-head { grid-column: 1; grid-row: 2 / span 40; position: sticky; top: 200px; }
.in > .page-head:first-child { grid-row: 1 / span 40; }
.page-head { font: 400 var(--t-h2)/0.95 var(--serif); letter-spacing: -0.015em; }
.lead { font-size: var(--t-lead); line-height: 1.35; max-width: 34ch; }
.body { max-width: 62ch; color: var(--mute); }
.prose { display: grid; gap: 1em; max-width: 64ch; }
.prose h2, .prose h3 { font: 600 1.25rem/1.2 var(--grot); font-stretch: 85%; margin-top: 0.8em; }
.prose a { border-bottom: 1px solid currentColor; }
.note { font: 400 var(--t-label)/1.5 var(--mono); color: var(--mute); max-width: 70ch; }
.note a { border-bottom: 1px solid; }

.go { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 0.6em; padding: 15px 22px 14px; background: var(--ink); color: var(--on-surface); font: 500 var(--t-label)/1 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; transition: background var(--t-fast), gap var(--t-fast) var(--ease); }
.btn::after { content: "↗"; }
.btn:hover { background: var(--accent); gap: 0.9em; }
.btn--carbon { background: var(--accent); }
.btn--carbon:hover { background: var(--ink); }
.page--carbon .btn { background: var(--accent); }
.link { font: 500 var(--t-label)/1 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: color var(--t-fast); }
.link:hover { color: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.steps > li { padding: 20px 24px 8px 0; border-right: 1px solid var(--rule); }
.steps > li + li { padding-left: 24px; }
.steps > li:last-child { border-right: 0; }
.steps__when { font: 500 var(--t-label)/1 var(--mono); color: var(--accent); }
.steps h3, .plan h3, .refuse h3, .refuse h4 { margin: 12px 0 10px; font: 700 var(--t-h3)/0.95 var(--grot); font-stretch: 72%; text-transform: uppercase; }
.steps p, .plan p, .refuse p { color: var(--mute); max-width: 40ch; }
.page--carbon .refuse p { color: var(--on-surface-mute); }
.week { display: grid; gap: 1em; max-width: 60ch; font-size: var(--t-lead); line-height: 1.4; }
.plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px 40px; }
.plan > li { border-top: 1px solid var(--ink); padding-top: 4px; }
.refuse { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 30px 40px; }
.refuse > div { border-top: 1px solid var(--on-surface-mute); padding-top: 4px; }
.refuse__head { margin: 64px 0 22px; font: 500 var(--t-label)/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-surface-mute); }

.letter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 50px; align-items: start; }
.letter .ticket { position: static; display: block; background: var(--sheet); border: 1px solid var(--ink); padding: 22px; font: 400 var(--t-label)/1.5 var(--mono); }
.ticket__head { display: flex; justify-content: space-between; color: var(--mute); border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.letter .ticket .ticket__price { display: block; margin: 16px 0; font: 400 4rem/0.9 var(--serif); color: var(--accent); }
.ticket__price small { font: 500 var(--t-label)/1 var(--mono); color: var(--ink); margin-left: 8px; }
.letter .ticket li { padding: 6px 0; border-top: 1px solid var(--rule); }

.ptable { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); }
.ptable thead th { font: 500 var(--t-tiny)/1 var(--mono); color: var(--mute); text-align: left; padding: 10px 0; }
.ptable thead th:last-child { text-align: right; }
.ptable tbody th, .ptable td { padding: 18px 0; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: left; }
.ptable tbody th { font: 700 1.3rem/1.05 var(--grot); font-stretch: 75%; text-transform: uppercase; padding-right: 30px; }
.ptable .what { display: block; margin-top: 6px; font: 400 var(--t-label)/1.45 var(--mono); text-transform: none; color: var(--mute); }
.ptable td { text-align: right; font: 400 1.7rem/1 var(--serif); white-space: nowrap; }

.qa { display: grid; border-top: 1px solid var(--ink); }
.qa > div { padding: 22px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 30px; }
.qa dt { font: 700 1.2rem/1.1 var(--grot); font-stretch: 78%; text-transform: uppercase; }
.qa dd { color: var(--mute); }
.qa dd a { border-bottom: 1px solid; }

.trades { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 30px 22px; }
.trades a { display: block; }
.trades img { aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); padding: 4px; }
.trades__name { display: block; margin-top: 10px; font: 700 1.25rem/1 var(--grot); font-stretch: 72%; text-transform: uppercase; transition: color var(--t-fast); }
.trades__who { display: block; margin-top: 4px; font: 400 var(--t-label)/1.4 var(--mono); color: var(--mute); }
.trades a:hover .trades__name { color: var(--accent); }
.trades__more { height: 100%; border: 1px solid var(--ink); padding: 18px; }
.trades__more p { margin-top: 10px; font: 400 var(--t-label)/1.5 var(--mono); color: var(--mute); }

/* The work as a list of cards on inner pages and /work: Huy's stacked screens in the centre column. */
.work { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 46px 28px; }
.work__card { position: relative; }
.work__card figure { position: relative; }
.work__card img { background: var(--surface); padding: 5px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; }
.work__card figcaption { display: grid; gap: 3px; padding-top: 12px; font: 400 var(--t-label)/1.4 var(--mono); color: var(--mute); }
.concept__tag { color: var(--ink); }
.concept__tag--client { color: var(--accent); }
.concept__name { font: 700 1.4rem/1 var(--grot); font-stretch: 72%; text-transform: uppercase; color: var(--ink); }
.work__visit, .work__wait { display: inline-block; margin-top: 10px; font: 500 var(--t-tiny)/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 8px 5px; }
.work__visit { background: var(--accent); color: var(--sheet); }
.work__wait { background: var(--shade); color: var(--ink); }
.work__link { display: block; }
.work__link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.work__link:hover .concept__name { color: var(--accent); }
.work__more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.work__more img { padding: 3px; }

/* The chapter rail on the right edge: Huy's thumbnails of the page, here the page's own chapter names. */
.rail { position: fixed; right: var(--side); top: 50%; translate: 0 -50%; z-index: 20; display: none; font: 500 var(--t-tiny)/1 var(--mono); text-align: right; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 6px 0; color: var(--mute); transition: color var(--t-fast); }
.rail a::after { content: ""; width: 14px; height: 1px; background: currentColor; transition: width var(--t-swap) var(--ease); }
.rail { transition: opacity var(--t-fast), visibility 0s; }
html:has(.stage.is-live):not(.is-past-stage) .rail { opacity: 0; visibility: hidden; } /* the stage keeps its own list at the right edge */
.rail a.is-on { color: var(--accent); }
.rail a.is-on::after { width: 34px; }
.rail a span { opacity: 0; translate: 6px 0; transition: opacity var(--t-fast), translate var(--t-fast) var(--ease); }
.rail:hover a span, .rail a.is-on span { opacity: 1; translate: 0 0; }

/* ------------------------------------------------------------------ footer */
.foot { background: var(--surface); color: var(--on-surface); padding: 120px var(--side) 30px var(--col); position: relative; overflow: hidden; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 60px; }
.foot h2 { font: 400 var(--t-h2)/0.95 var(--serif); color: var(--on-surface); }
.foot__note { margin: 20px 0 30px; color: var(--on-surface-mute); max-width: 40ch; }
.foot .btn { background: var(--accent); }
.foot .btn:hover { background: var(--on-surface); color: var(--ink); }
.foot__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.foot__links h3 { font: 500 var(--t-label)/1 var(--mono); color: var(--on-surface-mute); margin-bottom: 14px; }
.foot__links a { display: block; padding: 3px 0; font: 600 1.05rem/1.2 var(--grot); font-stretch: 80%; text-transform: uppercase; }
.foot__links a:hover { color: var(--accent); }
.foot__word { margin-top: 90px; font: 400 clamp(5rem, 1rem + 16vw, 16rem)/0.78 var(--serif); color: var(--accent); letter-spacing: -0.035em; white-space: nowrap; }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; margin-top: 30px; padding-top: 16px; border-top: 1px solid oklch(95% 0.008 85 / 0.2); font: 400 var(--t-tiny)/1.4 var(--mono); color: var(--on-surface-mute); }
.foot__legal a { margin-left: 18px; }
.foot__legal a:hover { color: var(--on-surface); }

/* ------------------------------------------------------------------ reveals */
/* Every start state lives under a class only the scripts add, so a page without them is finished. */
html.reveals-armed [data-reveal]:not(.is-in) { opacity: 0; translate: 0 1.5rem; }
html.reveals-armed [data-reveal] { transition: opacity var(--t-arrive) var(--ease) calc(var(--i, 0) * var(--reveal-stagger, 0.12s) + var(--reveal-delay, 0s)), translate var(--t-arrive) var(--ease) calc(var(--i, 0) * var(--reveal-stagger, 0.12s) + var(--reveal-delay, 0s)); }
html.reveals-armed .words[data-reveal] { opacity: 1; translate: none; }
html.reveals-armed .words[data-reveal]:not(.is-in) .w { opacity: 0; translate: 0 0.4em; }
html.reveals-armed .words .w { display: inline-block; transition: opacity 600ms var(--ease) calc(var(--w) * 40ms), translate 600ms var(--ease) calc(var(--w) * 40ms); }

/* ------------------------------------------------------------------ desktop rail on */
@media (min-width: 861px) { .rail { display: block; } }

/* ------------------------------------------------------------------ phone */
@media (max-width: 860px) {
  :root { --side: 16px; --col: 16px; --band: 28svh; }
  .bar { position: absolute; height: 0; }
  .mark { width: auto; height: 36px; padding: 0 10px; top: 14px; }
  .mark__word { writing-mode: horizontal-tb; transform: none; font-size: 1.1rem; }
  .mark__dot { display: none; }
  .looks { left: 50%; top: 14px; height: 36px; transform: translateX(-50%); flex-direction: row; align-items: center; }
  .nav { left: auto; right: var(--side); top: 14px; }
  .nav__label, .menu { display: none; }
  .burger { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--ink); font: 500 var(--t-label)/1 var(--mono); text-transform: uppercase; }
  .where, .ask { display: none; }
  /* The prices sit under the header, above the work, on every phone (the brief's phone order). */
  .fare { left: var(--side); right: var(--side); top: 62px; padding: 10px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); font-size: var(--t-tiny); }
  .fare dl { grid-template-columns: auto 1fr; }
  .fare dd { text-align: right; }
  .foot-cues { position: absolute; display: none; }

  /* On a phone the stage keeps Huy's walk in a band: the deck pins at the top at under a third of the screen, the
     full list scrolls under it, and the row that reaches the band's edge names the site in the band. The pin stays
     under the mobile floor's 30% share, and there is no curtain, so the first screen is readable at once. */
  .curtain { display: none; }
  .stage { padding: 170px var(--side) 40px; }
  .stage.is-live { height: auto; padding: 170px 0 40px; }
  .stage.is-live .stage__lines { position: static; margin: 0 var(--side) 22px; font-size: clamp(1.9rem, 1.2rem + 3.6vw, 2.4rem); max-width: none; }
  .stage.is-live .stage__pin { height: var(--band); background: var(--ground); border-bottom: 1px solid var(--ink); z-index: 4; }
  .stage.is-live .stage__deck { perspective-origin: 50% 50%; }
  .stage.is-live .stage__side, .stage.is-live .stage__key { display: none; }
  .stage__all { display: block; padding: 40px var(--side) 20px; counter-reset: s; }
  .stage.is-live .stage__all { padding-top: 26px; }
  .stage__all h2 { font: 400 2.4rem/0.95 var(--serif); margin-bottom: 18px; }
  .stage__all li { border-top: 1px solid var(--rule); }
  .stage.is-live .stage__all li { min-height: 13svh; transition: border-color var(--t-fast); scroll-snap-align: start; scroll-margin-top: calc(var(--band) + 0.2 * (100svh - var(--band)) - 6.5svh); }
  /* A swipe that stops between two rows settles on one, so the band never rests halfway between two sites. */
  html:has(.stage.is-live) { scroll-snap-type: y proximity; }
  .stage.is-live .stage__all li.is-current { border-top-color: var(--ink); }
  .stage.is-live .stage__all li.is-current b { color: var(--accent); }
  .stage__all b::before { counter-increment: s; content: counter(s, decimal-leading-zero); display: inline-block; min-width: 2.2em; font: 400 1.35rem/1 var(--serif); color: var(--accent); }
  .stage__all a, .stage__all .row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; font: 400 var(--t-tiny)/1.4 var(--mono); color: var(--mute); }
  .stage__all b { font: 700 1.2rem/1 var(--grot); font-stretch: 72%; text-transform: uppercase; color: var(--ink); }
  .stage__all .t { grid-row: 1 / span 2; grid-column: 2; align-self: center; padding: 5px 7px 4px; text-transform: uppercase; }
  .stage__all a .t { background: var(--accent); color: var(--sheet); }
  .stage__all .row .t { background: var(--shade); color: var(--ink); }

  .top { grid-template-columns: 1fr; padding: 220px var(--side) 60px; min-height: 0; }
  .top__photo { margin-top: 10px; }
  .giant, .top--plain .giant { --giant-w: calc(100vw - 2 * var(--side)); grid-column: 1; margin-top: -0.35em; justify-self: end; mix-blend-mode: normal; }
  .page { padding: 70px var(--side); }
  .in { grid-template-columns: 1fr; }
  .in > *, .in > .kicker, .in > .page-head, .in > .page-head:first-child { grid-column: 1; grid-row: auto; position: static; }
  .steps > li, .steps > li + li { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .letter, .foot__grid, .qa > div { grid-template-columns: 1fr; gap: 24px; }
  .foot { padding: 80px var(--side) 30px; }
  .foot__links { grid-template-columns: 1fr 1fr; }
  .ptable tbody th { font-size: 1.1rem; }
  .ptable td { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-delay: 0ms !important; }
  html.reveals-armed [data-reveal]:not(.is-in), html.reveals-armed .words[data-reveal]:not(.is-in) .w { opacity: 1; translate: none; }
}

/* View transitions between pages, 320 ms (the house rule). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 320ms; animation-timing-function: var(--ease); }
