/* =========================================================
   RENZO JANSEMA — portfolio
   Design tokens first. Change a colour or font here and it
   changes everywhere.
   ========================================================= */
:root {
  /* colour */
  --paper: #EAEBE5;          /* off-white page, same family as the reference */
  --paper-2: #DEDFD7;        /* placeholder / card fill */
  --ink: #0C0C0B;            /* near-black text */
  --ink-soft: #3A3A37;
  --shu: #B5341F;            /* "shu" urushi red — the accent. Swap here. */
  --shu-ink: #0C0C0B;        /* text colour on the red */
  --night: #0E0E0D;          /* dark sections (pens on black velvet) */
  --night-ink: #EAEBE5;

  /* type */
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;

  --fs-xs: 12px;
  --fs-s: 14px;
  --fs-m: clamp(16px, 1.15vw, 19px);
  --fs-l: clamp(26px, 3.6vw, 56px);       /* statements */
  --fs-xl: clamp(52px, 7.4vw, 128px);     /* playbook titles */
  --fs-xxl: clamp(80px, 15vw, 260px);

  /* space */
  --gutter: clamp(16px, 2.2vw, 32px);
  --section: clamp(96px, 16vh, 200px);

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--fs-m);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
::selection { background: var(--shu); color: var(--paper); }

/* type helpers ------------------------------------------------- */
.caps { text-transform: uppercase; letter-spacing: -0.01em; }
.label {
  font-size: var(--fs-s);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.25;
}
.statement {
  font-size: var(--fs-l);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
.serif { font-family: var(--serif); font-weight: 400; text-transform: none; letter-spacing: -0.01em; }
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; }
.body-copy { max-width: 46ch; font-weight: 500; font-size: var(--fs-m); color: var(--ink-soft); }
.wrap { padding-inline: var(--gutter); }

/* =========================================================
   NAV — signature top left, links top right (like the reference)
   ========================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px var(--gutter);
  pointer-events: none;
  color: var(--ink);
  transition: color .4s var(--ease-out);
}
.nav[data-tone="light"] { color: var(--paper); }
.nav a { pointer-events: auto; }
/* mark: a solid nib (breather hole + slit knocked out) beside a small wordmark */
.nav__mark { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; line-height: .95; }
.nav__mark svg { width: 17px; height: 26px; flex: none; fill: currentColor; transform-origin: 50% 100%; transition: transform .6s var(--ease-out); }
.nav__mark span { display: block; }
@media (hover: hover) { .nav__mark:hover svg { transform: rotate(-14deg); } }
.nav__links { display: flex; gap: 22px; }
.nav__links a {
  font-size: 18px; font-weight: 700; text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .45s var(--ease-out);
  padding-bottom: 2px;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { background-size: 100% 2px; }

/* scroll progress — a fountain pen filling with ink, bottom right */
.progress-pen {
  position: fixed; right: var(--gutter); bottom: 14px; z-index: 50;
  width: 132px; height: 46px; cursor: pointer;
  color: var(--ink); transition: color .4s var(--ease-out), opacity .4s;
  background: none; border: 0; padding: 0;
}
.progress-pen[data-tone="light"] { color: var(--paper); }
.progress-pen svg { width: 100%; height: 100%; overflow: visible; }
/* the pen writes a handwritten line as you scroll: .ink is the line, .pen rides its tip */
.progress-pen .ink { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.progress-pen .guide { fill: none; stroke: currentColor; stroke-width: 1; opacity: .18; stroke-dasharray: 2 4; }
.progress-pen .pen { fill: currentColor; }
.progress-pen .pen .cut { fill: var(--paper); }
.progress-pen[data-tone="light"] .pen .cut { fill: var(--night); }
@media (hover: hover) { .progress-pen:hover .pen-wrap { transform: translateY(-3px); } }
.progress-pen .pen-wrap { transition: transform .5s var(--ease-out); }

/* =========================================================
   HERO [H1]
   ========================================================= */
.hero {
  position: relative;
  height: 100svh; min-height: 560px;
  background: var(--shu); color: var(--shu-ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 0 var(--gutter) 22px;
  overflow: hidden;
}
.hero__word {
  margin: 0; padding-top: 74px;
  font-weight: 900; text-transform: uppercase;
  line-height: 0.78; letter-spacing: -0.045em;
  white-space: nowrap;
  font-size: 22vw; /* refined by fitText() */
}
.hero__word--2 { padding-top: 0.6vw; }
.hero__meta { padding-right: 130px; }
.hero__word .tm { font-size: 0.06em; vertical-align: top; letter-spacing: 0; margin-left: .15em; position: relative; top: .25em; }
.hero__meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.hero__meta .label { max-width: 30ch; }
.hero__scroll { display: inline-flex; align-items: center; gap: 10px; }
.hero__scroll i { display: block; width: 1px; height: 40px; background: currentColor; transform-origin: top; animation: drip 2.4s var(--ease-in-out) infinite; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* letters rise in on load — hidden state lives in the `from` keyframe, so no-JS still shows text */
.rise > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  /* .is-loaded is set in the first animation frame, so a page that never paints a frame still shows its text */
  .is-loaded .rise > span { animation: rise 1.1s var(--ease-out) both; animation-delay: calc(var(--i) * 40ms + 120ms); }
}
@keyframes rise { from { transform: translateY(105%); opacity: 0; } }
.rise-mask { overflow: hidden; display: block; padding-bottom: .02em; }

/* =========================================================
   STICKY STATEMENT + EXPANDING FILM [H2]
   ========================================================= */
.intro { position: relative; }
.intro__sticky {
  position: sticky; top: 0; height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 0 var(--gutter);
  z-index: 1;
}
.intro__sticky .statement { font-size: clamp(26px, 3.4vw, 54px); line-height: 0.95; }
.intro__film {
  position: relative; z-index: 2;
  height: 220svh; margin-top: -40svh;
}
.film {
  position: sticky; top: 0; height: 100svh;
  display: grid; place-items: center;
  overflow: hidden;
}
.film__frame {
  position: absolute; inset: 0;
  clip-path: inset(var(--inset-y, 18%) var(--inset-x, 22%) round var(--r, 6px));
  background: var(--night);
}
.film__frame video, .film__frame img { width: 100%; height: 100%; object-fit: cover; }
/* bright workshop footage: darken behind the white words and the nav so they stay legible */
.film__frame::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 45% at 50% 52%, rgb(0 0 0 / .4), transparent), linear-gradient(180deg, rgb(0 0 0 / .32), rgb(0 0 0 / .08) 22%, rgb(0 0 0 / .1) 60%, rgb(0 0 0 / .4)); }
/* a light "detent": if you stop scrolling near the point where the film fills the screen, the page settles onto it.
   81svh = 80% through the film's scroll range (220svh section, 100svh sticky), where it is fully open and the words are in */
.film__snap { position: absolute; left: 0; top: 81svh; width: 1px; height: 1px; pointer-events: none; scroll-snap-align: start; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-snap-type: y proximity; }
}
.film__words {
  position: relative; z-index: 3; color: var(--paper);
  text-align: center; line-height: .86; pointer-events: none;
  opacity: var(--words, 0); transform: translateY(calc((1 - var(--words, 0)) * 30px));
}
.film__words small { display: block; font-family: var(--serif); font-style: italic; font-size: clamp(18px, 1.8vw, 28px); margin-bottom: .2em; transform: translateX(30%); }
.film__words b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 9vw, 150px); letter-spacing: -0.02em; text-transform: uppercase; }
.film__words b + b { transform: translateX(18%); }

