/* =========================================================
   Adryan Putra — Portfolio
   Greyscale / light theme. DM Serif Display + Inter.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Greyscale ramp */
  --ink:        #0B0B0B;
  --ink-80:     #2E2E2E;
  --ink-60:     #6A6A6A;
  --ink-40:     #9A9A9A;
  --ink-20:     #D6D5D3;
  --line:       #E4E3E0;
  --line-soft:  #EFEEEB;
  --surface:    #FFFFFF;
  --surface-2:  #F5F4F2;
  --surface-3:  #EBEAE7;
  --fill-6:     #F0F0F0; /* 6% black — chip / label fill */

  /* Accent — primary CTAs, clickable titles on hover, thumbnail arrow.
     Never on ghost buttons. */
  --accent:       #FF2929;
  --accent-hover: #E51D1D;
  --accent-ink:   #FFFFFF;
  --positive:     #15A34A; /* upward impact arrows */
  --warn-fill:    #FFF3C4; /* "coming soon" capsule */
  --warn-ink:     #7A5B00;

  /* Department keys — only ever used on the team chips */
  --dept-ux:  #0F766E; /* teal */
  --dept-eng: #1D4ED8; /* blue */
  --dept-gd:  #A21CAF; /* magenta */
  --dept-cs:  #C2410C; /* orange */

  /* Typography */
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --gutter: 24px;
  --maxw: 1440px;
  --header-h: 68px;
  --header-pad: 40px;
  --logo-h: 40px;
  --radius: 0px;
  --radius-lg: 0px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.45s;
}

@media (min-width: 768px)  { :root { --gutter: 40px; } }
@media (min-width: 1200px) { :root { --gutter: 56px; --header-h: 79px; --logo-h: 48px; } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

/* ---------- Type scale ---------- */
.display {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 8.2vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.h1 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5.6vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.018em;
}
.h2 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.h3 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.1vw, 1.6rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-80);
  letter-spacing: -0.006em;
}
.body-lg { font-size: 1.0625rem; line-height: 1.7; color: var(--ink-80); }
.muted { color: var(--ink-60); }
s, del { color: #B5B5B5; text-decoration-thickness: 1.5px; text-decoration-color: var(--accent); }

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-60);
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
/* Dotted = a divider *within* a section. Solid rules stay reserved for section breaks. */
.rule--dotted {
  height: 0;
  background: none;
  border-top: 1px dashed var(--ink-20);
}

/* Section header: label + title */
.section-head {
  display: grid;
  gap: 20px;
  padding-bottom: clamp(28px, 4vw, 48px);
}
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: 220px 1fr;
    align-items: start;
    gap: 32px;
  }
}
.section-head__meta { display: flex; align-items: baseline; gap: 12px; }
.section-head__count {
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-40);
  letter-spacing: 0.08em;
}
.section-head__body { display: grid; gap: 14px; }

/* Left-aligned, stacked section header — label, title, description, grid below */
.sec-head {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding-bottom: clamp(28px, 4vw, 48px);
}
.sec-head .h2 { margin-top: 4px; }
/* extra air before the first showcase entry */
.sec-head--roomy { padding-bottom: clamp(30px, 4vw, 46px); }
.sec-head--roomy + .rule--dotted { margin-bottom: clamp(34px, 4.2vw, 59px); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 10px 2px;
  margin-right: 24px;
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--ink-60);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 550;
}

/* ---------- Capsule (chips + section labels) ---------- */
/* The only rounded component in the system — everything else is square. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--fill-6); /* 6% black, no outline */
  color: var(--ink-80);
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: -0.002em;
  white-space: nowrap;
  /* never stretch inside a grid parent */
  justify-self: start;
  align-self: start;
  width: fit-content;
}
.pill--label {
  color: var(--ink-60);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 18px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 560px) { .pill { white-space: normal; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn--solid:hover { background: var(--accent-hover); }
/* Ghost buttons are greyscale at rest and pick up the accent on hover — outline
   and label only, never a fill. */
.btn--ghost { border-color: var(--ink-20); color: var(--ink); }
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn--sm { padding: 10px 18px; font-size: 0.875rem; }
/* Red outline at rest, solid red on hover */
.btn--outline-accent { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn--outline-accent:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn__arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }
/* arrow leads the label, so it drifts the other way on hover */
.btn--lead-icon:hover .btn__arrow { transform: translateX(-3px); }

/* Text link with underline sweep */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  /* keep the underline hugging the text inside grid/flex parents */
  justify-self: start;
  align-self: start;
  width: fit-content;
  transition: color 0.3s var(--ease);
}
.link:hover { color: var(--accent); }
/* any icon inside a text link nudges along on hover, everywhere on the site */
.link svg { transition: transform 0.3s var(--ease); }
.link:hover svg { transform: translate(3px, -3px); }
.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.4s var(--ease);
}
.link:hover::after { transform-origin: left; transform: scaleX(0); }

/* ---------- Logo ---------- */
/* Supplied lockup, used as-is (assets/img/logo.png) — not traced or rebuilt */
.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.logo__img {
  height: var(--logo-h);
  width: auto;
  display: block;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Opaque: the header sits over the dark hero, so it can't be translucent */
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.header.is-stuck { border-bottom-color: var(--line); }
/* `overflow: hidden` on <body> stops position:sticky from sticking, which let the
   navbar scroll out from behind the open drawer — pin it while the menu is open. */
body.menu-open .header { position: fixed; top: 0; left: 0; right: 0; }
body.menu-open { padding-top: var(--header-h); }
/* the page-section row would otherwise sit on top of the open drawer */
body.menu-open .subnav { display: none; }
/* no hairline between the header and the open drawer */
body.menu-open .header { border-bottom-color: transparent; }

/* ---------- Sub-nav (works page): section shortcuts, one thin row ---------- */
/* the rule between the two rows shows up with the stuck state, not at rest */
.subnav { border-top: 1px solid transparent; background: var(--surface); transition: border-color 0.3s var(--ease); }
.header.is-stuck .subnav { border-top-color: var(--line); }
.subnav__inner {
  max-width: none;
  padding-inline: var(--header-pad);
  display: flex;
  justify-content: center;
  gap: clamp(28px, 4vw, 56px);
  overflow-x: auto;
  scrollbar-width: none;
}
/* centred until the row runs out of room, then it scrolls from the left */
@media (max-width: 640px) { .subnav__inner { justify-content: flex-start; } }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav__link {
  padding-block: 11px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-60);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.subnav__link:hover,
.subnav__link[aria-current="true"] { color: var(--accent); border-bottom-color: var(--accent); }
/* the anchors have to clear both rows when jumped to */
[data-page="works"] main > section[id] { scroll-margin-top: calc(var(--header-h) + 46px); }
/* Header: logo left, nav centred, CTA right — 40px inset both sides */
.header .wrap {
  max-width: none;
  padding-inline: var(--header-pad);
}
@media (max-width: 639px) { .header .wrap { padding-inline: 16px; } }
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav { display: none; }
@media (min-width: 900px) {
  /* Centred independently of the logo / CTA widths */
  .nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.6vw, 44px);
  }
  .header__inner { position: relative; }
  .nav__link {
    font-size: 0.9375rem;
    font-weight: 450;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink);
    transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
  }
  .nav__link:hover { color: var(--accent); }
  .nav__link[aria-current="page"] {
    font-weight: 650; /* base 450 + 200 */
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 6px;
  }
}
.header__actions { display: flex; align-items: center; gap: 10px; }
.header .btn { display: none; }
@media (min-width: 640px) { .header .btn { display: inline-flex; } }

