@import url('../assets/fonts/fonts.css');

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* surface */
  --bg:          #000000;
  --surface:     #0A0A0A;
  --surface-2:   #121212;
  --surface-3:   #1A1A1A;
  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* ink */
  --ink:       #FFFFFF;
  --ink-dim:   #C2C2C2;
  --ink-mute:  rgba(255, 255, 255, 0.52);
  /* captions, footer notes: 0.52 composites to about 5.4:1 on black, which
     clears 4.5:1 for 13px text */
  --ink-faint: rgba(255, 255, 255, 0.52);
  /* decoration only (dots, separators), never text */
  --ink-ghost: rgba(255, 255, 255, 0.25);

  /* everything else that used to assume a black page, as tokens, so the light
     theme below can answer each one */
  --surface-hover: #0D0D0D;
  --glow:          rgba(255, 255, 255, 0.075);   /* the closing block's light */
  --hover-glow:    rgba(255, 255, 255, 0.07);    /* the light under the pointer */
  --glow-ink:      var(--ink);                   /* a card's corner glow, where it has no brand tint */
  --hover-fill:    rgba(255, 255, 255, 0.06);
  --hover-line:    rgba(255, 255, 255, 0.3);
  --note-fill:     rgba(255, 255, 255, 0.025);
  --row-hover:     rgba(255, 255, 255, 0.015);
  --scrim:         rgba(0, 0, 0, 0.62);
  --shadow-deep:   rgba(0, 0, 0, 0.9);
  --solid-glow:    rgba(255, 255, 255, 0.34);
  --solid-glow-hover: rgba(255, 255, 255, 0.5);
  --solid-ring:    rgba(255, 255, 255, 0.12);
  --outline-stroke: rgba(255, 255, 255, 0.28);
  --media-fade-top: rgba(0, 0, 0, 0.05);
  --media-fade:    rgba(0, 0, 0, 0.5);
  --wash-blend:    screen;
  --wash-opacity:  0.18;
  --halo:          #000000;                     /* under leaders drawn over a screenshot */
  --halo-opacity:  0.55;
  --halo-dot-opacity: 0.6;                      /* the ring round a leader's dot */
  --shadow-reach:  rgba(0, 0, 0, 0.95);          /* the email and phone panel */
  --sheet-ring:    rgba(255, 255, 255, 0.06);    /* the resume sheet's edge */
  --scan-ink:      currentColor;                 /* the line that scans the portrait */
  --menu-gutter:   transparent;                  /* the scrollbar's strip while the menu is open */
  --draft-line:    rgba(255, 255, 255, 0.5);
  --on-ink-line:   rgba(0, 0, 0, 0.2);           /* a line drawn on an ink-filled pill */
  --logo-filter:   invert(76%);                 /* black marks shown at --ink-dim */
  --logo-filter-hover: invert(100%);
  --portrait-filter: grayscale(0.85) brightness(0.52);
  --portrait-mask:
    linear-gradient(to bottom, #000 62%, transparent 99%),
    linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  --portrait-radius: 0;
  --field-rgb:     255, 255, 255;               /* the pointer field's dots and light */
  /* the stage under real screens (.stage): how much of the case's tint is mixed
     into the panel's top, its foot and the light at its top edge; and the
     metal of a drawn laptop's base (space grey here, silver on paper) */
  --stage-top:     16%;
  --stage-foot:    5%;
  --stage-glow:    34%;
  --metal-hi:      #5C5D63;
  --metal-lo:      #2C2D31;
  --bezel:         #0C0C0E;                     /* a drawn device's black glass, in both themes */
  color-scheme: dark;

  /* brand tints: used only inside their own case study */
  --t-floweraura:   #E0517A;
  --t-bakingo:      #F0A32B;
  --t-seamsfriendly:#7FA88C;
  --t-zestta:       #4C6FFF;
  --t-systems:      #8B7BE0;
  --t-fnpvenues:    #1F8A63;   /* the voice agent's call card (24 Oct 2026) */
  --t-builtright:   #6E56F8;   /* Built Right's logo purple (24 Oct 2026) */

  /* radii */
  --r-xs: 12px;
  --r-sm: 16px;
  --r:    24px;
  --r-lg: 32px;
  --r-pill: 999px;

  /* rhythm */
  --gutter:  clamp(20px, 5vw, 64px);
  --maxw:    1240px;
  --section: clamp(84px, 11vw, 168px);

  /* type */
  --font:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-alt:'Figtree', system-ui, -apple-system, sans-serif;

  /* Six steps. Every piece of text on the site resolves to one of these.
     Each clamp tops out below its max at 1440, so the rendered set stays six. */
  --t1: 13px;                          /* eyebrow, meta, captions      */
  --t2: 16px;                          /* body, chips, buttons, footer */
  --t3: clamp(19px, 1.6vw, 22px);      /* lead, card titles, stats     */
  --t4: clamp(26px, 2.4vw, 34px);      /* section headings             */
  --t5: clamp(34px, 3.9vw, 56px);      /* page titles, closing CTA     */
  --t6: clamp(46px, 7.2vw, 104px);     /* hero display, giant marquee  */

  /* motion: one duration, one curve, site wide */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur:  400ms;
  /* the one exception: the switch between light and dark takes its time
     (Punit, 29 Sep 2026: about three seconds); its venom eases on its own
     curves (main.js venomPath) */
  --theme-dur:  3000ms;
}

/* ---------- light theme ----------
   The site follows the device: a device set to light gets the light page,
   unless the visitor has chosen dark with the toggle (data-theme="dark").
   A choice made with the toggle (data-theme="light") wins on any device. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    /* surface: warm-neutral paper, white cards and pills */
    --bg:          #F4F4F2;
    --surface:     #FFFFFF;
    --surface-2:   #FFFFFF;
    --surface-3:   #EAEAE7;
    --surface-hover: #FAFAF8;
    --line:        rgba(12, 12, 12, 0.09);
    --line-strong: rgba(12, 12, 12, 0.18);
    /* ink: every text colour clears 4.5:1 on the paper and on white */
    --ink:       #0C0C0C;
    --ink-dim:   #3A3A3A;
    --ink-mute:  rgba(12, 12, 12, 0.62);
    --ink-faint: rgba(12, 12, 12, 0.6);
    --ink-ghost: rgba(12, 12, 12, 0.22);
    /* the same roles, answered for a light page */
    /* flat paper: a shadow this faint bands into rings on a light page */
    --glow:          transparent;
    /* light enough that a white card never greys below the paper */
    --hover-glow:    rgba(12, 12, 12, 0.03);
    --glow-ink:      transparent;                /* ink would grey a white card */
    --hover-fill:    rgba(12, 12, 12, 0.045);
    --hover-line:    rgba(12, 12, 12, 0.3);
    --note-fill:     rgba(12, 12, 12, 0.025);
    --row-hover:     rgba(12, 12, 12, 0.02);
    --scrim:         rgba(244, 244, 242, 0.72);
    --shadow-deep:   rgba(12, 12, 12, 0.22);
    --solid-glow:    rgba(12, 12, 12, 0.22);
    --solid-glow-hover: rgba(12, 12, 12, 0.3);
    --solid-ring:    rgba(12, 12, 12, 0.08);
    --outline-stroke: rgba(12, 12, 12, 0.3);
    --media-fade-top: rgba(12, 12, 12, 0);
    --media-fade:    rgba(12, 12, 12, 0.08);
    --wash-blend:    multiply;
    --wash-opacity:  0.1;
    --halo:          #FFFFFF;
    --halo-opacity:  0.8;
    --halo-dot-opacity: 0.8;
    --shadow-reach:  rgba(12, 12, 12, 0.22);
    --sheet-ring:    var(--line);
    --scan-ink:      var(--bg);                  /* the portrait stays dark: a pale line reads on it */
    --menu-gutter:   var(--surface);             /* the white drawer runs to the window's edge */
    --draft-line:    rgba(12, 12, 12, 0.45);
    --on-ink-line:   rgba(255, 255, 255, 0.28);
    --logo-filter:   invert(24%);
    --logo-filter-hover: invert(0%);
    /* the portrait is an illustration on black: here it sits as a framed print */
    --portrait-filter: grayscale(0.85) brightness(0.95);
    --portrait-mask: none;
    --portrait-radius: var(--r);
    --field-rgb:     12, 12, 12;
    --stage-top:     15%;
    --stage-foot:    7%;
    --stage-glow:    22%;
    --metal-hi:      #E4E5E8;
    --metal-lo:      #A9ACB2;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  /* surface: warm-neutral paper, white cards and pills */
  --bg:          #F4F4F2;
  --surface:     #FFFFFF;
  --surface-2:   #FFFFFF;
  --surface-3:   #EAEAE7;
  --surface-hover: #FAFAF8;
  --line:        rgba(12, 12, 12, 0.09);
  --line-strong: rgba(12, 12, 12, 0.18);
  /* ink: every text colour clears 4.5:1 on the paper and on white */
  --ink:       #0C0C0C;
  --ink-dim:   #3A3A3A;
  --ink-mute:  rgba(12, 12, 12, 0.62);
  --ink-faint: rgba(12, 12, 12, 0.6);
  --ink-ghost: rgba(12, 12, 12, 0.22);
  /* the same roles, answered for a light page */
  /* flat paper: a shadow this faint bands into rings on a light page */
  --glow:          transparent;
  /* light enough that a white card never greys below the paper */
  --hover-glow:    rgba(12, 12, 12, 0.03);
  --glow-ink:      transparent;                  /* ink would grey a white card */
  --hover-fill:    rgba(12, 12, 12, 0.045);
  --hover-line:    rgba(12, 12, 12, 0.3);
  --note-fill:     rgba(12, 12, 12, 0.025);
  --row-hover:     rgba(12, 12, 12, 0.02);
  --scrim:         rgba(244, 244, 242, 0.72);
  --shadow-deep:   rgba(12, 12, 12, 0.22);
  --solid-glow:    rgba(12, 12, 12, 0.22);
  --solid-glow-hover: rgba(12, 12, 12, 0.3);
  --solid-ring:    rgba(12, 12, 12, 0.08);
  --outline-stroke: rgba(12, 12, 12, 0.3);
  --media-fade-top: rgba(12, 12, 12, 0);
  --media-fade:    rgba(12, 12, 12, 0.08);
  --wash-blend:    multiply;
  --wash-opacity:  0.1;
  --halo:          #FFFFFF;
  --halo-opacity:  0.8;
  --halo-dot-opacity: 0.8;
  --shadow-reach:  rgba(12, 12, 12, 0.22);
  --sheet-ring:    var(--line);
  --scan-ink:      var(--bg);                    /* the portrait stays dark: a pale line reads on it */
  --menu-gutter:   var(--surface);               /* the white drawer runs to the window's edge */
  --draft-line:    rgba(12, 12, 12, 0.45);
  --on-ink-line:   rgba(255, 255, 255, 0.28);
  --logo-filter:   invert(24%);
  --logo-filter-hover: invert(0%);
  /* the portrait is an illustration on black: here it sits as a framed print */
  --portrait-filter: grayscale(0.85) brightness(0.95);
  --portrait-mask: none;
  --portrait-radius: var(--r);
  --field-rgb:     12, 12, 12;
  --stage-top:     15%;
  --stage-foot:    7%;
  --stage-glow:    22%;
  --metal-hi:      #E4E5E8;
  --metal-lo:      #A9ACB2;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: var(--t2);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; min-height: 100vh; }
/* with the page locked the scrollbar goes but its strip stays (scrollbar-gutter);
   while the menu is open the strip takes the drawer's colour */
html:has(.menu[data-open='true']) { background: var(--menu-gutter); }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1, h2, h3, h4, h5, p, figure, blockquote, ul, ol, dl, dd {
  margin: 0;
}
ul, ol { padding: 0; list-style: none; }

html { scrollbar-gutter: stable; }
::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-pill);
  font-size: var(--t2);
  font-weight: 500;
}
.skip-link:focus { left: 12px; }

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

/* ============================================================
   TYPE SCALE
   ============================================================ */