/* =========================================================
   BIG STATEMENT [H3]
   ========================================================= */
.manifesto { padding: var(--section) var(--gutter); text-align: center; }
.manifesto .statement { max-width: 18ch; margin-inline: auto; font-size: clamp(32px, 4.6vw, 76px); }
.manifesto .statement em { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; color: var(--shu); letter-spacing: -0.01em; }

/* =========================================================
   PLAYBOOK — HOW A PEN GETS MADE [H4]
   ========================================================= */
.section-title { padding: 0 var(--gutter); margin: 0 0 18px; font-size: 28px; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; }
.lead-media { position: relative; width: 100%; aspect-ratio: 16 / 7; overflow: hidden; background: var(--paper-2); }
.lead-media > * { width: 100%; height: 100%; object-fit: cover; }

/* PINNED PROCESS: one photo frame stays put, the steps scroll past it.
   The active step is full ink; the others sit back at low opacity. */
.process { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); padding: clamp(56px, 10vh, 120px) var(--gutter) 0; }
.process__media { grid-column: 1 / 7; grid-row: 1; position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.process__frame { position: relative; aspect-ratio: 4 / 5; max-height: 76svh; overflow: hidden; background: var(--paper-2); }
.process__frame > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(100% 0 0 0); transition: clip-path 1s var(--ease-out), scale 1.4s var(--ease-out); scale: 1.08; }
.process__frame > .on { clip-path: inset(0 0 0 0); scale: 1; z-index: 2; }
.process__frame > .was { clip-path: inset(0 0 0 0); scale: 1; z-index: 1; }
.process__cap { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-s); font-weight: 800; text-transform: uppercase; }
.process__count { font-variant-numeric: tabular-nums; }
.process__count b { display: inline-block; min-width: 1.4em; }
.process__dots svg { width: 92px; overflow: visible; display: block; }
.process__dots ellipse { fill: none; stroke: currentColor; stroke-width: 1.4; transition: fill .3s; }
.process__dots ellipse.on { fill: currentColor; }