/* Menu toggle */
.menu-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0;
  background: none;
}
@media (min-width: 900px) { .menu-btn { display: none; } }
/* Duo-line icon; swaps to a close mark while the drawer is open */
.menu-btn { position: relative; color: var(--ink); }
.menu-btn svg { position: absolute; transition: opacity 0.25s var(--ease), transform 0.3s var(--ease); }
.menu-icn { opacity: 1; }
.menu-close { opacity: 0; transform: rotate(-90deg); }
body.menu-open .menu-icn { opacity: 0; transform: rotate(90deg); }
body.menu-open .menu-close { opacity: 1; transform: none; }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  background: var(--surface);
  color: var(--ink);
  padding: 8px var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0.3s;
}
body.menu-open .drawer {
  opacity: 1; transform: none; pointer-events: auto; visibility: visible;
}
@media (min-width: 900px) { .drawer { display: none; } }

/* Same pixel halftone as the footer, so the drawer reads as one surface with it. */
.drawer__field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Crect width='4' height='4' fill='%230B0B0B' opacity='.048'/%3E%3C/svg%3E");
  background-size: 6px 6px;
  -webkit-mask-image: linear-gradient(to top, #000 18%, rgba(0,0,0,.55) 55%, transparent 92%);
          mask-image: linear-gradient(to top, #000 18%, rgba(0,0,0,.55) 55%, transparent 92%);
}
.drawer__field::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: 0; /* hugs the bottom of the screen, not the CV button */
  width: min(380px, 72%);
  aspect-ratio: 1;
  background: url("../img/footer-mark.svg") no-repeat center / contain;
  opacity: 0.056;
}
/* the menu itself rides above the texture */
.drawer__nav, .drawer__foot { position: relative; z-index: 1; }
/* solid white fill so Download CV stands off the halftone */
.drawer .btn--ghost { background: #fff; }
.drawer .btn--ghost:hover { background: #fff; }

.drawer__nav { display: grid; padding-top: 20px; }
.drawer__link {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(2rem, 9vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-block: 14px;
  transition: color 0.3s var(--ease);
}
.drawer__link[aria-current="page"], .drawer__link:hover { color: var(--accent); }
.drawer__foot { display: grid; gap: 17px; margin-top: auto; padding-top: 24px; }
.drawer .btn { justify-self: start; }
.drawer__block { display: grid; gap: 12px; justify-items: start; }
.drawer__block h4 {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.drawer__block a { color: var(--ink-80); transition: color 0.3s var(--ease); }
.drawer__block a:hover { color: var(--accent); }
.drawer__end { display: grid; gap: 4px; }
.drawer__copy, .drawer__geo {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2E2E2E;
}
.drawer__geo { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.drawer__geo a { color: inherit; }

/* ---------- Hero ---------- */
/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  /* Bottom padding carries the grid past the CTA, roughly to the midpoint
     between it and the Selected works section. */
  padding-block: clamp(56px, 8vw, 120px) clamp(80px, 9vw, 120px);
}
.hero__inner { position: relative; z-index: 1; }
.hero + .section { padding-top: clamp(56px, 7vw, 96px); }

/* Home only: tighten the rhythm between the three work sections to a third of
   the default `.section` padding (9vw → 3vw). The hero → Selected works gap and
   the Experiments → footer gap are left alone. */
[data-page="home"] #selected,
[data-page="home"] #supporting { padding-bottom: clamp(21px, 3vw, 43px); }
[data-page="home"] #supporting,
[data-page="home"] #experiments { padding-top: clamp(21px, 3vw, 43px); }

/* About: halve the gap between the profile and the first content section, and
   again between every content section after it */
#profile { padding-bottom: clamp(32px, 4.5vw, 64px); }
[data-page="about"] main > .section { padding-block: clamp(32px, 4.5vw, 64px); }

/* Periodic-table backdrop.
   Three nested layers, each carrying one mask — nesting intersects them, which
   avoids `mask-composite` (patchy support) entirely:
     .pt-veil  fades the grid out as the hero meets the next section
     .pt-hole  carves a soft ellipse out around the hero copy
     .pt       the soft spotlight that follows the cursor
   Tiles are injected by JS only on fine-pointer, motion-OK devices. */
.pt-veil,
.pt-hole {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.pt-veil {
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%, #000 8%, #000 74%, transparent 100%);
          mask-image: linear-gradient(to bottom,
    transparent 0%, #000 8%, #000 74%, transparent 100%);
}
/* mask-image is generated in JS: one blurred hole per line box / chip / button */
.pt-hole {
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}
.pt {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  grid-auto-rows: 126px;
  align-content: start;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
  overflow: hidden;

  /* 40% lighter than the greyscale ramp they came from */
  --pt-line: #E6E6E5;
  --pt-sym:  #A6A6A6;
  --pt-dim:  #C2C2C2;

  --mx: 50%;
  --my: 50%;
  --r: 240px;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my),
    #000 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0) 80%);
          mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my),
    #000 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0) 80%);
}
.pt.is-on { opacity: 1; }
.pt__tile {
  position: relative;
  border: 1px solid var(--pt-line);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--sans);
  overflow: hidden;
}
.pt__num {
  position: absolute;
  top: 7px; left: 10px;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--pt-dim);
  font-variant-numeric: tabular-nums;
}
.pt__sym {
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--pt-sym);
  margin-top: 8px;
}
.pt__name {
  font-size: 0.75rem;
  line-height: 1.25;
  margin-top: 6px;
  color: var(--pt-dim);
}

/* Title runs the full safe area — it only wraps when it actually runs out of room */
.hero__title em {
  font-style: italic;
  color: var(--ink-60);
}

/* Two-line typewriter headline. Both lines always reserve their height so the
   page below never shifts while it types. */
.tw2 { display: block; }
.tw2__line {
  display: block;
  min-height: 0.98em; /* matches .display line-height */
}
.tw2__line:nth-child(1) { color: #B3B3B3; } /* 30% black */
.tw2__line:nth-child(2) { color: var(--ink); }
/* the closing full stop is the one bit of accent in the headline */
.tw2__dot { color: var(--accent); }
.tw2__caret {
  display: inline-block;
  width: 4px;
  height: 0.74em;
  background: var(--ink);
  margin-left: 6px;
  vertical-align: baseline;
  animation: blink 1.05s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) { .tw2__caret { display: none; } }
/* Narration, then CTAs beneath it */
.hero__body {
  display: grid;
  justify-items: start;
  gap: 32px;
  padding-top: clamp(28px, 3.5vw, 48px);
}
@media (min-width: 900px) {
  .hero__body .lead { max-width: 60%; }
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Work grids ---------- */
.grid { display: grid; gap: clamp(20px, 2.4vw, 32px); }
/* supporting work: rows need more air between them than columns do */
.grid--2 { grid-template-columns: 1fr; row-gap: clamp(40px, 5vw, 72px); }
.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
@media (min-width: 760px)  { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Feature entry (one per row, no box) ---------- */
/* rule sits between entries rather than around each one */
.grid--feature { grid-template-columns: 1fr; gap: 0; }
.feature + .feature {
  border-top: 1px dashed var(--ink-20);
  margin-top: clamp(34px, 4.2vw, 59px);   /* 30% tighter than before */
  padding-top: clamp(34px, 4.2vw, 59px);
}
.feature {
  display: grid;
  gap: clamp(24px, 3vw, 40px);
}
@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: start; /* copy and thumbnail both hang from the top */
    column-gap: clamp(40px, 5vw, 80px);
  }
  .feature__media { order: 2; } /* thumbnail right on desktop, on top when stacked */
  .feature__body  { order: 1; }
  .feature__meta  { order: 3; }
}
.feature__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}
.feature__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
a.feature:hover .feature__media img,
a.feature:hover .feature__media .ph { transform: scale(1.03); }
.feature__body { display: grid; justify-items: start; gap: 16px; }
/* title and its status capsule share a row, capsule vertically centred */
.feature__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.feature__title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.55vw, 2.2rem); /* 20% down from the previous scale */
  line-height: 1.12;
  letter-spacing: -0.016em;
  transition: color 0.3s var(--ease);
}
a.feature:hover .feature__title { color: var(--accent); }
.feature__p { color: var(--ink-60); font-size: 0.9375rem; line-height: 1.65; }
.feature__p--lead {
  color: var(--ink-80);
  font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
  line-height: 1.55;
}
.feature__cta { margin-top: 10px; pointer-events: none; }
a.feature:hover .feature__cta { background: var(--accent-hover); }