.display {
  font-size: var(--t6);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.h1 {
  font-size: var(--t5);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.h2 {
  font-size: var(--t4);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.h3 {
  font-size: var(--t3);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.h4 {
  font-size: var(--t3);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.012em;
}
.giant {
  font-size: var(--t6);
  font-weight: 100;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.lead {
  font-size: var(--t3);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--ink-dim);
}
.body {
  font-size: var(--t2);
  font-weight: 300;
  line-height: 1.62;
  color: var(--ink-dim);
}
.small {
  font-size: var(--t1);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-mute);
}
.eyebrow {
  font-size: var(--t1);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.mono-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.dim   { color: var(--ink-dim); }
.mute  { color: var(--ink-mute); }
.faint { color: var(--ink-faint); }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(56px, 7vw, 104px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  margin-bottom: clamp(36px, 4.5vw, 68px);
}
.section-head__text { max-width: 60ch; }
.section-head .eyebrow { margin-bottom: 18px; display: block; }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.grid { display: grid; gap: clamp(16px, 1.8vw, 24px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================
   NAVIGATION: floating pill + overlay panel
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 350;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(16px, 2.2vw, 28px) var(--gutter);
  pointer-events: none;
  transition: transform var(--dur) var(--ease);
}
.nav > * { pointer-events: auto; }
.nav.is-hidden { transform: translateY(-130%); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 10px;
  /* opaque: at 72% alpha, body copy showed through the pill while scrolling */
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.brand:hover { border-color: var(--line-strong); }

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  background: var(--ink);
  color: var(--bg);
  border-radius: 11px;
  font-family: var(--font-alt);
  font-size: var(--t2);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand__name {
  font-family: var(--font-alt);
  font-size: var(--t2);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.brand__name span { display: block; }
.brand__name span:last-child { color: var(--ink-mute); }

/* Menu toggle: a labelled pill that matches the name pill. "Menu" with two
   lines; when open it reads "Close" and the lines cross into an x. */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 18px 0 20px;
  flex: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.menu-toggle:hover { border-color: var(--line-strong); transform: translateY(-1px); }

/* the header's right-hand pair: the theme toggle, then Menu */
.nav__actions { display: flex; align-items: flex-start; gap: 10px; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.theme-toggle:hover { border-color: var(--line-strong); transform: translateY(-1px); }
/* without JavaScript the page still follows the device; the toggle, which
   would do nothing, stays out of the way */
.no-js .theme-toggle { display: none; }
.theme-toggle svg { width: 22px; height: 22px; overflow: visible; }
/* one mark, two states: a moon on the dark page (a circle painted in the
   button's own colour bites into the core), and on the light page the bite
   slides away and the sun's rays come out */
.theme-toggle__core { transform-box: fill-box; transform-origin: center; transition: transform var(--dur) var(--ease); }
.theme-toggle__cut { fill: var(--surface-2); transform-box: fill-box; transform-origin: center; transform: translate(9px, -9px) scale(0.4); opacity: 0; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.theme-toggle__rays { transform-box: fill-box; transform-origin: center; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.theme-toggle[data-mode='dark'] .theme-toggle__core { transform: scale(1.5); }
.theme-toggle[data-mode='dark'] .theme-toggle__cut { transform: translate(3.5px, -3.5px); opacity: 1; }
.theme-toggle[data-mode='dark'] .theme-toggle__rays { transform: rotate(-60deg) scale(0.4); opacity: 0; }
/* the narrowest phones: Menu keeps its lines and its label for screen
   readers (aria-label) and drops the word, so the pair fits beside the name */
@media (max-width: 359px) {
  .menu-toggle { padding: 0 16px; }
  .menu-toggle__label { display: none; }
}

/* The switch: the page as it will be spreads out from the toggle like venom.
   A blob of the new theme sprouts tendrils that race across the page, curl
   and branch, and the mass follows them, pulled out along its arms, until it
   swallows the page, over --theme-dur (main.js clips the new picture to
   venomPath every frame). It is the one place the page lingers. Nothing else moves while it
   plays (every animation waits, and so do the script's drawings, typing
   notes and loop), and with reduced motion it is instant. The reader's own
   scroll or click ends it at once (main.js). */
.is-theming *,
.is-theming *::before,
.is-theming *::after { transition: none !important; animation-play-state: paused !important; }
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
/* the page's scrollbar is not in the pictures: with a clear track it shows
   the circle through it instead of changing colour at once */
html:active-view-transition { scrollbar-color: rgba(128, 128, 128, 0.55) transparent; }
/* hidden until main.js starts the venom on it; if it never can, the page
   simply switches at once */
::view-transition-new(root) { clip-path: circle(0 at var(--theme-x, 100%) var(--theme-y, 0px)); }
.menu-toggle__label {
  font-size: var(--t1);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.menu-toggle__icon { position: relative; width: 18px; height: 10px; flex: none; }
.menu-toggle__icon i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}
.menu-toggle__icon i:first-child { top: 0; }
.menu-toggle__icon i:last-child { top: calc(100% - 1.5px); }
.menu-toggle[aria-expanded='true'] .menu-toggle__icon i:first-child { top: calc(50% - 0.75px); transform: rotate(45deg); }
.menu-toggle[aria-expanded='true'] .menu-toggle__icon i:last-child { top: calc(50% - 0.75px); transform: rotate(-45deg); }

/* Drawer: a full-height sheet that slides in from the right edge. A numbered
   index on top; current role, resume and contact at the foot. */
.menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  transition: visibility 0s var(--ease) var(--dur);
}
.menu[data-open='true'] { visibility: visible; transition: visibility 0s var(--ease); }

.menu__scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.menu[data-open='true'] .menu__scrim { opacity: 1; }

.menu__drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(500px, 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(96px, 12vh, 124px) clamp(24px, 3.4vw, 48px) clamp(28px, 4vh, 44px);
  background: var(--surface);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
}
.menu__drawer:focus { outline: none; }
.menu[data-open='true'] .menu__drawer { transform: none; }

.menu__eyebrow { margin-bottom: 20px; }
.menu__list { border-top: 1px solid var(--line); }

/* rows arrive one after another as the drawer opens */
.menu__list li {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.menu[data-open='true'] .menu__list li { opacity: 1; transform: none; }
.menu[data-open='true'] .menu__list li:nth-child(1) { transition-delay: 60ms; }
.menu[data-open='true'] .menu__list li:nth-child(2) { transition-delay: 100ms; }
.menu[data-open='true'] .menu__list li:nth-child(3) { transition-delay: 140ms; }
.menu[data-open='true'] .menu__list li:nth-child(4) { transition-delay: 180ms; }
.menu[data-open='true'] .menu__list li:nth-child(5) { transition-delay: 220ms; }
.menu[data-open='true'] .menu__list li:nth-child(6) { transition-delay: 260ms; }

.menu__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-block: clamp(12px, 1.8vh, 18px);
  border-bottom: 1px solid var(--line);
  color: var(--ink-dim);
  transition: color var(--dur) var(--ease);
}
/* hover: a white line draws in along the row's own hairline */
.menu__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}
.menu__link:hover,
.menu__link:focus-visible { color: var(--ink); }
.menu__link:hover::after,
.menu__link:focus-visible::after { transform: scaleX(1); }
.menu__link:focus-visible { outline: none; }

.menu__num {
  position: relative;
  min-width: 2ch;
  font-size: var(--t1);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.menu__label {
  font-size: var(--t4);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.menu__note {
  margin-left: auto;
  font-size: var(--t1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
/* the page you are on: lit, with its number marked */
.menu__link[aria-current='page'] { color: var(--ink); }
.menu__link[aria-current='page'] .menu__num { color: var(--ink); }
/* the bullet hangs in the gutter so the labels stay on one line */
.menu__link[aria-current='page'] .menu__num::before {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: currentColor;
}
.menu__link--disabled { pointer-events: none; color: var(--ink-faint); }

.menu__foot { display: grid; gap: 22px; }
.menu__status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--t2);
  font-weight: 300;
  color: var(--ink-dim);
}
.menu__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--solid-ring);
}
.menu__actions { display: grid; justify-items: start; gap: 18px; }
.menu__contact { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.menu__contact .link-arrow { padding: 0; }

/* short screens: keep the whole drawer on one screen */
@media (max-height: 760px) {
  .menu__label { font-size: var(--t3); }
  .menu__drawer { gap: 28px; }
}

/* ============================================================
   BUTTONS & LINKS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-size: var(--t2);
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn svg { flex: none; transition: transform var(--dur) var(--ease); }
.btn:hover svg { transform: translate(3px, -3px); }

/* Primary call to action: solid white with a soft halo so it reads as lit
   against the black. The halo brightens on hover; the fill stays white so the
   black label keeps full contrast. */
.btn--solid {
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  /* same 1px border as the outlined buttons, so paired pills line up exactly */
  border: 1px solid var(--ink);
  /* the halo only: a 1px ring here read as a grey keyline around the pill */
  box-shadow: 0 10px 30px -10px var(--solid-glow);
}
.btn--solid:hover {
  background: var(--ink);
  box-shadow:
    0 0 0 2px var(--solid-ring),
    0 16px 44px -10px var(--solid-glow-hover);
}
.btn--solid:active { transform: translateY(0) scale(0.98); }

/* Magnetic buttons: JS writes the pull into --mx / --my, so hover and the
   press state compose with it instead of fighting an inline transform. */
.btn--solid[data-magnetic],
.btn--solid[data-magnetic]:hover { transform: translate(var(--mx, 0px), var(--my, 0px)); }
.btn--solid[data-magnetic]:active { transform: translate(var(--mx, 0px), var(--my, 0px)) scale(0.98); }

.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--hover-fill); border-color: var(--hover-line); }

.btn--lg { padding: 17px 30px; font-size: var(--t2); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t2);
  color: var(--ink-mute);
  transition: color var(--dur) var(--ease), gap var(--dur) var(--ease);
}
.link-arrow:hover { color: var(--ink); gap: 12px; }

.link-underline {
  color: var(--ink);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--dur) var(--ease);
}
.link-underline:hover { background-size: 100% 1px; }

/* ============================================================
   HERO
   Centred on every screen. From 1024px the text and the line
   drawing sit in two columns, centred against each other; 768 to
   1023 stacks, with the drawing centred under the text. Below 768px
   the first screen holds the headline, identity lines, blurb,
   buttons and stats; the drawing and its notes follow.
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;               /* svh: mobile browser chrome cannot clip it */
  display: grid;
  align-content: center;
  /* symmetric, and the floor clears the fixed name pill (~88px at 1440) with
     room to spare above the headline */
  padding-block: clamp(112px, 13vh, 150px);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(28px, 3vw, 40px);
  max-width: 700px;
}
.hero__intro { display: grid; gap: clamp(22px, 2.2vw, 30px); }
.hero__title span { display: block; white-space: nowrap; }
/* two display words carry the hero, as the old one did, and the rest of the
   headline follows at the lead size (Punit, 3 Oct 2026) */
.hero__title .hero__sub { margin-top: clamp(12px, 1.4vw, 20px); font-size: var(--t3); font-weight: 400; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink-dim); white-space: normal; }
.hero__id { display: grid; gap: 6px; }
.hero__id strong { font-weight: 400; font-size: var(--t3); line-height: 1.2; letter-spacing: -0.015em; }
.hero__id em { font-style: normal; font-size: var(--t3); font-weight: 300; line-height: 1.2; color: var(--ink-dim); }
.hero__blurb { max-width: 46ch; }

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
/* QA 4 Oct 2026: the homepage CTA's copy-email button drops the browser's
   button padding, so on a phone it lines up with the resume link below it */
.copy-link { padding-inline: 0; }
/* 11 Oct 2026, WhatsApp beside Email me: under 640px the closing block's buttons (and the
   Resume page's) grow to share their row, so none sits alone on a line, and its text links
   take a line each */
@media (max-width: 639px) {
  .cta .hero__foot > .btn,
  .resume-head .hero__foot > .btn { flex: 1 1 auto; justify-content: center; }
  .cta .hero__foot > .link-arrow { flex-basis: 100%; }
}

/* round icon buttons: hero socials and the carousel arrows share this look */
.socials { display: flex; align-items: center; gap: 8px; }
/* 11 Oct 2026: with a fourth icon (WhatsApp), slightly tighter gaps keep the hero's icons and
   View case studies on one line at 1024 (iPad landscape) */
.hero .hero__foot { column-gap: 16px; }
.hero__foot .socials { gap: 6px; }
.socials a,
.icon-btn {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-mute);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.socials a:hover,
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-3px); }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px clamp(18px, 2.2vw, 32px);
}
.hero__stat { display: grid; gap: 6px; align-content: start; }
.hero__stat b {
  font-size: var(--t3);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero__stat span { font-size: var(--t1); line-height: 1.4; color: var(--ink-mute); }
/* QA 4 Oct 2026: the design systems stat links to its case study, underlined
   the way the practice list's link is */
.hero__stat--link span { text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--dur) var(--ease); }
.hero__stat--link:hover span { color: var(--ink); }

/* right-hand slot: the line drawing below */
.hero__media { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }

/* ---------- hero drawing ----------
   A checkout dashboard drawn in the same hand as the How I Work diagrams:
   1.5px lines in the secondary text colour, round caps, no fill. Four notes
   sit either side of it on straight leaders, at every width (the whole box
   scales, the 13px text does not). Small clusters in the corners drift up
   and down. Every loop uses the site curve with holds between moves, so it
   reads calm; with reduced motion it is a still drawing, finished. */
.hero__art { position: relative; width: 440px; max-width: 100%; color: var(--ink-dim); }
.art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.art * { vector-effect: non-scaling-stroke; }
/* strokes whose dashes come from pathLength scale normally: with a fixed
   screen width their dash maths breaks once the box is under 440px (the
   gauge would read full on a phone and the ring lose its even dashes) */
.art .art__gauge, .art .art__ring, .art .art__leader path { vector-effect: none; }
.art .art__fill { fill: currentColor; stroke: none; }
.art .art__faint { stroke-opacity: 0.4; }
.art .art__track { stroke-opacity: 0.16; }
.art .art__dots { fill: url(#art-dots); stroke: none; opacity: 0.55; }
.art .art__screen { fill: var(--bg); }
.art .art__chip { fill: currentColor; fill-opacity: 0.14; }
.art .art__cursor-shape { fill: var(--bg); }
/* every drifting piece at one level, top and bottom alike */
.art .art__float * { stroke-opacity: 0.4; }

/* corners: a slow lift and settle, each cluster out of step with the others */
.art__float { animation: art-float 9s var(--ease) infinite; animation-delay: var(--d, 0s); }
@keyframes art-float {
  0%, 10%  { transform: translateY(0); }
  45%, 55% { transform: translateY(-7px); }
  90%, 100% { transform: translateY(0); }
}

/* the screen's loop, 12s: gauge fills, bars grow, a cursor taps the button */
.art__ring { transform-origin: 220px 200px; animation: art-tick 16s var(--ease) infinite; }
@keyframes art-tick {
  0%, 20%  { transform: rotate(0deg); }
  25%, 45% { transform: rotate(90deg); }
  50%, 70% { transform: rotate(180deg); }
  75%, 95% { transform: rotate(270deg); }
  100%     { transform: rotate(360deg); }
}
.art__gauge { stroke-dasharray: 100; stroke-dashoffset: 32; animation: art-gauge 12s var(--ease) infinite; }
@keyframes art-gauge {
  0%       { stroke-dashoffset: 100; }
  22%, 86% { stroke-dashoffset: 32; }
  100%     { stroke-dashoffset: 100; }
}
.art__bar {
  transform-box: fill-box;
  transform-origin: left center;
  animation: art-bar 12s var(--ease) infinite backwards;
  animation-delay: calc(var(--i, 0) * 140ms);
}
/* the bar a note points at never moves, so its leader always lands on it */
.art .art__bar--still { animation: none; }
@keyframes art-bar {
  0%, 6%    { transform: scaleX(0.06); opacity: 0; }
  12%       { opacity: 1; }
  26%, 84%  { transform: scaleX(1); opacity: 1; }
  96%, 100% { transform: scaleX(0.06); opacity: 0; }
}
.art__cursor { transform: translate(262px, 443px); animation: art-cursor 12s var(--ease) infinite; }
@keyframes art-cursor {
  0%, 40%   { transform: translate(282px, 470px); opacity: 0; }
  46%       { opacity: 1; }
  56%       { transform: translate(262px, 443px) scale(1); }
  59%       { transform: translate(262px, 443px) scale(0.86); }
  62%, 84%  { transform: translate(262px, 443px) scale(1); opacity: 1; }
  94%, 100% { transform: translate(276px, 466px); opacity: 0; }
}
.art__cta { fill: currentColor; fill-opacity: 0; animation: art-cta 12s var(--ease) infinite; }
@keyframes art-cta {
  0%, 58%   { fill-opacity: 0; }
  61%       { fill-opacity: 0.22; }
  78%, 100% { fill-opacity: 0; }
}
.art__ripple { transform-box: fill-box; transform-origin: center; opacity: 0; animation: art-ripple 12s var(--ease) infinite; }
@keyframes art-ripple {
  0%, 58%   { opacity: 0; transform: scale(0.4); }
  60%       { opacity: 0.9; }
  78%, 100% { opacity: 0; transform: scale(2.6); }
}

/* notes: placed in % of the 440 x 600 box so they track the leaders at any
   size; each note's first line sits on its leader */
.art__notes { position: absolute; inset: 0; pointer-events: none; }
.art__note {
  position: absolute;
  width: 26.4%;                         /* 116 of 440: ends where its leader starts */
  display: grid;
  align-content: start;
  gap: 6px;
  font-size: var(--t1);
  line-height: 1.45;
}
.art__note--1 { left: 0;      top: 32.17%; }   /* leader at y 200 */
/* left notes set against their leader, so text meets the line on both sides */
.art__note--1, .art__note--3 { text-align: right; justify-items: end; }
.art__note--2 { left: 73.64%; top: 46.5%; }    /* y 286 */
.art__note--3 { left: 0;      top: 66.67%; }   /* y 407 */
.art__note--4 { left: 73.64%; top: 72.67%; }   /* y 443 */
.art__kind {
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.art__text { color: var(--ink-dim); }

/* they arrive once, one after another, after the headline */
/* backwards, not both: once in, the note is back on its own styles, so the
   swap below can fade it */
.art__note { animation: art-in var(--dur) var(--ease) backwards; animation-delay: calc(900ms + var(--i, 0) * 160ms); }
.art__leader path {
  stroke-opacity: 0.55;
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: art-lead var(--dur) var(--ease) backwards;
  animation-delay: calc(800ms + var(--i, 0) * 160ms);
}

/* notes are typed (main.js initNotes): the script clears and types them in
   itself, so the fade-in entrance steps aside. Each line keeps its height
   while it is empty, so nothing below it jumps. The caret does not blink;
   the letters are the motion. */
[data-art].is-typed .art__note { animation: none; }
.art__kind { min-height: 1em; }
.art__text { min-height: 1.45em; }
.art__note .is-caret::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: currentColor;
}
.art__kind.is-caret::after { vertical-align: top; height: 1em; }
@keyframes art-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes art-lead { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* the narrowest phones: the lowest note needs the corner the flow tree sits in */
@media (max-width: 374px) {
  .art__float--br { display: none; }
}
@media (max-width: 359px) {
  .art__float--bl { display: none; }
}
/* the narrowest screens: the label tightens so PROCESS fits its column */
@media (max-width: 319px) {
  .art__kind { letter-spacing: 0.06em; }
}
/* under 300px there is no room beside the dashboard: the notes list under it */
@media (max-width: 299px) {
  .art__notes { position: static; display: grid; gap: 14px; margin-top: 12px; }
  .art__note { position: static; width: auto; text-align: left; justify-items: start; }
  .art__leader { display: none; }
}

/* stop the loops while a drawing is off screen (main.js adds .is-paused) */
[data-art].is-paused,
[data-art].is-paused * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  [data-art],
  [data-art] * { animation: none !important; }
}
/* without JavaScript a drawing is simply there, finished and still */
.no-js [data-art],
.no-js [data-art] *,
.no-js [data-draw],
.no-js [data-draw] * { animation: none !important; }

/* tablet: the drawing needs its full 440px for the notes, so the hero stacks
   and the drawing sits centred under the text */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
}

/* 2 x 2 while the text column is narrow beside (or above) the drawing */
@media (max-width: 1099px) {
  .hero__stats { max-width: 520px; }
}

@media (max-width: 767px) {
  .hero { min-height: 0; display: block; padding-block: 0 var(--sec-y); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  /* first screen: headline, identity, blurb, buttons and the stats, centred
     under the pill; the drawing and its notes follow below */
  .hero__inner {
    max-width: none;
    gap: 28px;
    min-height: 100svh;
    align-content: center;
    padding-block: 92px 24px;
  }
  .hero__intro { gap: 20px; }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 2.6vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover { border-color: var(--line-strong); background: var(--surface-hover); }
a.card:hover { transform: translateY(-4px); }

.card__num {
  font-size: var(--t1);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.card__title { font-size: var(--t3); font-weight: 400; letter-spacing: -0.015em; line-height: 1.25; text-wrap: balance; }
.chapter__title { text-wrap: balance; }
.chapter__body > p, .case-head .lead, .intro__aside { text-wrap: pretty; }
.card__body { font-size: var(--t2); font-weight: 300; line-height: 1.6; color: var(--ink-mute); }

.card--glow::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--tint, var(--glow-ink)) 0%, transparent 68%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.card--glow:hover::before { opacity: 0.09; }

/* ============================================================
   SKILLS / CHIPS
   ============================================================ */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 19px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--t2);
  font-weight: 300;
  color: var(--ink-dim);
  letter-spacing: -0.01em;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.chip--lead {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 400;
}
.chip--lead:hover { background: var(--ink); color: var(--bg); }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  position: relative;
  display: flex;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.marquee__track {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--mq-gap, 28px);
  padding-right: var(--mq-gap, 28px);
  min-width: 100%;
  animation: mq-scroll var(--mq-dur, 46s) linear infinite;
}
.marquee--reverse .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes mq-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-100%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { mask-image: none; -webkit-mask-image: none; overflow-x: auto; }
  .marquee__track { animation: none; }
}