.process__steps { grid-column: 8 / 13; grid-row: 1; list-style: none; margin: 0; padding: 30svh 0 40svh; }
.pstep { min-height: 62svh; display: flex; flex-direction: column; justify-content: center; opacity: .16; transition: opacity .5s var(--ease-out); }
.pstep.is-active { opacity: 1; }
.pstep .n { font-size: var(--fs-s); font-weight: 800; margin-bottom: 14px; }
.pstep h3 { margin: 0 0 18px; font-size: clamp(40px, 5vw, 88px); font-weight: 800; text-transform: uppercase; line-height: .88; letter-spacing: -0.035em; }
.pstep p { margin: 0; max-width: 40ch; font-size: clamp(15px, 1.15vw, 19px); font-weight: 700; text-transform: uppercase; line-height: 1.14; }
.pstep__img { display: none; }

/* TILE ROWS: justified, edge to edge, equal heights (width follows each photo's --ar) */
.strip { padding: 0 var(--gutter); }
.strip__track { display: flex; gap: 2px; }
.strip__item { flex: calc(var(--ar, 0.8)) 1 0%; min-width: 0; aspect-ratio: var(--ar, 4 / 5); overflow: hidden; background: var(--paper-2); position: relative; margin: 0; }
.strip__item img, .strip__item video { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease-out); }
@media (hover: hover) { .strip__item:hover img { scale: 1.04; } }
.strip__item figcaption { position: absolute; left: 10px; bottom: 8px; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; color: var(--paper); text-shadow: 0 1px 8px rgb(0 0 0 / .4); }

/* =========================================================
   FEATURE (dark) — NIPPON SANSO [H5]
   ========================================================= */
.feature { background: var(--night); color: var(--night-ink); position: relative; overflow: hidden; }
.feature__img { width: 100%; height: 115svh; object-fit: cover; object-position: 50% 40%; }
.feature__over { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; padding: 90px var(--gutter) 34px; pointer-events: none; }
.feature__over .statement { font-size: clamp(40px, 7vw, 120px); max-width: 9ch; line-height: .86; }
.feature__over .serif-i { font-size: clamp(22px, 2.2vw, 34px); }
.feature__body { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding: var(--section) var(--gutter); }
.feature__body > :first-child { grid-column: 1 / 6; }
.feature__body > :last-child { grid-column: 7 / 13; }
.feature__body .body-copy { color: rgb(234 235 229 / .78); }
.facts { list-style: none; padding: 0; margin: 0; border-top: 1px solid currentColor; }
.facts li { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent); font-size: var(--fs-s); text-transform: uppercase; font-weight: 700; }
.facts li span:first-child { opacity: .6; }

/* =========================================================
   NUMBERS [H6]
   ========================================================= */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); margin: var(--section) var(--gutter) 0; }
.numbers > div { padding: 18px 16px 0 0; }
.numbers b { display: block; font-size: clamp(48px, 7vw, 120px); font-weight: 800; letter-spacing: -0.045em; line-height: .9; font-variant-numeric: tabular-nums; }
.numbers span { display: block; margin-top: 10px; font-size: var(--fs-s); text-transform: uppercase; font-weight: 700; max-width: 18ch; }

/* =========================================================
   WORK GRID [H7] — staggered cards like the reference
   ========================================================= */
.work-intro { padding: var(--section) var(--gutter) clamp(48px, 8vh, 96px); text-align: center; }
.work-intro .statement { max-width: 20ch; margin-inline: auto; }
.work { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: clamp(64px, 12vh, 140px); padding: 0 var(--gutter); }
.card { display: block; position: relative; }
.card__media { position: relative; overflow: hidden; background: var(--paper-2); aspect-ratio: var(--ar, 4 / 3); }
.card__media img, .card__media video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.2s var(--ease-out), opacity .9s var(--ease-out); }
.card:hover .card__media img, .card:hover .card__media video { transform: scale(1.045); }
.card__title { margin: 12px 0 2px; font-size: 16px; font-weight: 800; text-transform: uppercase; display: inline-block; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; transition: background-size .5s var(--ease-out); }
.card:hover .card__title { background-size: 0 1.5px; background-position: 100% 100%; }
.card__tags { display: flex; gap: 14px; font-size: 13px; font-weight: 700; text-transform: uppercase; }
.card__idx { position: absolute; top: 10px; left: 12px; z-index: 2; font-size: 13px; font-weight: 800; color: var(--paper); mix-blend-mode: difference; }
/* the stagger: positions per slot */
.work > .card:nth-child(6n+1) { grid-column: 1 / 8; }
.work > .card:nth-child(6n+2) { grid-column: 9 / 13; margin-top: 30vh; }
.work > .card:nth-child(6n+3) { grid-column: 3 / 11; }
.work > .card:nth-child(6n+4) { grid-column: 1 / 6; }
.work > .card:nth-child(6n+5) { grid-column: 7 / 13; margin-top: 18vh; }
.work > .card:nth-child(6n+6) { grid-column: 2 / 9; }

