/* Holland Works — site styles
   Paper, ink and one serif. Everything else gets out of the work's way. */

:root {
  --paper: #F6F3F1;
  --paper-deep: #EDE9E6;
  --ink: #0B0B0B;
  --ink-soft: #5B5755;
  --ink-quiet: #6B6664;
  --night: #151515;
  --night-soft: #A9A4A2;
  /* the one accent: small pings of tomato. --tomato-ink is a touch deeper so small text and
     white-on-tomato stay readable (4.5:1 on paper) */
  --tomato: #E0442A;
  --tomato-ink: #BE351D;
  --line: rgb(11 11 11 / 0.14);
  --line-night: rgb(246 243 241 / 0.16);

  --serif: "ivypresto-display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  /* Side padding: the page content never gets wider than --max-w. On windows wider than that the
     gutter grows to keep it centred, so pictures stop ballooning (header, footer text and every
     section use this same gutter, so they all line up on the one column). */
  --max-w: 1800px;
  --gutter: max(clamp(16px, 4.2vw, 60px), calc((100vw - var(--max-w)) / 2));
  --gap: clamp(10px, 1.2vw, 16px);
  --section: clamp(72px, 11vw, 168px);

  /* The type scale: seven sizes, each with one job.
     display  page headlines, stats            heading  section headings, insight pull-quotes
     intro    home/About intros, footer, articles (--home-type, sized to the screen; see .home-intro)
     title    card titles, company names, case study intros, quotes
     body / small / label (capitals: nav, buttons, labels) */
  --fs-display: clamp(2.7rem, 6.2vw, 6rem);
  --fs-intro: clamp(1.95rem, 3.65vw, 3.45rem);
  --fs-h2: clamp(1.75rem, 3vw, 2.85rem);
  --fs-title: clamp(1.5rem, 2.16vw, 2.16rem);   /* 24px on phones, under the 28px headings */
  --fs-lead: var(--fs-title);
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-small: 0.875rem;
  --fs-label: 0.75rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 180ms;
  --t-med: 420ms;
  --t-slow: 900ms;

  --z-header: 50;
  --z-menu: 60;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--tomato); color: #fff; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.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-link {
  position: absolute; left: var(--gutter); top: 12px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  font-family: var(--sans); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: var(--fs-label);
  transform: translateY(-160%); transition: transform var(--t-fast) var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ------------------------------------------------------------------ type */

.label {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--fs-label);
  letter-spacing: 0.1em; /* +100 tracking on all caps */
  text-transform: uppercase;
  line-height: 1.3;
}
.muted { color: var(--ink-soft); }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: clamp(18px, 3.6vw, 52px) var(--gutter) clamp(14px, 2vw, 24px);
  background: var(--paper);
  /* padding animates on purpose: the header is fixed (out of the page flow), so only its own
     few elements reflow; a sanctioned exception in .impeccable/config.json */
  transition: transform var(--t-med) var(--ease-out), padding var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
/* With JS the header is pinned (fixed) and the page reserves its full height (--header-h, set in
   site.js), so shrinking it on scroll never moves the page. As a sticky element in the flow, its
   shrinking pulled the page up ~46px, which pushed the scroll back past the threshold and made
   it flicker between the two sizes. Without JS it stays sticky and never shrinks. */
.js .site-header { position: fixed; left: 0; right: 0; }
/* the full-size header's height (padding + its 40px of content); site.js refines it if needed */
:root { --header-h: calc(clamp(18px, 3.6vw, 52px) + clamp(14px, 2vw, 24px) + 40.2px); }
.js body { padding-top: var(--header-h, 0px); }
.site-header.is-compact { padding-top: 16px; padding-bottom: 14px; box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }

.nav { display: flex; gap: clamp(18px, 2.2vw, 32px); }
.nav--right { justify-content: flex-end; }
.nav a {
  font-family: var(--sans); font-weight: 600; font-size: var(--fs-label);
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  padding: 10px 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform var(--t-med) var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { color: var(--tomato-ink); }

.wordmark { display: block; line-height: 0; color: var(--ink); }
.wordmark > svg { width: clamp(137px, 28.7vw, 412px); height: auto; fill: currentColor; }
.site-header .wordmark { position: relative; transform-origin: 50% 50%; transition: transform var(--t-med) var(--ease-out); }
.site-header.is-compact .wordmark { transform: scale(0.575); }
/* slot-machine word choices sit over the logo (gate/wordflip.css + .js) */

.menu-toggle { display: none; }

/* email envelope: the quick way to get in touch, top right of every page */
.nav-mail {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -12px -12px -12px -4px;
  align-self: center;
  color: var(--ink); border-radius: 50%; transition: background var(--t-fast) var(--ease-out);
}
.nav-mail svg { width: 20px; height: 20px; }
.nav-mail:hover { background: var(--paper-deep); }
.nav .nav-mail::after { display: none; }
.nav-mail--mobile { display: none; }

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto auto; gap: 4px; padding-top: 18px; padding-bottom: 14px; }
  :root { --header-h: 76px; }
  .nav-mail--mobile { display: inline-grid; margin: 0; }
  .site-header .nav { display: none; }
  .wordmark > svg { width: min(45.6vw, 200px); }
  .site-header.is-compact .wordmark { transform: none; }
  .site-header .wf { display: none; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px; justify-self: end;
    background: none; border: 0; padding: 12px 0 12px 12px; min-height: 44px; cursor: pointer;
    font-family: var(--sans); font-weight: 600; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase;
  }
  .menu-toggle .bars { width: 22px; height: 10px; position: relative; }
  .menu-toggle .bars::before, .menu-toggle .bars::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
    transition: transform var(--t-med) var(--ease-out);
  }
  .menu-toggle .bars::before { top: 0; }
  .menu-toggle .bars::after { top: 8.5px; }
  .menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(4.25px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-4.25px) rotate(-45deg); }
}

.mobile-menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 96px var(--gutter) 32px;
  visibility: hidden; opacity: 0;
  transition: opacity var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
}
.mobile-menu.is-open { visibility: visible; opacity: 1; transition: opacity var(--t-med) var(--ease-out); }
.mobile-menu ul { display: grid; gap: 4px; }
.mobile-menu a {
  font-family: var(--serif); font-size: clamp(2.6rem, 13vw, 4rem); line-height: 1.1; text-decoration: none;
  display: inline-block; padding: 4px 0;
}
.mobile-menu a[aria-current="page"] { font-style: italic; color: var(--tomato-ink); }
.mobile-menu .mobile-menu__foot a { font-size: var(--fs-body); font-family: var(--sans); text-decoration: underline; text-underline-offset: 4px; }
.site-header .menu-toggle { position: relative; z-index: calc(var(--z-menu) + 1); }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { z-index: calc(var(--z-menu) + 1); background: transparent; box-shadow: none; }

/* ------------------------------------------------------------------ layout */

main { display: block; }

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

/* ------------------------------------------------------------------ home */

/* The intro sizes itself to the screen's height as well as its width, so the top of
   "Selected work" always peeks above the fold and invites a scroll. The type shrinks only
   when the screen is short; line length is in em, so the paragraph shapes never change. */