.marquee--giant .marquee__track { gap: clamp(28px, 5vw, 76px); padding-right: clamp(28px, 5vw, 76px); }
.marquee--giant .marquee__item {
  display: inline-flex;
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  white-space: nowrap;
}
.marquee--giant .marquee__item::after {
  content: '';
  width: clamp(10px, 1.1vw, 16px);
  aspect-ratio: 1;
  background: var(--ink-ghost);
  border-radius: 50%;
  flex: none;
}
.giant-word { color: var(--ink); }
.giant-word--outline {
  color: transparent;
  -webkit-text-stroke: 1px var(--outline-stroke);
}

/* ============================================================
   WORK / CASE STUDY CARDS
   Image on top, content below. On work.html every card is the same
   size, two across from 768px and one below that.
   ============================================================ */
.work-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 24px);
}
@media (max-width: 767px) {
  .work-list { grid-template-columns: minmax(0, 1fr); }
}
/* a wide card runs the full width of the grid, its image beside the text, so no
   card sits alone in a row (unused since 8 Oct 2026: eight cards fill four rows) */
@media (min-width: 768px) {
  .work-list > .work-card--wide { grid-column: 1 / -1; flex-direction: row; }
  .work-card--wide .work-card__media { flex: 0 0 56%; }
  .work-card--wide .work-card__body { justify-content: center; }
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.work-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }

/* ---- media ---- */
.work-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
}
.work-card__media picture { position: absolute; inset: 0; display: block; }
.work-card__media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.88;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.work-card:hover .work-card__media img { transform: scale(1.04); opacity: 1; }
/* a looping clip over the card's still (build-cards.js, cardClip): the still's look and hover; on a
   phone the card shows its phone still, so the clip stays hidden and never loads */
.work-card__media .work-card__clip { object-position: top center; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.work-card__media .work-card__clip.is-playing { opacity: 0.88; }
/* the clip is dimmed like the still, so the still would show through it: it steps out once the clip plays */
.work-card__media:has(.work-card__clip.is-playing) img { opacity: 0; }
.work-card:hover .work-card__media .work-card__clip { transform: scale(1.04); }
.work-card:hover .work-card__media .work-card__clip.is-playing { opacity: 1; }
@media (max-width: 767px) { .work-card__media .work-card__clip { display: none; } }
.work-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--media-fade-top) 40%, var(--media-fade));
  pointer-events: none;
}
.work-card__tintwash {
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 70% at 50% 0%, var(--tint, transparent) 0%, transparent 62%);
  opacity: var(--wash-opacity);
  mix-blend-mode: var(--wash-blend);
  pointer-events: none;
}

/* ---- body ---- */
.work-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: clamp(20px, 2.2vw, 30px);
  min-width: 0;
}

.work-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: var(--t1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.work-card__meta i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tint, var(--ink-ghost));
  flex: none;
  font-style: normal;
}
.work-card__title {
  font-size: var(--t3);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.work-card__desc {
  font-size: var(--t2);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-mute);
  max-width: 46ch;
}

/* ---- results + hover affordance ---- */
.work-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: auto;
  padding-top: 14px;
}
.work-card__result { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.work-card__result div { display: grid; gap: 2px; }
.work-card__result b {
  font-size: var(--t3);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.work-card__result span { font-size: var(--t1); color: var(--ink-mute); }

.work-card__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: var(--t1);
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.work-card:hover .work-card__go,
.work-card:focus-visible .work-card__go {
  opacity: 1;
  transform: none;
  color: var(--ink);
}
/* touch devices never hover, so keep it permanently visible there */
@media (hover: none) {
  .work-card__go { opacity: 1; transform: none; }
}

/* ============================================================
   PROCESS
   ============================================================ */
.process { display: grid; gap: clamp(16px, 1.8vw, 24px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .process { grid-template-columns: minmax(0, 1fr); } }
.process .card { min-height: clamp(220px, 22vw, 300px); }
.process .card__num {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  margin-bottom: auto;
}

/* ============================================================
   CAREER TIMELINE
   ============================================================ */
.timeline { display: grid; gap: 0; }
/* 240px holds two marks side by side (FlowerAura and Bakingo share a row) */
.timeline__row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  gap: 20px 40px;
  align-items: start;
  padding-block: clamp(24px, 3vw, 38px);
  border-top: 1px solid var(--line);
  transition: background var(--dur) var(--ease);
}
.timeline__row:last-child { border-bottom: 1px solid var(--line); }
.timeline__row:hover { background: var(--row-hover); }
.timeline__when { display: grid; gap: 6px; align-content: start; }
/* the employer's mark leads the row, same files, size and colour as the
   homepage logo strip (see .brand-logo) */
.timeline__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 14px;
}
.timeline__when b { font-size: var(--t2); font-weight: 400; letter-spacing: -0.01em; }
.timeline__when span { font-size: var(--t1); color: var(--ink-mute); }
.timeline__what { display: grid; gap: 10px; max-width: 62ch; }
.timeline__what h3 { font-size: var(--t3); font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; }
/* 520px keeps a line near 63 characters; px, not ch, because in Inter 62ch
   is the old 613px. The colour is the intro paragraph's. */
.timeline__what p {
  max-width: 520px;
  font-size: var(--t2);
  font-weight: 300;
  line-height: 1.62;
  color: var(--ink-dim);
}
/* The way into each role's case studies, under its paragraph. White, so it
   reads as the thing to click against the dimmer copy above; the arrow
   steps out on hover like every other arrow link on the site. */
.timeline__cases {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  margin-top: 12px;
}
.timeline__cases .eyebrow { flex-basis: 100%; }
.timeline__cases .link-arrow { color: var(--ink); }
/* touch screens already pad each link to a 44px target, so no extra gap */
@media (hover: none), (max-width: 760px) {
  .timeline__cases { row-gap: 0; }
}
/* a plain caption, not a pill: it is a label, not a control */
.timeline__tag {
  align-self: start;
  font-size: var(--t1);
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: var(--ink-faint);
  white-space: nowrap;
}
@media (max-width: 800px) {
  .timeline__row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .timeline__tag { justify-self: start; }
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.quote-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: clamp(300px, 34vw, 420px);
  flex: none;
  padding: clamp(24px, 2.4vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  white-space: normal;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.quote-card:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.quote-card__kind {
  font-size: var(--t3);
  font-weight: 300;
  letter-spacing: -0.02em;
}
.quote-card__text {
  font-size: var(--t2);
  font-weight: 300;
  line-height: 1.62;
  color: var(--ink-mute);
  flex: 1;
}
.quote-card__who { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.quote-card__avatar {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: var(--t1);
  font-weight: 400;
  color: var(--ink-dim);
}
.quote-card__who b { display: block; font-size: var(--t2); font-weight: 400; letter-spacing: -0.01em; }
.quote-card__who span { display: block; font-size: var(--t1); color: var(--ink-mute); }

/* ============================================================
   CTA + FOOTER
   ============================================================ */
.cta {
  position: relative;
  text-align: left;
  padding-block: clamp(96px, 13vw, 190px);
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  left: 50%; bottom: -46%;
  transform: translateX(-50%);
  width: min(130%, 1500px);
  aspect-ratio: 2 / 1;
  background: radial-gradient(ellipse at center, var(--glow) 0%, transparent 62%);
  pointer-events: none;
}
.cta__inner { position: relative; display: grid; gap: clamp(26px, 3vw, 40px); max-width: 900px; }
.cta__title span { display: block; }

.footer { border-top: 1px solid var(--line); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding-block: 34px;
}
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer__nav a { font-size: var(--t2); color: var(--ink-mute); transition: color var(--dur) var(--ease); }
.footer__nav a:hover { color: var(--ink); }
.footer__note { font-size: var(--t1); color: var(--ink-faint); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-in,
.reveal:focus-within { opacity: 1; transform: none; }   /* focus is never invisible */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: var(--ink);
  z-index: 400;
  pointer-events: none;
  opacity: 0.6;
}

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-head {
  padding-block: clamp(140px, 18vh, 220px) clamp(40px, 5vw, 72px);
}
.page-head__inner { display: grid; gap: clamp(20px, 2.4vw, 30px); max-width: 940px; }
.page-head__kicker { display: flex; align-items: center; gap: 10px; }
.page-head__kicker i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--tint, var(--ink-ghost));
  flex: none;
  font-style: normal;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: var(--t2);
  color: var(--ink-mute);
  transition: color var(--dur) var(--ease), gap var(--dur) var(--ease);
}
.back-link:hover { color: var(--ink); gap: 13px; }
.back-link svg { transition: transform var(--dur) var(--ease); }
.back-link:hover svg { transform: translateX(-3px); }

/* ============================================================
   CASE STUDY
   ============================================================ */
.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
  padding-block: clamp(26px, 3vw, 38px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) { .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cs-meta div { display: grid; gap: 8px; align-content: start; }
.cs-meta dt { font-size: var(--t1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
.cs-meta dd { margin: 0; font-size: var(--t2); font-weight: 300; line-height: 1.45; color: var(--ink); }

.cs-cover {
  position: relative;
  margin-top: clamp(36px, 4.5vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-2);
}
.cs-cover img { width: 100%; height: auto; display: block; }
.cs-cover__wash {
  position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 0%, var(--tint, transparent) 0%, transparent 58%);
  opacity: 0.14;
  mix-blend-mode: screen;
  pointer-events: none;
}

.cs-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 960px) { .cs-layout { grid-template-columns: minmax(0, 1fr); } }

.cs-nav { position: sticky; top: 108px; display: grid; gap: 4px; }
@media (max-width: 960px) { .cs-nav { display: none; } }
.cs-nav a {
  padding: 7px 0;
  font-size: var(--t2);
  color: var(--ink-mute);
  border-left: 1px solid var(--line);
  padding-left: 16px;
  margin-left: -1px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cs-nav a:hover { color: var(--ink-dim); }
.cs-nav a[aria-current='true'] { color: var(--ink); border-color: var(--ink); }

.prose { display: grid; gap: clamp(30px, 3.6vw, 52px); }
.prose p,
.prose ul { max-width: 600px; }
.prose section { display: grid; gap: 18px; scroll-margin-top: 110px; }
.prose h2 {
  font-size: var(--t4);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.028em;
}
.prose h3 {
  font-size: var(--t3);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin-top: 6px;
}
.prose p {
  font-size: var(--t2);
  font-weight: 300;
  line-height: 1.68;
  color: var(--ink-dim);
}
.prose p strong { font-weight: 500; color: var(--ink); }
.prose ul,
.chapter__body > ul.chapter__list { display: grid; gap: 12px; }
.prose ul li,
.chapter__list li {
  position: relative;
  padding-left: 24px;
  font-size: var(--t2);
  font-weight: 300;
  line-height: 1.62;
  color: var(--ink-dim);
}
.prose ul li::before,
.chapter__list li::before {
  content: '';
  position: absolute;
  left: 2px; top: 0.66em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tint, var(--ink-ghost));
}

.pull {
  display: grid;
  gap: 12px;
  padding: clamp(22px, 2.4vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--tint, var(--line-strong));
  border-radius: var(--r-sm);
}
.pull p {
  font-size: var(--t3);
  font-weight: 300;
  line-height: 1.42;
  letter-spacing: -0.018em;
  color: var(--ink);
}
.pull span { font-size: var(--t1); color: var(--ink-mute); }

.note {
  padding: 18px 20px;
  background: var(--note-fill);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  font-size: var(--t2);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-mute);
}
.note b { color: var(--ink-dim); font-weight: 500; }

.figure { display: grid; gap: 12px; }
.figure__frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.figure__frame img { width: 100%; height: auto; display: block; }
.figure figcaption { font-size: var(--t1); font-weight: 300; line-height: 1.55; color: var(--ink-mute); }
.figure--pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 680px) { .figure--pair { grid-template-columns: minmax(0, 1fr); } }

/* a recording (build-cases.js, audio, 24 Oct 2026): the browser's own player at the reading
   width, and the words written out under a toggle, at the body and caption sizes */
.audio__player { width: 100%; height: 48px; display: block; border-radius: var(--r-pill); }
.audio__read { border-top: 1px solid var(--line); padding-top: 12px; }
.audio__read summary { cursor: pointer; font-size: var(--t2); font-weight: 500; color: var(--ink); width: fit-content; }
.audio__read summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
.audio__lines { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 14px; }
.audio__lines li { font-size: var(--t2); font-weight: 300; line-height: 1.55; color: var(--ink-dim); }
.audio__lines b { display: block; font-size: var(--t1); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
/* the same recording as a video (build-cases.js, audio with "video", 24 Oct 2026): a square
   film in the screenshots' hairline frame, no wider than its own 720px */
.callvid__frame { position: relative; max-width: 560px; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--bezel); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.45); }
.callvid__player { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; }
.callvid + .audio__read { max-width: 600px; }
/* the demo call as a case hero (voice agent, 24 Oct 2026): a landscape film as wide as the
   browser heroes, playing muted on its own; on a phone it takes the stage's whole width */