/* Arrow-led key pointers */
.feature__points { display: grid; gap: 10px; padding-top: 2px; }
.feature__points li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-80);
}
.feature__bullet { color: var(--ink-40); margin-top: 3px; }

/* Outlined stat capsules with a green rise arrow */
.feature__stats { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--ink-80);
  white-space: nowrap;
}
.stat-pill .stat__arrow { color: var(--positive); flex: none; }
@media (max-width: 560px) { .stat-pill { white-space: normal; } }

/* Coming soon — no link on the card itself; the artwork stays at full strength.
   The capsule sits on the thumbnail (.feature__badge, below) so the copy slot
   underneath is free for a real CTA when the product is already public. */
.feature--soon { cursor: default; }
/* Inline beside the title rather than pinned to the artwork, so the two read
   as one unit. Doubled up so it outranks .card__badge, declared further down. */
.card__badge.feature__badge {
  position: static;
  /* .pill sets align-self: start so it never stretches in a grid; here it has
     to win back the row's centring instead */
  align-self: center;
  padding: 7px 13px;
  font-size: 0.6875rem;
}
/* the one clickable thing inside a coming-soon showcase */
.feature__visit { pointer-events: auto; }
.feature__visit:hover { background: var(--accent-hover); }

/* Small cards can be coming-soon too */
/* Artwork and capsule stay at full strength — only the title reads as disabled,
   and it never lights up on hover because there is nothing to click. */
.card--soon { cursor: default; }
.card--soon .card__title { color: var(--ink-40); }
.card--soon:hover .card__title { color: var(--ink-40); }

/* Card */
.card { display: block; }
.card__media {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background: var(--surface-2);
  /* selected + supporting share one 16:9 frame; experiments stay square */
  aspect-ratio: 16 / 9;
}
/* experiments run landscape */
.card--sm .card__media { border-radius: 0; aspect-ratio: 3 / 2; }
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.card:hover .card__media img { transform: scale(1.035); }

/* Placeholder artwork (used until real thumbs land) */
.ph {
  position: absolute; inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 20% 0%, #FBFBFA 0%, transparent 60%),
    linear-gradient(148deg, var(--surface-3) 0%, var(--surface-2) 52%, #FCFCFB 100%);
  transition: transform 0.9s var(--ease);
}
.card:hover .ph { transform: scale(1.03); }
.ph::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px),
                    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.75;
  mask-image: radial-gradient(90% 80% at 50% 45%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(90% 80% at 50% 45%, #000 20%, transparent 78%);
}
.ph__initials {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  line-height: 1;
  color: var(--ink);
  opacity: 0.9;
}
.card--sm .ph__initials { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.ph__tag {
  position: relative;
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-40);
}

/* shared by the small cards and the selected-work showcase badge */
.card__badge {
  position: absolute;
  top: 14px; left: 14px;
  gap: 7px;
  padding: 7px 14px;
  background: var(--warn-fill);
  color: var(--warn-ink);
  border: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2;
}
.card__go {
  position: absolute;
  right: 14px; bottom: 14px;
  width: 42px; height: 42px;
  border-radius: 0;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid; place-items: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  z-index: 2;
}
.card:hover .card__go, .card:focus-visible .card__go { opacity: 1; transform: none; }
.card--sm .card__go { width: 34px; height: 34px; right: 10px; bottom: 10px; }

.card__body { padding-top: 18px; display: grid; gap: 8px; }
.card--sm .card__body { padding-top: 14px; gap: 6px; }
.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.card__meta span:not(:last-child)::after { content: " ·"; }
.card__title {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.012em;
  transition: color 0.3s var(--ease);
}
.card:hover .card__title,
.card:focus-visible .card__title { color: var(--accent); }
.card--sm .card__title { font-size: 1.125rem; }
.card__desc { color: var(--ink-60); font-size: 0.9375rem; line-height: 1.55; }
/* "Keep looking" cards: no eyebrow, bigger title, tagline as the excerpt,
   and the same 16:9 frame the case thumbnails use */
.card--brief.card--sm .card__media { aspect-ratio: 16 / 9; }
.card--brief.card--sm .card__title { font-size: clamp(1.1875rem, 1.5vw, 1.375rem); }
.card--brief .card__desc { font-size: 0.875rem; }

/* ---------- About ---------- */
.profile { display: grid; gap: clamp(28px, 4vw, 56px); }
@media (min-width: 900px) {
  .profile { grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr); align-items: center; }
}
.profile__photo {
  border-radius: 0;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 4 / 5;
  position: relative;
}
/* Portrait stays in colour and cross-fades to the dive shot on hover */
.profile__photo img { width: 100%; height: 100%; object-fit: cover; }
.profile__photo--swap .profile__img {
  position: absolute;
  inset: 0;
  object-position: 50% 30%;
  transition: opacity 0.55s var(--ease);
}
.profile__photo--swap .profile__img--b { opacity: 0; }
.profile__photo--swap:hover .profile__img--a,
.profile__photo--swap:focus-within .profile__img--a,
.profile__photo--swap.is-swapped .profile__img--a { opacity: 0; }
.profile__photo--swap:hover .profile__img--b,
.profile__photo--swap:focus-within .profile__img--b,
.profile__photo--swap.is-swapped .profile__img--b { opacity: 1; }
/* on touch the swap is a tap, so show it can be pressed */
@media (hover: none) { .profile__photo--swap { cursor: pointer; } }
.profile__body { display: grid; gap: 24px; }
/* a touch more air under the chips before the narration starts */
.profile__body .chips { margin-bottom: 10px; }