/* =========================================================
   ABOUT [H8]
   ========================================================= */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding: var(--section) var(--gutter) 0; align-items: start; }
.about__photo { grid-column: 1 / 6; position: sticky; top: 90px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.05); transition: filter 1s var(--ease-out); }
.about__photo:hover img { filter: none; }
.about__text { grid-column: 7 / 13; }
.about__text .statement { font-size: clamp(30px, 3.4vw, 56px); margin-bottom: 36px; }
.qa { border-top: 1px solid var(--ink); padding: 16px 0 26px; display: grid; grid-template-columns: 11em 1fr; gap: 16px; }
.qa h4 { margin: 0; font-size: var(--fs-s); text-transform: uppercase; font-weight: 800; }
.qa p { margin: 0; font-weight: 500; color: var(--ink-soft); }
.recog { list-style: none; margin: 0; padding: 0; }
.recog li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); font-weight: 700; text-transform: uppercase; font-size: var(--fs-s); }
.recog li span:last-child { opacity: .55; font-variant-numeric: tabular-nums; }

/* marquee of recognition */
.marquee { margin-top: var(--section); border-block: 2px solid var(--ink); overflow: hidden; white-space: nowrap; }
.marquee__track { display: inline-flex; gap: 0; animation: marquee 38s linear infinite; }
.marquee span { font-size: clamp(36px, 5vw, 84px); font-weight: 800; text-transform: uppercase; letter-spacing: -0.03em; padding: 10px 0; }
.marquee span::after { content: "✳"; display: inline-block; margin: 0 .45em; color: var(--shu); font-size: .6em; vertical-align: .3em; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   THESIS CTA [H9]
   ========================================================= */
.cta { background: var(--shu); color: var(--shu-ink); margin-top: var(--section); padding: clamp(80px, 14vh, 160px) var(--gutter) 34px; position: relative; overflow: hidden; }
.cta__big { margin: 0; font-size: clamp(54px, 10.5vw, 190px); font-weight: 900; text-transform: uppercase; line-height: .8; letter-spacing: -0.045em; }
.cta__big .serif-i { letter-spacing: -0.02em; font-size: .9em; }
.cta__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); margin-top: clamp(48px, 8vh, 90px); }
.cta__grid > :nth-child(1) { grid-column: 1 / 5; }
.cta__grid > :nth-child(2) { grid-column: 5 / 9; }
.cta__grid > :nth-child(3) { grid-column: 9 / 13; }
.cta__grid h4 { margin: 0 0 10px; font-size: var(--fs-s); text-transform: uppercase; font-weight: 800; border-top: 1.5px solid currentColor; padding-top: 10px; }
.cta__grid p { font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 26px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 800; text-transform: uppercase; font-size: 15px;
  transition: transform .5s var(--ease-out), background .3s;
}
.btn { -webkit-tap-highlight-color: transparent; transition-property: transform, background-color; }
.btn:not(:disabled):active { transform: scale(0.96); transition: transform 150ms ease-out; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn svg { width: 18px; height: 18px; transition: transform .5s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(40px, 7vh, 80px); }

/* FOOTER */
.foot { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding: 60px var(--gutter) 80px; font-size: var(--fs-s); font-weight: 700; text-transform: uppercase; }
.foot > :nth-child(1) { grid-column: 1 / 5; }
.foot > :nth-child(2) { grid-column: 5 / 9; }
.foot > :nth-child(3) { grid-column: 9 / 13; }
.foot a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .45s var(--ease-out); }
.foot a:hover { background-size: 100% 1.5px; }
.foot__sig { font-size: clamp(64px, 17vw, 320px); font-weight: 900; letter-spacing: -0.05em; line-height: .78; text-transform: uppercase; padding: 0 0 30px; margin: 0; white-space: nowrap; }
[data-fit] { width: max-content; }

/* =========================================================
   PROJECT (case-study) PAGES
   ========================================================= */