:root {
  --peek: 120px;          /* how much of Selected work shows below the intro */
  --head: 116px;          /* header height */
  --lines: 8;             /* intro height in em: 6 lines x 1.13 + 2 paragraph gaps */
  --scale: 0.72;          /* intro type at 72% of the size that would fill the space */
  --pad-top0: clamp(28px, 8vh, 150px);
  --pad-bottom: clamp(32px, 7vh, 120px);
  --fit: calc((100vh - var(--head) - var(--pad-top0) - var(--pad-bottom) - var(--peek)) / var(--lines));
  --fs-home: max(1.5rem, min(var(--fs-intro), var(--fit)));
  --home-type: calc(var(--fs-home) * var(--scale));   /* the intro's size; the footer shares it */
}
.home-intro {
  /* the space the smaller type gives back goes above the intro, so the peek stays the same */
  padding: calc(var(--pad-top0) + var(--fs-home) * (1 - var(--scale)) * var(--lines)) var(--gutter) var(--pad-bottom);
}
@supports (height: 100svh) {
  :root { --pad-top0: clamp(28px, 8svh, 150px); --pad-bottom: clamp(32px, 7svh, 120px); }
}
@media (max-width: 760px) {
  :root { --head: 64px; --lines: 10.2; --peek: 100px; }
}
.home-intro p {
  font-family: var(--serif);
  font-size: var(--home-type);
  line-height: 1.13;
  letter-spacing: -0.002em;   /* +10 tracking for legibility */
  max-width: 19.5em;      /* 20% longer lines than before (14.5em at the old, 10% larger size) */
  text-wrap: pretty;      /* fill each line to the measure (balance split them into short, even lines) */
}
.home-intro p + p { margin-top: 0.6em; }
/* the opening sentence is balanced into even lines: browsers' own "pretty" wrapping differs (Safari left a
   short middle line), balance reads the same everywhere */
.home-intro__text p:first-child { text-wrap: balance; }
/* availability line under the intro: small sans, quiet, so it reads as a note rather than a headline */
.home-intro p.home-status { font-family: var(--sans); font-size: var(--fs-small); line-height: 1.4; letter-spacing: 0.01em; color: var(--ink-soft); margin-top: 1.6em; max-width: 36em; text-wrap: balance; }

/* The intro makes room (--extra) for the availability line under it (and, in the client version, the selling
   points), so the top of Selected work still shows on the first screen. On phones the results drop under the
   intro too. Homepage only: the shared --home-type elsewhere (About, footer) keeps its size. */
.home-intro:has(.home-results) {
  --extra: 40px;
  --fit: calc((100vh - var(--head) - var(--pad-top0) - var(--pad-bottom) - var(--peek) - var(--extra)) / var(--lines));
  --fs-home: max(1.5rem, min(var(--fs-intro), var(--fit)));
  --home-type: calc(var(--fs-home) * var(--scale));
}
.home-intro:has(.home-points) { --extra: 170px; }
@supports (height: 100svh) {
  .home-intro:has(.home-results) { --fit: calc((100svh - var(--head) - var(--pad-top0) - var(--pad-bottom) - var(--peek) - var(--extra)) / var(--lines)); }
}
@media (max-width: 760px) { .home-intro:has(.home-results) { --extra: 190px; } .home-intro:has(.home-points) { --extra: 230px; } }
/* a longer intro (over 50 words, as in the freelance version) drops the extra space above it and sets a
   little smaller, so the work still peeks up */
.home-intro--long { padding-top: var(--pad-top0); --scale: .65; --home-type: calc(var(--fs-home) * var(--scale)); }
.about-intro--long .about-intro__text h1 { font-size: calc(var(--fs-home) * .65); }   /* the About heading matches that homepage intro */

/* client version: a visible headline above the intro, and four selling points under it */
/* under the headline, the intro runs 10% smaller */
.home-intro:has(.home-headline) .home-intro__text p:not(.home-status) { font-size: calc(var(--home-type) * 0.9); }
.home-headline { font: 400 calc(var(--home-type) * 1.8)/1.05 var(--serif); letter-spacing: -0.01em; margin: 0 0 0.45em; max-width: 16em; text-wrap: balance; }
.home-points { list-style: none; margin: 2em 0 0; padding: 1.4em 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px clamp(16px, 2.4vw, 40px); }
@media (max-width: 1100px) { .home-points { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .home-points { grid-template-columns: 1fr; } }
.home-points li { display: grid; gap: 6px; align-content: start; }
.home-points b { font-family: var(--serif); font-weight: 400; font-size: calc(var(--fs-body) * 1.35); line-height: 1.15; letter-spacing: .01em; text-wrap: balance; }
.home-points li > span { font-size: var(--fs-small); line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }

/* homepage results: beside the intro, level with its last line and against the right edge. One shows at a
   time and site.js fades to the next every few seconds; each links to the case study it came from. */
.home-intro__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(32px, 5vw, 96px); align-items: end; }
.home-results ul { list-style: none; margin: 0; padding: 0; display: grid; }
.home-results li { grid-area: 1 / 1; align-self: end; opacity: 0; pointer-events: none; transition: opacity 600ms var(--ease-in-out); }
.home-results li.is-on, .home-results:not(.is-live) li:first-child { opacity: 1; pointer-events: auto; }
.home-results a, .home-results div { display: grid; gap: 4px; justify-items: end; text-align: right; text-decoration: none; color: inherit;
  width: min-content; min-width: 11em; margin-left: auto; }
.home-results b { font: 400 clamp(3rem, 6vw, 5.6rem)/1 var(--serif); letter-spacing: .01em; font-variant-numeric: lining-nums; white-space: nowrap; }
.home-results span { font-size: var(--fs-body); line-height: 1.35; color: var(--ink); text-wrap: balance; }
.home-results small { font-size: var(--fs-label); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); transition: color var(--t-med) var(--ease-out); }
.home-results a:hover small, .home-results a:focus-visible small { color: var(--tomato-ink); }
@media (max-width: 760px) {
  .home-intro__row { grid-template-columns: 1fr; }
  .home-results { margin-top: 1.6em; }
  .home-results a, .home-results div { justify-items: start; text-align: left; margin-left: 0; }
}

/* Showreel: a silent teaser loops until someone presses play; then the full film (with sound) takes its place.
   Under the work on the homepage, full width at the top of the Work page. */
