/* Agathe Léger — one stylesheet for the whole site.
 * The homepage and every project page share this file, so the token layer, the
 * ink layer and the chrome are defined once. Font paths are relative to it.
 */
/* =========================================================================
     TYPE — Telegraf Regular, one weight, nothing else.
     With no weight axis available, hierarchy comes from size, letter-spacing,
     case and colour. font-synthesis is off so the browser never fakes a bold.
     ========================================================================= */
  @font-face {
    font-family: "Telegraf";
    src: url("fonts/PPTelegraf-Regular.woff2") format("woff2"),
         url("fonts/PPTelegraf-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }

  :root {
    --font: "Telegraf", ui-sans-serif, system-ui, -apple-system, sans-serif;

    /* The wordmark sits a step above the role line, close enough that the two
       still read as halves of one statement. */
    --t-display: clamp(1.85rem, 6.2vw, 4.5rem);
    --t-role: clamp(1.5rem, 5vw, 3.6rem);
    --t-statement: clamp(1.3rem, 3vw, 2.25rem);
    --t-title: clamp(1.55rem, 3.7vw, 2.6rem);
    --t-subtitle: clamp(1.1rem, 2.1vw, 1.35rem);
    --t-body: 0.95rem;
    --t-small: 0.85rem;

    --track-display: -0.035em;
    --track-statement: -0.02em;
    --track-title: -0.028em;
    --track-subtitle: -0.012em;
    --track-eyebrow: 0.15em;
    --track-meta: 0.06em;

    /* How wide the page ever gets, and the gutter it keeps at the edges. One
       value: the homepage wrapper and the project wrapper each carried their
       own copy of this, so changing the page width only moved half the site. */
    --page-max: 1160px;
    --page-gutter: clamp(2rem, 6vw, 5rem);

    /* Brand — orange, from #F26430 */
    --brand-50: #fff1ea;
    --brand-100: #ffe0d1;
    --peach-200: #fce1d2; /* pill hover fill */
    --brand-200: #ffc2a3;
    --brand-300: #ff9e72;
    --brand-400: #f8814d;
    --brand-500: #f26430;
    --brand-600: #d6491c;
    --brand-700: #ac3714;
    --brand-800: #7e2a11;
    --brand-900: #4f1a0b;

    /* Accent — periwinkle, from #8884FF */
    --accent-purple-100: #e1dfff;
    --accent-purple-300: #b3afff;
    --accent-purple-500: #8884ff;
    --accent-purple-700: #5b56d9;
    --accent-purple-900: #322f8c;

    /* Accent — sky, from #8FD8FF */
    --accent-blue-100: #dcf3ff;
    --accent-blue-300: #b3e8ff;
    --accent-blue-500: #8fd8ff;
    --accent-blue-700: #4fa9d6;
    --accent-blue-900: #1e5a78;

    /* Neutrals */
    --neutral-light: #faf6f6;
    --neutral-white: #ffffff;
    --neutral-mid: #6b6b76;
    --neutral-mid-light: #a3a1ac;
    /* The lightest grey that still clears 4.5:1 on --neutral-light. */
    --neutral-mid-dark: #6f6d78;
    --neutral-line: rgba(25, 25, 35, 0.12);
    --neutral-dark: #191923;
    --neutral-dark-600: #34343f;
    --neutral-dark-line: rgba(250, 246, 246, 0.14);

    /* Shadows are layered: a tight contact edge, a mid body, a short ambient
       spread. Tighter blur than a single wide blur, so edges stay defined. */
    --sh-1: 0 1px 2px rgba(25, 25, 35, .05), 0 4px 8px -4px rgba(25, 25, 35, .10);
    --sh-2: 0 1px 2px rgba(25, 25, 35, .07), 0 6px 12px -6px rgba(25, 25, 35, .14), 0 14px 24px -14px rgba(25, 25, 35, .12);
    --sh-3: 0 2px 4px rgba(25, 25, 35, .08), 0 10px 20px -8px rgba(25, 25, 35, .18), 0 22px 34px -20px rgba(25, 25, 35, .16);
    /* Per-object accent glow, only on hover. */
    --glow-brand: rgba(242, 100, 48, .42);
    --glow-purple: rgba(136, 132, 255, .42);
    --glow-blue: rgba(105, 195, 240, .46);
    --glow-dark: rgba(25, 25, 35, .3);

    --ease: cubic-bezier(.16, 1, .3, 1);

    /* Laid under a caption that has to sit on top of a photograph. */
    --scrim-foot: linear-gradient(to top, rgba(25,25,35,.72), rgba(25,25,35,0));
    /* A fine grain, so the flat fills do not read as plastic. */
    --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.5'/></svg>");

    /* Page-level ink, so hovering a project can repaint the page without
       any text rule needing to know which wash is active. */
    --page-bg: var(--neutral-light);
    --ink: var(--neutral-dark);
    --ink-soft: var(--neutral-mid);
    --ink-faint: var(--neutral-mid-dark);   /* 4.7:1 on the page ground */
    --rule: var(--neutral-line);
    --surface: var(--neutral-white);
    /* The mount an image sits on: the page ground, a shade deeper. Derived
       from the ink, so it follows every wash without a second declaration. */
    --tile: color-mix(in srgb, var(--ink) 5%, var(--page-bg));
    --tile-r: 1.4rem;   /* the mount an image sits on */
    --img-r: 0.8rem;    /* the photo inside it */
  }

  /* One wash per project, each with ink that stays legible on it. */
  body[data-wash="deep-blue"] {
    --page-bg: #001c73; --ink: #eaf0ff; --ink-soft: rgba(234,240,255,.72);
    --ink-faint: rgba(234,240,255,.56); --rule: rgba(234,240,255,.18); --surface: rgba(234,240,255,.07);
  }
  body[data-wash="light-blue"] {
    --page-bg: #ddf1fb; --ink: #10394d; --ink-soft: rgba(16,57,77,.72);
    --ink-faint: rgba(16,57,77,.72); --rule: rgba(16,57,77,.16); --surface: rgba(255,255,255,.6);
  }
  body[data-wash="orange"] {
    --page-bg: #ffe7d9; --ink: #5a2410; --ink-soft: rgba(90,36,16,.72);
    --ink-faint: rgba(90,36,16,.71); --rule: rgba(90,36,16,.16); --surface: rgba(255,255,255,.6);
  }
  body[data-wash="purple"] {
    --page-bg: #e7e5ff; --ink: #2c2977; --ink-soft: rgba(44,41,119,.72);
    --ink-faint: rgba(44,41,119,.72); --rule: rgba(44,41,119,.16); --surface: rgba(255,255,255,.6);
  }
  /* Facilitation is the one dark card, so instead of tinting the page it flips
     it: the whole ink layer inverts and the page drops below the card's own
     black. Everything else in the hero is a pastel, so the fan lights up. */
  body[data-wash="graphite"] {
    --page-bg: #14141c; --ink: #faf6f6; --ink-soft: rgba(250,246,246,.72);
    --ink-faint: rgba(250,246,246,.48); --rule: rgba(250,246,246,.16); --surface: rgba(250,246,246,.07);
    /* The dark card would sink into its own wash, so here it lifts a step. */
    --face-dark: var(--neutral-dark-600);
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  html, body { margin: 0; padding: 0; }
  body {
    background: var(--page-bg);
    color: var(--ink);
    font-family: var(--font);
    font-weight: 400;
    font-size: var(--t-body);
    line-height: 1.65;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .7s var(--ease), color .7s var(--ease);
  }
  body.locked { overflow: hidden; }
  /* UA stylesheets bold these — with one cut available, that would be synthesised. */
  h1, h2, h3, h4, b, strong, cite, th { font-weight: 400; }

  .wrap { width: min(var(--page-max), 100% - var(--page-gutter)); margin-inline: auto; }

  .eyebrow {
    font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: var(--track-eyebrow); color: var(--ink-soft);
  }

  /* =======================  MOTION  ======================= */
  .rise { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .rise.in { opacity: 1; transform: none; }
  .stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .stagger.in > * { opacity: 1; transform: none; }
  .stagger.in > *:nth-child(1) { transition-delay: .04s; }
  .stagger.in > *:nth-child(2) { transition-delay: .10s; }
  .stagger.in > *:nth-child(3) { transition-delay: .16s; }
  .stagger.in > *:nth-child(4) { transition-delay: .22s; }
  .stagger.in > *:nth-child(5) { transition-delay: .28s; }
  .stagger.in > *:nth-child(6) { transition-delay: .34s; }
  .stagger.in > *:nth-child(7) { transition-delay: .40s; }

  @media (prefers-reduced-motion: reduce) {
    .rise, .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .name .ch { animation: none !important; transform: none !important; }
    /* A minute-long loop is exactly the kind of motion the preference is for,
       and so is an arrow falling on repeat. The cue keeps its pill and its
       arrow: the shape is the message, the motion only draws the eye to it. */
    .marquee-track { animation: none !important; }
    .marquee { overflow-x: auto; }
    .sc-arrow { animation: none !important; translate: -50% 15px !important; opacity: 1; }
  }

  /* How far down the page you are. The element and its handler shipped
     without any styles, so the bar has never drawn; it scales on a transform
     rather than animating width, which would relayout on every scroll. */
  .progress {
    position: fixed; top: 0; left: 0; z-index: 60;
    width: 100%; height: 2px; transform: scaleX(0); transform-origin: 0 50%;
    background: var(--brand-500); pointer-events: none;
  }

  /* =======================  1 · HERO  ======================= */
  /* Capped rather than a flat 100vh: on a tall viewport the leftover height
     turned into dead space between the strip and Selected Work. */
  .hero {
    min-height: 100vh; min-height: min(100svh, 880px);
    padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1.25rem, 3.5vh, 2.5rem);
    text-align: center; display: flex; flex-direction: column; justify-content: center;
  }
  /* Socials on one side, language on the other — the toggle sits top right,
     where it also sits on every project page — and the place and the pill
     centred between them whatever width the two sides happen to take. */
  /* Three things on one line: the socials and the pill at the left, the place
     in the middle, the language at the right, all on the same centre. */
  .top-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
  .top-place { font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--track-eyebrow); color: var(--ink-soft); }
  .socials { justify-self: start; display: flex; align-items: center; gap: 0.5rem; }
  /* Standing in the icons' row, the pill takes their height rather than its own,
     so the three read as one set and not as a button beside two buttons. */
  .socials .talk-pill {
    margin-top: 0; height: 2.1rem; padding: 0 0.95rem;
    font-size: 0.76rem; gap: 0.45rem;
  }
  .socials .talk-pill svg { width: 14px; height: 14px; }

  /* The whole pill is the control: clicking either half goes to the other
     language, so there is no dead target. */
  .lang {
    justify-self: end; display: inline-flex; align-items: center; cursor: pointer;
    border: 1px solid var(--rule); border-radius: 999px; padding: 0.15rem;
    transition: border-color .35s ease;
  }
  .lang:hover, .lang:focus-visible { border-color: color-mix(in srgb, var(--ink) 45%, transparent); outline: none; }
  .lang-opt {
    padding: 0.35rem 0.7rem; border-radius: 999px; color: var(--ink-faint);
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em;
    transition: color .35s ease, background-color .35s ease;
  }
  .lang-opt[data-on] { background: var(--ink); color: var(--page-bg); }

  .social {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.1rem; height: 2.1rem; border-radius: 999px;
    border: 1px solid var(--rule); color: var(--ink); text-decoration: none;
    transition: border-color .35s ease, color .35s ease, transform .45s var(--ease);
  }
  .social:hover { border-color: var(--brand-500); color: var(--brand-600); transform: translateY(-2px); }
  .social svg { width: 15px; height: 15px; }

  @media (max-width: 620px) {
    /* Too narrow for three across: the sides take the first row and the place
       drops under them, centred across both. */
    .top-bar { grid-template-columns: auto auto; row-gap: 1.1rem; }
    .socials { grid-column: 1; grid-row: 1; }
    .lang { grid-column: 2; grid-row: 1; }
    .top-place { grid-column: 1 / -1; grid-row: 2; }
  }

  .talk-pill {
    display: inline-flex; align-items: center; gap: 0.6rem;
    margin-top: 0.9rem; padding: 0.6rem 1.3rem;
    border: 1px solid var(--rule); border-radius: 999px;
    background: none; color: var(--ink); text-decoration: none;
    font-size: 0.85rem; letter-spacing: 0;
    transition: border-color .35s ease, color .35s ease, box-shadow .45s var(--ease), transform .45s var(--ease);
  }
  .talk-pill:hover { border-color: var(--brand-500); color: var(--brand-600); transform: translateY(-2px); box-shadow: var(--sh-1); }
  .talk-pill svg { width: 15px; height: 15px; transition: transform .45s var(--ease); }
  .talk-pill:hover svg { transform: translate(3px, -3px); }

  .name { font-size: var(--t-display); line-height: 1; letter-spacing: var(--track-display); margin: clamp(1.5rem, 4vw, 2.5rem) 0 0; }
  .name .ch { display: inline-block; transform: translateY(0.45em); animation: rise-ch .9s var(--ease) forwards; }
  /* The portrait reads as one more glyph in the name: it rises with the
     letters and is sized off the display type, not off pixels. */
  .name-photo { width: 0.88em; height: 0.88em; border-radius: 50%; object-fit: cover; margin: 0 0.24em; vertical-align: -0.12em; }
  /* Sized off the display type, which shrinks faster than the portrait wants
     to: on a tablet or a phone it is set half again as large so it still
     reads as a face rather than a dot. */
  @media (max-width: 900px) {
    .name-photo { width: 1.32em; height: 1.32em; vertical-align: -0.32em; }
  }
  @keyframes rise-ch { to { transform: none; } }

  /* Fan layout: cards overlap in a shallow arc. Positions are computed in JS
     because the clearance each card needs depends on where its neighbour
     actually lands. */
  .fan {
    position: relative; height: clamp(200px, 19vw, 264px);
    width: min(1060px, 94vw); margin: clamp(1.75rem, 4vw, 2.75rem) auto 0;
  }
  /* The card is an unclipped shell: it carries the position, the tilt and the
     tags. The painted surface lives one level in, where overflow can be cut
     without also cutting the tags that fly out of it. */
  .fan-card {
    position: absolute; top: 0; left: 50%;
    width: clamp(196px, 26vw, 248px); height: 100%;
    text-align: left; color: var(--neutral-dark);
    transition: translate .6s var(--ease), rotate .6s var(--ease), scale .45s var(--ease),
                filter .5s var(--ease);
    will-change: translate, rotate;
  }
  .fc-surface {
    position: absolute; inset: 0; border-radius: 1.5rem; overflow: hidden; isolation: isolate;
    background-color: var(--face);
    /* Off-axis light: a lift at the top-left, a deepening toward the bottom-right. */
    background-image:
      radial-gradient(120% 90% at 12% 0%, rgba(255,255,255,.40), rgba(255,255,255,0) 58%),
      linear-gradient(155deg, rgba(255,255,255,.13), rgba(25,25,35,.10));
    box-shadow: var(--sh-2), inset 0 1px 0 rgba(255,255,255,.32);
    transition: box-shadow .5s var(--ease);
  }
  .fc-surface::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45; mix-blend-mode: overlay;
    background-image: var(--grain);
  }
  /* Specular sweep, only while hovered. */
  .fc-surface::after {
    content: ""; position: absolute; inset: -40% -60%; pointer-events: none;
    background: linear-gradient(72deg, transparent 42%, rgba(255,255,255,.42) 50%, transparent 58%);
    translate: -85% 0; opacity: 0;
    transition: translate 1s var(--ease), opacity .3s ease;
  }
  .fan-card:hover .fc-surface::after, .fan-card:focus-visible .fc-surface::after { translate: 85% 0; opacity: 1; }

  /* Every tag is white; only the ink changes, taking the card's own hue at the
     darkest step that still clears AA on white (6.3 / 5.6 / 7.6 / 7.6:1). */
  .fan-card { --tag-bg: var(--neutral-white); }
  .fan-card[data-accent="brand"]  { --face: var(--brand-300);         --glow: var(--glow-brand);  --tag-ink: var(--brand-700); }
  .fan-card[data-accent="purple"] { --face: var(--accent-purple-300); --glow: var(--glow-purple); --tag-ink: var(--accent-purple-700); }
  .fan-card[data-accent="blue"]   { --face: var(--accent-blue-300);   --glow: var(--glow-blue);   --tag-ink: var(--accent-blue-900); }
  .fan-card[data-accent="dark"]   { --face: var(--face-dark, var(--neutral-dark)); --glow: var(--glow-dark);   --tag-ink: var(--neutral-dark); color: var(--neutral-light); }
  .fan-card[data-accent="dark"] .fc-surface { box-shadow: var(--sh-2), inset 0 1px 0 rgba(255,255,255,.12); }

  /* Title and body share one box, so they hand over in sequence rather than
     crossing: whichever is leaving clears out in HAND_OFF, and the one arriving
     waits exactly that long before it starts. */
  .fc-face, .fc-body {
    position: absolute; inset: 1.35rem calc(1.35rem + var(--clear, 0px)) 1.35rem calc(1.35rem + var(--clear-left, 0px));
    display: flex; align-items: flex-end; z-index: 1;
    /* Whichever label is leaving clears out in --hand-off; the one arriving
       waits exactly that long, so the two are never legible at once. */
    --hand-off: .18s;
    --t-leave: opacity var(--hand-off) var(--ease), transform .3s var(--ease);
    --t-arrive: opacity .3s var(--ease) var(--hand-off), transform .42s var(--ease) var(--hand-off);
  }
  .fc-title { font-size: clamp(1.02rem, 1.35vw, 1.3rem); line-height: 1.18; text-transform: uppercase; letter-spacing: 0.02em; }
  .fc-body { font-size: 1rem; line-height: 1.38; }
  /* At rest the title is arriving and the body leaving. */
  .fc-face { opacity: 1; transform: none;               transition: var(--t-arrive); }
  .fc-body { opacity: 0; transform: translateY(10px);   transition: var(--t-leave); }
  /* On hover the two swap roles, delays included. */
  .fan-card:hover .fc-face, .fan-card:focus-visible .fc-face { opacity: 0; transform: translateY(-10px); transition: var(--t-leave); }
  .fan-card:hover .fc-body, .fan-card:focus-visible .fc-body { opacity: 1; transform: none;              transition: var(--t-arrive); }

  /* The hovered card rides up out of the arc; JS pushes its neighbours aside. */
  .fan-card:hover, .fan-card:focus-visible { scale: 1.03; z-index: 20; outline: none; }
  .fan-card:hover .fc-surface, .fan-card:focus-visible .fc-surface {
    box-shadow: var(--sh-2), 0 14px 30px -16px var(--glow), 0 26px 52px -30px var(--glow), inset 0 1px 0 rgba(255,255,255,.36);
  }

  /* Skill tags, flying out from behind the card — the same gesture the project
     cards use, at the smaller scale the fan can afford. */
  /* Anchored past the card's edge and tucked back underneath it at rest, so on
     hover they clear the card entirely instead of sitting on its copy. Which
     side each tag takes is decided in JS: the outer cards throw everything back
     toward the middle of the fan, so nothing reaches the viewport edge. */
  .ct-l { right: 100%; translate: 46px 0; }
  .ct-r { left: 100%;  translate: -46px 0; }
  .ct-s0 { top: 4%;  rotate: -6deg; }
  .ct-s1 { top: 36%; rotate: 7deg; }
  .ct-s2 { top: 68%; rotate: 4deg; }
  .ct-s3 { top: 88%; rotate: -5deg; }
  .fan-card:hover .ct, .fan-card:focus-visible .ct { opacity: 1; }
  .fan-card:hover .ct-l, .fan-card:focus-visible .ct-l { translate: -8px 0; }
  .fan-card:hover .ct-r, .fan-card:focus-visible .ct-r { translate: 8px 0; }
  .fan.focused .fan-card:not(:hover):not(:focus-visible) { filter: brightness(.97) saturate(.92); }

  @media (max-width: 1000px) and (min-width: 761px) {
    .fc-face, .fc-body { inset: 1.1rem calc(1.1rem + var(--clear, 0px)) 1.1rem calc(1.1rem + var(--clear-left, 0px)); }
    .fc-title { font-size: 0.92rem; }
    .fc-body { font-size: 0.82rem; line-height: 1.32; }
  }

  @media (max-width: 760px) {
    /* The cards drop the arc and carry their titles only: four paragraphs of
       body copy pushed everything below the hero off the first screen. */
    .fan { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; width: 100%; }
    .fan-card { position: relative; top: auto; left: auto; width: auto; height: auto; min-height: 96px; padding: 1.1rem; translate: none !important; scale: none !important; }
    /* Nothing to reveal without hover, and no room for either — the title
       carries the card on its own. */
    .fc-tags, .fc-body { display: none; }
    .fan-card:nth-child(even) { rotate: 1deg !important; }
    .fan-card:nth-child(odd)  { rotate: -1deg !important; }
    /* Back in the flow, but still positioned: .fc-surface is absolute, so it
       would paint over any static sibling however high its z-index. */
    .fc-face { position: relative; inset: auto; align-items: flex-start; opacity: 1 !important; transform: none !important; }
  }

  /* Scroll cue. Readers were treating the fan as the end of the page, so a mark
     under the subline says otherwise: an arrow travelling down a tall pill, on
     a loop. It stays put and simply scrolls away with the hero — fading it out
     underfoot read as something breaking rather than something finished. It is
     a real link, because a pill that looks pressable and does nothing is what
     got us here. */
  .scroll-cue {
    position: relative; display: block;
    width: 2.1rem; height: 3.2rem; border-radius: 999px;
    margin: clamp(1.5rem, 3.4vw, 2.4rem) auto 0;
    /* One colour drives both: the ring is drawn in currentColor and the arrow
       inherits it, so the two can never drift apart. */
    color: var(--rule); border: 1px solid currentColor;
    text-decoration: none;
    transition: color .4s var(--ease), opacity .45s var(--ease);
  }
  /* The pill is narrower than a thumb. The target is widened past it rather
     than the pill being fattened to suit. */
  .scroll-cue::after {
    content: ""; position: absolute; top: 0; bottom: 0;
    left: 50%; translate: -50% 0; width: 44px;
  }
  .scroll-cue:hover { color: var(--brand-500); }
  /* Once the cue has climbed into the top fifth of the screen it has said its
     piece, and a mark pointing down from up there only confuses things. */
  .scroll-cue.gone { opacity: 0; pointer-events: none; }
  /* Drawn rather than typed. A glyph is centred on its advance width, which is
     not the same as centred on its ink, and it changes with whatever font
     actually loads. The path is symmetric about the middle of its own box, so
     it is centred wherever it renders. */
  .sc-arrow {
    position: absolute; left: 50%; top: 0;
    display: block; width: 1rem; height: 1rem;
    animation: scFall 2.2s var(--ease) infinite;
  }
  @keyframes scFall {
    0%   { translate: -50% 7px;  opacity: 0; }
    25%  { opacity: 1; }
    65%  { opacity: 1; }
    100% { translate: -50% 23px; opacity: 0; }
  }

  /* ---------------------------------------------------------------
     TOUCH: the card opens on a tap
     Without hover the reveal had nothing to trigger it, so the cards read as
     buttons that did nothing. A tap now takes the page's wash and throws the
     card's tags out around it.
     --------------------------------------------------------------- */
  @media (hover: none) {
    /* :hover sticks after a tap on a touch screen. The tap class is the only
       thing that opens a card here, so hover is taken out of the argument. */
    .fan-card:hover .fc-face { opacity: 1; transform: none; }
    .fan-card:hover .fc-body { opacity: 0; transform: translateY(10px); }
    .fan-card:hover .ct { opacity: 0; }
    .fan-card:hover .fc-surface::after { opacity: 0; }

    .fan-card.tapped .ct { opacity: 1; }
    .fan-card.tapped .ct-l { translate: -8px 0; }
    .fan-card.tapped .ct-r { translate: 8px 0; }
    .fan.focused .fan-card:not(.tapped) { filter: brightness(.97) saturate(.92); }
  }

  /* Stacked two-up, the tags still scatter around the card rather than lining
     up inside it — the scatter is the gesture. They throw inward, across the
     gutter and over the card next door, because outward would take them off the
     screen. The open card rises above its neighbours so its tags land on top of
     them rather than under. */
  @media (hover: none) and (max-width: 760px) {
    .fan-card { min-height: 112px; }
    .fan-card.tapped { z-index: 20; }
    .fc-tags { display: block; }
    .ct {
      opacity: 0; white-space: nowrap;
      padding: 0.3rem 0.62rem; font-size: 0.62rem;
      transition: opacity .3s var(--ease), translate .3s var(--ease);
    }
    .fan-card .ct-l, .fan-card .ct-r { translate: 0 7px; }
    .fan-card.tapped .ct-l, .fan-card.tapped .ct-r { translate: 0 0; }
    .ct-s3 { display: none; }

    /* Anchored past the card's own edge rather than inside it, so a short tag
       breaks out as surely as a long one. Left column throws right. */
    .fan-card:nth-child(odd) .ct { left: auto; }
    .fan-card:nth-child(odd) .ct-s0 { right: -30%; top: 0.1rem;  rotate: -4deg; }
    .fan-card:nth-child(odd) .ct-s1 { right: -46%; top: 2.7rem;  rotate: 2.5deg; }
    .fan-card:nth-child(odd) .ct-s2 { right: -22%; top: 5.3rem;  rotate: -2deg; }

    /* Right column throws left, leaning the other way so the two columns do not
       read as the same sticker printed twice. */
    .fan-card:nth-child(even) .ct { right: auto; }
    .fan-card:nth-child(even) .ct-s0 { left: -30%; top: 0.1rem;  rotate: 4deg; }
    .fan-card:nth-child(even) .ct-s1 { left: -46%; top: 2.7rem;  rotate: -2.5deg; }
    .fan-card:nth-child(even) .ct-s2 { left: -22%; top: 5.3rem;  rotate: 2deg; }
  }

  /* Copy confirmation. A mailto needs a mail client wired up and silently does
     nothing where there is none, so the address is copied and this says so. It
     sits above everything and takes no clicks of its own. */
  .copied {
    position: fixed; left: 50%; bottom: 1.5rem; z-index: 90;
    translate: -50% 0; transform: translateY(10px);
    padding: 0.62rem 1.15rem; border-radius: 999px;
    background: var(--ink); color: var(--page-bg);
    font-size: 0.78rem; letter-spacing: 0.01em; white-space: nowrap;
    box-shadow: var(--sh-2);
    opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
  .copied.on { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    .copied { transform: none; transition: opacity .2s linear; }
  }

  .subline {
    margin-top: clamp(2.5rem, 7vw, 4.25rem);
    letter-spacing: -0.03em; line-height: 0.96;
    font-size: var(--t-role); text-transform: uppercase;
    color: color-mix(in srgb, var(--ink) 30%, transparent);
  }

  /* Bounded rather than `margin-top: auto`: the auto pushed the strip to the
     floor and opened a huge gap on tall viewports. */
  .clients { margin-top: clamp(1.75rem, 5.5vh, 3.75rem); }
  .clients .heading { font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--track-eyebrow); color: var(--ink-soft); }
  .marquee {
    overflow: hidden; margin-top: 0.55rem;
    /* Only the bottom needs depth: the arc dips, it never rises. */
    padding-top: 0.9rem;
    padding-bottom: clamp(1.5rem, 4.4vw, 2.8rem);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  }
  .marquee-track { display: flex; align-items: center; gap: 1rem; width: max-content; animation: slide 52s linear infinite; }
  /* A pill crosses a phone in a fraction of the distance it crosses a desktop,
     so the same seconds read as a crawl. Shorter loop, same pace to the eye. */
  @media (max-width: 760px) {
    .marquee-track { animation-duration: 42s; }
  }
  .marquee:hover .marquee-track,
  .marquee:focus-within .marquee-track,
  .marquee.paused .marquee-track { animation-play-state: paused; }
  .marquee span:hover { background: var(--ink); border-color: var(--ink); color: var(--page-bg); }
  .marquee span {
    display: inline-flex; align-items: center; white-space: nowrap;
    padding: 0.6rem 1.15rem; border-radius: 999px;
    /* Outline only, stroked in the text's own colour. */
    border: 1px solid currentColor; background: none;
    font-size: 0.76rem; letter-spacing: 0.02em; color: var(--ink-soft);
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
    /* Set by the arc pass; the fallback keeps the row flat if JS never runs. */
    translate: 0 var(--arc-y, 0px);
    rotate: var(--arc-r, 0deg);
  }
  @keyframes slide { to { transform: translateX(-50%); } }

  /* =======================  SECTION SHELL  ======================= */
  section { padding-block: clamp(4rem, 9vw, 7.5rem); }
  /* The homepage closes on a <section> and so takes this padding under its
     last card; a project page closes on a <footer> and was taking none, which
     left the dark card flush against the bottom of the page. The same value,
     so the two can never drift apart. Bottom only — the space above the card
     on a project page already comes from the prev/next nav before it. */
  footer.wrap { padding-bottom: clamp(4rem, 9vw, 7.5rem); }
  .sec-head { text-align: center; margin-bottom: clamp(2rem, 4.5vw, 3.5rem); }
  .sec-title { font-size: var(--t-title); line-height: 1.08; letter-spacing: var(--track-title); margin: 0.9rem auto 0; max-width: 26ch; text-wrap: balance; }

  /* =======================  2 · SELECTED WORK  ======================= */
  /* Each project is a coloured panel carrying its artwork, with the claim and
     credits set below it. Hovering lifts the artwork, floats the tags out and
     repaints the whole page in that project's wash. */
  /* Narrower than .wrap and with a wider column gap: the tags fly outward on
     hover and need room on both sides rather than running off the screen. */
  .work-wrap { width: min(1080px, 100% - clamp(3.5rem, 13vw, 11rem)); margin-inline: auto; }
  .work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3.5rem) clamp(2.5rem, 6vw, 5rem); }
  /* The right column runs lower, so the two columns cross rather than line up. */
  .work-item:nth-child(even) { margin-top: clamp(2.5rem, 7vw, 6rem); }
  @media (max-width: 800px) {
    .work-grid { grid-template-columns: 1fr; }
    .work-item:nth-child(even) { margin-top: 0; }
  }

  .work-item {
    display: block; width: 100%; text-align: left; background: none; border: 0;
    font: inherit; color: inherit; padding: 0; cursor: pointer;
  }
  .work-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 8px; border-radius: 1.9rem; }
  /* Later cards paint over earlier ones, which would clip the floating tags. */
  .work-item:hover, .work-item:focus-visible, .work-item.is-active { position: relative; z-index: 5; }

  .wp {
    position: relative; border-radius: 1.8rem; aspect-ratio: 4 / 3;
    background: var(--card); overflow: visible;
    box-shadow: var(--sh-2);
    transition: box-shadow .55s var(--ease), transform .55s var(--ease);
  }
  .wp-clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
  /* Same off-axis light as the hero cards, so both sections share a surface. */
  .wp-clip::before {
    content: ""; position: absolute; inset: 0;
    background-image:
      radial-gradient(120% 90% at 15% 0%, rgba(255,255,255,.30), rgba(255,255,255,0) 60%),
      linear-gradient(155deg, rgba(255,255,255,.10), rgba(25,25,35,.10));
  }
  .wp-clip::after {
    content: ""; position: absolute; inset: 0; opacity: .4; mix-blend-mode: overlay;
    background-image: var(--grain);
  }

  /* The artwork sits low in the panel and rises out of it on hover. */
  /* Centred rather than pinned, so shots of different ratios all sit balanced
     in the panel. The hover transform composes on top of this translate. */
  .wp-art {
    position: absolute; left: 8%; right: 8%; top: 50%; translate: 0 -50%;
    transition: transform .7s var(--ease), filter .7s var(--ease);
    filter: drop-shadow(0 14px 26px rgba(25,25,35,.18));
  }
  /* The transparent shots have nothing at the corners, so the radius only
     shows on the ones that are full-bleed compositions. */
  .wp-art img { display: block; width: 100%; height: auto; border-radius: 0.9rem; }
  .work-item:hover .wp-art, .work-item:focus-visible .wp-art, .work-item.is-active .wp-art {
    transform: translateY(-10%) scale(1.08);
    filter: drop-shadow(0 26px 44px rgba(25,25,35,.26));
  }

  /* Tags that fly out from behind the panel on hover. */
  .wp-tags, .fc-tags { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
  .ft, .ct {
    position: absolute; white-space: nowrap;
    padding: 0.5rem 1rem; border-radius: 999px;
    background: var(--tag-bg); color: var(--tag-ink);
    font-size: 0.74rem; letter-spacing: 0.04em;
    box-shadow: var(--sh-1);
    opacity: 0; transition: opacity .45s var(--ease), translate .6s var(--ease), rotate .6s var(--ease);
  }
  /* Flyout distance in px, capped so a tag never reaches the viewport edge. */
  .wp-tags { --fly: clamp(24px, 5vw, 76px); }
  .ft-0 { top: 13%; left: 0;  translate: 14px 0; rotate: -7deg; }
  .ft-1 { top: 22%; right: 0; translate: -14px 0; rotate: 8deg; }
  .ft-2 { top: 50%; left: 0;  translate: 22px 0; rotate: 5deg; }
  .ft-3 { top: 60%; right: 0; translate: -22px 0; rotate: -6deg; }
  .work-item:hover .ft, .work-item:focus-visible .ft, .work-item.is-active .ft { opacity: 1; }
  .work-item:hover .ft-0, .work-item:focus-visible .ft-0, .work-item.is-active .ft-0 { translate: calc(-1 * var(--fly)) 0; }
  .work-item:hover .ft-1, .work-item:focus-visible .ft-1, .work-item.is-active .ft-1 { translate: var(--fly) 0; }
  .work-item:hover .ft-2, .work-item:focus-visible .ft-2, .work-item.is-active .ft-2 { translate: calc(-0.8 * var(--fly)) 0; }
  .work-item:hover .ft-3, .work-item:focus-visible .ft-3, .work-item.is-active .ft-3 { translate: calc(0.8 * var(--fly)) 0; }
  @media (max-width: 620px) { .wp-tags { display: none; } }
  /* The fan runs the same pill a size down, and above its neighbours. */
  .fc-tags { z-index: 3; }
  /* The hero's tags used to be cut below the shared size; on a desktop screen
     there is room for them to be the larger of the two, not the smaller. */
  .ct { padding: 0.5rem 0.95rem; font-size: 0.76rem; }

  .work-meta { padding: 1.5rem 0.25rem 0; }
  .work-item, .work-item:hover { text-decoration: none; }
  .work-claim { margin: 0; font-size: clamp(1.15rem, 1.9vw, 1.55rem); line-height: 1.28; letter-spacing: var(--track-statement); text-wrap: pretty; }
  .work-credits { margin-top: 0.9rem; font-size: 0.78rem; letter-spacing: var(--track-meta); color: var(--ink-soft); }
  .work-credits .client { color: var(--ink); }
  /* At rest the credit line is just the client; the tags arrive with the
     floating ones, so both readings of the same list appear together. */
  .work-credits .sep { margin: 0 0.45rem; }
  .work-credits .sep, .work-credits .tag { opacity: 0; transition: opacity .45s var(--ease); }
  .work-item:hover .work-credits .sep, .work-item:focus-visible .work-credits .sep,
  .work-item.is-active .work-credits .sep { opacity: .45; }
  .work-item:hover .work-credits .tag, .work-item:focus-visible .work-credits .tag,
  .work-item.is-active .work-credits .tag { opacity: 1; }

  /* Card colours, and the tag tones that go with each. */
  .work-item[data-theme="deep-blue"], .tst-project[data-theme="deep-blue"]  { --card: #002fbd; --tag-bg: #e8edfd; --tag-ink: #001c73; --card-glow: rgba(0,47,189,.45); }
  .work-item[data-theme="light-blue"], .tst-project[data-theme="light-blue"] { --card: #b3e8ff; --tag-bg: #10394d; --tag-ink: #eef7fb; --card-glow: rgba(105,195,240,.5); }
  .work-item[data-theme="orange"], .tst-project[data-theme="orange"]     { --card: #ff9e72; --tag-bg: #5a2410; --tag-ink: #ffe7d9; --card-glow: rgba(242,100,48,.45); }
  .work-item[data-theme="purple"], .tst-project[data-theme="purple"]     { --card: #b3afff; --tag-bg: #2c2977; --tag-ink: #e7e5ff; --card-glow: rgba(136,132,255,.45); }
  .work-item:hover .wp, .work-item:focus-visible .wp, .work-item.is-active .wp {
    transform: translateY(-6px);
    box-shadow: var(--sh-3), 0 18px 38px -16px var(--card-glow), 0 34px 64px -34px var(--card-glow);
  }

  /* "Read the case" rides with the pointer over a project. */
  .case-cursor {
    position: fixed; top: 0; left: 0; z-index: 80; pointer-events: none;
    padding: 0.62rem 1.15rem; border-radius: 999px;
    background: var(--ink); color: var(--page-bg);
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.13em; white-space: nowrap;
    opacity: 0; scale: .8; transition: opacity .3s var(--ease), scale .3s var(--ease);
  }
  .case-cursor.on { opacity: 1; scale: 1; }
  @media (hover: none) { .case-cursor { display: none; } }

  /* =======================  3 · DESIGN VALUES  ======================= */
  /* A row of buttons that advances on its own, so the section keeps moving
     even when nobody touches it. A grid, not wrapping flex, so the four never
     break to 3 + 1: they go 4, then 2 + 2, then one per row. */
  .value-links {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem; margin-top: clamp(1.75rem, 4vw, 2.75rem);
  }
  @media (max-width: 900px) { .value-links { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 480px) { .value-links { grid-template-columns: 1fr; } }

  .value-link {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 2.9rem; padding: 0.65rem 1.15rem; cursor: pointer; font-family: inherit;
    border: 1px solid var(--rule); border-radius: 999px; background: transparent;
    font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.11em;
    color: var(--ink-soft); box-shadow: 0 0 0 0 transparent;
    transition: color .4s var(--ease), background-color .4s var(--ease),
                border-color .4s var(--ease), box-shadow .5s var(--ease), transform .4s var(--ease);
  }
  .value-link:hover {
    /* The stroke gives way to a peach fill — one step darker and more saturated
       than the page, so the pill reads as a surface rather than an outline. */
    color: var(--brand-700);
    border-color: transparent;
    background: var(--peach-200);
    transform: translateY(-1px);
  }
  .value-link[aria-selected="true"] {
    background: var(--brand-500); border-color: transparent; color: var(--neutral-white);
    transform: translateY(-2px);
    /* A short brand-tinted lift, so the active pill reads as raised rather than
       just filled in. */
    box-shadow: 0 2px 4px rgba(25,25,35,.06), 0 8px 18px -10px var(--glow-brand);
  }

  /* The same countdown the testimonial tabs run, so both navs read alike. */
  .vl-name { position: relative; z-index: 1; }
  .vl-fill {
    position: absolute; inset: 0; transform-origin: left; transform: scaleX(0);
    background: color-mix(in srgb, var(--ink) 10%, transparent);
  }
  .value-link[aria-selected="true"] .vl-fill { background: rgba(255,255,255,.22); }
  .value-link[aria-selected="true"] .vl-fill { animation: dotFill var(--rotate-ms, 5000ms) linear forwards; }
  /* The row's timer stops while it is hovered, so the fill holds with it. */
  .value-links.paused .vl-fill { animation-play-state: paused; }

  .values-stage { text-align: center; min-height: clamp(180px, 22vw, 240px); display: flex; align-items: center; justify-content: center; }
  /* --t-statement sits a step under --t-title, so the heading leads. */
  .values-statement { font-size: var(--t-statement); line-height: 1.22; letter-spacing: var(--track-statement); max-width: 24ch; margin: 0 auto; text-wrap: balance; transition: opacity .45s var(--ease), transform .45s var(--ease); }
  .values-statement.swap { opacity: 0; transform: translateY(14px); }
  .values-statement .lead { color: var(--brand-500); }

  /* =======================  4 · EXPERIENCE  ======================= */
  /* The list moves to a right column, with a portrait and a short note beside it. */
  /* minmax(0, …) so the tracks hold their 3/7 split: the portrait is given an
     explicit height and derives a width from its ratio, and without this that
     derived width becomes the column's minimum and pushes the split open
     whenever the note beside it is short. */
  .xp-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
  @media (max-width: 1000px) {
    .xp-layout { grid-template-columns: 1fr; }
    /* Stacked, a full-width 4:5 portrait would run over 1000px tall — and
       narrowed, it sits under the middle of the section rather than off to
       one side of it. */
    .xp-aside { max-width: 420px; margin-inline: auto; }
  }

  .xp-aside { display: flex; flex-direction: column; gap: 1rem; }
  /* Stacked, the portrait keeps a 4:5 crop. Side by side, JS gives it whatever
     height the list leaves, so the column tops out level with the list instead
     of running past it. */
  .xp-portrait {
    position: relative; aspect-ratio: 4 / 5; min-height: 240px; border-radius: 1.5rem; overflow: hidden;
    background: linear-gradient(200deg, var(--accent-purple-500), var(--brand-500) 62%, var(--brand-300));
  }
  /* Cropped a touch above centre, so the face survives whatever height the
     note leaves the portrait. */
  .xp-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; }
  .xp-note { border: 1px solid var(--rule); border-radius: 1.3rem; padding: 1.3rem 1.4rem; }
  .xp-note p { margin: 0 0 0.8rem; font-size: 0.88rem; line-height: 1.6; color: var(--ink-soft); }
  .xp-note p:last-child { margin-bottom: 0; }

  .xp-item {
    width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; text-decoration: none;
    display: grid; grid-template-columns: 1fr auto; align-items: baseline;
    gap: 0.25rem 1rem; padding: clamp(0.75rem, 1.3vw, 0.95rem) 0.4rem;
    position: relative; isolation: isolate;
    transition: padding-left .45s var(--ease);
  }
  .xp-item::before {
    content: ""; position: absolute; inset: 0; z-index: -1; background: var(--surface);
    transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease);
  }
  /* Every row lights up the same way; what differs is where it goes. */
  .xp-item:hover::before, .xp-item:focus-visible::before { transform: scaleY(1); }
  .xp-item:hover, .xp-item:focus-visible { padding-left: 1.5rem; outline: none; }
  .xp-item.linked { cursor: pointer; }
  .xp-item.muted { cursor: default; }
  .xp-year { grid-column: 1 / -1; font-size: 0.72rem; letter-spacing: var(--track-meta); color: var(--ink-faint); }
  .xp-org { font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.25; letter-spacing: var(--track-subtitle); }
    /* Role sits inline after the company, so each entry is one line of text. */
  .xp-org .role { font-size: 0.82rem; letter-spacing: 0; color: var(--ink-soft); }
  .xp-org .role::before { content: "·"; margin: 0 0.5rem; opacity: .45; }
  .xp-arrow { font-size: 1.1rem; color: var(--accent-purple-700); transition: transform .45s var(--ease); }
  .xp-item.linked:hover .xp-arrow, .xp-item.linked:focus-visible .xp-arrow { transform: translate(5px, -5px); }
  .xp-item.muted .xp-arrow { color: var(--ink-faint); font-size: 0.7rem; }


  .xp-cta { display: flex; justify-content: center; margin-top: 1.25rem; }
  /* Reuses the hero pill, with the icon travelling down rather than away. */
  .xp-cta .talk-pill { margin-top: 0; }
  .xp-cta .talk-pill:hover svg { transform: translate(0, 3px); }

  /* The list is dense enough not to need the full section run-up. */
  #experience { padding-block: clamp(3rem, 6.5vw, 5rem); }
  #experience .sec-head { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }

  .hover-preview {
    position: fixed; top: 0; left: 0; z-index: 50; pointer-events: none;
    width: 250px; height: 165px; border-radius: 1.1rem; overflow: hidden;
    opacity: 0; scale: .9; rotate: -3deg;
    transition: opacity .35s var(--ease), scale .35s var(--ease);
    box-shadow: var(--sh-3);
    display: flex; align-items: flex-end; padding: 1rem; color: var(--neutral-white);
    font-size: 0.85rem; letter-spacing: var(--track-subtitle);
  }
  .hover-preview.on { opacity: 1; scale: 1; }
  /* Drop an `img` on an experience row and it fills the panel; without one the
     accent gradient shows through instead. */
  .hover-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
  .hover-preview.has-img img { display: block; }
  .hover-preview.has-img::after {
    content: ""; position: absolute; inset: auto 0 0; height: 55%;
    background: var(--scrim-foot);
  }
  .hp-label { position: relative; z-index: 1; }
  .hover-preview[data-accent="brand"]  { background: linear-gradient(150deg, var(--brand-500), var(--brand-700)); }
  .hover-preview[data-accent="purple"] { background: linear-gradient(150deg, var(--accent-purple-500), var(--accent-purple-900)); }
  .hover-preview[data-accent="blue"]   { background: linear-gradient(150deg, var(--accent-blue-500), var(--accent-blue-900)); }
  .hover-preview[data-accent="dark"]   { background: linear-gradient(150deg, var(--neutral-dark-600), var(--neutral-dark)); }
  @media (hover: none) { .hover-preview { display: none; } }

  /* On a project page the panel is the project's own card: its colour, with
     the picture inset on top. The Experience list on the homepage keeps the
     full-bleed treatment it had. */
  .nav-preview[data-theme] { background: var(--card-bg); color: var(--card-ink); padding: 0.6rem; }
  .nav-preview[data-theme="deep-blue"]  { --card-bg: #002fbd;                  --card-ink: var(--neutral-white); }
  .nav-preview[data-theme="orange"]     { --card-bg: var(--brand-500);         --card-ink: var(--neutral-dark); }
  .nav-preview[data-theme="light-blue"] { --card-bg: var(--accent-blue-500);   --card-ink: var(--neutral-dark); }
  .nav-preview[data-theme="purple"]     { --card-bg: var(--accent-purple-500); --card-ink: var(--neutral-dark); }
  .nav-preview[data-theme="graphite"]   { --card-bg: var(--neutral-dark);      --card-ink: var(--neutral-light); }
  /* A project carrying a colour drawn from its own card picture sets --card-bg
     and --card-ink on the panel itself, which wins over the themes above. The
     themes stay as the answer for anything that has no picture to read. */
  /* Sized explicitly: the panel's own rule sets the picture to fill it, and an
     auto width against that would let the intrinsic size win and spill out. */
  .nav-preview.has-img img {
    inset: 0.6rem 0.6rem 2.1rem; width: calc(100% - 1.2rem); height: calc(100% - 2.7rem);
    border-radius: 0.7rem;
  }
  /* The scrim exists to lift a label off a photograph; here the label sits on
     the card's own colour instead. */
  .nav-preview.has-img::after { display: none; }
  .nav-preview .hp-label { color: inherit; }

  /* =======================  5 · TESTIMONIALS  ======================= */
  /* Three slides on a 3s timer. Each slide is two cards: the quote on one
     side, the project it came out of on the other. */
  .tst { position: relative; }
  .tst-viewport { overflow: hidden; border-radius: 1.6rem; }
  .tst-track { display: flex; transition: translate .8s var(--ease); }
  .tst-slide {
    flex: 0 0 100%; display: grid; grid-template-columns: 1fr 1fr;
    gap: clamp(0.75rem, 1.6vw, 1.25rem); align-items: stretch;
  }
  .tst-slide > * { opacity: .35; transition: opacity .7s var(--ease); }
  .tst-slide.current > * { opacity: 1; }

  .tst-quote {
    border-radius: 1.6rem; padding: clamp(1.5rem, 3vw, 2.4rem);
    background: var(--tint); color: var(--neutral-dark);
    display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
    min-height: clamp(320px, 34vw, 400px);
  }
  .tst-quote .qmark { font-size: 3rem; line-height: 0.6; height: 1.1rem; color: var(--qmark); opacity: .75; }
  .tst-quote blockquote { margin: 0; font-size: clamp(0.95rem, 1.25vw, 1.08rem); line-height: 1.6; }
  .tst-quote .who .name-line { font-size: 1rem; letter-spacing: var(--track-subtitle); }
  .tst-quote .who .role-line { font-size: 0.8rem; color: var(--neutral-mid); margin-top: 0.2rem; }

  .tst-project {
    position: relative; border-radius: 1.6rem; overflow: hidden;
    background: var(--card); min-height: clamp(320px, 34vw, 400px);
    display: flex; align-items: flex-end; padding: clamp(1.25rem, 2.4vw, 1.9rem);
  }
  /* The shot is the card: it covers the whole panel at every width, so no
     coloured plate shows behind it. */
  .tst-art { position: absolute; inset: 0; }
  .tst-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
  /* A scrim at the foot, so the button and the label keep their footing over
     whatever the photograph happens to be doing down there. */
  .tst-project::after {
    content: ""; position: absolute; inset: auto 0 0; height: 45%;
    background: var(--scrim-foot);
  }
  .tst-cta {
    position: relative; z-index: 1; text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.6rem;
    border: 0; border-radius: 999px; cursor: pointer; font-family: inherit;
    padding: 0.7rem 1.2rem; background: var(--neutral-dark); color: var(--neutral-light);
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
    transition: background .3s ease, transform .4s var(--ease);
  }
  .tst-cta:hover { background: var(--brand-500); transform: translateX(3px); }
  .tst-cta .arr { transition: transform .4s var(--ease); }
  .tst-cta:hover .arr { transform: translate(3px, -3px); }
  /* No published case: name the project rather than offer a dead button. */
  .tst-label {
    position: relative; z-index: 1; font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--neutral-light);
  }

  .tst-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem; }
  /* Named tabs on desktop so the choice is legible, not just a row of marks. */
  .tst-dot {
    position: relative; overflow: hidden; cursor: pointer; font-family: inherit;
    border: 1px solid var(--rule); border-radius: 999px; background: none;
    padding: 0.6rem 1.2rem; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--ink-faint); transition: color .35s ease, border-color .35s ease;
  }
  .tst-dot:hover { color: var(--ink-soft); }
  .tst-dot[aria-selected="true"] { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 45%, transparent); }
  .tst-name { position: relative; }
  /* The fill tracks the timer, so the countdown to the next slide is visible. */
  .tst-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: color-mix(in srgb, var(--ink) 10%, transparent); }
  /* The interval lives in one place, in the script; the fill reads it. */
  .tst-dot[aria-selected="true"] .tst-fill { animation: dotFill var(--tst-ms, 4000ms) linear forwards; }
  @keyframes dotFill { to { transform: scaleX(1); } }
  @media (max-width: 820px) {
    /* Keep a real tap target rather than a 3px bar. */
    .tst-dot { padding: 0.65rem 1rem; min-height: 2.75rem; font-size: 0.7rem; letter-spacing: 0.08em; }
  }

  @media (max-width: 820px) {
    .tst-slide { grid-template-columns: 1fr; }
    .tst-quote, .tst-project { min-height: 0; }
    /* No aspect-ratio here: paired with the height JS sets, it was driving the
       width too and leaving the card narrower than the quote above it. */
    .tst-project { width: 100%; min-height: 150px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .tst-track { transition: none; }
    .tst-dot[aria-selected="true"] span, .value-link[aria-selected="true"] .vl-fill { animation: none; transform: scaleX(1); }
  }

  /* =======================  6 · FOOTER  ======================= */
  .contact { background: var(--neutral-dark); color: var(--neutral-light); border-radius: clamp(1.5rem, 3vw, 2.5rem); padding: clamp(2.25rem, 6vw, 4.5rem); text-align: center; }
  .contact h2 { font-size: var(--t-title); line-height: 1.1; letter-spacing: var(--track-title); margin: 0 auto 2.25rem; max-width: 21ch; text-wrap: balance; }
  .contact-cta {
    display: inline-flex; align-items: center; gap: 1rem; text-decoration: none;
    background: var(--brand-500); color: var(--neutral-white);
    padding: 1rem 1.1rem 1rem 1.8rem; border-radius: 999px; font-size: 1rem; letter-spacing: var(--track-subtitle);
    transition: transform .45s var(--ease), background .35s ease;
  }
  .contact-cta:hover { transform: translateY(-3px); background: var(--brand-400); }
  .contact-cta .arrow { width: 2.2rem; height: 2.2rem; border-radius: 999px; background: var(--neutral-white); color: var(--neutral-dark); display: flex; align-items: center; justify-content: center; transition: transform .45s var(--ease); }
  .contact-cta:hover .arrow { transform: rotate(-45deg); }
  .contact-foot {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto;
    gap: clamp(1.75rem, 3.5vw, 3.5rem); align-items: start;
    text-align: left; margin-top: clamp(3rem, 7vw, 5rem);
  }
  .cf-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
  .cf-block { display: flex; flex-direction: column; gap: 0.4rem; text-decoration: none; }
  .cf-head {
    display: inline-flex; align-items: baseline; gap: 0.45rem;
    font-size: var(--t-small); letter-spacing: var(--track-subtitle); line-height: 1.25;
    color: var(--neutral-white); transition: color .35s ease;
  }
  .cf-sub { font-size: 0.76rem; line-height: 1.5; letter-spacing: 0; color: var(--neutral-light); opacity: .72; }
  .cf-ico { width: 0.9em; height: 0.9em; margin-right: 0.4em; vertical-align: -0.08em; }
  .cf-arrow { display: inline-block; transition: transform .45s var(--ease); }
  a.cf-block:hover .cf-head { color: var(--brand-400); }
  a.cf-block:hover .cf-arrow { transform: translate(2px, -2px); }
  .cf-top {
    justify-self: end; display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.72rem 1.2rem; border-radius: 999px; border: 1px solid var(--neutral-dark-line);
    color: var(--neutral-light); text-decoration: none;
    font-size: var(--t-small); letter-spacing: var(--track-subtitle);
    transition: border-color .35s ease, color .35s ease, transform .45s var(--ease);
  }
  .cf-top:hover { border-color: var(--brand-400); color: var(--brand-400); transform: translateY(-3px); }
  .cf-legal {
    margin: clamp(2.25rem, 4.5vw, 3.25rem) 0 0; text-align: center;
    font-size: 0.72rem; letter-spacing: var(--track-meta); color: var(--neutral-light); opacity: .72;
  }
  @media (max-width: 1000px) {
    .contact-foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .cf-top { grid-column: 1 / -1; justify-self: center; }
  }
  @media (max-width: 620px) {
    .contact-foot { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1.75rem; }
    .cf-links { grid-template-columns: 1fr; justify-items: center; gap: 1.5rem; }
    .cf-block { align-items: center; }
  }

  /* Case content — the beats, the facts and the numbers. Rendered by
     project.js on every project page. */
  .facts-grid { display: grid; grid-template-columns: repeat(var(--facts, 3), minmax(0, 1fr)); gap: 1.25rem; padding: 0.5rem 0 1.75rem; }
  .fact strong { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ink-soft); margin-bottom: 0.45rem; }
  .fact span { font-size: 0.92rem; line-height: 1.55; }
  .band { height: clamp(150px, 24vw, 250px); border-radius: 1.4rem; margin: 2rem 0; }
  .band[data-accent="brand"]  { background: linear-gradient(140deg, var(--brand-400), var(--brand-700)); }
  .band[data-accent="purple"] { background: linear-gradient(140deg, var(--accent-purple-500), var(--accent-purple-900)); }
  .band[data-accent="blue"]   { background: linear-gradient(140deg, var(--accent-blue-500), var(--accent-blue-900)); }
  .band[data-accent="dark"]   { background: linear-gradient(140deg, var(--neutral-dark-600), var(--neutral-dark)); }
  /* A section is one of two shapes. Full width puts its label out in the left
     gutter beside a statement that carries the whole measure; split runs the
     copy down a narrow left column with the work itself on the right. */
  /* A case-study chapter is a <section>, so the homepage's section rhythm
     lands on it; these want their own, tighter spacing. */
  .beat { margin: clamp(5rem, 11vw, 8.5rem) 0; padding-block: 0; }
  .beat .lab {
    font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: #f26240; line-height: 1;
  }
  .beat .lab span {
    display: inline-block; padding: 0.7rem 1.25rem; border-radius: 999px;
    border: 1px solid currentColor;
  }
  .beat h2 { text-wrap: pretty; letter-spacing: var(--track-title); margin: 1.1rem 0 1rem; line-height: 1.14; }
  /* #F26240 sits at 2.97:1 on this ground — just under the 3:1 AA asks of text
     this size. Kept as chosen; #EF613F is the nearest shade that clears it. */
  .beat-accent h2 { color: #f26240; }
  .beat p { margin: 0 0 0.9rem; color: var(--ink-soft); line-height: 1.7; }
  .beat p:last-child { margin-bottom: 0; }
  .beat-bullets {
    list-style: none; margin: 1.1rem 0 0; padding: 0;
    display: grid; gap: 0.7rem; color: var(--ink-soft); line-height: 1.6;
  }
  .beat-bullets li { position: relative; padding-left: 1.4rem; }
  .beat-bullets li::before {
    content: ""; position: absolute; left: 0; top: 0.62em;
    width: 0.5rem; height: 1px; background: var(--brand-500);
  }

  .beat-full { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
  /* Pinned, so a section that continues the one above it — no label of its own
     — still lines up with the labelled ones instead of falling into the
     gutter as the first grid item. */
  .bf-copy { grid-column: 2; }
  .beat-full h2 { margin-top: 0; font-size: clamp(1.5rem, 3.6vw, 2.6rem); }
  .beat-full p { font-size: 1.05rem; }

  .beat-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
  /* Smaller than a full-width statement, comfortably larger than the body. */
  .beat-split h2 { font-size: clamp(1.3rem, 2.7vw, 1.95rem); }
  .beat-split p { font-size: 1.05rem; }
  /* The copy stays where it is set. It used to be sticky, riding down the
     viewport while the pictures beside it scrolled past, which read as the
     text drifting inside its own section. */
  .bs-copy { position: static; }

  /* A section that ends on a link out. The pill is the page's own, so the only
     thing to say here is where it sits and that the arrow leans on hover. */
  .beat-link { margin: 1.4rem 0 0; }
  .beat-link .talk-pill { margin-top: 0; }
  .beat-link .arrow { transition: transform .4s var(--ease); }
  .beat-link .talk-pill:hover .arrow { transform: translate(2px, -2px); }
  /* The wide slot: a third grid child under both columns, for a picture that
     closes the section rather than illustrating one side of it. The margin
     matches the gap a figure group already leaves above itself. */
  .bs-wide { grid-column: 1 / -1; margin-top: 1.6rem; }
  .bs-wide .case-figs { margin-top: 0; }
  .build-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.8rem; }
  .build-list li { border: 1px solid var(--neutral-line); border-radius: 1.15rem; padding: 1.2rem 1.35rem; background: var(--neutral-white); }
  .build-list h3 { margin: 0 0 0.45rem; font-size: 1rem; letter-spacing: var(--track-subtitle); }
  .build-list p { margin: 0; font-size: 0.88rem; color: var(--neutral-mid); line-height: 1.6; }
  /* Two by two: four across leaves each figure too narrow to read as a
     headline number. */
  .impact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
  /* An odd last card takes the full width rather than sitting half-empty
     beside nothing. */
  .impact-grid > .impact:last-child:nth-child(odd) { grid-column: 1 / -1; }
  @media (max-width: 620px) { .impact-grid { grid-template-columns: minmax(0, 1fr); } }
  .impact { border-radius: 1.15rem; padding: 1.4rem; color: var(--neutral-dark); }
  .impact:nth-child(odd)  { background: var(--brand-200); }
  .impact:nth-child(even) { background: var(--brand-100); }
  /* A card can name its own step on the orange ramp instead of taking the
     alternation above, so a set can run dark to light in reading order. */
  .impact.impact-deep  { background: var(--brand-300); }
  .impact.impact-mid   { background: var(--brand-200); }
  .impact.impact-light { background: var(--brand-100); }
  /* With a picture the card reads across: the words on the left, the thing
     they are about on the right. */
  .impact.has-img {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(1rem, 3vw, 1.75rem); align-items: center;
  }
  .impact .imp-img {
    display: block; width: 100%; height: auto;
    border-radius: var(--img-r); background: var(--neutral-white);
  }
  @media (max-width: 760px) {
    .impact.has-img { grid-template-columns: minmax(0, 1fr); }
  }
  .imp-lab {
    font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.14em;
    opacity: 0.65; margin-bottom: 0.7rem;
  }
  .impact .fig { font-size: clamp(1.45rem, 3.4vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.05; }
  .impact .cap-txt { font-size: 0.95rem; margin-top: 0.7rem; line-height: 1.5; opacity: 0.85; }
  .pullquote { font-size: clamp(1.15rem, 2.6vw, 1.55rem); line-height: 1.4; letter-spacing: var(--track-statement); border-left: 3px solid var(--brand-500); padding-left: 1.4rem; margin: 2.5rem 0; }
  .pullquote cite { display: block; font-style: normal; font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.85rem; letter-spacing: 0; }
  .pullquote cite span { display: block; color: var(--ink-faint); margin-top: 0.2rem; }
  /* Two, explicitly: auto-fit found room for a third track and left the pair
     narrower than the column they sit in. */
  .quote-pair {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 4vw, 3rem); row-gap: clamp(2rem, 5vw, 3rem);
    margin: clamp(3rem, 7vw, 5rem) 0;
  }
  @media (max-width: 820px) { .quote-pair { grid-template-columns: minmax(0, 1fr); } }
  .quote-pair .pullquote { margin: 0; font-size: clamp(1rem, 1.9vw, 1.2rem); }
  .case-close {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    /* Side by side the columns need a gutter; stacked they need a real break,
       so the row gap is the larger of the two. */
    column-gap: clamp(1.5rem, 4vw, 3rem); row-gap: clamp(2.75rem, 6vw, 4rem);
    margin-top: clamp(3rem, 7vw, 5rem);
    padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--rule);
  }
  /* A closing note is often alone on its row, and auto-fit then hands it the
     whole 1160px — 114 characters a line, about fifty past where the eye
     finds the next line reliably. Capped on its own measure instead of on the
     grid, so a row holding two notes is unaffected. */
  .cc-note { max-width: 44rem; }
  .cc-note h3 {
    margin: 0 0 0.8rem; font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    letter-spacing: var(--track-title); line-height: 1.2; color: var(--ink);
  }
  .cc-note p { margin: 0 0 0.8rem; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.7; }
  .cc-note p:last-child { margin-bottom: 0; }
  .cc-note .beat-bullets { font-size: 0.92rem; }
  .cc-learn { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
  .cc-learn li { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.7; }
  .cc-learn strong { display: block; color: var(--ink); }

  /* One image at a time where the column is too narrow for a row of them. */
  .case-slider { display: grid; gap: 0.9rem; }
  .cs-track {
    display: flex; gap: 0.9rem; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; border-radius: 1.15rem;
  }
  .cs-track::-webkit-scrollbar { display: none; }
  .cs-track:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 3px; }
  /* A fixed tile ratio exists to line grid rows up with each other. A slider
     shows one image at a time and a lone figure has nothing to line up with,
     so both take the height the picture actually needs — the track settles on
     its tallest slide and the shorter ones centre inside it. */
  .cs-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; }
  /* The tile stretches to the track height so every slide is one shape; the
     photo centres inside whatever room that leaves. */
  .cs-slide .case-fig, .bs-media > .case-fig { width: 100%; }
  /* A definite width, so the ratio the width and height attributes carry can
     produce a height before the image has loaded — with width:auto an unloaded
     image has an intrinsic width of zero and the slide collapses to its
     padding, which is what made the track resize as you moved through it.
     Capped, so one portrait cannot set a height the landscapes float around
     in, and contained so nothing is cropped to fit the box. */

  .cs-bars { display: flex; gap: 0.5rem; justify-content: center; }
  .cs-bar {
    position: relative; overflow: hidden; cursor: pointer; padding: 0; border: 0;
    width: clamp(2rem, 6vw, 3.25rem); height: 3px; border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 15%, transparent);
    transition: background .3s ease;
  }
  .cs-bar:hover { background: color-mix(in srgb, var(--ink) 30%, transparent); }
  .cs-bar:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 3px; }
  /* The fill tracks the timer, so the countdown to the next slide is visible —
     the same dotFill the value and testimonial navs run. */
  .cs-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: var(--ink); }
  .cs-bar[aria-selected="true"] .cs-fill { animation: dotFill var(--step, 4500ms) linear forwards; }
  /* A 3px-high button is under half the 24px minimum for a touch target, so on
     a pointer-less screen the bar keeps its drawn height and gains the rest as
     transparent padding, clipped back by a wrapper so the fill still reads. */
  @media (hover: none) {
    .cs-bar {
      height: auto; padding-block: 0.6rem; border-radius: 0;
      background: none; min-height: 1.5rem;
    }
    .cs-bar::before {
      content: ""; position: absolute; inset: 50% 0 auto; height: 3px;
      transform: translateY(-50%); border-radius: 999px;
      background: color-mix(in srgb, var(--ink) 15%, transparent);
    }
    .cs-bar .cs-fill {
      inset: 50% 0 auto; height: 3px; transform: translateY(-50%) scaleX(0);
      border-radius: 999px;
    }
    .cs-bar[aria-selected="true"] .cs-fill { animation-name: dotFillY; }
  }
  @keyframes dotFillY { from { transform: translateY(-50%) scaleX(0); } to { transform: translateY(-50%) scaleX(1); } }
  .case-slider.paused .cs-fill { animation-play-state: paused; }
  @media (prefers-reduced-motion: reduce) {
    .cs-bar[aria-selected="true"] .cs-fill { animation: none; transform: scaleX(1); }
  }
  .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

  /* Always one tap from the top, once the first screen is behind you. */
  .to-top {
    position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
    width: 2.9rem; height: 2.9rem; border-radius: 999px; z-index: 40;
    border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
    /* A button does not inherit the page font, so this arrow was drawn from
       Arial and did not match the one in the footer. */
    font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; box-shadow: var(--sh-2);
    /* Centred by the box rather than by the glyph's own line metrics, which
       were leaving the arrow low and slightly left. */
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .35s ease, transform .45s var(--ease), visibility .35s,
                background .3s ease, border-color .3s ease, color .3s ease;
  }
  .to-top.on { opacity: 1; visibility: visible; transform: none; }
  .to-top:hover { background: var(--brand-500); border-color: var(--brand-500); color: var(--neutral-white); }

  @media (max-width: 900px) {
    .beat-full, .beat-split { grid-template-columns: minmax(0, 1fr); }
    .bf-copy { grid-column: 1; }
  }

  /* The work at full width, with nothing in the gutter beside it. */
  .beat-media > :first-child { margin-top: 0; }
  /* A page that opens straight onto its work sits its first picture closer to
     the facts than a section of writing would want to be. */
  .facts-grid + .beat-media { margin-top: clamp(2.75rem, 6vw, 5rem); }
  /* And full width means it: no mount to inset the picture, and none of the
     height cap a case study puts on a figure to stop a mood board taking over
     the page. Here the pictures are the page. */
  .beat-media .case-fig { background: none; padding: 0; display: block; }
  .beat-media .case-fig img,
  .beat-media .case-clip video { max-width: none; width: 100%; }

  /* Two columns of text, each under its own label. Same gutter as a split, so
     a page that opens on this and a page that opens on a split sit on the same
     grid. */
  .beat-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
  /* The label needs room before the paragraph starts: .beat .lab leaves just
     enough for a headline to follow it, and here the text follows directly. */
  .beat-duo .lab { margin-bottom: 1.35rem; }
  .beat-duo h2 { font-size: clamp(1.3rem, 2.7vw, 1.95rem); margin: 0 0 0.6rem; letter-spacing: var(--track-subtitle); }
  .beat-duo p { font-size: 1.05rem; }
  @media (max-width: 760px) { .beat-duo { grid-template-columns: minmax(0, 1fr); } }

  /* One row of pictures, all coming out the same height. Each track is as wide
     as its picture's ratio, so every picture divides back to the same height —
     no tile and no padding here, because a fixed inset would add itself to a
     wide picture and a tall one alike and break the match. */
  .case-row { display: grid; grid-template-columns: var(--tracks); gap: 0.9rem; margin: 1.6rem 0 0; align-items: start; }
  .case-row .case-fig { background: none; padding: 0; display: block; }
  .case-row .case-fig img, .case-row .case-fig video { width: 100%; height: auto; display: block; border-radius: var(--img-r); }
  @media (max-width: 860px) {
    /* Past two across the pictures stop being readable; the tracks go even, so
       a row of one shape still matches and a mixed row simply stacks below. */
    .case-row { grid-template-columns: repeat(min(var(--n, 1), 2), minmax(0, 1fr)); }
  }
  @media (max-width: 560px) { .case-row { grid-template-columns: minmax(0, 1fr); } }

  /* The link out to something live, under the pictures it belongs to. */
  .proj-cta { display: flex; justify-content: center; margin-top: clamp(2rem, 4vw, 3rem); }
  .proj-cta .talk-pill { margin-top: 0; }

  /* Figure groups inside a case section.
     These are design artefacts — mood boards, maps, slides — so they are laid
     out contained on a soft tile rather than cropped to a common ratio: a
     cropped mood board is a ruined mood board. The tile carries the shape the
     image does not fill. */
  .case-figs {
    display: grid; gap: 0.9rem; margin: 1.6rem 0 0;
    grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
  }
  /* One tile radius and one photo radius across the page: the tile is always
     the .case-fig, the photo always the img inside it. Before this the grid
     figures painted their own tile through the image's padding box, so their
     photos came out square while the ones in a slider were rounded. */
  .case-fig {
    margin: 0; background: var(--tile); border-radius: var(--tile-r);
    padding: clamp(0.75rem, 2vw, 1.5rem);
    display: flex; align-items: center; justify-content: center;
  }
  /* One tile shape per group, the image contained inside it. A group that mixes
     portrait and landscape would otherwise leave a hole under the shorter one,
     and cropping to match is not an option for a mood board. The tile reads as
     a mount, and any image added later fits without being measured first. */
  /* Every photo carries its own ratio and is capped on the width that would
     make it too tall, rather than on height with object-fit picking up the
     slack. Contain letterboxes inside the element box and border-radius rounds
     that box, not the picture inside it — which is why a clamped image kept
     square corners. Sized this way the box is the picture. */
  .case-ph { aspect-ratio: 3 / 2; }
  /* A clip sits in the same tile a photo does, at the same size. */
  .case-clip video {
    display: block; width: 100%; height: auto; border-radius: var(--img-r);
    max-width: calc(min(60vh, 28rem) * var(--ar, 1.5));
    aspect-ratio: var(--nat, 3 / 2); background: var(--tile);
  }
  .case-fig img {
    display: block; width: 100%; height: auto; border-radius: var(--img-r);
    max-width: calc(min(60vh, 28rem) * var(--ar, 1.5));
    aspect-ratio: var(--nat, 3 / 2);
  }
  .case-fig figcaption { margin-top: 0.55rem; font-size: 0.8rem; color: var(--neutral-mid); line-height: 1.5; }

  /* The moment somebody in the room said the thing that changed the direction. */
  .case-callout {
    margin: 1.9rem 0 0; padding: 1.5rem 1.6rem; border-radius: 1.4rem;
    background: color-mix(in srgb, var(--brand-500) 10%, var(--neutral-white));
    border: 1px solid color-mix(in srgb, var(--brand-500) 22%, transparent);
  }
  .case-callout h3 {
    margin: 0 0 0.6rem; font-size: clamp(1.05rem, 2.2vw, 1.35rem); line-height: 1.25;
    letter-spacing: var(--track-title); color: var(--brand-700);
  }
  .case-callout p { margin: 0; color: var(--neutral-mid); line-height: 1.7; max-width: 62ch; }

  @media (max-width: 860px) {
    /* Three directions side by side stop being readable well before this. */
    .case-figs { grid-template-columns: repeat(min(var(--cols, 1), 2), minmax(0, 1fr)); }
    .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 560px) {
    .case-figs, .facts-grid { grid-template-columns: minmax(0, 1fr); }
  }

  /* =======================  PROJECT PAGE  =======================
     Its own layout, but every colour, shadow and easing comes from the same
     token layer the homepage uses, and data-wash on <body> tints the page in
     the project's colour exactly as hovering its card does. */
  .proj-top { padding: clamp(1.5rem, 4vw, 3rem) 0 0; }
  .proj-top .top-bar { grid-template-columns: auto auto; justify-content: space-between; align-items: center; }
  .proj-top .lang { justify-self: end; }

  .back-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--ink-soft); text-decoration: none;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.16em;
    transition: color .35s ease;
  }
  .back-link:hover { color: var(--ink); }
  .back-link .arr { transition: transform .45s var(--ease); }
  .back-link:hover .arr { transform: translateX(-4px); }

  .proj { width: min(var(--page-max), 100% - var(--page-gutter)); margin-inline: auto; padding: clamp(2.5rem, 6vw, 4.5rem) 0 4rem; }
  /* The same tags the card carries on the homepage. Outlined rather than
     filled: --ink-soft on the page ground clears AA for this size, which a
     tint of the brand would not. */
  .proj-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
  .proj-tags li {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--ink-soft); border: 1px solid var(--rule);
    border-radius: 999px; padding: 0.4rem 0.85rem;
  }
  /* 22ch broke the longest of these titles over three lines; 34 holds every
     one of them to two, and text-wrap keeps the pair even. */
  .proj h1 {
    font-size: var(--t-title); line-height: 1.08; letter-spacing: var(--track-title);
    margin: 0.9rem 0 clamp(2rem, 4vw, 3rem); max-width: 34ch; text-wrap: balance;
  }
  .proj-shot {
    border-radius: var(--tile-r); overflow: hidden; background: var(--tile);
    margin-bottom: clamp(2rem, 4vw, 3rem);
  }
  /* ---------------------------------------------------------------
     SWITCHING LANGUAGE
     The toggle reloads the page, which on its own reads as a jolt. These
     rules turn it into a cross-fade: the page dims on the click, just before
     the navigation, and the language it lands on is revealed on the way in.

     The arrival is held rather than timed. A page of this weight is still
     being parsed while an animation started at first paint runs itself out,
     so a timed fade was over before there was anything to fade, and the new
     text simply appeared. It waits at zero instead, and the script in each
     page's <head> reveals it once the renderer has built something.

     Opacity and nothing else, deliberately. A transform on <body> would make
     it the containing block for the fixed back-to-top button, which would
     jump out of place mid-fade; opacity creates a stacking context but leaves
     positioning alone.

     Reveal first, leave second: should a second click land while the arrival
     fade is still going, leaving is what should win.
     --------------------------------------------------------------- */
  @keyframes langOut { to { opacity: 0; } }
  @keyframes langIn { from { opacity: 0; } }
  html.lang-hold body { opacity: 0; }
  html.lang-reveal body { animation: langIn 460ms var(--ease, ease) both; }
  html.lang-out body { animation: langOut 170ms ease-in forwards; }
  @media (prefers-reduced-motion: reduce) {
    html.lang-out body, html.lang-reveal body { animation: none; }
    html.lang-hold body { opacity: 1; }
  }

  .proj-shot img { display: block; width: 100%; height: auto; }
  /* A picture that carries its own transparency is already a composition:
     the mount behind it would only show as a grey rectangle in its corners. */
  .proj-shot.bare { background: none; border-radius: 0; }

  .proj-soon {
    margin: 0; padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--rule); border-radius: 1.3rem;
    font-size: 0.95rem; line-height: 1.6; color: var(--ink-soft);
  }

  .proj-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
    margin-top: clamp(3rem, 6vw, 4.5rem);
  }
  .proj-nav a {
    display: flex; flex-direction: column; gap: 0.4rem;
    padding: 1.1rem 1.3rem; border-radius: 1.2rem;
    border: 1px solid var(--rule); text-decoration: none; color: var(--ink);
    transition: border-color .35s ease, transform .45s var(--ease);
  }
  .proj-nav a:hover { border-color: color-mix(in srgb, var(--ink) 45%, transparent); transform: translateY(-2px); }
  .proj-nav .to-next { text-align: right; }
  .proj-nav .dir { font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--track-meta); color: var(--ink-faint); }
  .proj-nav .ttl { font-size: 0.95rem; line-height: 1.3; }
  .nav-tags { margin-top: 0.7rem; }
  .proj-nav .to-next .nav-tags { justify-content: flex-end; }
  .nav-tags span {
    font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--ink-soft); border: 1px solid var(--rule);
    border-radius: 999px; padding: 0.3rem 0.7rem;
  }
  @media (max-width: 620px) {
    .proj-nav { grid-template-columns: 1fr; }
    .proj-nav .to-next { text-align: left; }
  }

  .proj-foot {
    display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
    padding: 0 0 clamp(3rem, 6vw, 5rem);
  }
  .proj-foot .talk-pill { margin-top: 0; }

  /* Every page here is built by script. This is what is left if that fails. */
  .no-js {
    max-width: 34rem; margin: 4rem auto; padding: 1.5rem 1.6rem;
    border: 1px solid var(--rule); border-radius: 1rem;
    background: var(--surface); color: var(--ink);
    font-size: 1rem; line-height: 1.6;
  }
  .no-js p { margin: 0 0 0.75rem; }
  .no-js p:last-child { margin-bottom: 0; }
  .no-js a { color: inherit; }
