:root {
  --paper: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --field: #f2f2f0;
  --invert-ground: #111111;
  --invert-ink: #f2f2f0;
  --ui-line: #e3e3e3;
  --todo: #fff1a8;
  --xv-halo: none;
  --xv-ai: #e2401f; /* coral text darkened for contrast on white; the dot stays brand coral */

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --measure: 84rem;
  --column: 17rem;
  --gutter: 4rem;
  --wall: calc(4 * var(--column) + 3 * var(--gutter));
  --side: 2rem;

  --t-display: clamp(2.5rem, 13.4vw, 12.25rem);
  --t-head: clamp(2rem, 5.2vw, 5rem);
  --t-statement: clamp(1.375rem, 2.2vw, 2rem);
  --t-body: 1.0625rem;
  --t-small: 0.8125rem;

  --section: clamp(7.5rem, 14vw, 13.75rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --lead: 120ms;
  --settle: 700ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d0d0d;
    --ink: #ececec;
    --muted: #9b9b9b;
    --field: #171717;
    --invert-ground: #d8d8d4;
    --invert-ink: #0d0d0d;
    --ui-line: #2a2a2a;
    --xv-halo: 0 0 6px var(--paper), 0 0 2px var(--paper);
    --xv-ai: #ff5a3c;
  }
}
:root[data-theme="dark"] {
  --paper: #0d0d0d;
  --ink: #ececec;
  --muted: #9b9b9b;
  --field: #171717;
  --invert-ground: #d8d8d4;
  --invert-ink: #0d0d0d;
  --ui-line: #2a2a2a;
  --xv-halo: 0 0 6px var(--paper), 0 0 2px var(--paper);
  --xv-ai: #ff5a3c;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

a { color: inherit; }
a, button { transition: color 150ms ease-out, background-color 150ms ease-out, opacity 150ms ease-out, transform 150ms ease-out; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: absolute; left: 1rem; top: 1rem; z-index: 10; background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; }

/* Placeholders: remove before launch */
mark.todo { background: var(--todo); color: #111; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.todo-block { display: block; background: none; color: inherit; border-left: 3px solid var(--todo); padding-left: calc(1rem - 3px); margin-left: -1rem; /* taste-skill-ignore: placeholder marker, removed before launch */ }

/* ---------- Layout ---------- */

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

.wall {
  width: min(var(--wall), 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gutter);
}
.c12 { grid-column: 1 / 3; }
.c34 { grid-column: 3 / 5; }

.section { padding-block: var(--section); }

/* ---------- Type ---------- */

.display {
  font-size: var(--t-display);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.92;
}
.head {
  font-size: var(--t-head);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}
.statement {
  font-size: var(--t-statement);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.small { font-size: var(--t-small); line-height: 1.45; letter-spacing: normal; }
.muted { color: var(--muted); }

/* ---------- Controls ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 1.5rem;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); border-radius: 0;
  font: 500 var(--t-body) / 1 var(--font-sans);
  letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .button:hover { background: color-mix(in srgb, var(--ink) 85%, var(--paper)); }
  .text-link:hover, .masthead a:hover, .email:hover { color: var(--muted); }
}
.button:active { transform: scale(0.98); }

.text-link, .masthead a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* ---------- Masthead ---------- */

.masthead {
  position: absolute; inset: 0 0 auto 0;
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 24px;
  z-index: 2;
}
.wordmark { font-weight: 600; }
.masthead .wordmark { text-decoration: none; }
.masthead nav { display: flex; gap: 1.5rem; }

/* ---------- 1. Hero ---------- */

/* Plain hero (no JS, no WebGL): headline, copy, links. The exploded view (.xv-on) and the reduced-motion still (.xv-still)
   are layered on below; everything .xv-* that isn't the headline stays hidden until then. */
.hero { position: relative; }
.xv-pin {
  max-width: var(--measure); margin-inline: auto; padding: clamp(6rem, 14vh, 9rem) var(--side) 0;
  min-height: calc(min(100svh, 62rem) - 14rem); display: flex; flex-direction: column; justify-content: flex-end;
}
.xv-canvas, .xv-callouts, .xv-count, .xv-hint, .xv-cap:not(.xv-title) { display: none; }
.xv-head { font-size: var(--t-display); font-weight: 600; letter-spacing: -0.045em; line-height: 0.92; }
.hero-lede { font-size: var(--t-statement); line-height: 1.3; letter-spacing: -0.02em; color: var(--muted); margin-bottom: 3rem; }
.hero-foot { padding-top: 4rem; padding-bottom: 40px; }
.hero-foot .wall { align-items: end; row-gap: 2rem; }

/* the full stop: the brand's one colour */
.dot { display: inline-block; width: 0.15em; height: 0.15em; margin-left: 0.03em; border-radius: 50%; background: #ff5a3c; }
.line { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.line > span { display: block; white-space: nowrap; }

.hero-copy { grid-column: 1 / 3; max-width: 34ch; }
.hero-actions {
  grid-column: 3 / 5;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
}

/* ---- the exploded view ---- */

.xv-on, .xv-still { --xv-line: color-mix(in srgb, var(--ink) 50%, transparent); --xv-left: max(var(--side), calc((100% - var(--measure)) / 2 + var(--side))); }
.xv-on .xv-track { height: 800vh; }
.xv-on .xv-pin, .xv-still .xv-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; max-width: none; padding: 0; overflow: hidden; display: block;
}
.xv-still .xv-pin { position: relative; height: min(100svh, 62rem); }
.xv-on .xv-canvas, .xv-still .xv-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 600ms var(--ease); }
.xv-canvas.ready { opacity: 1; }
.xv-on .xv-callouts, .xv-still .xv-callouts { display: block; position: absolute; inset: 0; pointer-events: none; }
.xv-callouts svg { position: absolute; left: 0; top: 0; overflow: visible; }
.xv-callouts path { fill: none; stroke: var(--xv-line); stroke-width: 1; }
.xv-callouts .ring { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.xv-callouts .ai path { stroke: #ff5a3c; }
.xv-callouts .ai .ring { stroke: #ff5a3c; fill: #ff5a3c; }
.xv-lb {
  position: absolute; left: 0; top: 0; font: 500 14px/1 var(--font-mono); letter-spacing: 0.01em; color: var(--ink); white-space: nowrap;
  opacity: 0; will-change: transform, opacity; text-shadow: var(--xv-halo);
}
@media (min-width: 1200px) { .xv-lb { font-size: 15px; } }
.xv-lb::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 380ms var(--ease); }
.xv-lb.gone::after { transform: scaleX(1); }
.xv-lb.ai::after { content: none; }
.xv-lb em { font-style: normal; color: color-mix(in srgb, var(--muted) 70%, transparent); margin-right: 0.75em; }
.xv-lb.ai { display: flex; align-items: center; gap: 0.55em; color: var(--xv-ai); font: 600 14px/1 var(--font-sans); letter-spacing: -0.005em; }
.xv-lb.ai::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff5a3c; }
.xv-lb.ai em { display: none; }

.xv-on .xv-cap { display: block; position: absolute; left: var(--xv-left); bottom: 11vh; max-width: 36rem; opacity: 0; pointer-events: none; will-change: opacity, transform; }
.xv-on .xv-cap.xv-title { max-width: 44rem; opacity: 1; } /* visible before hero.js runs; JS takes over with inline opacity */
.xv-on .xv-cap.xv-end { max-width: none; } .xv-on .xv-end .xv-head { white-space: nowrap; } /* headline always two lines, like the opening */
.xv-end .button { pointer-events: auto; margin-top: 2.25rem; }
.xv-on .xv-head, .xv-still .xv-head { font-size: clamp(3rem, 6vw, 6.4rem); line-height: 0.92; letter-spacing: -0.052em; }
.xv-on .hero-lede, .xv-still .hero-lede { font-size: clamp(1.0625rem, 1.4vw, 1.25rem); margin-bottom: 1.75rem; }
.xv-say { font-size: clamp(1.65rem, 2.9vw, 2.85rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 600; max-width: 13.5em; text-wrap: balance; }
.xv-dim { color: var(--muted); }
.xv-step { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.15rem; font: 500 0.6875rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.xv-step::after { content: ""; width: 2.5rem; height: 1px; background: var(--ui-line); }
.xv-note { margin-top: 1.1rem; font: 500 0.6875rem/1.5 var(--font-mono); color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.xv-on .xv-hint { display: flex; align-items: center; gap: 0.7rem; margin-top: 2rem; font: 500 0.6875rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.xv-hint b { display: block; width: 1px; height: 2.2rem; background: linear-gradient(var(--ink), transparent); transform-origin: top; animation: drip 2.2s cubic-bezier(0.6, 0, 0.2, 1) infinite; }
@keyframes drip { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.xv-on .xv-count { display: block; position: absolute; right: var(--xv-left); bottom: 11vh; width: 9.5rem; opacity: 0; text-align: right;
  font: 500 0.6875rem/1.6 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.xv-count b { display: block; margin-top: 0.35rem; font: 600 clamp(2.4rem, 4.2vw, 3.6rem)/1 var(--font-sans); letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.xv-count s { display: block; position: relative; height: 1px; margin-top: 0.9rem; background: var(--ui-line); color: inherit; }
.xv-count s::after { content: ""; position: absolute; right: 0; top: 0; height: 1px; width: var(--w, 100%); background: var(--ink); }

/* reduced motion: one still of the rebuilt box beside the headline, nothing pinned */
.xv-still .xv-cap.xv-title { position: absolute; left: var(--xv-left); bottom: 9vh; max-width: 44rem; opacity: 1 !important; transform: none !important; }

@media (max-width: 700px) {
  .xv-on .xv-cap, .xv-still .xv-cap.xv-title { left: var(--side); right: var(--side); bottom: 6.5vh; }
  .xv-say { font-size: 1.6rem; }
  .xv-on .xv-count { right: var(--side); top: 4.6rem; bottom: auto; width: 6.5rem; }
  .xv-count b { font-size: 2rem; }
  /* phone labels sit on the screen edge, on a backing pill, so they stay readable over the stack */
  .xv-lb { font-size: 13px; padding: 5px 9px; border-radius: 999px; text-shadow: none;
    background: color-mix(in srgb, var(--paper) 78%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .xv-lb em { margin-right: 0.5em; }
  .xv-lb.ai { font-size: 13px; }
  .xv-lb::after { left: 9px; right: 9px; }
}
@media (max-height: 500px) { .xv-on .xv-count { display: none; } }

.hero :focus-visible, .masthead :focus-visible { box-shadow: 0 0 0 6px var(--paper); }

s { text-decoration: none; position: relative; display: inline-block; color: var(--muted); }

.strike {
  position: absolute; left: -0.12em; top: 44%;
  width: calc(100% + 0.24em); height: 0.24em;
  overflow: visible; pointer-events: none;
}
.strike path {
  fill: none; stroke: #ff5a3c;
  stroke-width: 2; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
/* the pen draws left to right: reveal the stroke with a clip, so it stays crisp at any width */
.strike { clip-path: inset(-100% -0.2em -100% -0.2em); }

/* with JS a [data-strikes] list starts unstruck and is struck in view */
.js [data-strikes] s { color: var(--ink); transition: color 600ms var(--ease) var(--d, 0ms); }
.js [data-strikes] .strike { clip-path: inset(-100% 106% -100% -0.2em); transition: clip-path 600ms cubic-bezier(0.55, 0.1, 0.35, 1) var(--d, 0ms); }
.js [data-strikes].drawn s { color: var(--muted); }
.js [data-strikes].drawn .strike { clip-path: inset(-100% -0.2em -100% -0.2em); }

/* ---------- 3. Engagement ---------- */

.stages { margin-top: 5rem; row-gap: 4rem; }
.stages li { display: flex; flex-direction: column; gap: 1rem; }
.engagement-intro { margin-top: 2rem; max-width: 40ch; }
.stage {
  font-size: clamp(1.75rem, 3.3vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  padding-bottom: 0.5rem;
}
.stages .small { margin-top: auto; padding-top: 0.5rem; font-size: var(--t-body); color: var(--ink); font-weight: 500; }

/* ---------- 4. Case study ---------- */

.case { background: var(--field); padding-block: clamp(5rem, 9vw, 8rem); }
.case .wall { row-gap: 2rem; }
.context { margin-top: 1.5rem; max-width: 46ch; }

.sub { font-size: var(--t-body); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 1rem; }
.close { align-items: end; }

.case-body { margin-top: 4rem; align-items: start; }
.ba { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; row-gap: 2.5rem; }
.ba .sub .muted { font-weight: 400; }
.ba ol { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; display: grid; gap: 0.6rem; }
.proof li { padding-block: 0.7rem; border-top: 1px solid var(--ui-line); }
.case .close { margin-top: 4rem; }
.close .context { margin-top: 0; }

/* ---------- 5. Stance ---------- */

.stance { background: var(--invert-ground); color: var(--invert-ink); }
.stance ::selection { background: var(--invert-ink); color: var(--invert-ground); }
.stance mark.todo { color: #111; }
.stance .hold { display: block; }
.stance h2 { margin-bottom: 0; }
.stance-notes { margin-top: 6rem; row-gap: 2rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stance-notes p { font-size: 1.25rem; max-width: 30ch; }
.stance :focus-visible { outline-color: var(--invert-ink); }

/* ---------- 6. People ---------- */

.people .wall { row-gap: 4rem; align-items: start; }
.sign-off { display: flex; gap: 4rem; flex-wrap: wrap; }
.signed { margin: 0; }
.mark { display: block; width: var(--w); height: 6rem; color: var(--ink); stroke-dasharray: 1 1; overflow: visible; }
.signed figcaption { margin-top: 0.75rem; font-family: var(--font-mono); font-size: var(--t-small); letter-spacing: normal; }
.role { display: block; color: var(--muted); }

.reach { margin-top: 6rem; }
.lead-in { margin-bottom: 2.5rem; max-width: 18ch; }
.reach-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 3rem; }
.contact { font-style: normal; min-width: 0; }
.email {
  font: 400 var(--t-statement) / 1.2 var(--font-mono);
  letter-spacing: -0.02em;
  color: var(--ink); background: none; border: 0; padding: 0;
  text-align: left; cursor: pointer; padding-block: 0.2rem;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}
.email.swapping { opacity: 0; }

/* ---------- Footer ---------- */

/* the wordmark fills the page */
.footer { padding: 8rem var(--side) 2.5rem; text-align: center; }
.bigmark { font-size: 22vw; font-weight: 600; letter-spacing: -0.055em; line-height: 0.8; overflow: hidden; padding-bottom: 0.06em; }
.bigmark span { display: inline-block; white-space: nowrap; }

/* ---------- Motion ---------- */

.js .line > span { transform: translateY(105%); animation: rise var(--settle) var(--ease) forwards; animation-delay: var(--lead); }
.js .line + .line > span { animation-delay: calc(var(--lead) + 110ms); }
.js .hero-foot { opacity: 0; animation: appear 900ms var(--ease) forwards; animation-delay: calc(var(--lead) + 250ms); }
@keyframes rise { to { transform: translateY(0); } }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 900ms var(--ease) var(--d, 0ms), transform 900ms var(--ease) var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
  :root { --gutter: 3rem; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-copy { grid-column: 1 / 2; }
  .hero-actions { grid-column: 2 / 3; }
  .c12, .c34 { grid-column: 1 / -1; }
  .stance-notes p:nth-child(3) { grid-column: 1 / 2; }
  .close { align-items: start; }
}

@media (max-width: 640px) {
  :root { --side: 1rem; --gutter: 2rem; }
  .wall, .stages { grid-template-columns: minmax(0, 1fr); }
  .stance-notes p:nth-child(3) { grid-column: auto; }
  .xv-pin { padding-top: 6rem; min-height: calc(100svh - 18rem); }
  .hero-foot { padding-bottom: 24px; }
  .hero-lede { font-size: 1.125rem; }
  .hero-foot { padding-top: 3rem; }
  .hero-copy { font-size: 1.25rem; }
  .hero-actions { align-items: stretch; }
  .hero-actions .text-link { align-self: flex-start; }
  .reach-row .button { width: 100%; }
  .ba { grid-template-columns: minmax(0, 1fr); }
  .case-body, .case .close { margin-top: 3rem; }
  .stance-notes { margin-top: 4rem; }
  .email { font-size: 1.125rem; }
  .sign-off { gap: 2rem; flex-wrap: nowrap; }
  .mark { width: calc(var(--w) * 0.75); height: 4.5rem; }
  .hero-copy, .hero-actions { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .line > span, .js .hero-foot, .js [data-reveal] { transform: none; opacity: 1; }
  .xv-hint b { animation: none; }
}

/* Hand-broken on wider screens; one flowing sentence on a phone keeps the heading to two lines. */
@media (max-width: 640px) {
  .stance .head { font-size: clamp(1.75rem, 8vw, 2.25rem); }
}

/* ================= Accents and footer ================= */

.stage-no, .work-index { font-family: var(--font-mono); font-size: var(--t-small); letter-spacing: normal; color: var(--muted); }
.work-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 3rem; width: min(var(--wall), 100%); }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li { font-family: var(--font-mono); font-size: var(--t-small); letter-spacing: normal; padding: 0.3rem 0.75rem; border-radius: 999px; border: 1px solid var(--ui-line); }

.foot-tag { margin-top: 3rem; font-size: var(--t-statement); letter-spacing: -0.02em; }
.footer .fine { display: block; margin-top: 3rem; font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.6; }

/* ---------- Chapter break: into the work ---------- */
.chapter { position: relative; width: min(var(--wall), 100%); padding-top: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: clamp(5rem, 10vw, 9rem); }
.chapter-rule { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); transform-origin: left; }
.chapter-no { font-family: var(--font-mono); font-size: var(--t-small); letter-spacing: normal; color: var(--muted); }
.chapter-title { margin-top: clamp(2.5rem, 6vw, 5rem); }
.chapter-line { margin-top: clamp(1.25rem, 2.5vw, 2rem); color: var(--muted); }
.case { padding-top: clamp(4rem, 7vw, 6rem); }
.js.live .chapter-rule { transform: scaleX(0); transition: transform 1400ms var(--ease); }
.js.live .chapter.in .chapter-rule { transform: none; }