.reel { padding: 0 var(--gutter); }
.reel--home { margin-top: var(--section); }
.reel--work { margin-bottom: var(--section); }
.reel__label { margin-bottom: 18px; }
.reel__frame { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.reel__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.reel__play { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 14px; padding: clamp(16px, 2.4vw, 36px); border: 0;
  background: linear-gradient(to top, rgb(0 0 0 / .55), transparent 45%); color: #fff; font: 500 var(--fs-body)/1.2 var(--sans); text-align: left; cursor: pointer; }
.reel__dot { flex: none; width: clamp(52px, 5vw, 76px); aspect-ratio: 1; border-radius: 50%; background: var(--tomato); display: grid; place-items: center;
  transition: transform var(--t-fast) var(--ease-out); }
.reel__dot svg { width: 34%; margin-left: 8%; fill: #fff; }
.reel__play:hover .reel__dot, .reel__play:focus-visible .reel__dot { transform: scale(1.08); }
.reel__play b { display: block; font: 400 var(--fs-title)/1.05 var(--serif); }
.reel__play small { display: block; margin-top: 4px; font-size: var(--fs-small); opacity: .8; }
.reel__pause { position: absolute; top: 12px; right: 12px; z-index: 1; border: 0; border-radius: 99px; padding: 6px 12px; background: rgb(0 0 0 / .5);
  color: #fff; font: 600 var(--fs-label)/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.reel.is-playing .reel__play, .reel.is-playing .reel__pause { display: none; }

/* Rotating food badge (in the footer, beside the email address). James's sketches, each
   pre-rotated so its bite sits at 3 o'clock; the wheel turns clockwise at a steady rate and
   a new food swaps in every 1.5s, so the bite carries on round as one continuous object. */
.foodspin {
  position: relative; flex: none; display: block;
  --size: clamp(76px, 7.4vw, 124px);
  width: var(--size); aspect-ratio: 1;
  border-radius: 50%; cursor: pointer;
}
.foodspin:focus-visible { outline: 2px solid var(--paper); outline-offset: 6px; }
/* In the footer: white line drawings on the dark background (the sketches are drawn in ink, so
   they're turned pure white), sitting on the same line as the email address. */
/* the badge floats beside the email, centred on it, without making the row taller (which pushed
   the email away from the heading above) */
.mail-row { position: relative; padding-right: calc(clamp(76px, 7.4vw, 124px) + 32px); }
.mail-row .foodspin { position: absolute; right: 0; top: 50%; translate: 0 -50%; }
.foodspin img { filter: brightness(0) invert(1); }
/* The plate: a thin ink circle the sketches sit on. Its line matches the sketches' average
   stroke (11.65px in the 480px artwork = 2.43% of the badge), so it scales with them. */
.foodspin::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  /* an inset shadow rather than a border: borders round down to whole pixels */
  box-shadow: inset 0 0 0 calc(var(--size) * 0.0243) var(--tomato);
}
.foodspin__wheel { position: absolute; inset: 0; animation: foodspin 24s linear infinite; }
/* Hand-off between sketches, as a relay (line drawings look messy when two overlap):
   the outgoing sketch shrinks a touch and fades out quickly (accelerating), then the next
   one grows into place from slightly smaller (decelerating). They never show together.
   Both scale from the centre, so the bite stays exactly in place. Transform/opacity only. */
.foodspin img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transform: scale(0.92);
  transition:
    opacity 170ms cubic-bezier(0.7, 0, 0.84, 0),
    transform 170ms cubic-bezier(0.7, 0, 0.84, 0);
  will-change: opacity, transform;
}
.foodspin img.is-on {
  opacity: 1; transform: scale(1);
  transition:                       /* waits for the outgoing sketch to clear first */
    opacity 280ms cubic-bezier(0.22, 1, 0.36, 1) 170ms,
    transform 340ms cubic-bezier(0.16, 1, 0.3, 1) 170ms;
}
.foodspin img.is-entering { transform: scale(0.92); transition: none; }
@keyframes foodspin { to { transform: rotate(360deg); } }
.foodspin.is-paused .foodspin__wheel { animation-play-state: paused; }
@media (max-width: 760px) { .foodspin { display: none; } .mail-row { padding-right: 0; } }
@media (prefers-reduced-motion: reduce) { .foodspin__wheel { animation: none; } }
.home-intro p.aside { color: var(--ink); }

.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 0 var(--gutter) 18px;
}
.section-head .count { color: var(--ink-soft); }

/* ------------------------------------------------------------------ cards */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px) var(--gap);
  padding-inline: var(--gutter);
}
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

.card { display: block; text-decoration: none; }
.card__media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
  border-radius: 4px;
}
.card__media img, .card__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out), opacity var(--t-med) var(--ease-out);
}
.card__media img, .card__media video { object-position: var(--cardpos, 50% 50%); } /* nudged in the card picker */
.card__media video { opacity: 0; }
/* a graphic floating over a case study's opening picture (hero_float in lead-picks.json) */
.b-hero .hero__float {
  position: absolute; left: var(--fl, 50%); top: 50%; translate: -50% -50%; z-index: 2;
  width: var(--fw, 40%); height: auto; max-width: none; pointer-events: none;
}
@container (max-width: 640px) { .b-hero .hero__float { width: var(--fws, var(--fw, 40%)); } }

/* a graphic floating over the middle of a card's picture (card_float in lead-picks.json) */
.card__media .card__float {
  position: absolute; inset: auto; left: 50%; top: 50%; translate: -50% -50%; z-index: 2;
  width: var(--fw, 60%); height: auto; max-width: none; object-fit: contain; pointer-events: none;
}
/* the card's own picture rules (fill the frame, grow on hover) must not touch it */
.card:hover .card__media .card__float { transform: none; }
.lead--static-zoom .card__media .card__float { scale: none; object-position: 50% 50%; }   /* not part of the zoomed picture */
.card.is-playing .card__media video { opacity: 1; }
@media (hover: hover) {
  .card:hover .card__media img, .card:hover .card__media video { transform: scale(1.035); }
  /* The picture grows a few pixels on hover. It rests 4px inside its box and fills the box on
     hover, so it can never reach the next card (the column gap is only 10–16px) or the name
     below, and nothing around it moves. All cards rest the same way so their edges line up. */
  .card__media { clip-path: inset(4px round 6px); transition: clip-path var(--t-med) var(--ease-out); }
  .card:hover .card__media, .card:focus-visible .card__media { clip-path: inset(0 round 4px); }
  /* the self-playing cards don't also zoom inside: the frame growing is their hover */
  .card[data-autoplay]:hover .card__media img, .card[data-autoplay]:hover .card__media video { transform: none; }
}
.card__meta { display: grid; gap: 6px; padding-top: 14px; }
.card__title { font-family: var(--serif); font-weight: 400; font-size: var(--fs-title); line-height: 1.1; letter-spacing: 0.04em; }

.card__desc { color: var(--ink-soft); font-size: var(--fs-small); line-height: 1.4; }
.card__desc .label { font-size: var(--fs-label); color: var(--ink); margin-right: 2px; transition: color var(--t-med) var(--ease-out); }
.card:hover .card__desc .label, .card:focus-visible .card__desc .label { color: var(--tomato-ink); }

/* homepage: brand down the left, campaign down the right */
.home-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); padding-inline: var(--gutter); align-items: start; }
.home-columns .cards--col { grid-template-columns: 1fr; padding-inline: 0; }

/* Two columns (641px+): the brand and campaign lists are dissolved into one grid too, so each row of
   cards starts at the same height however many lines the descriptions run to. Brand takes the left
   place and campaign the right (by --o). */
@media (min-width: 641px) {
  .home-columns { row-gap: clamp(36px, 4vw, 56px); }
  .home-columns > .cards--col { display: contents; }
  .home-columns > .cards--col > li { order: var(--o, 0); }
}

/* Wide windows (1700px+): the cards run 3 across. On the homepage the brand and campaign lists are
   dissolved into one grid (cards alternate, by --o); on the Work page each section gets 3 columns. */