.p-hero { padding: 120px var(--gutter) 0; }
.p-hero__kicker { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.p-hero h1 { margin: 0; font-size: var(--fs-xxl); font-weight: 900; text-transform: uppercase; line-height: .8; letter-spacing: -0.05em; white-space: nowrap; }
.p-hero__media { margin-top: 24px; position: relative; overflow: hidden; height: 88svh; background: var(--paper-2); }
.p-hero__media > img, .p-hero__media > video { width: 100%; height: 100%; object-fit: cover; }
.p-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); padding: 22px var(--gutter) 0; }
.p-facts div { border-top: 1.5px solid var(--ink); padding-top: 10px; font-size: var(--fs-s); text-transform: uppercase; font-weight: 700; }
.p-facts div span { display: block; opacity: .55; margin-bottom: 4px; }
.p-intro { padding: var(--section) var(--gutter); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }
.p-intro .statement { grid-column: 1 / 10; font-size: clamp(30px, 4.2vw, 70px); }
.p-intro .body-copy { grid-column: 7 / 12; margin-top: 40px; }
.p-block { padding: 0 var(--gutter); margin-bottom: clamp(56px, 10vh, 120px); }
.p-block--split { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: start; }
.p-block--split > .p-text { grid-column: 1 / 5; position: sticky; top: 100px; }
.p-block--split > .p-media { grid-column: 6 / 13; display: grid; gap: 10px; }
.p-block--split.flip > .p-text { grid-column: 9 / 13; grid-row: 1; }
.p-block--split.flip > .p-media { grid-column: 1 / 8; grid-row: 1; }
.p-text h3 { margin: 0 0 14px; font-size: clamp(24px, 2.6vw, 40px); font-weight: 800; text-transform: uppercase; line-height: .92; letter-spacing: -0.02em; }
.p-text .n { display: block; font-size: var(--fs-s); font-weight: 800; margin-bottom: 14px; }
.p-text p { font-weight: 500; color: var(--ink-soft); }
.p-media figure { margin: 0; overflow: hidden; background: var(--paper-2); position: relative; }
.p-media img, .p-media video { width: 100%; height: auto; }
.p-full { margin: 0 0 clamp(56px, 10vh, 120px); height: 100svh; overflow: hidden; position: relative; background: var(--paper-2); }
.p-full img, .p-full video { width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.p-quote { padding: var(--section) var(--gutter); text-align: center; }
.p-quote blockquote { margin: 0 auto; max-width: 22ch; font-family: var(--serif); font-size: clamp(34px, 5vw, 84px); line-height: 1; letter-spacing: -0.015em; }
.p-quote cite { display: block; margin-top: 24px; font-style: normal; font-size: var(--fs-s); font-weight: 800; text-transform: uppercase; }
.p-next { display: block; background: var(--ink); color: var(--paper); padding: 40px var(--gutter) 30px; margin-top: var(--section); position: relative; overflow: hidden; }
.p-next .label { opacity: .6; }
.p-next b { display: block; font-size: var(--fs-xxl); font-weight: 900; line-height: .8; letter-spacing: -0.05em; text-transform: uppercase; white-space: nowrap; transition: transform .9s var(--ease-out); }
.p-next:hover b { transform: translateX(2vw); }
.p-next__img { position: absolute; right: var(--gutter); top: 40px; width: 22vw; aspect-ratio: 4/5; object-fit: cover; opacity: 0; transform: translateY(20px) rotate(2deg); transition: opacity .6s var(--ease-out), transform .9s var(--ease-out); }
.p-next:hover .p-next__img { opacity: 1; transform: none; }
.p-next { padding-bottom: 60px; }
.p-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; background: var(--ink); color: var(--paper); padding: 22px var(--gutter) 70px; border-top: 1px solid rgb(234 235 229 / .18); font-size: var(--fs-s); font-weight: 800; text-transform: uppercase; }
.p-foot a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .45s var(--ease-out); }
.p-foot a:hover { background-size: 100% 1.5px; }
.todo { background: #F4E27A; color: var(--ink); padding: 0 .25em; font-weight: 700; font-style: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* =========================================================
   PLACEHOLDER — labelled box that names the photo needed
   ========================================================= */
.ph {
  position: relative; width: 100%; height: 100%; min-height: 160px;
  aspect-ratio: var(--ar, auto);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgb(12 12 11 / .05) 14px 15px),
    var(--paper-2);
  display: grid; place-items: center; text-align: center; padding: 16px;
  color: var(--ink-soft);
}
.ph::before { content: "PHOTO NEEDED"; position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.ph span { font-size: var(--fs-s); font-weight: 700; text-transform: uppercase; max-width: 28ch; line-height: 1.2; }
.feature .ph, .p-next .ph { background: repeating-linear-gradient(135deg, transparent 0 14px, rgb(255 255 255 / .05) 14px 15px), #1b1b19; color: #9c9c94; }

/* =========================================================
   REVEAL on scroll
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal-img { clip-path: inset(12% 0 0 0); transition: clip-path 1.4s var(--ease-out); }
.reveal-img.in { clip-path: inset(0 0 0 0); }
.lines .line { display: block; overflow: hidden; }
.lines .line > span { display: block; transform: translateY(102%); transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--l, 0) * 70ms); }
.lines.in .line > span { transform: none; }

/* =========================================================
   STORY — chapter markers, the ask, education timeline, what I bring
   ========================================================= */
/* nav: the ask is always one click away */
.nav__links { align-items: center; }
.nav__links a.nav__pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); color: var(--paper);
  padding: 8px 12px 8px 15px; border-radius: 999px; font-size: 15px;
  transition-property: background-color, color; transition-duration: .4s;
  -webkit-tap-highlight-color: transparent;
}
.nav[data-tone="light"] .nav__links a.nav__pill { background: var(--paper); color: var(--ink); }
.nav__pill svg { width: 14px; height: 14px; transition: transform .4s var(--ease-out); }
@media (hover: hover) { .nav__pill:hover svg { transform: translateX(3px); } }
.nav__pill:not(:disabled):active { transform: scale(0.96); transition: transform 150ms ease-out; }