.stage--video .stage__group { max-width: 1060px; }
.callvid__wrap { position: relative; }
.stage--video .callvid__frame { width: 100%; max-width: none; margin-inline: auto; }
/* on a phone the button sits under the film, so it never covers a caption */
@container (max-width: 599px) {
  .stage--video .stage__devices { padding-inline: 8px; padding-bottom: 20px; }
  .callvid__wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .callvid__wrap .callvid__sound { position: static; }
}
.callvid__sound {
  position: absolute; right: clamp(10px, 2cqw, 20px); bottom: clamp(10px, 2cqw, 20px);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 12px; min-height: 44px;
  border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: var(--t2); font-weight: 500;
  color: #fff; background: #1f1f1d;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.callvid__sound:hover { background: #000; transform: translateY(-1px); }
.callvid__sound:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* a small speaker drawn in CSS: a cone and one sound wave */
.callvid__icon { position: relative; width: 18px; height: 14px; flex: none; }
.callvid__icon::before { content: ''; position: absolute; left: 0; top: 2px; width: 10px; height: 10px; background: currentColor; clip-path: polygon(0 30%, 35% 30%, 100% 0, 100% 100%, 35% 70%, 0 70%); }
.callvid__icon::after { content: ''; position: absolute; right: 0; top: 2px; width: 6px; height: 10px; border: 2px solid currentColor; border-left: 0; border-radius: 0 10px 10px 0; box-sizing: border-box; }

.phone {
  max-width: 300px;
  margin-inline: auto;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 30px 70px -30px var(--shadow-deep);
}
.phone img { width: 100%; height: auto; display: block; }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
}
@media (max-width: 700px) { .metrics { grid-template-columns: minmax(0, 1fr); } }
.metric {
  display: grid;
  gap: 8px;
  padding: clamp(20px, 2.2vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.metric b {
  font-size: var(--t4);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.metric span { font-size: var(--t1); font-weight: 300; line-height: 1.5; color: var(--ink-mute); }

.next-case {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: clamp(26px, 3vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.next-case:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.next-case__label { font-size: var(--t1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 10px; }
.next-case__title { font-size: var(--t4); font-weight: 300; letter-spacing: -0.028em; line-height: 1.1; }

/* ============================================================
   CASE STUDIES PAGE (work.html)
   <main class="work"> takes the five-size scale. The head is short,
   so the first row of cards starts on the first screen. From 1024px a
   line drawing sits to its right, in the hero's hand: three phones
   stepping down (what was wrong, what changed, what happened), with
   typed notes in the corners they leave free.
   ============================================================ */
.work { --sec-y: clamp(64px, 7vw, 104px); }
.work-head { padding-block: clamp(112px, 14vh, 150px) clamp(36px, 4vw, 56px); }
.work-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 5vw, 80px);
}
.work-head .page-head__inner { gap: 20px; }
.work-head .lead { max-width: 56ch; }
.work-head .small { max-width: 62ch; }
.work-head__art { display: none; }
@media (min-width: 1024px) {
  .work-head__grid { grid-template-columns: minmax(0, 1fr) clamp(340px, 29vw, 420px); }
  .work-head__art { display: block; }
}
/* the drawing: notes placed in % of its 420 x 400 box, like a case wireframe */
.work-art { position: relative; margin: 0; color: var(--ink-dim); }
.work-art .art__note { width: var(--nw); left: var(--nx); top: var(--ny); }
.work-art .art__note--left { text-align: right; justify-items: end; }
.work-art .art__cursor { transform: none; animation-name: art-tap; }
.work-grid { padding-block: 0 var(--sec-y); }
/* ---------- Other work (09-cases-v2.md, 5b) ----------
   Under the six cards: five rows, each a title (16px) with its status chip
   (13px), one line of text (16px), and the title links where there is a link. */
.other-work-sec { padding-block: 0 var(--sec-y); }
/* QA 4 Oct 2026: the hairline opens the section with the homepage's gap below
   it, as on every other page; without it the eyebrow sat on the line */
.other-work-sec > .wrap > .rule:first-child { margin-bottom: var(--sec-y); }
.other-work { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.other-work__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.other-work__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.other-work__title { font-size: var(--t2); font-weight: 400; line-height: 1.4; letter-spacing: -0.01em; color: var(--ink); }
.other-work__title a { display: inline-flex; align-items: center; gap: 8px; transition: gap var(--dur) var(--ease); }
.other-work__title a svg { color: var(--ink-mute); flex: none; }
.other-work__title a:hover { gap: 12px; }
.other-work__status { font-size: var(--t1); line-height: 1; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--ink-mute); letter-spacing: 0.02em; }
.other-work__status--live { color: var(--ink-dim); border-color: var(--line-strong); }
.other-work__text { font-size: var(--t2); font-weight: 300; line-height: 1.55; color: var(--ink-dim); max-width: 72ch; }
@media (min-width: 900px) {
  .other-work__row { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: baseline; padding-block: 22px; }
}

/* ============================================================
   RESUME PAGE (resume.html, built by build-resume.js)
   The site's head, then the resume sheet (css/resume.css) as a
   page of paper on the black.
   ============================================================ */
.resume-page { --sec-y: clamp(64px, 7vw, 104px); }
.resume-head { padding-block: clamp(112px, 14vh, 150px) clamp(36px, 4vw, 56px); }
.resume-head .page-head__inner { gap: 20px; }
.resume-head .lead { max-width: 46ch; }
.resume-sheet { padding-block: 0 var(--sec-y); }

/* ============================================================
   CONTACT AND PROCESS PAGES (built by build-pages.js)
   The site's page head, then their own content on the same rhythm.
   ============================================================ */
.sub-page { --sec-y: clamp(64px, 7vw, 104px); }
.sub-head { padding-block: clamp(112px, 14vh, 150px) clamp(36px, 4vw, 56px); }
.sub-head .page-head__inner { gap: 20px; }
.sub-head .lead { max-width: 40ch; }
.sub-head .body { max-width: 52ch; }
.sub-sec { padding-block: 0 var(--sec-y); }

/* ---------- contact: one row per way to reach Punit ---------- */
.reach-list { display: grid; border-top: 1px solid var(--line); }
.reach-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px 40px;
  padding-block: clamp(26px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}
.reach-row > .eyebrow { padding-top: 0.7em; color: var(--ink-mute); }
.reach-row__main { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.reach-row__value { font-size: var(--t4); font-weight: 300; line-height: 1.1; letter-spacing: -0.03em; overflow-wrap: break-word; }
.reach-row__note { margin-top: -8px; font-size: var(--t2); font-weight: 300; color: var(--ink-mute); }
.reach-row__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 767px) {
  .reach-row { grid-template-columns: minmax(0, 1fr); }
  .reach-row > .eyebrow { padding-top: 0; }
  .reach-row__value { font-size: var(--t3); }
}

/* ---------- process: sections on the homepage's rhythm ---------- */
.sub-page .sec { padding-block: 0 var(--sec-y); }
.sub-page .sec > .wrap > .rule:first-child { margin-bottom: var(--sec-y); }
.loop-sec__aside { max-width: 34ch; }
/* Process: the A/B story (#combos, 09-cases-v2.md section 6): two paragraphs, read as one piece */
.prose.combos { gap: 18px; }
/* a smaller section heading, the scale's 26px size: Other work on work.html and
   the A/B story on Process (09-cases-v2.md, 5b and 6) */
.h2.h2--minor { font-size: var(--t3); line-height: 1.2; letter-spacing: -0.015em; }

/* ---------- the Subtraction Loop ----------
   A ring with the four moves on it and a dot that travels to the one in
   view; its small scene plays in the middle, its panel reads beside it.
   main.js (initLoop) turns the panels into tabs. Without JavaScript every
   panel is listed. Every scene's resting state is its finished drawing, so
   with reduced motion or without JavaScript it shows complete and still. */
.loop { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 5vw, 80px); align-items: center; }
@media (min-width: 1024px) {
  .loop { grid-template-columns: minmax(360px, 5fr) minmax(0, 6fr); }
  /* without JavaScript every panel is listed: the ring stays beside the one being read */
  .loop:not(.is-live) { align-items: start; }
  .loop:not(.is-live) .loop__stage { position: sticky; top: 120px; }
}
.loop__stage { position: relative; width: min(100%, 460px); aspect-ratio: 1; justify-self: center; color: var(--ink-dim); }
.loop__ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.art .loop__arc { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 0 100; vector-effect: none; transition: stroke-opacity var(--dur) var(--ease); }
.art .loop__arc.is-fading { stroke-opacity: 0; }
.art .loop__dot { fill: var(--ink); stroke: none; }
.loop__scenes { position: absolute; inset: 28%; }
.loop__scene { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity var(--dur) var(--ease); }
.loop__scene.is-active,
.loop:not(.is-live) .loop__scene:first-child { opacity: 1; }
.loop__node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--bg);
  font-size: var(--t2);
  color: var(--ink-dim);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.loop__node--1 { left: 50%; top: 12.5%; }
.loop__node--2 { left: 87.5%; top: 50%; }
.loop__node--3 { left: 50%; top: 87.5%; }
.loop__node--4 { left: 12.5%; top: 50%; }
.loop__n {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: var(--t1);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--dur) var(--ease);
}
.loop__node:hover { color: var(--ink); border-color: var(--hover-line); }
.loop__node.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.loop__node.is-active .loop__n { border-color: var(--on-ink-line); }
/* Pause and Play for the loop's moving on, in the ring's corner */
.loop__toggle { position: absolute; right: 0; bottom: 0; }
.loop__toggle[hidden] { display: none; }
.loop__toggle .loop__play { display: none; }
.loop__toggle.is-paused .loop__play { display: block; }
.loop__toggle.is-paused .loop__pause { display: none; }

.loop__panels { display: grid; gap: 56px; }
/* with JavaScript the panels share one cell: the one in view shows, the rest
   keep their room (hidden from everyone, screen readers included), so the
   section holds the height of its longest move and nothing jumps */
.loop.is-live .loop__panels { gap: 0; }
.loop.is-live .loop__panel { grid-area: 1 / 1; }
.loop.is-live .loop__panel[hidden] { display: grid; visibility: hidden; }
.loop__panel { display: grid; gap: 16px; align-content: start; }
.loop.is-live .loop__panel:not([hidden]) { animation: loop-in var(--dur) var(--ease); }
@keyframes loop-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.loop__panel:focus-visible { outline: 2px solid var(--ink); outline-offset: 12px; border-radius: 4px; }
.loop__kicker { display: flex; align-items: center; gap: 10px; font-size: var(--t1); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); }
.loop__kicker span { color: var(--ink-faint); letter-spacing: 0.06em; }
.loop__title { font-size: var(--t4); font-weight: 300; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.loop__text { max-width: 40ch; font-size: var(--t3); font-weight: 300; line-height: 1.45; color: var(--ink-dim); }
.loop__facts { margin-top: 10px; border-top: 1px solid var(--line); }
.loop__facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 20px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.loop__facts dt { padding-top: 3px; font-size: var(--t1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
.loop__facts dd { margin: 0; font-size: var(--t2); font-weight: 300; line-height: 1.55; color: var(--ink-dim); }
.loop__facts a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.22em; transition: text-decoration-color var(--dur) var(--ease); }
.loop__facts a:hover { text-decoration-color: currentColor; }
@media (max-width: 600px) {
  .loop__facts div { grid-template-columns: minmax(0, 1fr); }
  .loop__node { padding: 5px 12px 5px 6px; gap: 6px; }
  .loop__n { width: 22px; height: 22px; }
}

/* the scenes: each plays only while its move is in view, on the site's curve */
.art .sc-leak { fill: currentColor; fill-opacity: 0.28; }
.sc-lens { transform: translate(118px, 78px); }
.loop__scene.is-active .sc-lens { animation: sc-lens 6s var(--ease) infinite; }
.loop__scene.is-active .sc-leak { animation: sc-leak 6s var(--ease) infinite; }
@keyframes sc-lens {
  0%, 8%    { transform: translate(128px, 34px); }
  30%       { transform: translate(124px, 56px); }
  50%, 86%  { transform: translate(118px, 78px); }
  100%      { transform: translate(128px, 34px); }
}
@keyframes sc-leak { 0%, 45% { fill-opacity: 0; } 56%, 86% { fill-opacity: 0.28; } 100% { fill-opacity: 0; } }

.loop__scene.is-active .sc-say--1 { animation: sc-say-1 6s var(--ease) infinite; }
.loop__scene.is-active .sc-say--2 { animation: sc-say-2 6s var(--ease) infinite; }
.loop__scene.is-active .sc-say--3 { animation: sc-say-3 6s var(--ease) infinite; }
.loop__scene.is-active .sc-dot { animation: sc-dot 1.2s var(--ease) infinite alternate; }
.loop__scene.is-active .sc-dot:nth-of-type(2) { animation-delay: 0.2s; }
.loop__scene.is-active .sc-dot:nth-of-type(3) { animation-delay: 0.4s; }
@keyframes sc-say-1 { 0%, 4% { opacity: 0; transform: translateY(6px); } 14%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes sc-say-2 { 0%, 24% { opacity: 0; transform: translateY(6px); } 34%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes sc-say-3 { 0%, 44% { opacity: 0; transform: translateY(6px); } 54%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes sc-dot { from { transform: translateY(0); } to { transform: translateY(-3px); } }

.art .sc-cut, .art .sc-line { vector-effect: none; stroke-dasharray: 1; stroke-dashoffset: 0; }
.art .sc-gone { opacity: 0.15; }
.loop__scene.is-active .sc-cut { animation: sc-cut 6s var(--ease) infinite; }
.loop__scene.is-active .sc-gone { animation: sc-gone 6s var(--ease) infinite; }
@keyframes sc-cut { 0%, 10% { stroke-dashoffset: 1; opacity: 1; } 34%, 80% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes sc-gone { 0%, 34% { opacity: 1; } 50%, 86% { opacity: 0.15; } 100% { opacity: 1; } }

.loop__scene.is-active .sc-line { animation: sc-line 6s var(--ease) infinite; }
.loop__scene.is-active .sc-end { animation: sc-end 6s var(--ease) infinite; }
@keyframes sc-line { 0%, 8% { stroke-dashoffset: 1; opacity: 1; } 52%, 88% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes sc-end { 0%, 48% { opacity: 0; } 56%, 88% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- the laws ---------- */
.laws { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 24px); }
.law { gap: 12px; }
.law--lead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 320px); align-items: center; gap: 24px clamp(32px, 5vw, 72px); }
.law__copy { display: grid; gap: 12px; justify-items: start; }
.law__tag { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t1); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.law__tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.law__name { font-size: var(--t3); font-weight: 400; line-height: 1.2; letter-spacing: -0.015em; }
.law--lead .law__name { font-size: var(--t4); font-weight: 300; line-height: 1.08; letter-spacing: -0.03em; }
.law__def { font-size: var(--t2); font-weight: 300; line-height: 1.6; color: var(--ink-dim); }
.law__use { font-size: var(--t2); font-weight: 300; line-height: 1.6; color: var(--ink-mute); }
.law__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: auto; padding-top: 6px; }
.law__art { width: 100%; max-width: 320px; justify-self: center; color: var(--ink-dim); }
.art .hk-go { opacity: 0.12; }
.art .hk-keep { fill: currentColor; fill-opacity: 0.25; }
.law__art .hk-go { animation: hk-go 8s var(--ease) infinite; }
.law__art .hk-keep { animation: hk-keep 8s var(--ease) infinite; }
.law__art .hk-go--1 { animation-delay: 0.12s; } .law__art .hk-go--2 { animation-delay: 0.24s; }
.law__art .hk-go--3 { animation-delay: 0.36s; } .law__art .hk-go--5 { animation-delay: 0.48s; }
.law__art .hk-go--6 { animation-delay: 0.6s; }  .law__art .hk-go--7 { animation-delay: 0.72s; }
.law__art .hk-go--8 { animation-delay: 0.84s; }
@keyframes hk-go { 0%, 18% { opacity: 1; } 32%, 86% { opacity: 0.12; } 100% { opacity: 1; } }
@keyframes hk-keep { 0%, 40% { fill-opacity: 0; } 52%, 86% { fill-opacity: 0.25; } 100% { fill-opacity: 0; } }
@media (max-width: 767px) {
  .laws { grid-template-columns: minmax(0, 1fr); }
  .law--lead { grid-template-columns: minmax(0, 1fr); }
  .law__art { max-width: 260px; }
}

/* ---------- why it matters to whoever is hiring ---------- */
.hire { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.hire__item { display: grid; gap: 8px; align-content: start; padding: 28px 24px 4px 0; }
.hire__item + .hire__item { padding-left: 24px; border-left: 1px solid var(--line); }
.hire__figure { font-size: var(--t3); font-weight: 300; letter-spacing: -0.025em; line-height: 1.15; }
.hire__label { font-size: var(--t1); line-height: 1.4; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }
.hire__text { margin-top: 6px; font-size: var(--t2); font-weight: 300; line-height: 1.6; color: var(--ink-dim); }
.hire__item .link-arrow { margin-top: 6px; font-size: var(--t1); }
@media (max-width: 1023px) {
  .hire { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hire__item:nth-child(3) { padding-left: 0; border-left: 0; }
  .hire__item:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .hire { grid-template-columns: minmax(0, 1fr); }
  .hire__item, .hire__item + .hire__item { padding-left: 0; border-left: 0; }
  .hire__item + .hire__item { border-top: 1px solid var(--line); }
}

/* ---------- the products, live ---------- */
.live-list { display: grid; gap: 14px; margin-top: 8px; max-width: 720px; }
.live-list .eyebrow { color: var(--ink-mute); }
.live-list ul { display: grid; border-top: 1px solid var(--line); }
.live-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  font-size: var(--t2);
  color: var(--ink-dim);
  transition: color var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.live-list a:hover { color: var(--ink); padding-left: 6px; }
.live-list i { width: 7px; height: 7px; border-radius: 50%; background: var(--tint, var(--ink-ghost)); }
.live-list em { font-style: normal; font-size: var(--t1); color: var(--ink-mute); }
@media (max-width: 480px) {
  .live-list a { grid-template-columns: auto minmax(0, 1fr) auto; }
  .live-list em { display: none; }
}

/* ============================================================
   THE EMAIL AND PHONE PANEL (main.js initReach)
   Where there is a mouse, a mailto: or tel: link opens this: the
   address or number, a copy button, and the ways to use it.
   ============================================================ */
.reach {
  width: min(calc(100vw - 32px), 460px);
  max-width: none;
  padding: 30px;
  margin: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: 0 40px 100px -30px var(--shadow-reach);
}
.reach[open] { display: grid; gap: 12px; animation: reach-in var(--dur) var(--ease); }
.reach::backdrop { background: var(--scrim, rgba(0, 0, 0, 0.62)); backdrop-filter: blur(4px); }
@keyframes reach-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.reach__close {
  position: absolute;
  top: 16px; right: 16px;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-mute);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.reach__close:hover { color: var(--ink); border-color: var(--line-strong); }
.reach__kind { color: var(--ink-mute); }
.reach__value { padding-right: 40px; font-size: var(--t3); font-weight: 300; letter-spacing: -0.02em; line-height: 1.3; overflow-wrap: break-word; user-select: all; }
.reach__actions { display: grid; gap: 14px; margin-top: 10px; }
.reach__actions > .btn { justify-self: start; }
.reach__ways { display: grid; border-top: 1px solid var(--line); }
.reach__way {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  font-size: var(--t2);
  color: var(--ink-dim);
  transition: color var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.reach__way:hover { color: var(--ink); padding-inline: 6px 0; }
@media (prefers-reduced-motion: reduce) {
  .reach[open] { animation: none; }
}

/* ============================================================
   CASE PAGES (rebuilt from content/cases/*.json by build-cases.js)
   <main class="case"> takes the five-size scale. Every chapter opens
   like a homepage section: a hairline, then an eyebrow and a heading,
   on the homepage's gap (--sec-y). Paragraphs read at 600px; figures,
   wireframes and diagrams use the whole content column (840px at 1440,
   beside the rail).
   ============================================================ */
.case { --sec-y: clamp(64px, 7vw, 104px); }
.case .sec { padding-block: 0 var(--sec-y); }
.case .sec > .wrap > .rule:first-child { margin-bottom: var(--sec-y); }
.case .cta.sec { padding-block: 0 var(--sec-y); }

/* ---------- head: built like the homepage hero ---------- */
.case-head {
  display: grid;
  align-content: center;
  min-height: 100svh;
  padding-block: clamp(96px, 10vh, 132px) var(--sec-y);
}
.case-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}
.case-head__text { display: grid; gap: clamp(20px, 2vw, 28px); align-content: center; max-width: 700px; }
/* the dot, then the words; when they wrap on a phone they stay beside it */
.case-head__eyebrow { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.case-head__eyebrow i {
  width: 7px; height: 7px;
  margin-top: 0.48em;                    /* centred on the first line */
  border-radius: 50%;
  background: var(--tint, var(--ink-ghost));
  flex: none;
}
.case-head__art { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
/* "See it live on seamsfriendly.com" is wider than the narrowest phones: it wraps
   there, where every other button stays on one line */
.case-head__live .btn,
.live__cta .btn { max-width: 100%; white-space: normal; }
/* under 360px the label runs as text, and the arrow follows its last word */
@media (max-width: 359px) {
  .case-head__live .btn,
  .live__cta .btn { display: inline-block; padding-inline: 20px; text-align: left; line-height: 1.45; }
  .case-head__live .btn svg,
  .live__cta .btn svg { display: inline; margin-left: 6px; vertical-align: -1px; }
}
.case-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px clamp(18px, 2vw, 28px);
  margin-top: clamp(40px, 5vw, 64px);
  padding-block: clamp(22px, 2.6vw, 32px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.case-facts div { display: grid; gap: 8px; align-content: start; }
.case-facts dt { font-size: var(--t1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mute); }
.case-facts dd { margin: 0; font-size: var(--t2); font-weight: 300; line-height: 1.45; color: var(--ink); }
@media (max-width: 1023px) {
  .case-head { min-height: 0; }
  .case-head__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 767px) {
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* a study card in a chapter ("study" block): the facts row's rows, inside the
   reading width (Custom Size, chapter 02) */
.chapter__body .study-card { margin-top: 4px; max-width: 600px; }

/* ---------- key statement: the homepage intro, word scrub and all ---------- */
.case .intro__grid { padding-bottom: 0; }

/* ---------- how it went: the homepage process cards, each a link ---------- */
.case .process .card__num { margin-bottom: 0; }
.case a.card { color: inherit; }

/* ---------- chapters, with the rail ---------- */
.case-body .cs-layout { align-items: start; }
.case-chapters { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
html:has(main.case) { scroll-padding-top: 96px; }
.chapter { scroll-margin-top: 14px; padding-bottom: var(--sec-y); }
.chapter > .rule { margin-bottom: var(--sec-y); }
.chapter:first-child > .rule { display: none; }        /* the section's own hairline opens the first */
.chapter .section-head { margin-bottom: clamp(28px, 3vw, 40px); }
.chapter__title {
  font-size: var(--t3);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.chapter__body { --ch-gap: clamp(24px, 2.6vw, 36px); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ch-gap); }
.chapter__body > p,
.chapter__body > ul,
.chapter__body > .chapter__sub,
.case .note { max-width: 600px; }
/* a subheading inside a chapter: body size, a little heavier, and close to the
   paragraph under it (the grid gap is pulled back to 14px below it) */
.chapter__sub { font-size: var(--t2); font-weight: 500; line-height: 1.4; color: var(--ink); }
.chapter__body > .chapter__sub { margin: 8px 0 calc(14px - var(--ch-gap)); }
.chapter__body > p {
  font-size: var(--t2);
  font-weight: 300;
  line-height: 1.68;
  color: var(--ink-dim);
}
.case .metric b { font-size: var(--t3); }
.case .metrics { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.case .metrics:has(> .metric:only-child) { grid-template-columns: minmax(0, 600px); }
/* a second row of metrics sits right under the first, at the row's own gap,
   and a line under the rows (when there is one) at 13px */
.chapter__body > .metrics + .metrics { margin-top: calc(clamp(14px, 1.6vw, 20px) - var(--ch-gap)); }
.chapter__body > p.metrics__line { margin: calc(12px - var(--ch-gap)) 0 0; font-size: var(--t1); font-weight: 300; line-height: 1.5; color: var(--ink-mute); }
/* a qualitative result: one sentence, never in a figure slot */
.result {
  padding: clamp(22px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-left: 2px solid var(--tint, var(--line-strong));
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: var(--t3);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.chapter__body > p.result { font-size: var(--t3); line-height: 1.4; color: var(--ink); max-width: none; }
/* the caveat: the .note look, with its eyebrow */
.caveat { display: grid; gap: 10px; }
.caveat .eyebrow { display: block; }
.case .next-case__title { font-size: var(--t3); }

/* ---------- live today ---------- */
.live { display: grid; gap: clamp(28px, 3vw, 44px); }
.live__phones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}
.live__phones .figure { justify-items: center; text-align: center; }
.live__phones .phone { width: 100%; max-width: 260px; }

/* ---------- close-up: a crop from a 2x capture, shown large ---------- */
.figure--zoom .figure__frame {
  background: var(--bg);
  border: 1px solid var(--line-strong);
}
.figure--zoom img { width: 100%; height: auto; }
.figure--zoom .figure__frame { width: 100%; max-width: 520px; justify-self: center; }
/* notes under a capture: listed and centred under the image, no wider than it,
   typed like a diagram's (main.js makeNotes, through data-art on the figure) */
.figure .art__notes { position: relative; inset: auto; width: min(100%, var(--fg-w, 100%)); justify-self: center; display: grid; gap: 10px; color: var(--ink-dim); pointer-events: auto; }
.figure .art__note { position: relative; width: min(46%, 240px); left: calc(50% - min(23%, 120px)); text-align: center; justify-items: center; }
.figure--zoom .art__notes { --fg-w: 520px; }

/* ---------- drafts: dotted underline, only while reviewing on this machine ---------- */
[data-review] [data-draft]:not(svg),
[data-review] .art__note[data-draft] .art__text,
[data-review] .art__note[data-draft] .art__kind {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--draft-line);
  text-underline-offset: 4px;
}

/* ============================================================
   WIREFRAME WITH TYPED NOTES (.wf)
   The hero drawing, generalised: a traced screen in 1.5px lines, notes
   around it on straight leaders, placed in % of the drawing's box from
   the content file. It draws itself in once (main.js initDrawings), then
   the notes type. Where the box is too narrow for notes beside it, they
   list under the drawing instead.
   ============================================================ */
/* grids that shrink with the column: an auto track would size to the
   drawing (440px) and push the page sideways on a phone */
.wf { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; justify-items: center; }
.wf__box {
  position: relative;
  width: var(--wf-w, 440px);
  max-width: 100%;
  color: var(--ink-dim);
  container-type: inline-size;
}
.wf .art__note {
  width: var(--nw, 26.4%);
  left: var(--nx, 0%);
  top: var(--ny, 0%);
}
.wf .art__note--left { text-align: right; justify-items: end; }
.wf figcaption,
.flow figcaption,
.diagram figcaption,
.visual figcaption {
  max-width: 60ch;
  font-size: var(--t1);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-mute);
  text-align: center;
  justify-self: center;
}
/* a reconstruction: the frame is dashed, and says so in its caption */
.art .art__frame--dashed { stroke-dasharray: 6 6; }
@container (max-width: 329px) {
  .wf .art__notes { position: static; display: grid; gap: 14px; margin-top: 12px; }
  .wf .art__note { position: static; width: auto; text-align: left; justify-items: start; }
  .wf .art__leader { display: none; }
  /* the phone ends 430 units down a 440-wide box (97.73% of its width): the list
     starts under it, and the box grows to hold it. The phone is sized from the
     width here (24 units down, its own shape), so the growing box never
     stretches it. */
  .wf--shot .shot__phone { top: 0 !important; margin-top: 5.45%; height: auto !important; aspect-ratio: 188 / 406; }
  .wf--shot:not(.wf--browser) .art__notes { margin-top: 0; padding-top: calc(97.73% + 16px); }
  /* the browser frame ends 304 units down (69.12% of the width); the list starts under it */
  .wf--browser .art__notes { margin-top: 0; padding-top: calc(69.12% + 16px); }
  .wf--browser .art__note { padding: 0; }
}
/* phones: the right-hand labels tighten so CONSTRAINT and the like fit their column */
@container (max-width: 400px) {
  .wf--shot .art__kind { letter-spacing: 0.06em; }
}
@container (max-width: 360px) {
  .wf--shot .art__kind { letter-spacing: 0.01em; }
}

/* ---------- the hero, as a real screenshot ----------
   A phone capture in a frame the size of the hero drawing's phone, with the
   notes around it. Over a bright screen a thin light line would vanish, so
   each leader has a dark halo under it and ends in a ringed dot. */
/* build-cases.js crops the box to the part in use, so its aspect ratio and the
   phone's top and height come inline; these are the uncropped values */
.wf--shot .wf__box { aspect-ratio: 440 / 600; }
.wf--shot .shot__lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot__phone {
  position: absolute;
  left: 28.64%;                          /* 126 of 440 */
  top: 16.17%;                           /* 97 of 600 */
  width: 42.73%;                         /* 188 */
  height: 67.67%;                        /* 406 */
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12.8% / 5.9%;
  background: var(--surface-2);
  box-shadow: 0 30px 70px -30px var(--shadow-deep);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.shot__phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
[data-draw].is-armed .shot__phone { opacity: 0; transform: translateY(12px); }
.art .shot__halo { stroke: var(--halo); stroke-opacity: var(--halo-opacity); stroke-width: 4; }
.art .shot__dot { fill: var(--ink); stroke: var(--halo); stroke-width: 2; stroke-opacity: var(--halo-dot-opacity); }

/* ---------- a desktop screenshot in a browser frame ----------
   The frame (a rounded rect, a top bar with three dots, in the hero's line
   style) is an svg over the whole box width; the screenshot sits in the
   window under the bar. build-cases.js sizes both in cqw, so the box can grow
   for its notes without moving them. The frame fades and rises with its
   screenshot, as the phone does: it is not stroke-drawn. */
.shot__browser {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  border-radius: 2.27cqw;                /* rx 10 of 440, under the shadow */
  box-shadow: 0 30px 70px -30px var(--shadow-deep);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
/* the frame's strokes, as .art draws them; it is not an .art drawing itself,
   so nothing stroke-draws it and the gate reads the screenshot's alt instead */
.shot__frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.shot__frame * { vector-effect: non-scaling-stroke; }
.shot__frame .art__faint { stroke-opacity: 0.4; }
.shot__window {
  position: absolute;
  overflow: hidden;
  border-radius: 0 0 2.1cqw 2.1cqw;      /* inside the frame's corners */
  background: var(--surface-2);
}
.shot__window img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
[data-draw].is-armed .shot__browser { opacity: 0; transform: translateY(12px); }
/* the leaders keep the width's scale whatever the box's height does (the phone
   hero's svg fills the box; this one takes its height from its own viewBox and
   lets a line run past it), so a note measured taller than the room reserved
   for it never shifts the lines */
.wf--browser .shot__lines { height: auto; bottom: auto; pointer-events: none; }
/* the hero's notes sit under the frame in two columns, their leaders rising in
   lanes beside the gutter: each note keeps 22 units (5cqw) clear on its inner
   side, so no leader crosses a note's text */
.wf--browser .art__note { padding-right: 5cqw; }
.wf--browser .art__note:not(.art__note--left) { padding-right: 0; padding-left: 5cqw; }

/* the drawing is hidden until it draws itself in (JavaScript only) */
/* opacity, not visibility: the drawing's label and its notes stay in the
   accessibility tree while they wait to draw in */
[data-draw].is-armed .art,
[data-draw].is-armed .art__notes,
[data-draw].is-armed .diagram__label { opacity: 0; }

/* the tap loop, on any wireframe: the cursor's position is the <g> around
   it (a transform in the drawing), so this only moves it relative to there */
.wf .art__cursor,
.flow .art__cursor { transform: none; animation-name: art-tap; }
@keyframes art-tap {
  0%, 40%   { transform: translate(20px, 26px); opacity: 0; }
  46%       { opacity: 1; }
  56%       { transform: translate(0, 0) scale(1); }
  59%       { transform: translate(0, 0) scale(0.86); }
  62%, 84%  { transform: translate(0, 0) scale(1); opacity: 1; }
  94%, 100% { transform: translate(14px, 22px); opacity: 0; }
}
/* the control the cursor taps flashes in step with the tap; on a wireframe the
   main button keeps still unless it is the one being tapped */
.art .art__tapped { fill: currentColor; fill-opacity: 0; animation: art-cta 12s var(--ease) infinite; }
.wf .art__cta:not(.art__tapped),
.flow .art__cta:not(.art__tapped) { animation: none; }
/* a chip filling in, then letting go */
.art .art__chip--fill { animation: art-chip 6s var(--ease) infinite; }
@keyframes art-chip {
  0%, 30%  { fill-opacity: 0; }
  45%, 85% { fill-opacity: 0.18; }
  100%     { fill-opacity: 0; }
}

/* ============================================================
   FLOW STEPPER (.flow)
   Two to four phones joined by connectors. Where they all fit, they sit
   in a row and draw in one after another; where only one fits, the row
   scrolls with a swipe or the arrow buttons.
   ============================================================ */
.flow { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; container-type: inline-size; }
.flow__track { position: relative; display: flex; align-items: flex-start; gap: clamp(18px, 3cqi, 36px); }
/* position: relative keeps each note's hidden screen-reader copy inside the
   scrolling row, so it never widens the page */
.flow__step { position: relative; flex: 1 1 0; min-width: 0; display: grid; gap: 12px; justify-items: center; color: var(--ink-dim); margin: 0; }
.flow__step .wf__box { width: min(100%, 240px); container-type: normal; }
.flow__step .art__notes {
  position: static;
  display: grid;
  gap: 10px;
  width: min(100%, 186px);          /* the width of the phone frame above it */
  pointer-events: auto;
}
.flow__step .art__note { position: static; width: auto; }
/* placed by main.js (placeJoints): from one phone's frame to the next, level
   with its middle */
.flow__joint {
  position: absolute;
  height: 1px;
  color: var(--ink-dim);
  pointer-events: none;
}
.flow__joint::before {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0.55;
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}
.flow.is-armed .flow__joint:not(.is-drawn)::before { transform: scaleX(0); }
.flow__nav { display: none; justify-content: center; gap: 8px; }
.flow .icon-btn[aria-disabled='true'] { opacity: 0.4; cursor: default; }
/* without JavaScript: no arrows that do nothing, and a visible scrollbar instead */
.no-js .flow__nav,
.no-js .flow__joint { display: none !important; }
.no-js .flow .flow__track { scrollbar-width: thin; }
/* one phone at a time where the row would squeeze below about 180px a phone */
@container (max-width: 419px) {
  .flow .flow__track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .flow .flow__track::-webkit-scrollbar { display: none; }
  .flow .flow__step { flex: 0 0 100%; scroll-snap-align: center; }
  .flow .flow__joint { display: none; }
  .flow .flow__nav { display: flex; }
}
@container (max-width: 639px) {
  .flow[data-steps='3'] .flow__track,
  .flow[data-steps='4'] .flow__track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .flow[data-steps='3'] .flow__step,
  .flow[data-steps='4'] .flow__step { flex: 0 0 100%; scroll-snap-align: center; }
  .flow[data-steps='3'] .flow__joint,
  .flow[data-steps='4'] .flow__joint { display: none; }
  .flow[data-steps='3'] .flow__nav,
  .flow[data-steps='4'] .flow__nav { display: flex; }
}
@container (max-width: 819px) {
  .flow[data-steps='4'] .flow__track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .flow[data-steps='4'] .flow__step { flex: 0 0 100%; scroll-snap-align: center; }
  .flow[data-steps='4'] .flow__joint { display: none; }
  .flow[data-steps='4'] .flow__nav { display: flex; }
}

/* ---------- screenshots in browser frames (.flow--shots) ----------
   Each step is a <figure>: a browser frame up to 440 wide (the frame is sized
   in cqw, so the box is its own container), the notes under it and its own
   caption. The steps scroll, one frame wide with scroll snap and the arrows,
   wherever they do not all fit: two at 440 need 916px, three 1392px, four
   1868px, so in the 840px column they always step. */
.flow--shots .flow__step .wf__box { width: min(100%, 440px); container-type: inline-size; }
.flow--shots .flow__step .art__notes { width: min(100%, 440px); }
.flow--shots .flow__step figcaption { transition: opacity var(--dur) var(--ease); }
.flow--shots .flow__step.is-armed figcaption { opacity: 0; }
@container (max-width: 915px) {
  .flow--shots[data-steps='2'] .flow__track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .flow--shots[data-steps='2'] .flow__step { flex: 0 0 min(100%, 440px); scroll-snap-align: start; }
  .flow--shots[data-steps='2'] .flow__joint { display: none; }
  .flow--shots[data-steps='2'] .flow__nav { display: flex; }
}
@container (max-width: 1391px) {
  .flow--shots[data-steps='3'] .flow__track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .flow--shots[data-steps='3'] .flow__step { flex: 0 0 min(100%, 440px); scroll-snap-align: start; }
  .flow--shots[data-steps='3'] .flow__joint { display: none; }
  .flow--shots[data-steps='3'] .flow__nav { display: flex; }
}
@container (max-width: 1867px) {
  .flow--shots[data-steps='4'] .flow__track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .flow--shots[data-steps='4'] .flow__step { flex: 0 0 min(100%, 440px); scroll-snap-align: start; }
  .flow--shots[data-steps='4'] .flow__joint { display: none; }
  .flow--shots[data-steps='4'] .flow__nav { display: flex; }
}

/* ============================================================
   STAGE (.stage): real screens in drawn devices, on a tinted panel
   build-cases.js showcase(), for the hero ("layout": "stage") and the
   "showcase" block. A rounded panel in a soft wash of the case's tint,
   mixed into the theme's own surface so it reads on the dark page and on
   paper; the devices centred on it; the notes as chips in a row under
   the panel, so they never take width from a screen (09-cases-v2.md, 2i:
   a desktop screen at least 900px wide at a 1440px window); the caption
   under the chips. The panel is the frame's ::before, placed in the
   frame's grid over the devices (and over a close-up's chips too). The
   devices fade up as the stage comes into view (main.js drawIn), then the
   chips type.
   ============================================================ */
.stage {
  --stage-ink: var(--tint, var(--ink-ghost));
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  container-type: inline-size;
}
.stage__frame {
  --pad: clamp(16px, 3.4cqw, 44px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.stage__frame::before {
  content: '';
  grid-area: 1 / 1;
  border: 1px solid color-mix(in srgb, var(--stage-ink) 22%, var(--line));
  border-radius: clamp(20px, 2.6cqw, 32px);
  background:
    radial-gradient(64% 80% at 50% 0%, color-mix(in srgb, var(--stage-ink) var(--stage-glow), transparent), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--stage-ink) var(--stage-top), var(--surface)), color-mix(in srgb, var(--stage-ink) var(--stage-foot), var(--bg)));
}
.stage__devices {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  padding: var(--pad);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
[data-draw].is-armed .stage__devices { opacity: 0; transform: translateY(12px); }
.stage__group { position: relative; width: 100%; min-width: 0; margin-inline: auto; }
.stage--laptop .stage__group { max-width: 820px; }
.stage--browser .stage__group { max-width: 1060px; }
.stage--laptop-phone .stage__group { max-width: 900px; padding-right: 9%; }
.stage--crop .stage__group { display: flex; justify-content: center; }
.stage figcaption {
  max-width: 60ch;
  font-size: var(--t1);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-mute);
  text-align: center;
  justify-self: center;
}

/* ---------- the devices, drawn in CSS ----------
   Each is its own container, so bezels, corners and shadows scale with
   the device (cqw); the screenshot sits inside at its own aspect (a phone
   shows a 390 x 844 capture). The glass is black in both themes; a laptop's
   base is space grey on the dark page and silver on paper. */
.device { position: relative; width: 100%; min-width: 0; container-type: inline-size; }
.device img { display: block; width: 100%; height: auto; }
.device__screen { position: relative; overflow: hidden; background: var(--surface-2); }
/* a looping clip over its own first frame (the screenshot under it); it shows
   only once it is playing, so a slow or blocked video leaves the still */
.device__clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity var(--dur) var(--ease); pointer-events: none; }
.device__clip.is-playing { opacity: 1; }
/* in a phone the capture starts under the status strip, so the clip sits on
   the screenshot alone: full width, its own height, from the bottom up */
.device--phone .device__clip { top: auto; height: auto; aspect-ratio: 390 / 844; object-position: top center; }

/* a laptop: the lid (thin bezel, rounded top corners, a camera dot, a
   slightly deeper chin), then the base, wider than the lid, with the notch
   that lifts it */
.device__lid {
  position: relative;
  margin-inline: 4.5cqw;
  padding: 1.2cqw 1.2cqw 1.9cqw;
  border-radius: 2.4cqw 2.4cqw 0.5cqw 0.5cqw;
  background: var(--bezel);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.device__lid::before {
  content: '';
  position: absolute;
  top: 0.42cqw;
  left: 50%;
  width: 0.42cqw;
  height: 0.42cqw;
  margin-left: -0.21cqw;
  border-radius: 50%;
  background: #2B2C31;
}
.device__lid .device__screen { border-radius: 0.5cqw; }
.device__base {
  position: relative;
  height: 1.9cqw;
  border-radius: 0.3cqw 0.3cqw 3cqw 3cqw / 0.3cqw 0.3cqw 1.9cqw 1.9cqw;
  background: linear-gradient(180deg, var(--metal-hi) 0%, var(--metal-hi) 30%, var(--metal-lo) 100%);
  box-shadow: 0 2.6cqw 5cqw -1.2cqw var(--shadow-deep);
}
.device__base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 14cqw;
  height: 0.7cqw;
  margin-left: -7cqw;
  border-radius: 0 0 1cqw 1cqw;
  background: var(--metal-lo);
  opacity: 0.7;
}

/* a phone: a rounded body, a thin bezel, and a status strip (in the
   capture's own top colour, "matte", white unless told) for the island to
   sit in, so the island never covers the top of the capture */
.device__body {
  position: relative;
  padding: 3.2cqw;
  border-radius: 15cqw;
  background: var(--bezel);
  box-shadow: 0 0 0 1px var(--line-strong), 0 10cqw 18cqw -9cqw var(--shadow-deep);
}
.device--phone .device__screen { padding-top: 12.8%; border-radius: 12cqw; background: var(--matte, #FFF); }
.device--phone img { aspect-ratio: 390 / 844; height: auto; object-fit: cover; object-position: top center; }
.device__island {
  position: absolute;
  z-index: 1;
  top: 6.4cqw;
  left: 50%;
  width: 28cqw;
  height: 8cqw;
  margin-left: -14cqw;
  border-radius: var(--r-pill);
  background: #000;
}

/* a browser window: a bar with three dots and an address pill, the screen
   under it */
.device--browser {
  overflow: hidden;
  border-radius: clamp(8px, 1.3cqw, 14px);
  background: var(--surface-3);
  box-shadow: 0 0 0 1px var(--line-strong), 0 4cqw 8cqw -4cqw var(--shadow-deep);
}
.device__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(5px, 0.7cqw, 8px);
  height: clamp(22px, 3.4cqw, 36px);
  padding-inline: clamp(10px, 1.6cqw, 18px);
}
.device__bar i { width: clamp(7px, 0.9cqw, 10px); aspect-ratio: 1; border-radius: 50%; background: var(--ink-ghost); }
.device__bar span {
  position: absolute;
  top: 24%;
  bottom: 24%;
  left: 32%;
  right: 32%;
  border-radius: var(--r-pill);
  background: var(--surface-2);
}
/* a pill with an address in it ("label" in the content file), 13px */
.device__bar span:not(:empty) {
  top: 10%;
  bottom: 10%;
  left: max(18%, 52px);
  right: max(18%, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 8px;
  font-size: var(--t1);
  color: var(--ink-mute);
}
.device__bar b { min-width: 0; overflow: hidden; font-weight: 400; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }

/* a close-up: the crop on a card of its own ground colour, at up to its
   "scale" times its width; image-rendering stays the browser's own */
.device--crop {
  width: min(100%, calc(var(--crop-w) + 2 * clamp(12px, 2.4cqw, 28px)));
  padding: clamp(10px, 1.8cqw, 20px) clamp(12px, 2.4cqw, 28px);
  border-radius: var(--r-sm);
  background: var(--matte, var(--surface-2));
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px var(--shadow-deep);
}
.device--crop .device__screen { background: transparent; }
/* on a phone the strip needs every pixel of width it can have */
@container (max-width: 599px) {
  .stage--crop .stage__devices { padding-inline: 8px; }
  .device--crop { width: 100%; padding-inline: 8px; }
}

/* a laptop with a phone over its lower right corner */
.stage--laptop-phone .device--phone { position: absolute; right: 0; bottom: -3%; width: 19%; }
/* on a phone the phone grows to a third of the stage and stands taller than
   the laptop beside it; the group is padded on top by what the phone rises
   above the laptop, so it stays on the panel */
@container (max-width: 599px) {
  .stage--laptop-phone .stage__group { padding-right: 20%; padding-top: 40%; }
  .stage--laptop-phone .device--phone { width: 36%; bottom: -4%; }
}

/* a browser window with a phone overlapping its right edge, the two in one
   row and centred on each other, so the panel grows to the taller of them
   and the phone never leaves it. The phone is 236 to 250px wide, so its
   screen is at least 220px (09-cases-v2.md, 2i); it covers 10% of itself of
   the window, which takes the rest of the row, so the window's screen is at
   least 900px wide at a 1440px window. On a phone the phone stands under
   the window, clear of it. */
.stage--browser-phone .stage__group {
  --phone-w: clamp(236px, 20cqw, 250px);
  display: flex;
  align-items: center;
  max-width: 1240px;
}
.stage--browser-phone .device--browser { flex: 1 1 auto; }
.stage--browser-phone .device--phone { flex: none; z-index: 1; width: var(--phone-w); margin-left: calc(var(--phone-w) * -0.1); }
@container (max-width: 599px) {
  .stage--browser-phone .stage__group { flex-direction: column; }
  .stage--browser-phone .device--browser { flex: none; }
  .stage--browser-phone .device--phone { margin: 16px 0 0; }
}

/* a desktop screen with a "phoneCrop" shows that part of itself on a phone,
   at about its own size, so its text reads at 12px or more (09-cases-v2.md,
   2i); on a phone under 360px the crop's smallest text would read under 12px,
   so the whole screen shows there. The widths match the image's sizes. */
@media (min-width: 360px) and (max-width: 599px) {
  .device--browser[data-crop] .device__screen { aspect-ratio: var(--cr-a); }
  /* scaled up from its own top left corner, so the picture's own box stays in
     the frame and lazy loading sees it (a negative margin pushed it out of
     view and it never loaded) */
  .device--browser[data-crop] img { transform-origin: 0 0; transform: scale(calc(1 / var(--cr-w))) translate(calc(-100% * var(--cr-x)), calc(-100% * var(--cr-y))); }
}

/* phones in a row; on a phone, a swipe row that runs to the panel's edges */
.stage--phones .stage__group { display: flex; justify-content: center; gap: clamp(16px, 3cqw, 40px); }
.stage--phones .device--phone { flex: 0 1 260px; }
/* a phone with its own chip and caption under it (a figure of its own) */
.stage--phones .stage__item { flex: 0 1 260px; display: grid; align-content: start; gap: 14px; margin: 0; min-width: 0; }
.stage--phones .stage__item .device--phone { flex: none; }
.stage__item .stage__notes { grid-area: auto; margin: 4px 0 0; grid-template-columns: minmax(0, 1fr); }
/* a numbered pill under a phone in a row ("1 · Sign in") */
.stage__pill { justify-self: center; padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--t1); line-height: 1.5; color: var(--ink-dim); }
.stage__item figcaption { font-size: var(--t1); font-weight: 300; line-height: 1.55; color: var(--ink-mute); text-align: center; }
/* the swipe row takes over wherever three phones of 236px or more would not
   fit side by side (a stage under about 812px) */
@container (max-width: 819px) {
  .stage--phones .stage__group {
    flex: none;
    /* centred while every phone fits, from the start once the row scrolls */
    justify-content: safe center;
    width: calc(100% + 2 * var(--pad));
    margin-inline: calc(-1 * var(--pad));
    padding: 0 var(--pad) 10%;
    margin-bottom: -10%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .stage--phones .stage__group::-webkit-scrollbar { display: none; }
  /* with a mouse, a thin scrollbar shows the row goes on */
  @media (pointer: fine) {
    .stage--phones .stage__group { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
    .stage--phones .stage__group::-webkit-scrollbar { display: block; height: 6px; }
    .stage--phones .stage__group::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--line-strong); }
  }
  /* at least 236px, so a phone's screen is at least 220px (09-cases-v2.md, 2i) */
  .stage--phones .device--phone,
  .stage--phones .stage__item { flex: 0 0 clamp(236px, 58%, 280px); scroll-snap-align: start; }
  .stage--phones .stage__item .device--phone { flex: none; }
  .stage--phones .stage__group:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
  /* one phone is no swipe row: it stands in the middle of its panel */
  .stage--phones[data-count="1"] .stage__group { justify-content: center; width: 100%; margin-inline: 0; padding: 0; margin-bottom: 0; overflow-x: visible; }
}

/* design boards ("board" items): documentation images with no device chrome,
   on a card with a hairline; one board at the stage's width ("board"), or two
   up in a grid ("grid"), each with its own pill under it; one column on a phone */
.device--board { width: 100%; overflow: hidden; border-radius: var(--r-sm); background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px var(--shadow-deep); }
.device--board img { display: block; width: 100%; height: auto; }
.stage--board .stage__group { max-width: 1060px; }
.stage--grid .stage__group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4cqw, 32px); max-width: 1060px; }
.stage--grid .stage__item { display: grid; justify-items: center; gap: 12px; margin: 0; min-width: 0; }
@container (max-width: 599px) {
  .stage--grid .stage__group { grid-template-columns: minmax(0, 1fr); }
}

/* close-ups side by side ("crops"), each with its own caption under it; they
   wrap to one column where two will not fit */
.stage--crops .stage__group { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: clamp(20px, 3cqw, 40px); }
.stage--crops .stage__item { flex: 0 1 auto; width: min(100%, calc(var(--crop-w, 400px) + 2 * clamp(12px, 2.4cqw, 28px))); display: grid; justify-items: center; gap: 14px; margin: 0; min-width: 0; }
.stage--crops .stage__item .device--crop { width: 100%; }
@container (max-width: 599px) {
  .stage--crops .stage__devices { padding-inline: 8px; }
  .stage--crops .stage__item { width: 100%; }
  .stage--crops .stage__item .device--crop { padding-inline: 8px; }
}

/* ---------- the chips ----------
   The notes' own type (kind over text, 13px), on a card of the theme's
   raised surface with the case's tint as a dot. A chip keeps its width,
   and main.js (makeNotes) holds it at the height of its tallest text, so
   nothing moves while the notes are typed and swapped. */
.stage__notes {
  grid-area: 2 / 1;
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  pointer-events: auto;
  transition: opacity var(--dur) var(--ease);
}
.stage__note {
  position: relative;
  width: auto;
  padding: 12px 14px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface-2);
  box-shadow: 0 18px 36px -26px var(--shadow-deep);
  pointer-events: auto;
}
.stage__note .art__kind::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  vertical-align: 0.1em;
  border-radius: 50%;
  background: var(--stage-ink);
}
/* the chips stay under the panel at every width, so they never take width
   from a screen (09-cases-v2.md, 2i, 3 Oct 2026); where there is room they
   sit in one centred row of even chips, each at most 260px (--n, the count,
   from build-cases.js) */
@container (min-width: 900px) {
  .stage--notes:not(.stage--crop) .stage__notes {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    width: 100%;
    max-width: calc(var(--n, 4) * 260px + (var(--n, 4) - 1) * 12px);
    justify-self: center;
  }
}
@container (min-width: 1150px) {
  /* a close-up is a strip: its chips sit in a row under it, in the panel */
  .stage--crop.stage--notes .stage__frame::before { grid-row: 1 / 3; }
  .stage--crop.stage--notes .stage__devices { padding-bottom: 24px; }
  .stage--crop .stage__notes {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 260px);
    justify-content: center;
    gap: 16px;
    margin: 0;
    padding: 0 var(--pad) var(--pad);
  }
}

/* ---------- where a stage sits ----------
   In the head: under the facts, the width of the page's content. In a
   chapter: beside the rail, it runs out over the rail's column to the
   wrap's content edges (main.js fades the rail while a stage covers it).
   On screens wide enough to leave room, both reach into the gutter, to the
   wrap's own 1240px. The stage only grows inside the wrap's box, so it can
   never widen the page. */
.case-head--stage { min-height: 0; align-content: start; }
.case-head--stage .case-head__text { max-width: none; }
.case-head--stage .case-head__text > .lead { max-width: 860px; }
.case-head__text > .back-link { justify-self: start; }
/* on a phone the head is tighter, so the stage begins on or near the first screen */
@media (max-width: 767px) {
  .case-head--stage .case-head__text { gap: 16px; }
  .case-head--stage .case-facts { margin-top: 28px; padding-block: 18px; }
  .case-head--stage .case-head__live .btn { padding-block: 10px; }
  .case-head--stage .stage { margin-top: 28px; }
}
@media (min-width: 961px) {
  .case-head--stage .case-head__text:has(> .case-head__live) { grid-template-columns: minmax(0, 860px) auto; column-gap: 40px; }
  .case-head--stage .case-head__text > :not(.lead):not(.case-head__live) { grid-column: 1 / -1; }
  .case-head--stage .case-head__live { grid-column: 2; align-self: end; justify-self: end; }
}
.case-head--stage .stage { margin-top: clamp(40px, 5vw, 64px); }
.case-body .cs-layout { --cs-gap: clamp(32px, 5vw, 80px); }    /* the gap .cs-layout sets */
.chapter__body > .stage { margin-block: clamp(4px, 1.2vw, 16px); }
@media (min-width: 961px) {
  .chapter__body > .stage { margin-left: calc(-200px - var(--cs-gap)); }
}
@media (min-width: 1360px) {
  .case-head--stage .stage { margin-inline: calc(-1 * var(--gutter)); }
  .chapter__body > .stage { margin-left: calc(-200px - var(--cs-gap) - var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
}
.cs-nav { transition: opacity var(--dur) var(--ease); }
.cs-nav.is-covered { opacity: 0; pointer-events: none; }
.cs-nav.is-covered:focus-within { opacity: 1; pointer-events: auto; position: relative; z-index: 3; background: var(--bg); border-radius: var(--r-sm); box-shadow: 0 0 0 12px var(--bg); }

/* ============================================================
   DIAGRAM (.diagram) and DRAWN VISUAL (.visual)
   Line boxes and connectors in the How I Work hand. Nodes draw in along
   the path (data-seq); labels are 13px HTML text laid over the drawing.
   ============================================================ */
.diagram,
.visual { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.diagram .art__notes { position: relative; inset: auto; width: min(100%, var(--dg-w, 100%)); justify-self: center; display: grid; gap: 10px; color: var(--ink-dim); pointer-events: auto; }
.diagram .art__note { position: relative; width: min(46%, 240px); left: calc(var(--nx, 50%) - min(23%, 120px)); text-align: center; justify-items: center; }
.nowrap { white-space: nowrap; }
.diagram__box,
.visual__box {
  position: relative;
  width: var(--dg-w, 100%);
  max-width: 100%;
  justify-self: center;
  color: var(--ink-dim);
}
.diagram__label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: var(--t1);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  white-space: nowrap;
  text-align: center;
}
.diagram__label--muted { color: var(--ink-mute); }
/* a label above its node hangs from its bottom edge: its "top" is where it ends, so wrapping grows upward */
.diagram__label--above { transform: translate(-50%, -100%); }

/* Delight Store, D1 (the cut): the three parts that are cut draw in solid,
   hold, then fade (.dg-was) as their dashed, faint outlines fade in, at 3.2
   steps of the block's seqStep (3.2 x 400 = 1280ms, after the last of them
   has drawn); their labels mute with them (.diagram__label--cut). At rest,
   with reduced motion or with no script, only the dashed outlines show and
   the labels are muted. */
.art .dg-was { opacity: 0; }
.diagram.is-drawing .art .dg-was { animation: dg-was var(--dur) var(--ease) 1280ms both; }
@keyframes dg-was { from { opacity: 1; } to { opacity: 0; } }
.diagram__label--cut { color: var(--ink-mute); }
.diagram.is-drawing .diagram__label--cut { animation: dg-label-cut var(--dur) var(--ease) 1280ms both; }
/* a diagram whose labels wrap inside their boxes at every width ("wrap"):
   each label is as wide as its words, up to its maxw (the box less a margin) */
.diagram--wrap .diagram__label { white-space: normal; width: max-content; text-wrap: balance; }
@keyframes dg-label-cut { from { color: var(--ink-dim); } to { color: var(--ink-mute); } }
/* Delight Store, D2 (eight sessions): the eight dots move in from the left
   once, while the drawing draws in; five stop at the line and three carry on
   past it. They rest where they end, so the still drawing is the end. */
.diagram.is-drawing .art .dg-run--stop { animation: dg-run-stop calc(var(--dur) * 3) var(--ease) 180ms both; }
.diagram.is-drawing .art .dg-run--on { animation: dg-run-on calc(var(--dur) * 4) var(--ease) 180ms both; }
@keyframes dg-run-stop { from { transform: translateX(-254px); } to { transform: none; } }
@keyframes dg-run-on { from { transform: translateX(-424px); } to { transform: none; } }
.diagram__box { container-type: inline-size; }
/* a diagram with a phone drawing ("phone" in the content file): the wide
   drawing where the figure is 640px wide or more, the phone one under that
   (a phone, or a tablet's narrow column) */
.diagram--two { container-type: inline-size; }
.diagram__box--phone { display: none; }
@container (max-width: 639px) {
  .diagram__box--wide { display: none; }
  .diagram__box--phone { display: block; }
}
@container (max-width: 439px) {
  .diagram__label { white-space: normal; max-width: 19%; }
}
/* an arrow that reaches for something and stops short, then fades */
.art .art__swap { stroke-opacity: 0.35; transition: stroke-opacity var(--dur) var(--ease); }
[data-draw].is-drawing .art__swap { stroke-opacity: 1; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
/* The page title takes the homepage headline size, in the lighter weight:
   same top, calmer voice. */
.about-title,
.page-title { font-size: var(--t6); }
.page-title { text-wrap: balance; }
/* One line per span, like the homepage headline: the About title reads
   "Product designer for / consumer apps and / enterprise software." in three
   lines on a wide screen, and balance evens out any line that wraps. */
.about-title span,
.page-title span { display: block; }
.about-title span,
.timeline__what h3 { text-wrap: balance; }
/* on a phone the About title flows as one sentence: at the 46px floor the
   block lines would break it into six short lines ("consumer" on a line of
   its own); flowing, it takes five */
@media (max-width: 600px) { .about-title span { display: inline; } }
/* the name at the display size, the headline under it at the lead size, as on
   the homepage (Punit, 3 Oct 2026: the three big lines were too heavy) */
.about-title .about-title__sub { display: block; margin-top: clamp(12px, 1.4vw, 20px); font-size: var(--t3); font-weight: 400; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink-dim); }

/* ---------- about: the first screen, centred like the homepage hero ----------
   The whole block (back link, title, paragraph, facts, buttons, portrait)
   sits in the middle of the first screen; if it is taller than the screen
   the section grows instead of clipping. The floor clears the name pill. */
.about .page-head {
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding-block: clamp(96px, 10vh, 132px);
}
.about .page-head__inner { gap: 20px; }
/* short laptop screens: the name pill already takes the top 88px, so the
   block is centred in the space under it (same top clearance, less below)
   and its rows tighten a little */
@media (min-width: 1024px) and (max-height: 820px) {
  .about .page-head { padding-block: 108px 20px; }
  .about-intro .about-art { width: 320px; }
  .about-intro { row-gap: 22px; }
  .about-intro__facts { gap: 18px; }
  .about-intro .fact-list > div { padding-block: 9px; }
}

/* ---------- about intro: text beside the portrait ----------
   Paragraph, facts and buttons on the left; the portrait on the right in a
   line frame, drawn in the homepage hero's language. The facts sit 48px
   under the paragraph. Below 1024 it stacks: paragraph, portrait, facts. */
.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "lead" "art" "facts";
  gap: 40px;
  margin-top: 24px;                     /* the title-to-paragraph gap */
}
.about-intro__lead  { grid-area: lead; }
.about-intro__facts {
  grid-area: facts;
  display: grid;
  align-content: start;
  gap: 24px;
  max-width: 560px;
}
/* beside the text the portrait column is 360px, so the paragraph keeps a
   three-line measure and the whole block fits a laptop screen */
@media (min-width: 1024px) {
  .about-intro {
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-rows: auto 1fr;
    grid-template-areas: "lead art" "facts art";
    column-gap: clamp(40px, 4vw, 64px);
    row-gap: 32px;
  }
  .about-art { width: 360px; align-self: center; }
  .about-intro .fact-list > div { padding-block: 12px; }
}

/* the portrait sits in a 440 x 460 box; the frame and the drifting pieces
   are one SVG laid over it, in the same box */
.about-art {
  grid-area: art;
  position: relative;
  width: 440px;
  max-width: 100%;
  aspect-ratio: 440 / 460;
  align-self: start;
  color: var(--ink-dim);
}
/* fact file 7.8: the illustration stays until a photo replaces it, smaller on phones */
@media (max-width: 767px) { .about-art { width: 240px; } }
.about-art picture {
  position: absolute;
  left: 18.18%;                         /* x 80 of 440 */
  top: 10.87%;                          /* y 50 of 460 */
  width: 63.64%;                        /* 280 */
  height: 76.09%;                       /* 350 */
}
/* the shirt runs to the image edges and is a shade lighter than the page,
   so the bottom and the sides fade into it. The picture is muted and dimmed
   well below the text (brightest tones under 100 of 255, from 175 as
   supplied). No contrast change: that would lift the black background into
   a visible grey box. */
.about-art__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--portrait-radius);
  filter: var(--portrait-filter);
  -webkit-mask-image: var(--portrait-mask);
  -webkit-mask-composite: source-in;
          mask-image: var(--portrait-mask);
          mask-composite: intersect;
}
.about-art .art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.art .art__frame { stroke-opacity: 0.4; }

/* About frame motion, quicker than the homepage: the corners ease out and
   settle every 4s, a faint line scans down every 5s, the two small pieces
   drift on a 5s cycle */
.about-art .art__corner { animation: art-focus 4s var(--ease) infinite; }
@keyframes art-focus {
  0%, 35%  { transform: translate(0, 0); }
  55%, 85% { transform: translate(calc(var(--dx, 0) * 6px), calc(var(--dy, 0) * 6px)); }
  100%     { transform: translate(0, 0); }
}
.about-art .art__scan { stroke: var(--scan-ink); stroke-opacity: 0.28; stroke-width: 1; opacity: 0; animation: art-scan 5s var(--ease) infinite; }
@keyframes art-scan {
  0%        { transform: translateY(54px); opacity: 0; }
  8%, 44%   { opacity: 1; }
  56%, 100% { transform: translateY(396px); opacity: 0; }
}
.about-art .art__float { animation-duration: 5s; }
/* solid dots inside the drifting pieces sit at the same level as their lines */
.art .art__float .art__fill { fill-opacity: 0.4; }

/* ---------- skills: the homepage lists, side by side ----------
   The lists are the homepage components (build-skills.js writes both pages).
   From 1024px the two groups share one spread; below that they stack. */
.about-skills__grid { display: grid; gap: clamp(56px, 7vw, 96px); }
.about-skills .section-head { margin-bottom: clamp(24px, 3vw, 40px); }
/* the tools are grouped by method, as on Home (fact file 5.13): a 13px label
   over each group's list, and one hairline over all the groups */
.about-skills .tool-groups { display: grid; gap: 36px; }
.about-skills .tool-group { display: grid; gap: 14px; }
.about-skills .tool-group__label { margin: 0; }
.about-skills .practice-list,
.about-skills .tool-groups {
  padding-top: clamp(24px, 2.8vw, 36px);
  border-top: 1px solid var(--line);
}
@media (min-width: 1024px) {
  .about-skills__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(40px, 5vw, 80px);
  }
  /* half the width, so two columns a list instead of the homepage's three */
  .about-skills .practice-list,
  .about-skills .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.fact-list { display: grid; gap: 0; }
.fact-list > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 15px;
  border-bottom: 1px solid var(--line);
}
.fact-list dt { font-size: var(--t2); color: var(--ink-mute); }
.fact-list dd { margin: 0; font-size: var(--t2); font-weight: 300; text-align: right; }


/* ============================================================
   TOUCH TARGETS
   Text links are small by design on desktop; on a phone they need
   a 44px-ish hit area without changing how they look.
   ============================================================ */
@media (hover: none), (max-width: 760px) {
  .link-arrow,
  .back-link,
  .cs-nav a { padding-block: 11px; }

  .footer__nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .footer__nav { gap: 0 26px; }

  .socials a { width: 46px; height: 46px; }
}

/* ============================================================
   POINTER HIGHLIGHT
   A soft light that tracks the cursor across a card. Falls back to
   nothing at all when --mx is unset, so touch and keyboard are unaffected.
   ============================================================ */
.work-card::after,
.card--glow::after,
.next-case::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%),
              var(--hover-glow), transparent 68%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.work-card:hover::after,
.card--glow:hover::after,
.next-case:hover::after { opacity: 1; }

.next-case { position: relative; overflow: hidden; }

/* the card body must sit above the highlight */
.work-card__body { position: relative; z-index: 3; }

@media (prefers-reduced-motion: reduce), (hover: none) {
  .work-card::after, .card--glow::after, .next-case::after { display: none; }
}

/* copy-to-clipboard confirmation */
[data-copied=true] { color: var(--ink); }

/* ============================================================
   FIVE-SIZE SCALE: homepage, About, Case Studies and case pages
   <main class="home">, "about", "work" and "case" share one scale, so
   the pages cannot drift apart. At 1440 both render five sizes:
   13, 16, 26, 52 and 104. The homepage marquee is exempt.
   ============================================================ */
.home,
.about,
.work,
.case,
.resume-page,
.sub-page {
  --t3: clamp(20px, 1.8vw, 26px);     /* card titles, stat figures, identity lines, leads, job titles */
  --t4: clamp(32px, 3.6vw, 52px);     /* every section heading */
  --t5: clamp(32px, 3.6vw, 52px);     /* the CTA heading is a section heading too */
}

/* ============================================================
   HOMEPAGE
   Everything below is scoped to <main class="home">.
   ============================================================ */

/* ---------- section system ----------
   Every section after the hero opens with a hairline across the content
   column, then the same gap before its content and the same gap after it.
   So the line always sits exactly halfway between two sections, and one
   token (--sec-y) sets the rhythm for the whole page. */
.home { --sec-y: clamp(64px, 7vw, 104px); }
.home .sec { padding-block: 0 var(--sec-y); }
.home .sec > .wrap > .rule:first-child { margin-bottom: var(--sec-y); }
.home .cta.sec { padding-block: 0 var(--sec-y); }
/* the marquee closes the work section: one gap above it (the work section's
   own), one gap below it, then the next section's hairline */
.home .marquee-band { padding-block: 0 var(--sec-y); }

/* ---------- intro band: statement, note, logo wall ---------- */
.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30ch);
  align-items: end;
  gap: clamp(28px, 5vw, 80px);
  padding-bottom: clamp(40px, 5vw, 72px);
}
/* The first sentence, set as a statement at the section-heading size. */
.intro__statement {
  max-width: 21ch;
  font-size: var(--t4);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
/* With JS, words start muted and brighten as the statement scrolls through.
   Muted is --ink-mute, which still clears 4.5:1 on black. */
.intro__statement[data-scrub] .w { color: var(--ink-mute); transition: color var(--dur) var(--ease); }
.intro__statement[data-scrub] .w.is-lit { color: var(--ink); }
/* the note beside the statement, then the way on to About */
.intro__aside { display: grid; gap: 20px; justify-items: start; max-width: 30ch; }

@media (max-width: 767px) {
  .intro__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

/* Employers strip: three cells split by hairlines, newest first, each with
   the marks, the role and the dates. The 1px gap shows the list's background
   through, so the lines work at any column count. */
.brand-strip { margin-top: 0; }
.brand-strip__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  /* top only: the next section's hairline closes the band, so there is no
     double line at the boundary */
  border-top: 1px solid var(--line);
}
.brand-strip__list li {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 6px;
  min-height: clamp(96px, 9vw, 136px);
  padding: clamp(24px, 2.4vw, 32px);
  background: var(--bg);
}
.brand-strip__logos { display: flex; align-items: center; gap: 20px; margin-bottom: 10px; }
.brand-strip__role { font-size: var(--t2); font-weight: 300; line-height: 1.4; color: var(--ink-dim); }
.brand-strip__when { font-size: var(--t1); line-height: 1.4; color: var(--ink-mute); }
/* The company's own mark as an image, recoloured to the secondary text colour:
   black at invert(76%) lands on #C2C2C2 (--ink-dim). An <img> needs no CORS
   fetch, so it also shows when the page is opened straight from disk.
   One rule for every mark on the site: the logo strip here and the
   Experience rows on About use the same files at the same size and colour. */
.brand-logo {
  display: block;
  /* explicit heights beat the global img { height: auto }, tuned per mark so
     a row of them reads optically even */
  height: 30px;
  width: auto;
  max-width: 100%;
  filter: var(--logo-filter);
  transition: filter var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.brand-logo[src*="zestta"]        { height: 24px; }
.brand-logo[src*="seamsfriendly"] { height: 27px; }
.brand-strip__list li:hover .brand-logo { filter: var(--logo-filter-hover); transform: translateY(-2px); }

/* below 1024 a third of the column is too narrow for a pair of marks, so the
   cells stack, one employer a row, their text in line with the section's */
@media (max-width: 1023px) {
  .brand-strip__list { grid-template-columns: minmax(0, 1fr); }
  .brand-strip__list li { min-height: 0; padding: 28px 0; }
}
@media (max-width: 767px) {
  .brand-strip__list li { padding: 24px 0; }
  .brand-logo { height: 26px; }
  .brand-logo[src*="zestta"]        { height: 21px; }
  .brand-logo[src*="seamsfriendly"] { height: 23px; }
}

/* ---------- pointer field (site-wide background) ---------- */
.pointer-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ---------- skills: practice and tools ----------
   Two labelled rows between hairlines. Items sit in an even grid so every
   column starts on the same line: three across on desktop, two on a phone. */
/* no bottom border: the next section's hairline closes it, so there is never
   a double line at a section boundary */
.skillset__row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px 40px;
  padding-block: clamp(24px, 2.8vw, 36px);
  border-top: 1px solid var(--line);
}
.skillset__row:last-child { padding-bottom: 0; }
/* the method labels run to two or three lines in the 160px column, so they
   get room between lines; the first line still sits level with the list's */
.skillset__label { margin: 0; padding-top: 1px; line-height: 1.5; }

.practice-list,
.tool-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 32px;
}
.practice-list li,
.tool-list li {
  font-size: var(--t2);
  font-weight: 300;
  line-height: 1.4;
  color: var(--ink-dim);
}

.tool-list li { display: flex; align-items: center; gap: 12px; }
/* a fixed slot for the mark, so every name starts on the same line, including
   the tools shown by name only */
/* every mark is single now (HTML and CSS, the one pair, came off on 3 Oct
   2026), so the slot is one mark wide; .tool-pair still lays out a pair */
.tool-mark { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; flex: none; width: 20px; }
.tool-list svg { width: 20px; height: 20px; flex: none; fill: currentColor; color: var(--ink-dim); }
.tool-list .tool-pair { display: inline-flex; gap: 4px; }
/* a practice with its own case study links to it (build-skills.js LINKS) */
.practice-list a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color var(--dur) var(--ease); }
.practice-list a:hover { color: var(--ink); }

/* below 1024 the label sits above its list, so three columns of names get the
   full width on a tablet instead of about 140px each */
@media (max-width: 1023px) {
  .skillset__row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 767px) {
  .practice-list,
  .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  /* smaller marks on a phone: the one-mark slot plus its gap leaves about
     150px for a name at 390 */
  .tool-list li { gap: 6px; }
  .tool-list svg { width: 16px; height: 16px; }
  .tool-mark { width: 16px; }
  .tool-list .tool-pair { gap: 3px; }
}

/* ---------- process diagrams ---------- */
.home .process .card__num { margin-bottom: 0; }
.case .process .card__diagram { margin: 20px 0 6px; }
.card__diagram {
  display: block;
  width: 120px;
  height: 80px;
  margin: 20px 0 auto;
  color: var(--ink-dim);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

/* ---------- carousel ---------- */
.carousel-nav { display: flex; gap: 8px; }
.icon-btn:disabled { opacity: 0.4; pointer-events: none; }

.carousel {
  position: relative;
  /* clip, not hidden: no scroll container, so the page's vertical wheel still works,
     and cards parked in the margins can never cause page-level sideways scroll */
  overflow-x: clip;
  padding-block: 6px 12px;
}
.carousel__track {
  --drag: 0px;
  display: grid;
  grid-template-columns: 100%;
  touch-action: pan-y;
  cursor: grab;
}
.carousel[data-dragging] .carousel__track { cursor: grabbing; user-select: none; -webkit-user-select: none; }

/* every card stacks in one grid cell, so the track is as tall as the tallest
   card and every card is the same height; transforms do the placing */
.carousel .carousel__slide,
.carousel .carousel__slide:hover {
  grid-area: 1 / 1;
  width: var(--cw, 100%);
  transform:
    translateX(calc(var(--x0, 0px) + var(--k, 0) * var(--step, 0px) + var(--drag, 0px)))
    scale(var(--scale, 1));
  transform-origin: 50% 50%;
}
.carousel .carousel__slide {
  opacity: var(--alpha, 1);
  transition:
    transform var(--dur) var(--ease),
    opacity var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.carousel__slide[data-state='shadow'] { --scale: 0.94; --alpha: 0.35; }
.carousel__slide[data-state='hidden'] { --scale: 0.94; --alpha: 0; pointer-events: none; }
.carousel__slide[data-state='shadow'] .work-card__go { opacity: 0; }
.carousel[data-dragging] .carousel__slide { transition: none; }
.carousel__slide img { -webkit-user-drag: none; user-select: none; }

/* without JavaScript the track is a plain horizontal scroller */
.no-js .carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-inline: var(--gutter);
  cursor: auto;
}
.no-js .carousel .carousel__slide { flex: 0 0 min(82vw, 540px); transform: none; }

/* ---------- marquee ----------
   Smaller than the hero headline so whole words stay in view as they pass.
   Exempt from the five-size scale as a display element. */
.home .marquee--giant .giant { font-size: clamp(34px, 6vw, 84px); }
.home .marquee--giant .marquee__track { gap: clamp(20px, 3.2vw, 52px); padding-right: clamp(20px, 3.2vw, 52px); }
.home .marquee--giant .marquee__item { gap: clamp(20px, 3.2vw, 52px); }
.home .marquee--giant .marquee__item::after { width: clamp(7px, 0.8vw, 12px); }

/* ---------- view all case studies + carousel controls ----------
   The route to the full list sits top right, level with the heading, in the
   original quiet link style. The arrows sit on one row with the figures note,
   centred on it, directly above the carousel they move. */
.work-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  margin-bottom: clamp(20px, 2.4vw, 32px);
}
.work-note { max-width: 56ch; min-width: 0; }
.work-bar .carousel-nav { flex: none; }

/* Zestta One hero (browser frame): the notes stand under the screenshot on their
   own, with no leaders or dots (Punit, 2 Oct 2026: the lines did not read) */
.wf--browser .shot__lines { display: none; }