@media (min-width: 1700px) {
  .home-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: clamp(36px, 4vw, 56px); }
  .home-columns > .cards--col { display: contents; }
  .home-columns > .cards--col > li { order: var(--o, 0); }
  .home-columns .cards [data-more][data-wide][hidden] { display: list-item; }   /* the first set is 9 when 3 across */
  .work-section .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--home { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* the freelance homepage's single list */
  .work-section .cards > li { order: var(--o3, 0); }   /* the Work page's own 3-across order (content.WORK_3COL_SWAPS) */
}
@media (max-width: 640px) { .home-columns { grid-template-columns: 1fr; row-gap: clamp(36px, 4vw, 56px); } }
.card:focus-visible { outline-offset: 8px; }

.cards [data-more][hidden] { display: none; }
.cards .is-revealing { animation: rise var(--t-slow) var(--ease-out) both; }

.more-row { display: flex; justify-content: center; padding: clamp(48px, 6vw, 80px) var(--gutter) 0; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 28px;
  border: 1px solid var(--ink); border-radius: 999px; background: transparent;
  font-family: var(--sans); font-weight: 600; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.pill-btn:hover { background: var(--ink); color: var(--paper); }
.pill-btn svg { width: 14px; height: 14px; transition: transform var(--t-med) var(--ease-out); }
.pill-btn:hover svg { transform: translateX(3px); }
.pill-btn[aria-expanded] svg { transform: rotate(90deg); }

@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ page heads */

.page-head { padding: clamp(56px, 10vh, 140px) var(--gutter) clamp(48px, 7vw, 96px); }
.page-head h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.02em;
  max-width: 14em; text-wrap: balance;
}
.page-head .lead { margin-top: 28px; max-width: 34em; font-family: var(--serif); font-size: var(--fs-lead); line-height: 1.3; letter-spacing: 0.01em; color: var(--ink-soft); }

.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.jump a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
  font-family: var(--sans); font-weight: 600; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.jump a:hover { border-color: var(--ink); }

.work-section + .work-section { margin-top: var(--section); }
.work-section__head { padding: 0 var(--gutter) clamp(28px, 3vw, 40px); display: grid; gap: 10px; }
.work-section__head h2 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h2); line-height: 1.05; letter-spacing: 0.01em; }
.work-section__head p { color: var(--ink-soft); font-family: var(--serif); font-size: var(--fs-lead); line-height: 1.3; letter-spacing: 0.01em; font-style: italic; }

.crosslink {
  margin: var(--section) var(--gutter) 0; padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap;
}
.crosslink a.big {
  font-family: var(--serif); font-size: var(--fs-h2); line-height: 1.05; letter-spacing: 0.01em; text-decoration: none;
  display: block;
}
.crosslink a.big svg { width: .55em; height: .55em; margin-left: .35em; vertical-align: baseline; transition: transform var(--t-med) var(--ease-out); }
.crosslink a.big:hover svg { transform: translate(4px, -4px); }
/* two cross-links side by side (end of the Talks and Opinions page) */
.crosslink--pair { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 28px var(--gap); align-items: start; }
.crosslink--pair .label { margin-bottom: 10px; }
@media (max-width: 640px) { .crosslink--pair { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ case study */

.cs-head { padding: clamp(48px, 9vh, 120px) var(--gutter) clamp(40px, 5vw, 72px); }
.cs-head .eyebrow { display: flex; gap: 14px; align-items: center; margin-bottom: 28px; color: var(--ink-soft); }
.cs-head .eyebrow a { text-decoration: none; }
.cs-head .eyebrow a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cs-head .eyebrow .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.cs-head h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: calc(var(--fs-display) * 1.1); line-height: 1.1; letter-spacing: -0.012em;   /* tracked out +10 (0.01em) from -0.022em; 10% larger, with room between the lines for ascenders and descenders */
  max-width: 13.5em; text-wrap: balance;
}
.cs-head__row { margin-top: clamp(40px, 6vw, 88px); row-gap: 32px; }
.cs-head__lead { grid-column: 1 / span 6; font-size: var(--fs-lead); font-family: var(--serif); line-height: 1.28; letter-spacing: 0.01em; text-wrap: pretty; }
.cs-head__meta { grid-column: 8 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-content: start; }
.cs-head__meta dt { margin-bottom: 6px; }
.cs-head__meta dd { color: var(--ink-soft); }
@media (max-width: 860px) {
  .cs-head__lead, .cs-head__meta { grid-column: 1 / -1; }
}

.cs-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); padding-bottom: var(--section); }
.cs-body > * { margin-inline: var(--gutter); }

/* the media primitive */
.m { position: relative; overflow: hidden; background: var(--paper-deep); border-radius: 3px; }
.m img, .m video { width: 100%; height: 100%; object-fit: cover; }

.m figcaption { position: absolute; left: 14px; bottom: 12px; }

/* No cropping by default: every picture keeps its own shape (--ar / --arn, set per picture by
   build.py). Rows of several pictures share one height, each column as wide as its picture's shape
   (--cols). A row saved with "Crop to fill" (.is-crop) uses the old fixed frames instead. */
.b-hero .m { aspect-ratio: var(--ar, 16 / 9); }
/* Never taller than the window: on wide, shallow windows the opening picture would otherwise be taller
   than the screen. It narrows (centred, never cropped) so its height stays within 92% of the window,
   the same rule as the full-width pictures. The hero itself narrows, so overlays and floating text stay
   in step with the picture. Phones and normal windows are unaffected. */
.cs-body > .b-hero { width: min(calc(100% - 2 * var(--gutter)), calc(92vh * var(--arn, 1.7778))); margin-inline: auto; }
.b-hero.is-crop .m { aspect-ratio: 16 / 9; }
.b-hero .m img, .b-hero .m video { position: absolute; inset: 0; }
@media (max-width: 640px) { .b-hero.is-crop .m { aspect-ratio: 4 / 5; } }

.b-full .m { aspect-ratio: var(--ar, 16 / 9); width: min(100%, calc(92vh * var(--arn, 1.7778))); margin-inline: auto; }
.b-full.is-crop .m { width: auto; max-height: 92vh; }
.b-full.is-wide .m { width: 100%; }   /* "wide": always the full page width, however tall */
.b-full .m img, .b-full .m video { position: absolute; inset: 0; }

.b-pair, .b-asym, .b-trio, .b-grid4, .g4-row { display: grid; gap: var(--gap); align-items: start; }
.b-pair, .b-asym, .b-trio, .g4-row { grid-template-columns: var(--cols, 1fr 1fr); }
.b-grid4 { grid-template-columns: 1fr; }
.b-pair .m, .b-asym .m, .b-trio .m, .b-grid4 .m { aspect-ratio: var(--ar, 4 / 3); }
.b-pair .m--space { background: none; aspect-ratio: auto; } /* a deliberate gap beside one image */
.b-pair .m img, .b-pair .m video, .b-trio .m img, .b-trio .m video,
.b-asym .m img, .b-asym .m video, .b-grid4 .m img, .b-grid4 .m video { position: absolute; inset: 0; }
/* crop to fill */
.is-crop.b-pair { grid-template-columns: 1fr 1fr; }
.is-crop.b-asym { grid-template-columns: 1.65fr 1fr; align-items: stretch; }
.is-crop.b-trio { grid-template-columns: repeat(3, 1fr); }
.is-crop.b-grid4 { grid-template-columns: repeat(2, 1fr); }
.is-crop.b-pair .m, .is-crop.b-trio .m { aspect-ratio: var(--row-ar, 4 / 3); }
.is-crop.b-asym .m { aspect-ratio: auto; min-height: 100%; }
.is-crop.b-asym .m:first-child { aspect-ratio: 16 / 10; }
.is-crop.b-grid4 .m { aspect-ratio: 16 / 9; }
@media (max-width: 760px) {
  .b-pair, .b-asym, .b-trio, .is-crop.b-pair, .is-crop.b-asym { grid-template-columns: 1fr; }
  .b-pair .m--space { display: none; }
  .is-crop.b-trio { grid-template-columns: 1fr 1fr; }
  .is-crop.b-trio .m:first-child { grid-column: 1 / -1; }
  .is-crop.b-asym .m { aspect-ratio: 4 / 3; }
}