.hero__meta .label.hero__ask { max-width: 40ch; }
.hero__ask b { display: block; margin-top: .5em; font-weight: 800; }

/* chapter marker: a rule with number, title and a side note */
.chapter {
  display: grid; grid-template-columns: 1fr 2fr 1fr; gap: var(--gutter);
  border-top: 2px solid var(--ink); padding-top: 10px;
  margin-bottom: clamp(48px, 9vh, 110px);
  font-size: var(--fs-s); font-weight: 800; text-transform: uppercase; text-align: left;
}
.chapter > :last-child { text-align: right; opacity: .55; }
#work > .chapter, .chapter--about { margin-inline: var(--gutter); }
#work > .chapter { margin-top: var(--section); margin-bottom: 0; }
.chapter--about { margin-top: var(--section); margin-bottom: 0; }
.chapter--about + .about { padding-top: clamp(48px, 9vh, 110px); }

/* [H10] education — a line written down the page, like the pen bottom right.
   The dotted guide is always there; the ink line draws as you scroll and each year's node fills when the ink reaches it. */
.tl { padding: var(--section) var(--gutter) 0; }
.tl__intro { text-align: center; margin-bottom: clamp(56px, 10vh, 120px); }
.tl__intro .statement { font-size: clamp(36px, 5.6vw, 96px); margin-inline: auto; }
.tl__intro .body-copy { margin: 24px auto 0; }
.tl__track { --x: 50%; --node: 16px; position: relative; list-style: none; margin: 0; padding: 0 0 clamp(24px, 4vh, 48px); }
.tl__track::before, .tl__track::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; }
.tl__track::before { background: repeating-linear-gradient(var(--ink) 0 2px, transparent 2px 7px); opacity: .22; }
.tl__track::after { background: var(--ink); transform-origin: top; transform: scaleY(var(--p, 0)); }
.tl__row { position: relative; width: 50%; padding: 0 clamp(28px, 4.5vw, 80px) 0 0; text-align: right; }
.tl__row:nth-child(even) { margin-left: 50%; padding: 0 0 0 clamp(28px, 4.5vw, 80px); text-align: left; }
.tl__row + .tl__row { margin-top: clamp(-120px, -9vh, -40px); }
.tl__row::before { /* the node on the line */
  content: ""; position: absolute; top: calc(.41em - var(--node) / 2); right: calc(var(--node) / -2); z-index: 1;
  width: var(--node); height: var(--node); border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink);
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
  font-size: clamp(56px, 7vw, 124px);
}
.tl__row:nth-child(even)::before { right: auto; left: calc(var(--node) / -2); }
.tl__row.is-past::before { background: var(--ink); }
.tl__year { display: block; font-size: clamp(56px, 7vw, 124px); font-weight: 900; letter-spacing: -0.05em; line-height: .82; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--ink) 22%, transparent); transition: color .6s var(--ease-out); }
.tl__row.is-past .tl__year { color: var(--ink); }
.tl__row h3 { margin: 14px 0 6px; font-size: clamp(20px, 1.7vw, 28px); font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: -0.01em; }
.tl__where { margin: 0 0 14px; font-size: var(--fs-s); font-weight: 700; text-transform: uppercase; color: var(--ink-soft); }
.tl__claim { margin: 0 0 .3em; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(26px, 2.4vw, 40px); line-height: 1; }
.tl__body { max-width: 40ch; margin-left: auto; font-weight: 500; color: var(--ink-soft); }
.tl__row:nth-child(even) .tl__body { margin-left: 0; }
.tl__body a { color: var(--ink); font-weight: 700; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; }
.tl__row--next { --c: var(--shu); }
.tl__row--next::before { --node: 22px; box-shadow: inset 0 0 0 2px var(--shu); }
.tl__row--next.is-past::before { background: var(--shu); }
.tl__row--next.is-past .tl__year, .tl__row--next .tl__claim { color: var(--shu); }