/* Definition-style list rows */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  gap: 6px 32px;
  padding-block: clamp(20px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 800px) {
  .row { grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1.35fr); align-items: baseline; }
}
/* Oversized hairline numerals down the left of each row */
.row__num {
  font-family: var(--sans);
  font-weight: 100;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1;
  color: var(--ink-40);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.row__title { font-family: var(--serif); font-size: clamp(1.1875rem, 2vw, 1.5rem); line-height: 1.25; }
.row__desc { color: var(--ink-60); font-size: 0.9375rem; line-height: 1.62; }

/* Tag pills */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.8125rem;
  color: var(--ink-80);
  background: var(--surface);
}
.tag--fill { background: var(--surface-2); }

/* Impact stat cards */
.stats { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 0; overflow: hidden; }
@media (min-width: 640px)  { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); padding: clamp(20px, 2.6vw, 30px); display: grid; gap: 8px; align-content: start; }
.stat__value { font-family: var(--serif); font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1; letter-spacing: -0.02em; }
.stat__label { font-size: 0.875rem; color: var(--ink-60); line-height: 1.5; }

/* Experience list */
.job {
  display: grid;
  gap: 8px 32px;
  padding-block: clamp(22px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 860px) {
  .job { grid-template-columns: 190px minmax(0, 1fr); align-items: baseline; }
}
.job__period {
  font-size: 0.8125rem;
  color: var(--ink-40);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.job__body { display: grid; gap: 6px; }
.job__role { font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; }
.job__org { color: var(--ink-60); font-size: 0.9375rem; }
.job__note { color: var(--ink-60); font-size: 0.9375rem; line-height: 1.6; }

/* Quote */
.quote {
  display: grid;
  gap: 24px;
  padding: clamp(32px, 5vw, 72px) clamp(24px, 4vw, 64px);
  background: var(--surface-2);
  border-radius: 0;
  border: 1px solid var(--line-soft);
}
.quote__mark { font-family: var(--serif); font-size: 3rem; line-height: 0.6; color: var(--ink-20); }
.quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 3vw, 2.125rem);
  line-height: 1.28;
  letter-spacing: -0.014em;
}
.quote figcaption { font-size: 0.875rem; color: var(--ink-60); }
.quote figcaption strong { color: var(--ink); font-weight: 500; }

/* ---------- Case study ---------- */
.case-hero { padding-block: clamp(40px, 5vw, 72px) clamp(32px, 4vw, 56px); }
/* tagline + "Visit the app" share a baseline row; the button drops below on mobile */
.case-lede { display: grid; gap: 20px; }
.case-visit[hidden] { display: none; }
@media (min-width: 760px) {
  .case-lede {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 32px;
  }
}
/* Project information — sits under the description, side by side on desktop.
   Wraps onto a second row when the copy runs long. */
/* Same treatment as the contact cards: a 1px grid showing through the gaps,
   so the dividers run the full height of the row. */
.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: clamp(32px, 4vw, 52px) 0 0;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 640px)  { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact {
  display: grid;
  gap: 7px;
  align-content: start;
  background: var(--surface);
  padding: clamp(14px, 1.6vw, 20px) clamp(16px, 1.8vw, 22px);
}
.fact__k {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.fact__v { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-80); }

/* Team initials — full name on hover / focus */
.who-list { display: flex; flex-wrap: wrap; gap: 6px; }
.who {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 5px 10px;
  /* outline only — the colour is the department key */
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--ink-60);
  background: transparent;
  cursor: default;
  transition: background 0.25s var(--ease);
}
.who:hover, .who:focus-visible { background: color-mix(in srgb, currentColor 9%, transparent); }
.who--ux  { color: var(--dept-ux); }
.who--eng { color: var(--dept-eng); }
.who--gd  { color: var(--dept-gd); }
.who--cs  { color: var(--dept-cs); }
.who__n {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: 6px 10px;
  background: var(--ink);
  color: var(--surface);
  font-size: 0.75rem;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 3;
}
.who:hover .who__n, .who:focus-visible .who__n { opacity: 1; transform: translate(-50%, 0); }

/* Recorded impact — one row under the hero image */
/* `display: grid` would otherwise beat the UA rule for [hidden] */
.impact[hidden] { display: none; }
.impact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(20px, 2.4vw, 28px);
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 900px) {
  .impact { grid-template-columns: repeat(var(--impact-cols, 4), minmax(0, 1fr)); }
}
/* Always a stack: arrow, then figure, then label. As a wrapping flex row the
   label sat beside the figure or under it depending on the width, so the three
   cells rarely agreed. `align-content: start` keeps every cell's content on the
   top edge, so one long label cannot push the others off the line. */
.impact__item {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 4px;
  background: var(--surface);
  padding: 16px 20px;
}
.impact__arrow { color: var(--positive); }
.impact__v { font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; }
.impact__m { font-size: 0.875rem; color: var(--ink-60); }

/* Live prototype embedded in place of a cover image */
.case-cover--live { background: #010402; }
.demo-frame { width: 100%; height: 100%; border: 0; display: block; }
.demo-launch {
  position: absolute;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  z-index: 2;
}
/* the 2:3 mobile size is set in the mobile block near the end of this file */
.cover-note[hidden] { display: none; }
.cover-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--ink-40);
}
.cover-note .link { font-size: 0.8125rem; color: var(--ink-60); }
.cover-note .link:hover { color: var(--accent); }