.sec-label { grid-column: 1 / span 3; display: flex; gap: 12px; align-items: baseline; padding-top: .45em; }
.sec-label .num { color: var(--tomato-ink); font-variant-numeric: tabular-nums; }
.copy { grid-column: 4 / span 7; display: grid; gap: 1.1em; max-width: 40em; text-wrap: pretty; }
.copy strong { font-weight: 600; }

@media (max-width: 860px) {
  .sec-label, .copy { grid-column: 1 / -1; }
}

/* captions under any media row (slideshows have their own bar) */
.cs-caption { margin: 12px 0 0; color: var(--ink-soft); }

/* slideshow */
.b-slides { position: relative; }
.slides { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 3px; }
.slides .slide { position: absolute; inset: 0; opacity: 0; transition: opacity var(--t-slow) var(--ease-in-out); }
.slides .slide.is-active { opacity: 1; }
.slides { cursor: pointer; } /* click the picture for the next slide */
.slides .slide img { width: 100%; height: 100%; object-fit: contain; } /* whole pictures, never cropped */
.slides-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px;
}
.slides-bar .caption { color: var(--ink-soft); }
.slides-ctrl { display: flex; align-items: center; gap: 4px; }
.slides-ctrl .count { font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: center; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border: 0; background: transparent; border-radius: 50%; cursor: pointer;
  transition: background var(--t-fast);
}
.icon-btn:hover { background: var(--paper-deep); }
.icon-btn svg { width: 16px; height: 16px; }
.slides-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgb(255 255 255 / .2); }
.slides-progress span { display: block; height: 100%; background: var(--paper); transform-origin: left; transform: scaleX(0); }
@media (max-width: 640px) { .slides { aspect-ratio: 4 / 3; } }

/* filmstrip */
.b-marquee { margin-inline: 0 !important; overflow: hidden; padding-block: clamp(8px, 2vw, 24px); }
.marquee { display: flex; width: max-content; gap: var(--gap); animation: marquee var(--marquee-dur, 70s) linear infinite; }
.marquee__set { display: flex; gap: var(--gap); }
.marquee .m { height: clamp(200px, 30vw, 440px); flex: none; }
.marquee .m img { height: 100%; width: auto; }
.b-marquee:hover .marquee, .b-marquee:focus-within .marquee, .b-marquee.is-paused .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
.marquee-note { padding: 14px var(--gutter) 0; color: var(--ink-quiet); }

.quote { grid-column: 4 / span 8; margin-top: clamp(48px, 6vw, 80px); }
.quote p { font-family: var(--serif); font-size: var(--fs-lead); line-height: 1.32; letter-spacing: 0.01em; text-wrap: pretty; }
.quote p::before { content: "\201C"; margin-left: -0.45em; }
.quote p::after { content: "\201D"; }
.quote footer { margin-top: 18px; color: var(--night-soft); font-size: var(--fs-small); }
@media (max-width: 860px) { .quote { grid-column: 1 / -1; } .quote p::before { margin-left: 0; } }

/* credits + related */
.credits { margin: 0 var(--gutter); padding: 28px 0 0; border-top: 1px solid var(--line); }
.credits__body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px var(--gap); margin-top: 18px; align-items: start; }
.credits__team { grid-column: 1 / span 6; display: grid; gap: 1.1em; max-width: 36em; font-size: var(--fs-body); text-wrap: pretty; }
.credits__team strong { font-weight: 600; }
.credits dl { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px var(--gap); margin: 0; }
.credits__team + dl { grid-column: 8 / -1; grid-template-columns: 1fr; }
@media (max-width: 860px) { .credits__team, .credits__team + dl { grid-column: 1 / -1; } }
.credits dt { color: var(--ink-quiet); font-size: var(--fs-small); }
.credits dd { font-family: var(--sans); font-weight: 500; font-size: var(--fs-body); }

.related { padding-top: var(--section); }
/* "More work": two projects, and a third on wide windows (like the Work page's 3 across) */
.related .cards > li:nth-child(3) { display: none; }
@media (min-width: 1700px) {
  .related .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related .cards > li:nth-child(3) { display: list-item; }
}
.related .section-head h2 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h2); line-height: 1.05; letter-spacing: 0.01em; }

/* media players */
.vid-toggle {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgb(21 21 21 / .55); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity var(--t-fast);
}
.vid-toggle svg { width: 14px; height: 14px; }
.m:hover .vid-toggle, .vid-toggle:focus-visible, .m.is-paused .vid-toggle { opacity: 1; }
.m--film, .m--film-auto { background: var(--night); }
.m--film video, .m--film-auto video { object-fit: contain; }
/* silent films that play by themselves: the pause button stays in view, plus a progress line */
.m--film-auto .vid-toggle { opacity: .85; }
.vid-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 14px; cursor: pointer; display: flex; align-items: flex-end; }
.vid-progress span { display: block; width: 100%; height: 3px; background: var(--tomato); transform: scaleX(0); transform-origin: 0 50%; transition: transform 250ms linear; }
.vid-progress:hover span { height: 5px; }

/* reveal on scroll (only when JS runs and motion is welcome) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(36px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
  .b-marquee { overflow-x: auto; }
  .slides .slide { transition: none; }
}

/* ------------------------------------------------------------------ about */

.about-intro { padding: clamp(48px, 9vh, 120px) var(--gutter) 0; row-gap: 48px; align-items: start; }
.about-intro__text { grid-column: 1 / span 7; }
.about-intro__text h1 { font-family: var(--serif); font-weight: 400; font-size: var(--home-type); /* same as the homepage intro */ line-height: 1.13; letter-spacing: -0.002em; text-wrap: pretty;
  max-width: 19.3em; } /* the homepage intro's measure */
.about-intro__text .copy p.is-status { font-weight: 600; }   /* "I’m based in London and open to CD and ECD roles." */
.about-intro__text .copy { margin-top: clamp(36px, 4vw, 56px); max-width: 34em; }
/* two sizes only: the headline, then everything else at body size */
.about-intro__photo { grid-column: 9 / -1; position: sticky; top: 120px; }
.about-intro__photo .m { aspect-ratio: 1 / 1; }
.about-intro__photo .m img { position: absolute; inset: 0; object-position: 50% 30%;
  /* square crop, nudged in towards the face: less torso, more background either side */
  scale: 1.15; transform-origin: 50% 15%; }