/* [H7.0] what I bring — four words above the work grid; pick one and the projects behind it light up */
.lens { padding: clamp(48px, 9vh, 110px) var(--gutter) clamp(48px, 8vh, 96px); text-align: center; }
.lens__lead { margin: 0 auto 22px; max-width: 34ch; }
.lens__words { display: flex; flex-wrap: wrap; justify-content: center; column-gap: .28em; font-size: clamp(44px, 7.4vw, 136px); line-height: .86; }
.lens__w {
  font: inherit; font-weight: 900; text-transform: uppercase; letter-spacing: -0.045em;
  color: var(--ink); background: none; border: 0; padding: 0 0 .04em; margin: 0; cursor: pointer;
  transition: color .3s var(--ease-out), opacity .3s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.lens__dot { color: var(--shu); }
.lens__w sup { font-size: .16em; letter-spacing: 0; vertical-align: top; position: relative; top: .6em; margin-left: .15em; font-weight: 800; }
.lens.has-pick .lens__w { opacity: .2; }
.lens.has-pick .lens__w[aria-pressed="true"] { opacity: 1; color: var(--shu); }
@media (hover: hover) { .lens__w:hover { color: var(--shu); opacity: 1; } }
.lens__claim { max-width: 44ch; margin: clamp(28px, 4vh, 44px) auto 0; min-height: 6.2em; }
.lens__c { margin: 0 0 .35em; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(26px, 2.4vw, 40px); line-height: 1.02; }
.lens__p { margin: 0; font-weight: 500; color: var(--ink-soft); }
.lens__bar {
  position: sticky; top: 64px; z-index: 6; width: max-content; max-width: calc(100% - 2 * var(--gutter)); margin: 0 auto 24px;
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 6px 6px 6px 16px;
  font-size: 13px; font-weight: 800; text-transform: uppercase;
}
.lens__bar[hidden] { display: none; }
.lens__clear { font: inherit; color: var(--ink); background: var(--paper); border: 0; border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.lens__clear:not(:disabled):active { transform: scale(0.96); transition: transform 150ms ease-out; }
.work .card { transition: opacity .45s var(--ease-out), filter .45s var(--ease-out), transform 1.2s var(--ease-out); }
.work.is-picking .card:not(.is-match) { opacity: .14; filter: grayscale(1); }

/* =========================================================
   EDIT MODE — press E (or add ?edit) to show section IDs
   ========================================================= */
[data-id] { position: relative; }
.edit-on [data-id]::before {
  content: attr(data-id);
  position: absolute; top: 6px; left: 6px; z-index: 40;
  background: #F4E27A; color: #000; font: 800 11px/1 var(--sans);
  padding: 5px 7px; border-radius: 3px; letter-spacing: .02em;
  box-shadow: 0 0 0 1px #000;
}
.edit-on [data-id] { outline: 1px dashed rgb(0 0 0 / .35); outline-offset: -1px; }
.edit-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(80px); z-index: 60; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 700; padding: 10px 16px; border-radius: 999px; transition: transform .5s var(--ease-out); }
.edit-toast.show { transform: translateX(-50%); }

/* =========================================================
   POLISH — hover only on real pointers, image outlines
   ========================================================= */
/* the hover rules above are neutralised on touch so nothing "sticks" after a tap */
@media (hover: none) {
  .nav__links a:hover:not([aria-current]) { background-size: 0 2px; }
  .card:hover .card__media img, .card:hover .card__media video { transform: scale(1.001); }
  .card:hover .card__title { background-size: 100% 1.5px; background-position: 0 100%; }
  .btn:hover svg { transform: none; }
  .p-next:hover b { transform: none; }
  .p-next:hover .p-next__img { opacity: 0; }
  .about__photo:hover img { filter: grayscale(1) contrast(1.05); }
  .foot a:hover, .p-foot a:hover { background-size: 0 1.5px; }
}
.card, .p-next { -webkit-tap-highlight-color: transparent; }
/* 1px neutral outline so photos don't bleed into the paper */
.card__media img, .strip__item img, .p-media img, .lead-media img, .about__photo img {
  outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px;
}
.feature .strip__item img, .feature__img { outline: 1px solid oklch(1 0 0 / 0.1); outline-offset: -1px; }

/* keyboard focus: always visible, in ink or paper depending on the ground */
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }
.card:focus-visible { outline-offset: 8px; }

/* soft page transition: fade in on load, fade out before following an internal link */
@media (prefers-reduced-motion: no-preference) {
  .is-loaded main, .is-loaded footer { animation: page-in .6s var(--ease-out) both; }
  @keyframes page-in { from { opacity: 0; } }
  html.is-leaving main, html.is-leaving footer, html.is-leaving .p-foot { opacity: 0; transition: opacity .25s ease-out; }
}