/* the facts toggle only exists on small screens */
.facts-toggle { display: none; }

.case-cover {
  border-radius: 0;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 16 / 9;
  position: relative;
}

.case-layout { display: grid; gap: 40px; }
@media (min-width: 1000px) {
  .case-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 72px; align-items: start; }
}

/* Sidebar nav */
.case-nav { display: none; }
@media (min-width: 1000px) {
  .case-nav {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }
}
.case-nav__list { display: grid; gap: 2px; }
.case-nav__link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0 11px 16px;
  border-left: 1px solid var(--line);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-40);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.case-nav__link { font-weight: 400; }
.case-nav__link:hover { color: var(--ink-80); }
.case-nav__link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500; /* base 400 + 100 */
}
.case-nav__num {
  font-family: var(--sans);
  font-style: normal;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--ink-40);
  min-width: 18px;
}
.case-nav__link.is-active .case-nav__num { color: var(--accent); }

/* Mobile section jumper */
.case-nav-mobile { display: block; }
@media (min-width: 1000px) { .case-nav-mobile { display: none; } }
.case-nav-mobile select {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  font-size: 0.9375rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%230B0B0B' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}

.case-body { display: grid; gap: clamp(48px, 7vw, 88px); }
.case-section { display: grid; gap: 18px; scroll-margin-top: calc(var(--header-h) + 32px); }
.case-section__label { display: flex; align-items: baseline; gap: 12px; }
.case-section__num {
  font-family: var(--sans);
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--ink-40);
  font-size: 0.8125rem;
}
.case-section p { color: var(--ink-80); font-size: 1.0625rem; line-height: 1.72; }
/* the section title needs more air under it than the 18px section gap gives */
.case-section > .h2 { margin-bottom: clamp(10px, 1.2vw, 18px); }
/* Sub-headings inside a section (3.1, 3.2 …). Every sub-section after the first
   needs real separation from the block above it; the first sits under the <h2>
   and already has that spacing. */
.case-sub { display: grid; gap: 6px; padding-top: clamp(24px, 3vw, 40px); }
.case-section > .h2 + .case-sub { padding-top: 14px; }
/* a run-on sub-heading: no gap above it, the breathing room goes after its list */
.case-sub--tight { padding-top: 0; }
.case-sub--tight + ol.steps,
.case-sub--tight + ul.bullets { margin-bottom: clamp(20px, 2.4vw, 32px); }
.case-sub__h {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  line-height: 1.35;
  letter-spacing: -0.008em;
}
/* needs to outrank `.case-section p` */
.case-section .case-sub__p {
  color: var(--ink-40);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.case-section ol.steps {
  display: grid;
  gap: 10px;
  counter-reset: step;
}
/* the number reads as the first word of the line, not a marker in a gutter */
.case-section ol.steps > li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-80);
  font-size: 1.0625rem;
  line-height: 1.5;
  counter-increment: step;
}
.case-section ol.steps > li::before {
  content: counter(step) ".";
  position: absolute;
  left: 0; top: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  font-variant-numeric: tabular-nums;
}
/* nested bullets read as one group — tighter than a standalone list */
.case-section ol.steps ul.bullets,
.case-section ul.bullets ul.bullets { margin-top: 10px; gap: 6px; }
.case-section ol.steps ul.bullets li,
.case-section ul.bullets ul.bullets li { line-height: 1.4; }
.case-section ol.steps ul.bullets li::before,
.case-section ul.bullets ul.bullets li::before { top: 10px; }
.case-section ul.bullets { display: grid; gap: 8px; }
.case-section ul.bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-80);
  font-size: 1.0625rem;
  line-height: 1.5;
}
.case-section ul.bullets li::before {
  content: "";
  position: absolute;
  left: 2px; top: 11px;
  width: 6px; height: 1px;
  background: var(--ink-40);
}
/* Figures match the text column exactly — the UA default `margin: 1em 40px`
   on <figure> was insetting them relative to the copy above. */
/* Double the breathing room between the copy and the visual below it
   (18px section gap + 18px here). */
/* extra room *under* a figure too, so the next paragraph isn't crowded */
.case-section figure { margin: 18px 0 22px; width: 100%; }
.case-section figure:last-child { margin-bottom: 0; }
.case-figure {
  border-radius: 0;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 16 / 10;
  position: relative;
}
/* real images set their own height so nothing is cropped by the 16/10 frame */
.case-figure--img { aspect-ratio: auto; }
.case-figure--img img { display: block; width: 100%; height: auto; }

/* Highlighter sweep. Sits behind the text like a stabilo stripe: slightly
   taller than the line box, no rounding, and it wraps across line breaks. */
mark {
  background: #FFF3A8;
  color: inherit;
  padding: 0.08em 0.14em;
  margin-inline: -0.06em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------- Case slider ---------- */
.slider { margin: 0; }
.slider__stage { position: relative; }
/* the first slide holds the frame's height; the rest stack on top of it */
.slider__img {
  opacity: 0;
  /* invisible slides must not take the click — otherwise the last one in the
     stack sits on top of the visible one and opens the wrong shot */
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.slider__img + .slider__img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.slider__img.is-on { opacity: 1; pointer-events: auto; }
.slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.slider__nav--prev { left: 10px; }
.slider__nav--next { right: 10px; }
.slider:hover .slider__nav,
.slider:focus-within .slider__nav { opacity: 1; }
.slider__nav:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
/* touch has no hover — keep them visible there */
@media (hover: none) { .slider__nav { opacity: 1; } }

.slider__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
}
.slider__cap { flex: 1 1 260px; }
.slider__dots { display: flex; gap: 7px; padding-top: 12px; }
.slider__dot {
  width: 7px; height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink-20);
  cursor: pointer;
  transition: background 0.25s var(--ease);
}
.slider__dot[aria-selected="true"] { background: var(--accent); }
.slider__dot:hover { background: var(--ink-40); }

/* Embedded HTML slides — the source documents are authored at 1920×1080 and
   scaled down to fit, so they read as flat artwork rather than a live page. */
/* the stage carries the height here — every frame is absolute inside it, so a
   frame must never be the element the height comes from (it would collapse) */
.slider--embed .slider__stage { aspect-ratio: 16 / 9; }
.slider__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: zoom-in;
  /* the only framed artwork that gets an edge — it needs one, because these
     documents are white to the corners and would otherwise bleed into the page */
  border: 1px solid var(--line);
}
/* the document is artwork, not a control: let the click reach the frame so it
   can open the lightbox */
.slider__frame iframe { pointer-events: none; }
.slider__frame iframe {
  position: absolute;
  top: 0; left: 0;
  width: 1920px; height: 1080px;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
}