.about-intro__photo figcaption { position: static; margin-top: 12px; color: var(--ink-quiet); font-size: var(--fs-small); }
@media (max-width: 860px) {
  .about-intro__text, .about-intro__photo { grid-column: 1 / -1; position: static; }
  .about-intro__photo { max-width: 420px; }
}
/* phones: this size sets the intro in even lines at the common widths (375 / 390 / 430) */

.block { padding: var(--section) var(--gutter) 0; }
.block__head { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.block__head h2 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h2); line-height: 1.05; letter-spacing: 0.01em; }

/* Freelance About: agencies I've worked for, all one grey whatever their own colours (each logo is used
   as a mask), each at its own height so they carry the same visual weight (content: freelance.json) */
.agencies { list-style: none; margin: 0; padding: clamp(24px, 3vw, 40px) 0 0; display: grid; width: fit-content; max-width: 100%; row-gap: clamp(28px, 3vh, 44px); }
.agencies__row ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; align-items: center; gap: clamp(36px, 4.4vw, 72px); }
.agencies__row li { flex: none; display: flex; align-items: center; min-height: 66px; }
.agency { display: block; height: calc(var(--h, 40px) * var(--s, 1)); aspect-ratio: var(--r, 3); background: var(--ink-quiet); opacity: .8;
  -webkit-mask: var(--src) left center / contain no-repeat; mask: var(--src) left center / contain no-repeat; }
@media (max-width: 760px) {
  .agencies { --s: .62; width: auto; row-gap: 18px; }
  .agencies__row ul { flex-wrap: wrap; justify-content: flex-start; gap: 18px 30px; }
  .agencies__row li { min-height: 48px; }
}
@media (forced-colors: active) { .agency { background: CanvasText; } }
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 40%), 1fr));
  /* ends where the widest line in "How I built this site" ends (its descriptions start halfway across) */
  font-size: var(--fs-body); width: min(100%, calc(50% + var(--gap) / 2 + 22.9em)); }
.logos li { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 14% 10%; }   /* no keylines */
.logos img { max-height: 100%; height: auto; max-width: 100%; object-fit: contain; mix-blend-mode: multiply; opacity: .82; } /* width set per logo (optical sizing) */

.career li { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px var(--gap); padding: 28px 0; border-bottom: 1px solid var(--line); }
.career h3 { grid-column: 1 / span 4; font-family: var(--serif); font-weight: 400; font-size: var(--fs-title); line-height: 1.1; letter-spacing: 0.01em; }
.career .role { grid-column: 5 / span 3; font-weight: 500; }
.career .role span { font-weight: 400; }
.career .role span { display: block; color: var(--ink-soft); font-size: var(--fs-small); margin-top: 4px; font-variant-numeric: tabular-nums; }
.career p { grid-column: 8 / -1; color: var(--ink-soft); max-width: 36em; }
@media (max-width: 860px) { .career h3, .career .role, .career p { grid-column: 1 / -1; } }

.awards { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.awards li { grid-column: 5 / -1; }   /* one per line, lined up with the job titles in "Where I've been" */
@media (max-width: 860px) { .awards li { grid-column: 1 / -1; } }
.awards li { padding: 18px 0; border-bottom: 1px solid var(--line); font-family: var(--sans); font-weight: 500; font-size: var(--fs-body); line-height: 1.3; }
.awards li small { display: block; font-family: var(--sans); font-size: var(--fs-small); color: var(--ink-soft); font-style: italic; margin-top: 4px; }
/* About: the awards in two columns with no rules, first five on the left and the rest on the right */
/* about as wide as the widest line in "How I built this site" on a laptop, opening up on wider screens so the
   two columns have room to breathe */
.awards--cols { --cg: clamp(var(--gap), 4vw, 96px); display: block; columns: 2; column-gap: var(--cg); font-size: var(--fs-body); padding-top: 14px;
  /* ...but the right-hand column (its longest line is the Cannes note, about 12.2em) always ends before the job
     titles in "Where I've been", which start a third of the way across (column 5 of 12) */
  width: min(100%, max(22.9em, min(calc(22.9em + clamp(0px, (100vw - 1100px) * .45, 360px)),
                                   calc((100% / 3 + var(--gap) / 3 - 12.2em - 32px) * 2 - var(--cg))))); }   /* never narrower than the laptop size */
.awards--cols li { border-bottom: 0; padding: 10px 0; break-inside: avoid; }
.awards--cols li:nth-child(5) { break-after: column; }
@media (min-width: 1600px) { .awards--cols li small { white-space: nowrap; } }   /* the Cannes note stays on one line on wide screens; narrower ones wrap it so it stays clear of the job titles */

.colophon { margin-top: 8px; }
.colophon div { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px var(--gap); padding: 18px 0; border-bottom: 1px solid var(--line); }
.colophon dt { grid-column: 1 / span 5; /* an empty column before the descriptions keeps the two apart */ font-family: var(--sans); font-weight: 500; font-size: var(--fs-body); line-height: 1.35; }
.colophon dd { grid-column: 7 / -1; color: var(--ink-soft); }
@media (max-width: 760px) { .colophon dt, .colophon dd { grid-column: 1 / -1; } }
.block__intro { margin: 28px 0 8px; font-family: var(--serif); font-size: var(--fs-lead); letter-spacing: 0.01em; font-style: italic; color: var(--ink-soft); }
/* the lines under the talks section headings: 20% smaller than the standard intro */
.block__intro--sm { font-size: calc(var(--fs-lead) * 0.8); margin-top: 20px; }

/* ------------------------------------------------------------------ opinion */

.articles li a {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px var(--gap); align-items: baseline;
  padding: clamp(22px, 2.6vw, 34px) 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.articles .pub, .articles .title { transition: transform var(--t-med) var(--ease-out); }
.articles .pub { grid-column: 1 / span 3; color: var(--ink-soft); }
.articles .title { grid-column: 4 / span 8; font-family: var(--serif); font-size: var(--home-type); line-height: 1.1; letter-spacing: 0; }
.articles .arrow { grid-column: 12; justify-self: end; width: 22px; height: 22px; transition: transform var(--t-med) var(--ease-out); }
@media (hover: hover) {
  .articles li a:hover .pub, .articles li a:hover .title { transform: translateX(14px); }
  .articles li a:hover .arrow { transform: translate(3px, -3px); }
}
@media (max-width: 760px) {
  .articles .pub { grid-column: 1 / -2; } .articles .title { grid-column: 1 / -2; grid-row: 2; } .articles .arrow { grid-row: 1 / span 2; align-self: center; }
}

.talks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4vw, 56px) var(--gap); margin-top: 28px; }
@media (max-width: 960px) { .talks { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .talks { grid-template-columns: 1fr; } }
.talk__frame { position: relative; aspect-ratio: 16 / 9; background: var(--night); border-radius: 4px; overflow: hidden; }
/* a thumbnail that links out (e.g. Superbrands, The Arena): the picture eases in a touch on hover */
.talk__link { position: absolute; inset: 0; display: block; }
.talk__link img { transition: transform var(--t-slow) var(--ease-out); }
.talk__link:hover img, .talk__link:focus-visible img { transform: scale(1.035); }
.talk__link:focus-visible { outline: 2px solid var(--tomato); outline-offset: 3px; }
.talk__frame img, .talk__frame iframe, .talk__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
/* the whole thumbnail is the play button; the round icon sits bottom-left so it never covers
   the talk's title slide */
.talk__play {
  position: absolute; inset: 0; width: 100%; border: 0; padding: clamp(10px, 1.2vw, 16px); background: transparent; cursor: pointer;
  display: grid; place-items: end start;
}
.talk__play span {
  width: 52px; height: 52px; border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 2px 12px rgb(11 11 11 / .22);
  transition: transform var(--t-med) var(--ease-out);
}
.talk__play span svg { width: 16px; height: 16px; margin-left: 3px; }
.talk__play:hover span { transform: scale(1.08); }
.talk h3 { font-family: var(--sans); font-weight: 500; font-size: var(--fs-body); line-height: 1.3; margin-top: 14px; }
.talk p { margin-top: 6px; font-size: var(--fs-small); }
.talk .talk__about { margin-top: 6px; color: var(--ink-soft); line-height: 1.45; }   /* what the talk argued */
.talk .talk__for { margin-top: 8px; font-family: var(--sans); font-weight: 600; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }   /* who it was for */
/* links inside the About intro copy */
.about-intro__text .copy p a { text-decoration: underline; text-decoration-color: var(--tomato); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.talk p a { color: var(--ink-soft); text-underline-offset: 3px; }

/* ------------------------------------------------------------------ footer */

.site-footer { margin-top: var(--section); background: var(--night); color: var(--paper); padding: clamp(72px, 10vw, 150px) var(--gutter) 28px; }
.site-footer .kicker { color: var(--night-soft); }
.site-footer h2 { font-family: var(--serif); font-weight: 400; font-size: var(--home-type); line-height: 1.13; letter-spacing: 0; margin-top: 20px; }
.mail {
  display: inline-block; margin-top: 0.12em;
  font-family: var(--serif); font-size: var(--home-type); line-height: 1.13; letter-spacing: 0.01em; /* same size as the homepage intro */
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em;
  text-decoration-color: var(--tomato);
  overflow-wrap: anywhere;
  transition: text-underline-offset var(--t-med) var(--ease-out);
}
.mail:hover { text-underline-offset: .26em; }
.site-footer .note { margin-top: 18px; color: var(--night-soft); max-width: 32em; }
.footer-bar {
  margin-top: clamp(72px, 10vw, 140px); padding-top: 22px; border-top: 1px solid var(--line-night);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center;
}
.footer-bar .wordmark { color: var(--paper); }
.footer-bar .wordmark > svg { width: 197px; }
.footer-bar nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bar nav a { text-decoration: none; padding: 10px 0; }
.footer-bar nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bar small { color: var(--night-soft); font-size: var(--fs-small); }

/* ------------------------------------------------------------------ 404 */
.notfound { min-height: 60vh; display: grid; align-content: center; gap: 28px; padding: 0 var(--gutter); }
.notfound h1 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-display); line-height: 1; max-width: 12em; }