/* small project tile (Surface Studies) */
.card__note { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ink-soft); max-width: 36ch; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .feature__body > :first-child, .feature__body > :last-child { grid-column: 1 / -1; }
  .numbers { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .work { row-gap: 64px; }
  .work > .card:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .work > .card:nth-child(3n+2) { grid-column: 3 / -1; }
  .work > .card:nth-child(3n+3) { grid-column: 1 / 11; }
  .about__photo, .about__text { grid-column: 1 / -1; position: static; }
  .about__photo { aspect-ratio: 1; }
  .cta__grid > :nth-child(n), .foot > :nth-child(n) { grid-column: 1 / -1; }
  .p-facts { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .p-intro .statement, .p-intro .body-copy { grid-column: 1 / -1; }
  .p-block--split > .p-text, .p-block--split > .p-media,
  .p-block--split.flip > .p-text, .p-block--split.flip > .p-media { grid-column: 1 / -1; grid-row: auto; position: static; }
  .p-next__img { display: none; }
  .qa { grid-template-columns: 1fr; gap: 6px; }

  /* story */
  /* nav: a solid bar in the colour of the ground beneath it; it and the pen step aside while you scroll down */
  .nav { background: var(--nav-bg, var(--paper)); padding-block: 12px; pointer-events: auto; transition: transform .35s var(--ease-out), background-color .3s ease-out, color .4s var(--ease-out); }
  .progress-pen { transition: transform .35s var(--ease-out), color .4s var(--ease-out); }
  html.nav-hidden .nav { transform: translateY(-100%); }
  html.nav-hidden .progress-pen { transform: translateY(160%); }
  html.nav-hidden .process__media, html.nav-hidden .lens__bar { top: 8px; }
  .process__media, .lens__bar { transition: top .35s var(--ease-out); }

  /* timeline: the line moves to the left edge, every year sits on its right */
  .tl__track { --x: 8px; }
  .tl__row, .tl__row:nth-child(even) { width: auto; margin-left: 0; padding: 0 0 0 38px; text-align: left; }
  .tl__row + .tl__row { margin-top: clamp(40px, 7vh, 64px); }
  .tl__row::before, .tl__row:nth-child(even)::before { right: auto; left: calc(8px - var(--node) / 2); font-size: 64px; }
  .tl__year { font-size: 64px; }
  .tl__body, .tl__row:nth-child(even) .tl__body { margin-left: 0; }
  /* lenses: one word per line, like the hero */
  .lens__words { flex-direction: column; align-items: center; font-size: 13vw; line-height: .9; }
  .chapter { grid-template-columns: auto 1fr auto; }

  /* process: the frame pins under the nav, steps scroll beneath it */
  .process { display: block; }
  .process__media { position: sticky; top: 64px; height: auto; z-index: 3; background: var(--paper); padding-bottom: 12px; }
  .process__frame { aspect-ratio: 4 / 3; max-height: 40svh; width: 100%; }
  .process__steps { padding: 6svh 0 20svh; }
  .pstep { min-height: 46svh; }

  /* tile rows become a swipe row you control */
  .strip { padding: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .strip::-webkit-scrollbar { display: none; }
  .strip__track { padding-inline: var(--gutter); width: max-content; gap: 6px; }
  .strip__item { flex: 0 0 auto; height: 62vw; scroll-snap-align: center; }
}
@media (max-width: 600px) {
  .nav__links { gap: 14px; }
  .nav__opt { display: none; }
  .nav__links a.nav__pill { font-size: 13px; padding: 7px 10px 7px 12px; }
  .nav__links a { font-size: 15px; }
  .nav__mark { font-size: 13px; }
  .hero { height: 74svh; min-height: 520px; }
  .hero__meta { flex-direction: column; align-items: flex-start; padding-right: 0; }
  .hero__word { padding-top: 84px; }
  .hero__word--2 { padding-top: 0.6vw; }
  .facts li { grid-template-columns: 1fr; gap: 2px; }
  .progress-pen { width: 104px; height: 38px; }
  .film__words b { font-size: 52px; }
  .intro__film { height: 180svh; }
  .film__snap { top: 49svh; } /* same 80% point on the shorter phone section */
}

@media (prefers-reduced-motion: reduce) {
  /* no movement: reveals become a plain opacity cross-fade */
  .reveal, .lines .line > span { transform: none !important; }
  .reveal { transition: opacity .6s ease-out; }
  .lines .line > span { transition: none; }
  .reveal-img { clip-path: none; transition: none; }
  .card__media img, .card__media video, .p-next b { transition: none; }
  .marquee__track { animation: none; }
  .nav, .progress-pen, .process__media, .lens__bar { transition: none !important; }
}