/* ---------- Wide cover (very long artwork) ---------- */
/* breaks out of .wrap to sit edge-to-edge; `overflow-x: clip` on <html> stops
   the 100vw maths from producing a horizontal scrollbar */
.case-cover--wide {
  position: relative;
  background: var(--surface-2);
  margin-inline: calc(50% - 50vw);
  border-inline: 0;
  /* full-bleed width, but the same height a normal 16:9 cover would have
     inside .wrap — so it lines up with every other project's hero */
  aspect-ratio: auto;
  height: calc((min(var(--maxw), 100vw) - 2 * var(--gutter)) * 9 / 16);
}
.wide {
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.wide img { height: 100%; width: auto; max-width: none; }
.wide__cue {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  color: var(--ink);
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.wide__cue.is-off { opacity: 0; }
.wide__full {
  position: absolute;
  right: 14px; bottom: 14px;
  background: rgba(255, 255, 255, 0.92);
}
.wide__full:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  /* must clear the sticky header (z-index 100) */
  z-index: 200;
  background: var(--ink);
  display: grid;
  grid-template-rows: auto 1fr;
  /* an `auto` column would grow to the artwork's full width and kill the
     sideways scroll — pin the track to the viewport */
  grid-template-columns: minmax(0, 1fr);
}
.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
  background: #000;
  color: var(--surface);
}
.lightbox__title {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lightbox__hint {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.62);
}
@media (max-width: 760px) { .lightbox__hint { display: none; } }
.lightbox__close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  color: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lightbox__close:hover { color: var(--accent); }

.lightbox__body { position: relative; min-height: 0; min-width: 0; overflow: hidden; }
.lightbox__stage {
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
}
.lightbox__stage img { height: 100%; width: auto; max-width: none; }

/* paging arrows — the left one only exists once you have scrolled off the start */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border: 0;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.lightbox__nav:hover { background: var(--accent); color: var(--accent-ink); }
.lightbox__nav--left  { left: 16px; }
.lightbox__nav--right { right: 16px; }
.lightbox.at-start .lightbox__nav--left,
.lightbox.at-end .lightbox__nav--right { opacity: 0; pointer-events: none; }
.case-figure + figcaption, .figcap { font-size: 0.8125rem; color: var(--ink-40); padding-top: 10px; }

/* ---------- "Details coming soon" tape ---------- */
/* Two bands crossed into a rough X. Each band is two identical runs side by
   side, the pair slid left by exactly one run, so the loop is seamless. */
.tape-x {
  position: relative;
  /* full-bleed out of the text column */
  margin-inline: calc(50% - 50vw);
  height: clamp(110px, 14vw, 150px);
  /* clip sideways only, so the tape ends are never sliced off top or bottom */
  overflow-x: clip;
  overflow-y: visible;
  display: grid;
  place-items: center;
  user-select: none;
}
.tape {
  position: absolute;
  left: -12%;
  width: 124%;
  display: flex;
  overflow: hidden;
  background: #F5F5F3;
  color: var(--ink-60);
  padding-block: 11px;
}
/* deliberately not mirrored — the crossing point sits left of centre */
.tape--down { transform: translateY(-22px) rotate(-6.5deg); z-index: 1; }
.tape--up   { transform: translateY(20px) rotate(4.5deg); background: var(--surface-3); }
.tape__run {
  display: flex;
  align-items: center;
  flex: none;
  gap: 14px;
  padding-right: 14px;
  animation: tape-run 68s linear infinite;
}
.tape--up .tape__run { animation-duration: 88s; animation-direction: reverse; }
.tape__word {
  font-size: clamp(0.6875rem, 1.15vw, 0.875rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tape__star { color: var(--ink-20); font-size: 0.75rem; }
@keyframes tape-run { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .tape__run { animation: none; } }
/* no sidebar to sit beside when the body is just the tape */
.case-layout--bare { display: block; }
.case-layout--bare .case-nav { display: none; }

/* ---------- Image lightbox (case-study figures) ---------- */
.is-zoomable { cursor: zoom-in; }
.shotbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.9);
  display: grid;
  grid-template-rows: 1fr auto;
  /* rows stretch: the picture uses every pixel between the close button and the
     controls, and stays capped so the two never overlap */
  padding: 64px 0 24px;
  overflow: hidden;
}
.shotbox__close {
  position: absolute;
  top: 14px; right: 14px;
  touch-action: manipulation;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 6px;
}
.shotbox__close:hover { color: var(--accent); }
.shotbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  /* every gesture here is ours: pinch to zoom, one finger to swipe or pan */
  touch-action: none;
  overscroll-behavior: contain;
}
/* Carousel: three panes wide — previous, current, next — parked one pane to the
   left so the current shot is centred. Sliding the track is what animates a
   change of image, which leaves the <img>'s own transform free for zoom/pan.
   The gap is what lets a sliver of the neighbour show while you drag. */
.shotbox__track {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 16px;
  will-change: transform;
}
.shotbox__pane {
  flex: 0 0 100%;
  display: grid;
  /* Pin the row to the pane's own height. Left as an auto track it sizes to the
     picture, so the image's max-height: 100% resolved against the image itself
     and tall shots overflowed the stage and were clipped. */
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  min-width: 0;
}
.shotbox__stage img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.25s var(--ease);
}
/* Embedded HTML in the lightbox: held at its authored size and scaled as a
   whole, so the layout cannot reflow and zooming behaves like it does on an
   image. */
.shotbox__doc {
  width: 1920px;
  height: 1080px;
  flex: none;
  transform-origin: center center;
  background: #fff;
  transition: transform 0.25s var(--ease);
}
.shotbox__doc iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}
.shotbox--doc .shotbox__stage {
  cursor: zoom-in;
  /* the unscaled 1920x1080 track is bigger than the stage; centre the track
     itself, or it parks at the top and the document renders off-centre */
  place-content: center;
}
/* breathing room under the document so it never sits beneath the zoom buttons */
.shotbox--doc .shotbox__foot { padding-bottom: 26px; }