.linkish {
  background: none; border: 0; padding: 10px 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  text-decoration: underline; text-underline-offset: 3px;
}
.linkish:hover { color: var(--ink); }

/* ------------------------------------------------------------------ hidden recipe page */
.recipe__body {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px var(--gap);
  padding: 0 var(--gutter);
}
.recipe__body section:first-child { grid-column: 1 / span 5; }
.recipe__body section:last-child { grid-column: 7 / -1; }
.recipe__body h2 { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.recipe__list li { display: grid; grid-template-columns: 5.5em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.recipe__list .qty { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.recipe__method { display: grid; gap: 1.1em; padding-top: 18px; max-width: 34em; }
.recipe__back { padding: clamp(48px, 7vw, 96px) var(--gutter) 0; }
@media (max-width: 860px) {
  .recipe__body section:first-child, .recipe__body section:last-child { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ lead media effects
   Set per project from James's picks (_build/lead-picks.json). */

/* slow hover zoom into a chosen point (JATO, YouGov, Arsenal) */
.lead--zoom .card__media img { transform-origin: var(--zo); transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1); }
@media (hover: hover) {
  .card.lead--zoom:hover .card__media img { transform: scale(var(--zs)); transition: transform var(--zt, 6s) cubic-bezier(0.25, 0.1, 0.25, 1); }
  /* still on hover: the video takes over from an identical first-frame still, no zoom */
  .card.lead--still:hover .card__media img, .card.lead--still:hover .card__media video { transform: none; }
}
.card.lead--zoom:focus-visible .card__media img { transform: scale(var(--zs)); transition: transform var(--zt, 6s) cubic-bezier(0.25, 0.1, 0.25, 1); }

/* permanent zoom / crop (AND Digital: tighter on the logo; BearingPoint card: cloud only) */
.lead--static-zoom .card__media img, .lead--static-zoom .card__media video,
.b-hero.lead--static-zoom .m img, .b-hero.lead--static-zoom .m video { scale: var(--sz); transform-origin: var(--so); object-position: var(--sp, 50% 50%); }

/* BearingPoint opener: show only the left of the frame (the cloud), centred on white */
.b-hero.lead--crop .m { background: #fff; }
.b-hero.lead--crop .m img, .b-hero.lead--crop .m video {
  object-fit: contain; clip-path: inset(0 var(--clip) 0 0); translate: var(--shift) 0;
}

/* Axis: the ad's yellow frame, timestamp, logo and headline build onto the clean photo */
.card__media, .b-hero { container-type: inline-size; }
.b-hero { position: relative; }
.axov { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.axov > * {
  position: absolute; display: block; opacity: 0;
  transition: opacity 180ms cubic-bezier(0.7, 0, 0.84, 0), transform 180ms cubic-bezier(0.7, 0, 0.84, 0);
}
.axov__frame { border: max(2px, 0.6cqw) solid #F2C93B; transform: scale(1.035); }
/* the card's own image rule (fill the box) must not touch the overlay pieces */
.card__media .axov > img, .b-hero .axov > img { inset: auto; height: auto; object-fit: initial; max-width: none; }

 .axov__frame { --d: 0ms; }
.card.lead--overlay:hover .axov > *, .card.lead--overlay:focus-visible .axov > *, .axov.is-on > * {
  opacity: 1; transform: none;
  transition: opacity 380ms cubic-bezier(0.22, 1, 0.36, 1) var(--d), transform 520ms cubic-bezier(0.16, 1, 0.3, 1) var(--d);
}
/* 16:9 opener: the ad's original layout */
.axov.axov--hero .axov__frame { left: 2.29%; top: 4.44%; right: 2.29%; bottom: 4.63%; border-width: max(2px, 0.52cqw); }

/* 4:3 thumbnail: same pieces, laid out for the tighter frame */
.axov.axov--card .axov__frame { left: 3.5%; top: 4.5%; right: 3.5%; bottom: 4.5%; border-width: max(2px, 0.7cqw); }

@media (max-width: 640px) {   /* the opener is 4:5 on phones */
  .axov.axov--hero .axov__frame { left: 4%; top: 3.5%; right: 4%; bottom: 3.5%; border-width: max(2px, 0.9cqw); }
  
  
  
}
@media (prefers-reduced-motion: reduce) {
  .axov > *, .card.lead--overlay:hover .axov > *, .axov.is-on > * { transition: none; }
  .card.lead--zoom:hover .card__media img { transform: none; }
}

/* ------------------------------------------------------------------ toast ("Email copied to clipboard"), centred on screen */
.toast {
  position: fixed; left: 50%; top: 50%; z-index: 80;
  translate: -50% -50%; transform: translateY(12px) scale(.96); opacity: 0; pointer-events: none;
  background: var(--tomato-ink); color: #fff; border-radius: 999px;
  padding: 16px 28px; font-size: var(--fs-body); font-weight: 500; white-space: nowrap;
  box-shadow: 0 12px 40px rgb(11 11 11 / .18);
  transition: opacity 160ms cubic-bezier(0.7, 0, 0.84, 0), transform 160ms cubic-bezier(0.7, 0, 0.84, 0);
}
.toast:empty { display: none; }
.toast.is-on {
  opacity: 1; transform: none;
  transition: opacity 260ms cubic-bezier(0.22, 1, 0.36, 1), transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) { .toast, .toast.is-on { transition: none; transform: none; } }

/* ------------------------------------------------------------------ case study reading progress: a thin tomato line along the top */
.read-progress {
  position: fixed; left: 0; top: 0; z-index: 90; width: 100%; height: 3px;
  background: var(--tomato); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}

/* ------------------------------------------------------------------ the secret romesco page: the one page in full paprika */
html:has(body.is-romesco) { background: #C93B22; }
body.is-romesco {
  --paper: #C93B22; --paper-deep: #B9341D;
  --ink: #FFF6F1; --ink-soft: #FFF0EA; --ink-quiet: #FFF0EA;
  --line: rgb(255 246 241 / 0.35);
  --tomato-ink: #FFF6F1;
  background: var(--paper); color: var(--ink);
}
.is-romesco ::selection { background: #FFF6F1; color: #C93B22; }
.is-romesco .toast { background: var(--night); color: #fff; }
/* the footer keeps the site's own colours */
.is-romesco .site-footer {
  --paper: #F6F3F1; --paper-deep: #EDE9E6; --ink: #0B0B0B; --ink-soft: #5B5755; --ink-quiet: #6B6664;
  --line: rgb(11 11 11 / 0.14); --tomato-ink: #BE351D;
}

/* ------------------------------------------------------------------ LinkedIn + CV links (footer, phone menu, About intro) */
.profile-links { display: flex; flex-wrap: wrap; gap: 10px 28px; font-family: var(--sans); font-weight: 600; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; }
.profile-links a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; text-decoration: underline; text-decoration-color: var(--tomato); text-decoration-thickness: 1px; text-underline-offset: 5px; transition: text-underline-offset var(--t-med) var(--ease-out); }
.profile-links a:hover { text-underline-offset: 8px; }
.profile-links svg { width: 11px; height: 11px; flex: none; }
.profile-links--footer { margin-top: 26px; }
.profile-links--about { margin-top: 10px; }   /* sits with the intro, about a paragraph's gap below it */
.profile-links--menu { margin-top: 14px; }

/* an optional label on a project, e.g. "Pitch-winning work" (case study eyebrow only) */
.eyebrow .note-tag { color: var(--ink); }

/* About intro heading: each sentence on its own line, with a little air between them */
.about-h__line { display: block; }
.about-h__line + .about-h__line { margin-top: 0.42em; }

/* a full-width picture cropped to a set frame (recipe option "frame", e.g. 16 / 9; "pos" sets the crop) */
.b-full.is-framed .m img, .b-full.is-framed .m video { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }

/* ------------------------------------------------------------------ the condensed story (build.py story_recipe)
   Client + problem beside a picture, a picture beside insight + idea, then the result as a full-width
   light strip: the whole story is read by the third picture. */
.b-story { display: grid; gap: clamp(8px, 1.5vw, 24px); padding-top: clamp(32px, 4vw, 64px); }
.b-story__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; padding-block: clamp(24px, 3.5vw, 56px); }
.b-story__text { grid-column: 1 / span 5; display: grid; gap: clamp(28px, 3vw, 44px); align-content: start; padding-right: clamp(0px, 3vw, 48px); }
.b-story__sec { display: grid; gap: 22px; align-content: start; }
.b-story .sec-label { grid-column: auto; }
.b-story .copy { grid-column: auto; max-width: 34em; }
.b-story__fig { grid-column: 7 / -1; }
.b-story__row--b .b-story__fig { grid-column: 1 / span 6; grid-row: 1; }
.b-story__row--b .b-story__text { grid-column: 8 / -1; grid-row: 1; padding-right: 0; }
.b-story__row--solo .b-story__text { grid-column: 4 / span 7; }
.b-story__result { background: var(--paper-deep); border-radius: 6px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gap); align-items: end; padding: clamp(28px, 4vw, 64px); margin-top: clamp(8px, 2vw, 32px); }
.b-story__res-text { grid-column: 1 / span 6; display: grid; gap: 22px; align-content: start; }
.b-story__result .copy { max-width: 34em; }
.b-story__stats { grid-column: 8 / -1; display: flex; flex-wrap: wrap; gap: 24px clamp(24px, 3vw, 56px); }
.sr-stat b { display: block; font: 400 var(--fs-h2)/1 var(--serif); letter-spacing: 0.01em; font-variant-numeric: lining-nums; }
.sr-stat span { display: block; margin-top: 8px; color: var(--ink-soft); font-size: var(--fs-small); max-width: 16em; }
.b-story__result .quote { grid-column: 1 / span 6; margin: 0; padding-top: 28px; border-top: 1px solid var(--line); }
.b-story__result .quote p { color: var(--ink); }
.b-story__result .quote footer { color: var(--ink-soft); }
/* with a quote, the stats stand level with its last line (the box's base), not up beside the label */
.b-story__result:has(.quote) .b-story__stats { grid-row: 1 / span 2; align-self: end; }
@media (max-width: 860px) {
  .b-story__text, .b-story__fig, .b-story__row--b .b-story__fig, .b-story__row--b .b-story__text, .b-story__row--solo .b-story__text,
  .b-story__res-text, .b-story__stats, .b-story__result .quote { grid-column: 1 / -1; grid-row: auto; padding-right: 0; }
  .b-story__row--b .b-story__text { order: -1; }          /* on phones the words come before their picture, as they do in row 1 */
}

/* No widows: a single word is never left alone on the last line of a paragraph, and short headings and captions share their words evenly */
p, li, dd, blockquote p, .card__desc { text-wrap: pretty; }
h2, h3, h4, .card__title, .cs-caption, .crosslink a.big { text-wrap: balance; }
.nw { white-space: nowrap; }

/* card previews: a play badge where the browser won't autoplay (or the video is large), tap to play */
.card__play {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  background: rgb(21 21 21 / .55); color: #fff; display: none; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.card__play svg { width: 16px; height: 16px; margin-left: 2px; }
.card__play .i-pause { display: none; }
.card.needs-tap:not(.is-playing) .card__play { display: grid; }
/* with Reduce Motion on, a playing card keeps a pause button */
.reduced-motion .card.is-playing .card__play { display: grid; }
.reduced-motion .card.is-playing .card__play .i-play { display: none; }
.reduced-motion .card.is-playing .card__play .i-pause { display: block; }