.shotbox__foot { display: grid; justify-items: center; gap: 12px; padding: 18px var(--gutter) 0; }
.shotbox__nav { display: flex; align-items: center; gap: 20px; }
.shotbox__btn {
  min-width: 40px; height: 40px;
  /* kills the browser's double-tap-to-zoom, so fast taps just page through */
  touch-action: manipulation;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding-inline: 14px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.shotbox__btn span { display: none; }
/* zoom controls, bottom right */
.shotbox__zoom {
  position: absolute;
  right: 16px; bottom: 16px;
  display: flex;
  gap: 8px;
}
.shotbox__zoom button {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
}
.shotbox__zoom button:not(:disabled):hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
/* Current zoom level; click to drop straight back to 100%. Selector is doubled
   up because `.shotbox__zoom button` would otherwise win on specificity. */
.shotbox__zoom .shotbox__level {
  width: auto;
  min-width: 64px;
  padding-inline: 10px;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.shotbox__zoom .shotbox__level:disabled {
  opacity: 0.4;
  cursor: default;
}
.shotbox__btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.shotbox__count {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}
.shotbox__cap {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  max-width: 46rem;
}
@media (min-width: 900px) {
  /* reserve room for the flanking buttons so the picture never runs under them */
  .shotbox { padding: 64px calc(var(--gutter) + 76px) 32px; }
  .shotbox__stage img { width: auto; max-width: 100%; }
  /* the buttons move out of the footer row and flank the picture */
  .shotbox__nav { display: contents; }
  .shotbox__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    padding-inline: 0;
  }
  .shotbox__btn[data-shot="prev"] { left: var(--gutter); }
  .shotbox__btn[data-shot="next"] { right: var(--gutter); }
  .shotbox__count { order: -1; }
}

/* ---------- Contact ---------- */
.contact-hero { padding-block: clamp(64px, 10vw, 148px) clamp(40px, 5vw, 72px); }
@media (min-width: 900px) {
  .contact-lead { max-width: 60%; }
}

.tw {
  display: inline;
  border-bottom: 2px solid var(--ink-20);
  padding-bottom: 2px;
}
.tw__caret {
  display: inline-block;
  width: 3px;
  height: 0.78em;
  background: var(--ink);
  margin-left: 4px;
  vertical-align: baseline;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tw__caret { animation: none; } }

.contact-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 0; overflow: hidden; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  background: var(--surface);
  padding: clamp(24px, 3vw, 36px);
  display: grid;
  gap: 10px;
  align-content: start;
  transition: background 0.35s var(--ease);
}
a.contact-card:hover { background: var(--surface-2); }
a.contact-card:hover .contact-card__v { color: var(--accent); }
.contact-card__v { transition: color 0.3s var(--ease); }
.contact-card__k { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-40); }
.contact-card__v { font-family: var(--serif); font-size: clamp(1.125rem, 1.9vw, 1.375rem); line-height: 1.25; word-break: break-word; }
.contact-card__n { font-size: 0.875rem; color: var(--ink-60); }

.availability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.8125rem;
  color: var(--ink-80);
  background: var(--surface-2);
}
.availability__dot {
  width: 7px; height: 7px;
  border-radius: 0;
  background: var(--ink);
  position: relative;
}
.availability__dot::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 0;
  border: 1px solid var(--ink-40);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .availability__dot::after { animation: none; opacity: 0.4; } }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
/* halftone dot field, faded from the top-right — the texture from the reference,
   kept light so the copy on top stays the loudest thing here */
/* ── Footer backdrop ────────────────────────────────────────────────────────
   A monitor-pixel field: square "pixels" everywhere, with the logo's "Ad"
   resolving out of them in the bottom-right corner. The mark is
   assets/img/footer-mark.svg — the mark.png tile sampled onto a 46×46 grid,
   one <rect> per lit cell (regenerate with scratchpad/mosaic.swift).

   ROLLBACK: delete the two rules below and un-comment this block — it is the
   previous generic dotted halftone, unchanged.

   .footer__field {
     position: absolute; inset: 0; z-index: 0; pointer-events: none;
     background-image: radial-gradient(circle, rgba(11, 11, 11, 0.204) 1px, transparent 1.3px);
     background-size: 7px 7px;
     -webkit-mask-image: radial-gradient(115% 105% at 82% -5%, #000 0%, rgba(0,0,0,.5) 45%, transparent 80%);
             mask-image: radial-gradient(115% 105% at 82% -5%, #000 0%, rgba(0,0,0,.5) 45%, transparent 80%);
   }
   ──────────────────────────────────────────────────────────────────────────── */
.footer__field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* the pixel grid: a 4px cell inside a 6px tile, so every dot stays square */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Crect width='4' height='4' fill='%230B0B0B' opacity='.048'/%3E%3C/svg%3E");
  background-size: 6px 6px;
  /* fades out upward so it never fights the copy */
  -webkit-mask-image: linear-gradient(to top, #000 18%, rgba(0,0,0,.55) 55%, transparent 92%);
          mask-image: linear-gradient(to top, #000 18%, rgba(0,0,0,.55) 55%, transparent 92%);
}
.footer__field::after {
  content: "";
  position: absolute;
  right: -3%;
  bottom: -7%;
  width: min(640px, 58%);
  aspect-ratio: 1;
  background: url("../img/footer-mark.svg") no-repeat center / contain;
  opacity: 0.056;
}
.footer > .wrap { position: relative; z-index: 1; }

.footer__lead {
  display: grid;
  gap: 40px;
  padding-block: clamp(56px, 8vw, 112px) clamp(40px, 5vw, 64px);
}
@media (min-width: 760px) {
  /* pitch column lines up with the middle footer column below it, and hangs
     from the same top line as the title */
  .footer__lead {
    /* same column count + gap as .footer__cols, so the pitch's left edge
       lands exactly on the "Selected work" column below it */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;   /* narration + CTA sit on the title's bottom line */
    gap: 32px;
  }
  .footer__pitch { grid-column: 2 / -1; }
}
.footer__title {
  font-size: clamp(2.5rem, 6.2vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
}
/* margin-bottom lifts the group 8px off the title's baseline (the row is align: end) */
.footer__pitch { display: grid; justify-items: start; gap: 16px; margin-bottom: 8px; }
.footer__pitch p { color: var(--ink-60); font-size: 1rem; line-height: 1.65; }
/* forced line break in the footer pitch — desktop only, ignored once it wraps anyway */
.br-desk { display: none; }
@media (min-width: 900px) { .br-desk { display: inline; } }
.footer__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: clamp(40px, 5vw, 64px);
}
@media (min-width: 760px) { .footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer__col { display: grid; gap: 12px; align-content: start; }
.footer__col h4 {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.footer__col a { font-size: 0.9375rem; color: var(--ink-80); transition: color 0.3s var(--ease); }
.footer__col a:hover { color: var(--accent); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  padding-block: 24px;
  border-top: 1px solid var(--ink-20);
  position: relative;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2E2E2E;
}
/* the coordinates link inherits the row colour instead of the link colour */
.footer__bottom a { color: inherit; }
.footer__clock { font-variant-numeric: tabular-nums; }
.footer__dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
  margin-inline: 2px 4px;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Utilities ---------- */
.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;
}
.skip-link {
  position: absolute; left: 12px; top: 12px;
  transform: translateY(-200%);
  z-index: 200;
  background: var(--ink); color: var(--surface);
  padding: 10px 18px; border-radius: 0; font-size: 0.875rem;
}
.skip-link:focus { transform: none; }
.stack-sm { display: grid; gap: 12px; }
.stack-md { display: grid; gap: 20px; }
.stack-lg { display: grid; gap: 32px; }


/* ---------- About: sub-section headings ---------- */
.sub-h {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.9375rem, 1.25vw, 1.125rem);
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
}

/* "Hire me" row at the top of the journey list */
.job--cta .job__body--row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}
.job--cta .job__note { margin: 0; }

/* Quote without its box */
.quote--bare {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;             /* <figure> defaults to margin-inline: 40px */
  gap: 9px;              /* half the previous mark-to-copy gap */
  justify-items: start;
}
.quote--bare .quote__mark {
  font-size: clamp(4.5rem, 9vw, 7.5rem);
  line-height: 0.5;
  color: var(--ink-20);
}

/* footer rule stops at the title column rather than running full width */

.footer__geo { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.footer__geo a { transition: color 0.3s var(--ease); }
.footer__geo a:hover { color: var(--accent); }

/* =========================================================
   Mobile refinements (≤760px)
   ========================================================= */
@media (max-width: 760px) {
  /* supporting work runs two-up, like the experiments grid */
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* excerpts step down on every card grid, incl. "Keep looking" */
  .card__desc { font-size: 0.8125rem; line-height: 1.5; }
  .card--brief .card__desc { font-size: 0.8125rem; }
  /* smaller coming-soon capsule everywhere it appears */
  .card__badge {
    top: 8px; left: 8px;
    gap: 5px;
    padding: 5px 9px;
    font-size: 0.5625rem;
  }
  .card__badge svg { width: 10px; height: 10px; }
  .card__badge.feature__badge { padding: 5px 9px; font-size: 0.5625rem; gap: 5px; }
  .card__badge.feature__badge svg { width: 11px; height: 11px; }

  /* About portrait: 3:2 frame, centred at rest, top on hover */
  .profile__photo { aspect-ratio: 3 / 2; }

  /* Contact headline keeps "opportunities." on its own row */
  .contact-title .tw2__fix { display: block; }

  /* case page: the live link shouldn't span the column */
  .case-lede .case-visit { justify-self: start; width: fit-content; }

  /* impact stats: one row, tighter labels */
  .impact { grid-template-columns: repeat(var(--impact-cols, 3), minmax(0, 1fr)); }
  .impact__item { gap: 2px; padding: 12px 10px; }
  .impact__v { font-size: 0.875rem; }
  .impact__m { font-size: 0.625rem; line-height: 1.35; }

  /* facts collapse behind a text button */
  .facts-toggle { display: inline-flex; margin-top: clamp(24px, 4vw, 36px); }
  .facts { display: none; }
  .facts.is-open { display: grid; }

  /* section tabs: one scrolling row, stuck under the header */
  /* the wrapper is what sticks — a sticky child inside a wrapper its own height
     has nowhere to travel and scrolls straight off */
  .case-nav-mobile {
    position: sticky;
    top: var(--header-h);
    z-index: 40;
    margin-inline: calc(50% - 50vw);
    margin-bottom: 24px !important;
  }
  .case-tabs {
    display: flex;
    gap: 22px;
    padding: 0 var(--gutter);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .case-tabs::-webkit-scrollbar { display: none; }
  .case-tab {
    padding-block: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-60);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
  }
  .case-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
  /* the sections have to clear the header + the tab row when jumped to */
  .case-section { scroll-margin-top: calc(var(--header-h) + 46px); }

  /* smaller card type: supporting matches experiments */
  .card__title, .card--sm .card__title { font-size: 1rem; }
  .card--brief.card--sm .card__title { font-size: 1rem; }
  /* section descriptions ("Telling you how I think…") step down */
  .sec-head .body-lg { font-size: 0.875rem; line-height: 1.6; }
  /* card eyebrows are noise at this width */
  .card__meta { display: none; }

  /* About: smaller sub-headings above the stat rows */
  .sub-h { font-size: 0.9375rem; }

  /* facts CTA: arrow first, no underline, no chevron */
  .facts-toggle {
    text-decoration: none;
    flex-direction: row-reverse;
    gap: 10px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .facts-toggle::after { display: none; }
  .facts-toggle svg { width: 18px; height: 18px; }
  .facts-toggle:hover svg { transform: none; }

  /* impact stats read larger */
  .impact__v { font-size: 1.0625rem; }
  .impact__m { font-size: 0.75rem; line-height: 1.4; }
  /* the stats sit closer to the tab row: half, then 30% off again */
  .impact { margin-bottom: -20px; }

  /* first photo centred on its own subject; the second keeps its framing */
  .profile__photo--swap .profile__img--a { object-position: 50% 50%; }
  .profile__photo--swap .profile__img--b { object-position: 50% 30%; }

  /* the tap-swap owns the portrait on touch — hover would fight it */
  .profile__photo--swap:hover .profile__img--a,
  .profile__photo--swap:focus-within .profile__img--a { opacity: 1; }
  .profile__photo--swap:hover .profile__img--b,
  .profile__photo--swap:focus-within .profile__img--b { opacity: 0; }
  .profile__photo--swap.is-swapped .profile__img--a { opacity: 0; }
  .profile__photo--swap.is-swapped .profile__img--b { opacity: 1; }

  /* stat labels (Acquisition, SaaS, …) read like the row titles above */
  .stat__value { font-size: 1.1875rem; }

  /* roman numeral in front of each section tab */
  .case-tab__num {
    margin-right: 6px;
    color: var(--ink-40);
    font-variant-numeric: tabular-nums;
  }
  .case-tab.is-active .case-tab__num { color: var(--accent); }

  /* "Keep looking" tabs have to fit one row on a 390px screen */
  .tabs { flex-wrap: nowrap; gap: 0; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { margin-right: 16px; font-size: 0.8125rem; white-space: nowrap; }
  .tab:last-child { margin-right: 0; }

  /* pinch is the only zoom on touch, so the buttons go away and the picture
     takes the space they were using */
  .shotbox { padding: 52px 0 16px; }
  .shotbox__zoom { display: none; }
  .shotbox--doc .shotbox__foot { padding-bottom: 0; }
  .shotbox__foot { padding-top: 12px; gap: 8px; }

  /* experiment pages: no section tabs (there are no sections yet) */
  [data-case-bare] .case-nav-mobile { display: none; }
  /* live demos run at 2:3 so their own responsive layout kicks in */
  .case-cover--live { aspect-ratio: 2 / 3; height: auto; }

  /* Caption then dots, always. Side by side, whether they fit on one row
     depends on the caption's length, so the dots kept moving. */
  .slider__foot { display: grid; justify-items: start; gap: 4px; }
  .slider__cap { flex: none; }
  .slider__dots { padding-top: 8px; }
}
