/* ==========================================================================
   Shak Creative — portfolio
   Warm paper base, ink text, one highlighter accent, and a colour per project.
   ========================================================================== */

:root {
  --paper: #F6F2EB;
  --paper-2: #EEE8DE;
  --card: #FFFFFF;
  --ink: #16161A;
  --ink-2: #2A2A30;
  --muted: #5F5B55;
  --faint: #9A948B;
  --line: #E2DBCF;

  --sun: #FFCF3F;      /* signature highlighter */
  --sp: #E8291C;       /* SportsPick red */
  --ts: #4B3BFF;       /* Trackside indigo */
  --sn: #1FBF5A;       /* SportNation green */
  --cb: #7A2EF5;       /* Cerberus purple */
  --white: #FFFFFF;

  /* Project shades. Names match the Figma variables (see figma-map.json). */
  --sp-deep: #B9160E;  --sp-glow: #FF6A3D;  --sp-glow-2: #FFB547;  --sp-soft: #FCE7E4;
  --ts-deep: #2B1FC2;  --ts-glow: #7C6CFF;  --ts-soft: #E9E7FF;
  --cb-deep: #1E1430;  --cb-night: #1A1128; --cb-soft: #EFE6FF;
  --ww: #3D7BF2;       --ww-deep: #0E1834;  --ww-glow: #3D7BF2;  --ww-soft: #E6EEFE;  /* Watchwhere blue */

  /* On-colour and placeholder tokens (match Figma color/on-colour/*, color/placeholder/*) */
  --on-colour-fill-subtle: rgba(255,255,255,.16); --on-colour-fill: rgba(255,255,255,.18);
  --on-colour-border: rgba(255,255,255,.22); --on-colour-border-strong: rgba(255,255,255,.24); --on-colour-border-chip: rgba(255,255,255,.28);
  --on-colour-text-subtle: rgba(255,255,255,.62); --on-colour-text-muted: rgba(255,255,255,.78); --on-colour-text-secondary: rgba(255,255,255,.86);
  --card-translucent: rgba(255,255,255,.7); --ink-deep: #121216;
  --placeholder-dark: #26262E; --placeholder-light: #D9D3C8; --placeholder-overlay: rgba(0,0,0,.2);

  --c: var(--ink);     /* per-page project colour */
  --c-soft: var(--paper-2);

  /* Type scale: one set of sizes for the whole site */
  --fs-display: clamp(34px, 5vw, 60px);
  --fs-h1: clamp(28px, 3.2vw, 40px);
  --fs-h2: clamp(22px, 2.4vw, 30px);
  --fs-h3: 18px;
  --fs-lede: clamp(16px, 1.3vw, 18px);
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-caption: 13px;
  --fs-label: 12px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow: 0 1px 2px rgba(22,22,26,.04), 0 12px 32px -12px rgba(22,22,26,.14);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body)/1.65 Manrope, ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* Highlighter mark */
.mark {
  background: linear-gradient(transparent 58%, var(--sun) 58%, var(--sun) 92%, transparent 92%);
  padding: 0 .08em;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  --g: color-mix(in srgb, var(--ink) 5%, transparent); --g-line: color-mix(in srgb, var(--ink) 10%, transparent);
  padding: 24px 48px 0; transition: padding .25s;
}
/* The bar sits straight on the page. Once you scroll, a soft frosted backing
   fades in behind it and melts away at the bottom instead of ending in a line */
.site-header::before { content: ""; position: absolute; z-index: -1; inset: 0 0 -28px; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: color-mix(in srgb, var(--paper) 62%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.site-header.is-scrolled { padding-top: 12px; padding-bottom: 12px; }
.site-header.is-scrolled::before { opacity: 1; }
/* The bar spans the full width with 48px at each side, like the reference */
.site-header .wrap { max-width: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; height: 56px; gap: 16px; }

/* Name and role on the left */
.hdr-id { justify-self: start; display: flex; flex-direction: column; gap: 8px; }
.hdr-id b { font-size: 20px; line-height: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.hdr-id span { font-size: 12px; line-height: 12px; letter-spacing: .2px; color: color-mix(in srgb, var(--ink) 50%, transparent); }

/* Centre: a frosted pill. A soft highlight and a small glowing bar slide to the
   link you point at, and rest on the section you're in (js in main.js). */
.seg { position: relative; display: flex; align-items: center; height: 48px; padding: 0 6px; border-radius: 24px;
  background: var(--g); border: 1px solid var(--g-line);
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 10px 25px rgba(0,0,0,.15); }
.seg a { position: relative; z-index: 1; display: grid; place-items: center; min-width: 80px; height: 36px; padding: 0 14px; border-radius: 18px;
  font-size: 14px; line-height: 18px; font-weight: 500; letter-spacing: .2px; color: var(--ink); }
.seg-thumb { position: absolute; top: 5px; left: 0; width: 0; height: 36px; border-radius: 18px; opacity: 0; background: var(--g);
  transition: translate .5s cubic-bezier(.3,1.25,.5,1), width .5s cubic-bezier(.3,1.25,.5,1), opacity .25s; }
.seg-thumb::before { content: ""; position: absolute; top: -8px; left: 50%; width: 24px; height: 4px; translate: -50% 0; border-radius: 2px;
  background: var(--ink); box-shadow: 0 2px 25px 2px color-mix(in srgb, var(--ink) 80%, transparent); }

/* Right: theme switch, then rounded text links with an arrow */
.hdr-end { justify-self: end; display: flex; align-items: center; }
.hdr-end .theme-toggle { margin: 0 8px 0 0; }
.hdr-link { display: inline-flex; align-items: center; gap: 4px; height: 48px; padding: 0 12px 0 16px; border-radius: 24px;
  font-size: 14px; line-height: 18px; font-weight: 500; letter-spacing: .2px; color: var(--ink); cursor: pointer; transition: background .2s; }
.hdr-link:hover { background: var(--g); }
.hdr-arrow { font-size: 16px; transition: translate .2s ease; }
.hdr-link:hover .hdr-arrow { translate: 2px -2px; }
.hdr-link[aria-disabled="true"] { cursor: default; }
@media (max-width: 760px) {
  .site-header { padding: 12px 16px 0; }
  .site-header .wrap { grid-template-columns: minmax(0, 1fr) auto; }
  .seg, .hdr-linkedin { display: none; }
  .hdr-id b { font-size: 18px; }
}

/* --------------------------------------------------------------------------
   Buttons, chips
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  transition: transform .15s ease, background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { box-shadow: 4px 4px 0 var(--sun); }
.btn-sun { background: var(--sun); border-color: var(--ink); color: var(--ink); }
.btn-sun:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.arrow { transition: transform .2s ease; display: inline-block; }
a:hover .arrow, .btn:hover .arrow { transform: translateX(3px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px; font-weight: 500; line-height: 1;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.7); border: 1px solid var(--line); color: var(--ink-2);
}
.on-color .chip { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted);
}

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */
.hero { padding: clamp(32px, 5vw, 64px) 0 clamp(40px, 5vw, 64px); position: relative; isolation: isolate; }
.hero h1 {
  font-size: var(--fs-display);
  line-height: 1.04; letter-spacing: -0.025em; font-weight: 800;
  max-width: 15ch;
}
.hero h1 .soft { color: var(--faint); font-weight: 700; }
.pill {
  --pb: var(--ink);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .22em;
  vertical-align: .06em;
  height: .92em; padding: 0 .22em 0 .32em; border-radius: 999px;
  font-size: .78em; letter-spacing: -0.02em; color: #fff;
  background: var(--pb);
  box-shadow: 0 .06em 0 color-mix(in srgb, var(--pb) 55%, black);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .35s cubic-bezier(.3,1.8,.5,1), box-shadow .35s cubic-bezier(.3,1.8,.5,1);
}
/* Shine that sweeps across on hover */
.pill::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-120%);
}
.pill:hover, .pill:focus-visible {
  transform: translateY(-.07em) rotate(calc(var(--tilt, 0deg) * -1.5)) scale(1.06);
  box-shadow: 0 .13em 0 color-mix(in srgb, var(--pb) 55%, black);
}
.pill:hover::after, .pill:focus-visible::after { transform: translateX(120%); transition: transform .6s ease; }
.pill:active { transform: translateY(.03em) rotate(0deg) scale(.97); box-shadow: 0 .015em 0 color-mix(in srgb, var(--pb) 55%, black); transition-duration: .08s; }
/* Arrow badge: bobs now and then, spins to point at the case study on hover */
.pill-arrow {
  width: .62em; height: .62em; padding: .1em; border-radius: 50%;
  background: rgba(255,255,255,.22); color: #fff;
  transition: transform .4s cubic-bezier(.3,1.8,.5,1), background .2s, color .2s;
  animation: pill-nudge 4s ease-in-out infinite; animation-delay: var(--nudge, 0s);
}
.pill:hover .pill-arrow, .pill:focus-visible .pill-arrow {
  animation: none; transform: rotate(45deg) scale(1.15);
  background: #fff; color: var(--pb);
}
@keyframes pill-nudge {
  0%, 80%, 100% { transform: none; }
  86% { transform: translate(.06em, -.06em); }
  92% { transform: translate(-.01em, .01em); }
}
.pill.sp { --pb: var(--sp); --tilt: -2deg; --nudge: 1.3s; }
.pill.ts { --pb: var(--ts); --tilt: 1.5deg; --nudge: 0s; }
.pill.cb { --pb: var(--cb); --tilt: -1deg; --nudge: 2.6s; }
.pill.sn { --pb: var(--sn); --tilt: -1.5deg; }

/* Hero top: headline and intro */
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

.brands { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; margin-top: clamp(40px, 5vw, 64px); padding-top: 24px; border-top: 1px solid var(--line); }
.brands small { font-size: 13px; color: var(--faint); font-weight: 500; }
.brands span { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 4vw, 48px); flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -0.025em; font-weight: 800; }
.section-head p { color: var(--muted); max-width: 42ch; }

/* --------------------------------------------------------------------------
   Home — project cards
   -------------------------------------------------------------------------- */
.projects { display: grid; gap: clamp(24px, 3vw, 32px); }
.project {
  --pc: var(--ink);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  background: var(--pc); color: #fff;
  border-radius: var(--r-lg); overflow: hidden;
  min-height: 460px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
  isolation: isolate;
}
.project:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--pc) 70%, black); }
/* Each card: a deeper base colour with a soft glow of its accent */
.project.sp { --pc: var(--sp-deep); --glow: var(--sp-glow); --glow-2: var(--sp-glow); }
.project.ts { --pc: var(--ts-deep); --glow: var(--ts-glow); --glow-2: var(--ts-glow); }
.project.cb { --pc: var(--cb-deep); --glow: var(--cb); --glow-2: var(--cb); }
.project.ww { --pc: var(--ww-deep); --glow: var(--ww-glow); --glow-2: var(--ww-glow); }
.project-body { padding: clamp(32px, 4vw, 56px); display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.project-kicker { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; opacity: .9; }
.project-kicker .num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.18); font-size: 12px; }
.project h3 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -0.025em; font-weight: 800; max-width: 16ch; }
.project p { font-size: var(--fs-body); line-height: 1.6; color: rgba(255,255,255,.86); max-width: 44ch; }
.project-stats { display: flex; flex-wrap: wrap; gap: 16px clamp(24px, 3vw, 40px); margin-top: auto; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.22); }
.project-stats b { display: block; font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.project-stats small { font-size: 13px; color: rgba(255,255,255,.78); }
.project-cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--fs-small); background: #fff; color: var(--ink); height: 42px; padding: 0 16px; border-radius: 999px; align-self: flex-start; }
.project-media { position: relative; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.project:hover .project-media:not(.is-screen) img { transform: scale(1.035); }
/* Thumbnail tilts in 3D towards the cursor, the phone floating in front for depth,
   with a soft light following the pointer. Values come from main.js. */
.project-media.is-screen { perspective: 1100px; }
.project-media.is-screen > * {
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transform-style: preserve-3d;
}
:is(.project, .sc-slide) .is-screen .screen-combo img.mob { transform: translate3d(var(--px, 0px), var(--py, 0px), 40px); transition: none; }
.project.ts .project-media img { object-position: 50% 40%; }
/* Product screenshots sit whole inside the image area, like a framed screen */
.project-media.is-screen { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 4vw, 48px); background: rgba(255,255,255,.06); }
.is-screen img { height: auto; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 24px 48px -16px rgba(0,0,0,.45); }
/* Two brands fused into one desktop screen, split on a diagonal */
.screen-split { position: relative; width: 100%; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 24px 48px -16px rgba(0,0,0,.45); }
.is-screen .screen-split img { display: block; width: 100%; border-radius: 0; box-shadow: none; }
.is-screen .screen-split img.right { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: right top; clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%); }
.screen-split::after { content: ""; position: absolute; inset: 0; clip-path: polygon(57.6% 0, 58.4% 0, 42.4% 100%, 41.6% 100%); background: rgba(255,255,255,.9); pointer-events: none; }
/* Desktop screen with the mobile design overlapping its corner */
.screen-combo { position: relative; width: 100%; padding: 0 8% 10% 0; }
.screen-combo img { display: block; width: 100%; }
.is-screen .screen-combo img.mob { position: absolute; right: 0; bottom: 0; width: 24%; height: auto; max-height: none; border-radius: 14px; border: 4px solid #0E0E10; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 24px 40px -12px rgba(0,0,0,.6); }
.project::before,
.project::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
}
.project::before {
  inset: auto -10% -40% -10%; height: 80%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 60%, transparent), transparent);
}
.project::after {
  inset: -35% 40% auto -15%; height: 70%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow-2) 28%, transparent), transparent);
}
.project .tag-new { position: absolute; top: 24px; right: 24px; z-index: 2; background: var(--sun); color: var(--ink); font-size: 12px; font-weight: 700; padding: 8px 8px; border-radius: 999px; transform: rotate(4deg); }

/* --------------------------------------------------------------------------
   Home — principles
   -------------------------------------------------------------------------- */
/* How I work: an open row of steps; each opens a panel with the full story */
.flow { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.flow-step { position: relative; display: flex; flex-direction: column; gap: 8px; padding-top: 24px; border-top: 2px solid var(--line); }
.flow-step::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.3,1,.4,1); }
.flow-step:hover::before, .flow-step:has(.flow-open:focus-visible)::before { transform: scaleX(1); }
.flow-num { font-size: 48px; font-weight: 800; line-height: 1; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--faint) 50%, transparent); transition: color .3s; margin-bottom: 8px; }
.flow-step:hover .flow-num, .flow-step:has(.flow-open:focus-visible) .flow-num { color: var(--ink); }
.flow-tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.flow-step h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; line-height: 1.25; font-weight: 700; }
.flow-open { text-align: left; font: inherit; color: inherit; }
.flow-open::after { content: ""; position: absolute; inset: 0; }  /* whole step is clickable */
.flow-open:focus-visible { outline: none; }
.flow-step:has(.flow-open:focus-visible) { outline: 2px solid var(--ink); outline-offset: 8px; border-radius: 4px; }
.flow-step p { color: var(--muted); font-size: var(--fs-small); }
.flow-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.flow-more svg { width: 14px; height: 14px; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.flow-step:hover .flow-more svg { transform: translateX(4px); }

/* The detail panel */
.flow-dialog {
  width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 0;
  border-radius: var(--r-lg); background: var(--card); color: var(--ink); box-shadow: 0 40px 80px -20px rgba(0,0,0,.45);
}
.flow-dialog::backdrop { background: rgba(10,10,13,.55); backdrop-filter: blur(4px); }
.flow-dialog[open] { animation: flow-in .35s cubic-bezier(.2,1,.3,1); }
@keyframes flow-in { from { opacity: 0; } }
.flow-panel { display: flex; flex-direction: column; gap: 12px; padding: 40px 40px 8px; }
.flow-panel[hidden] { display: none; }
/* Keep the page still behind the open panel */
html:has(.flow-dialog[open]) { overflow: hidden; }
.flow-panel .guide-art { height: 104px; margin-bottom: 4px; }
.flow-panel h3 { font-size: var(--fs-h2); letter-spacing: -0.02em; line-height: 1.15; font-weight: 800; }
.flow-summary { color: var(--ink-2); font-size: var(--fs-lede); font-weight: 500; line-height: 1.5; }
.flow-panel > p:not(.flow-summary) { color: var(--muted); font-size: var(--fs-body); }
.flow-points { list-style: none; display: grid; gap: 8px; }
.flow-points li { position: relative; padding-left: 24px; font-size: var(--fs-small); color: var(--ink-2); }
.flow-points li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 10px; height: 6px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
.flow-panel h4 { margin-top: 16px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.flow-examples { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.flow-examples a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 8px; border-radius: var(--r-sm); background: var(--paper); transition: transform .2s; }
.flow-examples a:hover { border-color: var(--ink); transform: translateY(-2px); }
.flow-shot { display: block; aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.flow-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.flow-examples a:hover .flow-shot img { transform: scale(1.04); }
.flow-examples b, .flow-examples a > span:last-child { padding: 0 8px; }
.flow-examples b { font-size: 14px; }
.flow-examples b::after { content: " →"; color: var(--faint); }
.flow-examples a > span:last-child { font-size: 14px; line-height: 1.45; color: var(--muted); }
.flow-close { position: absolute; z-index: 2; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; background: var(--paper-2); color: var(--ink); }
.flow-close:hover { background: var(--line); }
.flow-nav { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 40px 24px; background: var(--card); border-top: 1px solid var(--line); }
.flow-nav button { height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--paper-2); color: var(--ink); }
.flow-nav button:hover { background: var(--line); }
.flow-nav button:disabled { opacity: .35; pointer-events: none; }
.flow-count { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* Wireframe sketch on each step: dotted canvas, dashed low-fi shapes, solid hi-fi shapes */
.guide-art {
  display: block; width: 100%; height: auto; margin-bottom: 8px; border-radius: var(--r-sm);
  border: 1px dashed var(--line);
  background: radial-gradient(var(--line) 1px, transparent 1.2px) 0 0 / 12px 12px, var(--paper);
}
.guide-art .sk { fill: var(--card); stroke: var(--faint); stroke-width: 1.5; stroke-dasharray: 4 3; stroke-linecap: round; stroke-linejoin: round; }
.guide-art path.sk { fill: none; }
.guide-art .sk.solid { stroke: var(--muted); stroke-dasharray: none; }
.guide-art .sk.hl { fill: var(--sun); stroke: none; }
.guide-art .ln { fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; opacity: .6; }
.guide-art .ln.solid { stroke: var(--muted); opacity: 1; }
.guide-art .fill { fill: var(--placeholder-light); }
.guide-art .hlfill { fill: var(--sun); }
.guide-art .knob { fill: var(--muted); }
.guide-art .tick { fill: none; stroke: #16161A; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.guide-art text { font: 800 22px/1 Manrope, ui-sans-serif, system-ui, sans-serif; fill: var(--ink); }
.guide-art .q { font-size: 20px; fill: var(--muted); }
.guide-art .ab { font-size: 24px; }
.guide-art g { transform-box: fill-box; transform-origin: center; transition: transform .7s cubic-bezier(.3,1.6,.5,1) .25s; }
/* Each sketch acts out its step when its panel opens */
.flow-panel.is-active .art-lens { transform: translate(-56px, -8px); }
.flow-panel.is-active .art-notes { transform: rotate(-2deg); }
.flow-panel.is-active .art-arrow { transform: translateX(8px); }
.flow-panel.is-active .art-toggle .knob { transform: translateX(16px); }
.guide-art .art-toggle .knob { transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.flow-panel.is-active .art-toggle rect { fill: var(--sun); stroke: none; }
.flow-panel.is-active .art-check { transform: scale(1.3); }
.flow-panel.is-active .art-loop { transform: rotate(360deg); transition-duration: .9s; }

/* --------------------------------------------------------------------------
   Home — illustration
   -------------------------------------------------------------------------- */
.illo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); gap: clamp(16px, 2vw, 24px); }
.illo {
  background: #fff; padding: 8px 8px 16px; border-radius: 14px; box-shadow: var(--shadow);
  transform: rotate(var(--r, 0deg)); transition: transform .35s cubic-bezier(.3,1.5,.5,1);
}
.illo:nth-child(1) { --r: -2.5deg; }
.illo:nth-child(2) { --r: 1.8deg; margin-top: 32px; }
.illo:nth-child(3) { --r: -1.2deg; }
.illo:nth-child(4) { --r: 2.4deg; margin-top: 24px; }
.illo:hover { transform: rotate(0) translateY(-6px); }
.illo .frame { aspect-ratio: 4/5; border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.illo img { width: 100%; height: 100%; object-fit: cover; }
.illo p { margin-top: 8px; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.illo small { display: block; font-size: 12px; color: var(--faint); }

/* --------------------------------------------------------------------------
   Home — about (ink)
   -------------------------------------------------------------------------- */
.ink { background: var(--ink); color: #fff; }
.ink .eyebrow { color: rgba(255,255,255,.6); }
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(304px, 1fr)); gap: clamp(32px, 6vw, 96px); align-items: start; }
.about h2 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -0.025em; font-weight: 800; margin-top: 16px; }
.about h2 em { font-style: normal; color: var(--sun); }
.about-copy p { color: rgba(255,255,255,.76); font-size: var(--fs-lede); }
.about-copy p + p { margin-top: 16px; }
.about-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 24px; margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.14); }
.about-lists h3 { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.5); margin-bottom: 8px; }
.about-lists ul { list-style: none; }
.about-lists li { font-size: 15px; line-height: 1.95; }
/* Tools with their logos, in each tool's brand colour */
.tools li.tool { display: flex; align-items: center; gap: 10px; }
.tool-ico { width: 18px; height: 18px; flex: none; fill: var(--tc); }
.tool-icons { display: inline-flex; gap: 4px; width: 40px; flex: none; }
/* About: where I am and how I got here */
.about-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 32px; padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 14px; font-weight: 600; color: rgba(255,255,255,.86); }
.about-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sn) 25%, transparent); }
.path { list-style: none; margin-top: 32px; border-left: 1px solid rgba(255,255,255,.14); }
.path li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 0 0 24px 24px; }
.path li:last-child { padding-bottom: 0; }
.path li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #16161A; box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.path li:first-child::before { background: #fff; box-shadow: none; }
.path-when { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.5); padding-top: 2px; font-variant-numeric: tabular-nums; }
.path b { font-size: 16px; font-weight: 700; }
.path small { font-size: 13px; color: rgba(255,255,255,.5); }
.path p { margin-top: 4px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.66); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact { padding: clamp(32px, 4vw, 40px) 0 0; }
.contact-card {
  background: var(--sun); border: 2px solid var(--ink); border-radius: var(--r-lg);
  padding: clamp(32px, 6vw, 80px); position: relative; overflow: hidden;
}
.contact-card h2 { font-size: var(--fs-display); line-height: 1; letter-spacing: -0.03em; font-weight: 800; max-width: 13ch; }
.contact-card p { font-size: var(--fs-lede); margin-top: 16px; max-width: 46ch; color: var(--ink-2); }
.contact-card .hero-actions { margin-top: 32px; }
.contact-card .btn-ink:hover { box-shadow: 4px 4px 0 #fff; }
.contact-card .btn { background-color: transparent; }
.contact-card .btn-ink { background: var(--ink); }
.contact-card .doodle { position: absolute; right: clamp(-40px, -2vw, 0px); bottom: -32px; width: clamp(160px, 22vw, 280px); opacity: .95; pointer-events: none; }

.site-footer { padding: 40px 0 48px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer nav { display: flex; gap: 24px; }

/* ==========================================================================
   Case study pages
   ========================================================================== */
.case-sp { --c: var(--sp); --c-soft: var(--sp-soft); }
.case-ts { --c: var(--ts); --c-soft: var(--ts-soft); }
.case-cb { --c: var(--cb); --c-soft: var(--cb-soft); }
.case-ww { --c: var(--ww); --c-soft: var(--ww-soft); }

.case-hero { background: var(--c); color: #fff; padding: clamp(40px, 6vw, 72px) 0 0; position: relative; overflow: hidden; }
.case-sp .case-hero { background: var(--sp-deep); --glow: var(--sp-glow); --glow-2: var(--sp-glow); }
.case-ts .case-hero { background: var(--ts-deep); --glow: var(--ts-glow); --glow-2: var(--ts-glow); }
.case-cb .case-hero { background: var(--cb-night); --glow: var(--cb); --glow-2: var(--cb); }
.case-ww .case-hero { background: var(--ww-deep); --glow: var(--ww-glow); --glow-2: var(--ww-glow); }
.case-hero::before,
.case-hero::after { content: ""; position: absolute; pointer-events: none; }
.case-hero::before { inset: -30% -10% auto 30%; height: 90%; background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 60%, transparent), transparent); }
.case-hero::after { inset: 20% 55% auto -20%; height: 60%; background: radial-gradient(closest-side, color-mix(in srgb, var(--glow-2) 22%, transparent), transparent); }
.case-hero .wrap { position: relative; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.85); }
.back:hover { color: #fff; }
.back .arrow { transform: rotate(180deg); }
.back:hover .arrow { transform: rotate(180deg) translateX(3px); }
.case-hero .eyebrow { display: flex; color: rgba(255,255,255,.75); margin-top: 40px; }
.case-hero h1 { font-size: var(--fs-display); line-height: 1; letter-spacing: -0.03em; font-weight: 800; margin-top: 16px; max-width: 14ch; position: relative; }
.case-hero .lede { font-size: var(--fs-lede); line-height: 1.5; color: rgba(255,255,255,.88); max-width: 50ch; margin-top: 24px; position: relative; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); gap: 8px 0; margin-top: clamp(32px, 5vw, 56px); border-top: 1px solid rgba(255,255,255,.24); position: relative; }
.facts div { padding: 16px 16px 0 0; }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: .03em; color: rgba(255,255,255,.62); }
.facts dd { font-size: 15px; font-weight: 600; margin-top: 4px; line-height: 1.4; }
.case-cover { margin-top: clamp(40px, 5vw, 56px); border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; position: relative; aspect-ratio: 16/8; background: rgba(0,0,0,.2); }
.case-cover img { width: 100%; height: 100%; object-fit: cover; }
.case-cover.is-screen { aspect-ratio: auto; display: flex; justify-content: center; padding: clamp(24px, 6vw, 72px) clamp(16px, 6vw, 72px); background: rgba(255,255,255,.06); }
.case-cover.is-screen > * { width: 100%; max-width: 880px; }
.case-cover.is-screen > img { height: auto; }

/* At a glance */
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(264px, 1fr)); gap: 48px; }
.glance-card { padding: 0; }
.glance-card h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.glance-card p { font-size: clamp(18px, 1.5vw, 21px); font-weight: 500; line-height: 1.45; letter-spacing: -0.01em; color: var(--ink); }

/* Chapters */
.chapter { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.chapter:first-of-type { border-top: 0; }
.chapter-label { position: sticky; top: 104px; align-self: start; }
.chapter-label .n { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 999px; background: var(--c); color: #fff; font-size: 13px; font-weight: 700; }
.chapter-label p { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.chapter h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.025em; font-weight: 800; max-width: 22ch; }
.chapter h2 + p, .chapter .prose { margin-top: 24px; }
.prose p { color: var(--muted); max-width: 64ch; }
.prose p + p { margin-top: 16px; }
.prose strong { color: var(--ink); font-weight: 600; }
.chapter > div > * + .block { margin-top: clamp(32px, 4vw, 48px); }
.block { margin-top: clamp(32px, 4vw, 48px); }

.cards-2, .cards-3, .cards-4 { display: grid; gap: 16px; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(304px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(304px, 1fr)); }
.card { background: var(--card); border-radius: var(--r-md); padding: 24px; }
.card .k { font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--c); }
.card h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.02em; font-weight: 700; margin-top: 8px; }
.card p { font-size: var(--fs-small); color: var(--muted); margin-top: 8px; }
.card.tint { background: var(--c-soft); border-color: transparent; }
.card.solid { background: var(--c); border-color: transparent; color: #fff; }
.card.solid .k { color: rgba(255,255,255,.8); }
.card.solid p { color: rgba(255,255,255,.86); }

.quote {
  border-left: 4px solid var(--c); padding: 8px 0 8px 24px;
  font-size: clamp(20px, 2.2vw, 26px); line-height: 1.4; letter-spacing: -0.02em; font-weight: 600; color: var(--ink);
  max-width: 40ch;
}

.big-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.big-stat { background: var(--c-soft); border-radius: var(--r-md); padding: 24px; }
.big-stat b { display: block; font-size: clamp(32px, 3.6vw, 44px); line-height: 1; letter-spacing: -0.03em; font-weight: 800; color: var(--c); }
.big-stat span { display: block; font-size: 15px; color: var(--ink-2); margin-top: 8px; line-height: 1.45; }
.big-stat.dark { background: var(--ink); }
.big-stat.dark b { color: #fff; }
.big-stat.dark span { color: rgba(255,255,255,.8); }

/* Steps */
.steps { list-style: none; counter-reset: s; display: grid; gap: 4px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); font-weight: 800; font-size: 15px; color: var(--c); padding-top: 4px; }
.steps h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; font-weight: 700; }
.steps p { color: var(--muted); font-size: 16px; margin-top: 4px; }

/* Team */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); gap: 16px; }
.member { display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: var(--r-sm); padding: 16px; }
.member .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--paper-2); color: var(--ink-2); flex-shrink: 0; }
.member.me .av { background: var(--c); color: #fff; }
.member b { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.member small { font-size: 13px; color: var(--muted); }

/* Figures */
.figure { margin: 0; }
.figure .frame {
  border-radius: var(--r-md); overflow: hidden; background: var(--c-soft);
  cursor: zoom-in; position: relative;
}
.figure .frame img { width: 100%; height: auto; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.figure .frame:hover img { transform: scale(1.012); }
.figure .frame.pad { padding: clamp(16px, 3vw, 40px); }
.figure .frame.pad img { border-radius: 10px; box-shadow: var(--shadow); }
.figure .frame.dark { background: #121216; border-color: #121216; }
.figure figcaption { font-size: 14px; color: var(--muted); margin-top: 16px; display: flex; gap: 8px; }
.figure figcaption b { color: var(--ink); font-weight: 600; }
.zoom-hint { position: absolute; right: 16px; top: 16px; background: rgba(22,22,26,.78); color: #fff; font-size: 12px; font-weight: 600; padding: 8px 8px; border-radius: 999px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.figure .frame:hover .zoom-hint { opacity: 1; }

/* Phone gallery */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 8px; padding: 4px; background: var(--paper-2); border-radius: 999px; }
.tab { font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; color: var(--muted); transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.panel[hidden] { display: none; }
.phones {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--phone-min, 184px), 1fr));
  gap: 24px 16px; padding: 24px 4px 8px; margin-top: 8px;
}
.phone { margin: 0; max-width: 240px; justify-self: center; width: 100%; }
.phone .device {
  border-radius: 26px; padding: 8px; background: var(--ink);
  box-shadow: 0 18px 40px -20px rgba(22,22,26,.5);
  cursor: zoom-in; transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.phone .device:hover { transform: translateY(-4px); }
.phone .device img { border-radius: 21px; width: 100%; aspect-ratio: 780/1570; object-fit: cover; object-position: top; background: #fff; }
.phone figcaption { font-size: 13px; margin-top: 16px; color: var(--muted); line-height: 1.4; }
.phone figcaption b { display: block; color: var(--ink); font-weight: 700; font-size: 12px; letter-spacing: .02em; color: var(--c); }

/* Collectable cards */
.card-fan { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 144px), 1fr)); gap: 16px 16px; }
.tcard { border-radius: 12px; overflow: hidden; box-shadow: 0 16px 30px -16px rgba(0,0,0,.5); transform: rotate(var(--r, 0)); transition: transform .35s cubic-bezier(.3,1.5,.5,1); cursor: zoom-in; background: #111; }
.tcard:nth-child(odd) { --r: -2deg; }
.tcard:nth-child(even) { --r: 2deg; translate: 0 10px; }
.tcard:hover { transform: rotate(0) scale(1.04); z-index: 2; }
.tcard img { width: 100%; aspect-ratio: 353/500; object-fit: cover; }

/* Lists of tags */
.deliverables { display: flex; flex-wrap: wrap; gap: 8px; }
.deliverables span { font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.deliverables span:nth-child(4n+1) { background: var(--c-soft); border-color: transparent; }

/* Reflections */
.reflections { display: grid; gap: 16px; counter-reset: rf; }
.reflection { counter-increment: rf; background: var(--card); border-radius: var(--r-md); padding: 24px 24px 24px 72px; position: relative; }
.reflection::before { content: counter(rf); position: absolute; left: 24px; top: 24px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--c); color: #fff; }
.reflection h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.02em; }
.reflection p { color: var(--muted); margin-top: 8px; font-size: 16px; }

/* Next project */
.next {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  border-radius: var(--r-lg); padding: clamp(32px, 5vw, 56px); color: #fff;
  background: var(--nc, var(--ink)); transition: transform .3s;
  position: relative; overflow: hidden;
}
.next:hover { transform: translateY(-3px); }
.next small { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75); }
.next h2 { font-size: var(--fs-h1); letter-spacing: -0.025em; line-height: 1.04; font-weight: 800; margin-top: 8px; }
.next .circle { width: 72px; height: 72px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 26px; font-weight: 700; transition: transform .3s; }
.next:hover .circle { transform: rotate(-45deg); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(14,14,18,.92); display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1600px, 100%); max-height: 100%; width: auto; height: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox .close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 22px; font-weight: 600; }

/* ==========================================================================
   Responsive
   Matches the Figma frames: Desktop 1440 · Tablet 768 · Mobile 375.
   Most grids wrap on their own (auto-fit + minimum width, the same rule as
   the Figma auto-layout), so the breakpoints below only change layout.
   ========================================================================== */

/* Tablet and below · ≤1020px  (Figma: "Tablet · 768") */
@media (max-width: 1020px) {
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  /* Project cards stack, image first */
  .project { grid-template-columns: 1fr; min-height: 0; }
  .project-media { order: -1; aspect-ratio: 16/10; }
  .project-media.is-screen { aspect-ratio: auto; }

  /* Case-study chapters stack; the label sits inline above */
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .chapter-label { position: static; display: flex; align-items: center; gap: 16px; }
  .chapter-label p { margin-top: 0; }
}

/* Mobile · ≤640px  (Figma: "Mobile · 375") */
@media (max-width: 640px) {
  body { font-size: 16px; }

  /* Header keeps the logo and the Get in touch button */

  /* Hero: buttons stacked */
  .hero { padding-top: 48px; }
  .hero-foot { grid-template-columns: 1fr; gap: 32px; margin-top: 32px; }
  /* Phones: one column for anything with a heading or label */
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .facts dd { margin-top: 0; }
  .about-lists { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .project-stats { flex-direction: column; gap: 12px; }
  .contact-card .hero-actions { flex-direction: column; align-items: stretch; }
  .contact-card .hero-actions .btn { justify-content: center; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* Tabs: a full-width segmented control on one line; long sets scroll sideways */
  .tabs { display: flex; flex-wrap: nowrap; width: 100%; gap: 4px; padding: 4px; border-radius: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs.has-more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .tab { flex: 1 0 auto; padding: 10px 12px; font-size: 13px; text-align: center; white-space: nowrap; border-radius: 10px; scroll-snap-align: center; }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .flow-num { font-size: 40px; }
  .flow-panel { padding: 32px 24px 8px; }
  .flow-examples { grid-template-columns: minmax(0, 1fr); }
  .flow-nav { padding: 16px 24px 24px; }
  .brands { margin-top: 48px; }

  /* Cards */
  .project-stats { gap: 16px; }
  .case-cover { aspect-ratio: 4/3; }
  .case-cover.is-screen { aspect-ratio: auto; }
  .phones { --phone-min: 144px; gap: 24px 16px; }
  .card-fan { --card-min: 88px; }
  .reflection { padding: 24px 24px 24px 64px; }
  .reflection::before { left: 16px; top: 16px; }
  .next { grid-template-columns: 1fr; }
  .next .circle { width: 56px; height: 56px; }
  .contact-card .doodle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Brand palettes (Trackside page) */
.palette { display: grid; gap: 24px; }
.palette-brand { background: var(--card); border-radius: var(--r-md); padding: 32px; display: grid; gap: 24px; }
.palette-head .k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.palette-head h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; font-weight: 700; margin-top: 8px; }
.ramp h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.ramp ul { list-style: none; display: grid; grid-template-columns: repeat(var(--steps, 7), minmax(0, 1fr)); gap: 8px; }
.ramp li { display: grid; gap: 8px; }
.ramp li span { display: block; height: 48px; border-radius: 8px; background: var(--s); box-shadow: inset 0 0 0 1px rgba(22,22,26,.08); }
.ramp code { font: 600 12px/1.2 Manrope, ui-sans-serif, system-ui, sans-serif; letter-spacing: .02em; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.ramp small { margin-top: -4px; font-size: var(--fs-label); font-weight: 500; line-height: 1.2; color: var(--faint); text-align: center; overflow-wrap: anywhere; }
.ramp.named ul { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
@media (max-width: 1020px) { .ramp.ten ul { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 16px; } }

@media (max-width: 640px) {
  .palette-brand { padding: 24px 16px; }
  .ramp ul { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 16px; }
}

/* Design-token viewer (Trackside page) */
.token-viewer .tabs { margin-bottom: 24px; }
.token-viewer .panel > * { margin-top: 0; }
.type-scale, .grid-spec { display: grid; gap: 24px; background: var(--card); border-radius: var(--r-md); padding: 32px; }
.type-group h4 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.type-group ul { list-style: none; }
.type-group li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.type-group li span { line-height: 1.4; color: var(--ink); }
.type-group li span.upper { text-transform: uppercase; letter-spacing: .08em; }
.type-group li small { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.bp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bp-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--faint); padding: 8px 0; }
.bp-table td { padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); }
.bp-table td:first-child { color: var(--ink); font-weight: 600; }
.bp-table td b { color: var(--c); font-weight: 700; }
.layout-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.layout-card { display: grid; gap: 4px; padding: 16px; border-radius: var(--r-sm); background: var(--paper); }
.layout-card .cols { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: var(--g); height: 64px; margin-bottom: 8px; }
.layout-card .cols i { background: var(--c-soft); border-radius: 4px; }
.layout-card small { font-size: 12px; font-weight: 600; color: var(--faint); }
.layout-card b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.layout-card span { font-size: 13px; color: var(--muted); }
.shadow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); gap: 24px; background: var(--paper-2); border-radius: var(--r-md); padding: 32px; }
.shadow-tile { margin: 0; display: grid; gap: 16px; }
.shadow-tile > div { height: 120px; border-radius: 16px; background: var(--card); }
.shadow-tile > div.swatch-grad { box-shadow: inset 0 0 0 1px rgba(22,22,26,.08); }
.type-family { font-size: 14px; color: var(--muted); }
.type-family b { display: block; font-size: 32px; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 4px; }
.shadow-tile b { display: block; font-size: 15px; font-weight: 700; }
.shadow-tile code { display: block; margin-top: 4px; font: 500 12px/1.5 Manrope, ui-sans-serif, system-ui, sans-serif; color: var(--muted); }

@media (max-width: 640px) {
  .type-scale, .grid-spec, .shadow-grid { padding: 24px 16px; }
  .type-group li { flex-direction: column; gap: 4px; }
}

/* ==========================================================================
   Dark mode
   Toggled by the header button (sets <html data-theme="dark">), defaulting
   to the device setting. Tokens flip; a few surfaces that use ink or white
   as a background get explicit treatment below.
   ========================================================================== */
:root { --on-light: #16161A; color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111114;
  --paper-2: #1C1C22;
  --card: #1A1A20;
  --ink: #F2EFE8;
  --ink-2: #D6D2CA;
  --muted: #A39F97;
  --faint: #78746D;
  --line: #2C2C34;
  --sp-soft: #3A1713;
  --ts-soft: #201C4C;
  --cb-soft: #2A1A45;
  --ww-soft: #142347;
  --card-translucent: rgba(255,255,255,.06);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.7);
}
:root[data-theme="dark"] .case-sp { --c-soft: var(--sp-soft); }
:root[data-theme="dark"] .case-ts { --c-soft: var(--ts-soft); }
:root[data-theme="dark"] .case-cb { --c-soft: var(--cb-soft); }
:root[data-theme="dark"] .case-ww { --c-soft: #142347; }

/* Buttons and tabs: ink becomes a light pill with dark text */
:root[data-theme="dark"] .btn-ink,
:root[data-theme="dark"] .chip { background: var(--card-translucent); }

/* White pills on coloured cards keep dark text */
:root[data-theme="dark"] .project-cta,
:root[data-theme="dark"] .next .circle,
:root[data-theme="dark"] .lightbox .close { color: var(--on-light); }

/* Dark surfaces go deeper instead of flipping to light */
:root[data-theme="dark"] .ink,
:root[data-theme="dark"] .big-stat.dark { background: #0A0A0D; }
:root[data-theme="dark"] .ink { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
:root[data-theme="dark"] .path li:not(:first-child)::before { background: #0A0A0D; }
:root[data-theme="dark"] .phone .device { background: #000; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -20px rgba(0,0,0,.8); }
:root[data-theme="dark"] .illo { background: var(--card); }

/* Yellow surfaces always use dark ink */
:root[data-theme="dark"] .contact-card { color: var(--on-light); border-color: transparent; }
:root[data-theme="dark"] .contact-card p { color: #2A2A30; }
:root[data-theme="dark"] .contact-card .btn { color: var(--on-light); border-color: var(--on-light); }
:root[data-theme="dark"] .contact-card .btn-ink { background: var(--on-light); color: #fff; }
:root[data-theme="dark"] .btn-sun { color: var(--on-light); border-color: var(--on-light); }
:root[data-theme="dark"] .mark { background: linear-gradient(transparent 84%, var(--sun) 84%, var(--sun) 96%, transparent 96%); }

/* Theme toggle */
.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink); background: transparent; margin-left: 8px;
  transition: background .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--paper-2); border-color: var(--faint); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .tab[aria-selected="true"] { color: var(--on-light); }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (max-width: 640px) { .theme-toggle { margin-left: 0; margin-right: 8px; } }

/* Brand logos (home hero). Drop SVGs into img/brands/; missing files fall back to the name as text. */
.brands .brand { display: inline-flex; align-items: center; height: 32px; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; color: var(--ink-2); }
.brands .brand img { height: 24px; width: auto; max-width: 128px; object-fit: contain; filter: brightness(0) opacity(.72); transition: filter .2s ease; }
.brands .brand:hover img { filter: none; }
:root[data-theme="dark"] .brands .brand img { filter: brightness(0) invert(1) opacity(.78); }
:root[data-theme="dark"] .brands .brand:hover img { filter: brightness(0) invert(1); }

/* Phone frames holding taller (750x1624) captures */
.phone.tall .device img { aspect-ratio: 750 / 1624; }

/* Keep dark swatches visible on dark cards */
:root[data-theme="dark"] .ramp li span,
:root[data-theme="dark"] .shadow-tile > div.swatch-grad { box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }

/* ==========================================================================
   Custom cursor (mouse and trackpad only): a dot with a trailing ring that
   grows over links and shows a label over cards, notes and zoomable images
   ========================================================================== */
.has-cursor, .has-cursor * { cursor: none !important; }
.cursor { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .2s; }
.cursor.is-visible { opacity: 1; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; border-radius: 999px; will-change: translate; }
.cursor-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--ink); transition: opacity .2s, scale .2s; }
.cursor-ring {
  display: grid; place-items: center; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 1.5px solid var(--ink); background: transparent;
  transition: width .3s cubic-bezier(.3,1.5,.5,1), height .3s cubic-bezier(.3,1.5,.5,1), margin .3s cubic-bezier(.3,1.5,.5,1), background .2s, border-color .2s, scale .15s;
}
.cursor-label { font: 700 12px/1 Manrope, ui-sans-serif, system-ui, sans-serif; letter-spacing: .02em; color: #16161A; white-space: nowrap; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .3s cubic-bezier(.3,1.6,.5,1); }
/* Over anything clickable: a yellow highlighter blob */
.cursor.is-link .cursor-ring { width: 48px; height: 48px; margin: -24px 0 0 -24px; background: color-mix(in srgb, var(--sun) 55%, transparent); border-color: transparent; }
.cursor.is-link .cursor-dot { scale: .5; }
/* Over cards, notes and images: a pill with a word in it */
.cursor.has-label .cursor-ring { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: var(--sun); border-color: transparent; }
.cursor.has-label .cursor-dot { opacity: 0; }
.cursor.has-label .cursor-label { opacity: 1; transform: none; }
.cursor.is-down .cursor-ring { scale: .85; }

/* Smallest phones (≤360px): tighten the header so it never overflows */
@media (max-width: 360px) {
  .site-header .wrap { gap: 8px; }
}

/* ==========================================================================
   Design-tool toolbar (desktop only): Move, Inspect, Layout grid, Comment
   ========================================================================== */
.dt-toolbar {
  position: fixed; left: 50%; bottom: 24px; z-index: 9000; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: 14px; background: #1E1E22; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 16px 40px -12px rgba(0,0,0,.55);
  animation: dt-in .5s cubic-bezier(.2,1,.3,1) .6s both;
}
@keyframes dt-in { from { opacity: 0; transform: translate(-50%, 16px); } }
.dt-toolbar button, .dt-toolbar a {
  position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px;
  color: rgba(255,255,255,.82); transition: background .15s, color .15s;
}
.dt-toolbar button:hover, .dt-toolbar a:hover { background: rgba(255,255,255,.1); color: #fff; }
.dt-toolbar [aria-pressed="true"] { background: #0C8CE9; color: #fff; }
.dt-toolbar [aria-pressed="true"]:hover { background: #0C8CE9; }
.dt-toolbar svg { width: 18px; height: 18px; }
.dt-sep { width: 1px; height: 20px; margin: 0 4px; background: rgba(255,255,255,.14); }
/* Tooltip with the shortcut, like a design tool */
.dt-toolbar [data-tip]::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px);
  padding: 6px 8px; border-radius: 6px; background: #1E1E22; color: #fff; font: 500 12px/1 Manrope, ui-sans-serif, system-ui, sans-serif;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.dt-toolbar [data-tip]:hover::after { opacity: 1; transform: translateX(-50%); }

/* Inspect: blue selection box with a size label */
.dt-select { position: fixed; z-index: 8990; pointer-events: none; border: 1.5px solid #0C8CE9; opacity: 0; transition: opacity .1s; }
.dt-select.is-on { opacity: 1; }
.dt-select::before, .dt-select::after { content: ""; position: absolute; width: 6px; height: 6px; background: #fff; border: 1.5px solid #0C8CE9; }
.dt-select::before { left: -4px; top: -4px; }
.dt-select::after { right: -4px; bottom: -4px; }
.dt-tag {
  position: absolute; left: -1.5px; top: calc(100% + 6px); padding: 3px 6px; border-radius: 4px; background: #0C8CE9; color: #fff;
  font: 600 11px/1.3 Manrope, ui-sans-serif, system-ui, sans-serif; white-space: nowrap;
}
.dt-tag.above { top: auto; bottom: calc(100% + 6px); }
/* Clickable layers get a green selection, so it is clear a click will go through */
.dt-select.is-clickable { border-color: #14AE5C; }
.dt-select.is-clickable::before, .dt-select.is-clickable::after { border-color: #14AE5C; }
.dt-select.is-clickable .dt-tag { background: #14AE5C; }

/* Layout grid overlay: the site's 12 columns */
.dt-grid { position: fixed; inset: 0; z-index: 8980; pointer-events: none; display: none; }
.dt-grid.is-on { display: block; }
.dt-grid .wrap { height: 100%; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; }
.dt-grid i { background: rgba(255, 64, 64, .08); box-shadow: inset 1px 0 rgba(255,64,64,.2), inset -1px 0 rgba(255,64,64,.2); }

/* Touch devices and narrow screens don't get the toolbar */
@media (max-width: 1020px), (hover: none) { .dt-toolbar, .dt-select, .dt-grid { display: none !important; } }
html.dt-inspecting .cursor-ring { opacity: 0; }

/* Product type specimens keep the product font (Inter) */
.type-scale { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }

/* Phase mocks: a row of phones, then a row of desktop screens */
.mocks { display: grid; gap: 32px; }
.mocks-row { display: grid; gap: 16px; }
.mocks-mobile { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mocks-desktop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mocks figure img { width: 100%; border-radius: 16px; background: var(--card); }
.mocks-desktop figure img { border-radius: 12px; }
.mocks figcaption { margin-top: 8px; font-size: var(--fs-caption); font-weight: 600; color: var(--muted); }
@media (max-width: 760px) {
  .mocks-mobile { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mocks-desktop { grid-template-columns: minmax(0, 1fr); }
}
.mock-blank { display: grid; place-items: center; aspect-ratio: 375 / 812; border-radius: 16px; border: 1.5px dashed var(--line); background: var(--paper-2); color: var(--faint); font-size: var(--fs-caption); font-weight: 600; text-align: center; padding: 8px; }
.mocks-desktop .mock-blank { aspect-ratio: 16 / 10; border-radius: 12px; }
.mocks-car { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mocks-car .mock-blank { aspect-ratio: 5 / 3; border-radius: 12px; }
.mocks-label { font-size: var(--fs-small); font-weight: 700; color: var(--ink); margin-bottom: -16px; }
@media (max-width: 760px) { .mocks-car { grid-template-columns: minmax(0, 1fr); } }

/* Low-fi to hi-fi switcher */
.fidelity-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.fidelity-head .mocks-label { margin: 0; }
.mocks-fidelity { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mocks-fidelity figure img, .mocks-fidelity .mock-blank { animation: fid-in .35s ease both; }
@keyframes fid-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .mocks-fidelity { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Mock labels and captions */
.mocks-label { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin-bottom: -12px; }
.mocks-label span { display: block; margin-top: 4px; font-size: var(--fs-small); font-weight: 400; letter-spacing: 0; color: var(--muted); }
.mocks figcaption, .fidelity figcaption { margin-top: 12px; }
.mocks figcaption b, .fidelity figcaption b { display: block; font-size: var(--fs-small); font-weight: 700; color: var(--ink); }
.mocks figcaption span, .fidelity figcaption span { display: block; margin-top: 2px; font-size: var(--fs-caption); font-weight: 400; line-height: 1.4; color: var(--muted); }

/* Information architecture panel */
.ia { --ia-soft: color-mix(in srgb, var(--ink) 6%, transparent); --ia-line: color-mix(in srgb, var(--ink) 16%, transparent); }
.ia-panel { background: var(--card); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 40px); animation: fid-in .35s ease both; }
.ia-sitemap { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.ia-col b { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-small); font-weight: 700; color: var(--ink); padding: 8px 12px; border-radius: 10px; background: var(--ia-soft); }
.ia-col b::after { content: attr(data-count); font-size: 12px; font-weight: 600; color: var(--faint); }
.ia-col ul { list-style: none; margin-top: 12px; padding-left: 12px; display: grid; gap: 2px; }
.ia-col li { font-size: var(--fs-caption); color: var(--muted); padding: 4px 0; transition: color .2s, transform .2s; }
.ia-col li:hover { color: var(--ink); transform: translateX(2px); }
.ia-flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.ia-branch { display: grid; gap: 10px; position: relative; }
.ia-node { border-radius: 14px; padding: 14px 16px; background: var(--ia-soft); position: relative; transition: transform .2s, box-shadow .2s; }
.ia-node:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ia-node b { display: block; font-size: var(--fs-small); font-weight: 700; color: var(--ink); }
.ia-node span { display: block; font-size: var(--fs-caption); color: var(--muted); margin-top: 2px; line-height: 1.4; }
.ia-node.is-main { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); }
/* Soft connectors: a rounded bracket into the branch, and a line out to the race card */
.ia-branch::before { content: ""; position: absolute; left: -20px; top: 28px; bottom: 28px; width: 12px; border: 1.5px solid var(--ia-line); border-right: 0; border-radius: 12px 0 0 12px; }
.ia-flow > .ia-node.is-main::after, .ia-branch::after { content: ""; position: absolute; top: 50%; height: 0; border-top: 1.5px solid var(--ia-line); }
.ia-flow > .ia-node.is-main::after { right: -40px; width: 20px; }
.ia-branch::after { right: -40px; width: 40px; }
.ia-note { margin-top: 24px; font-size: var(--fs-caption); color: var(--muted); }
.ia-open { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-size: var(--fs-small); font-weight: 600; color: var(--ink); padding: 10px 18px; border-radius: 999px; background: var(--ia-soft); transition: background .2s, color .2s; }
.ia-open:hover { background: var(--ink); color: var(--paper); }
.ia-note + .ia-open { margin-top: 12px; }
@media (max-width: 900px) {
  .ia-sitemap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ia-flow { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ia-branch::before, .ia-branch::after, .ia-flow > .ia-node.is-main::after { content: none; }
}

/* Challenge chapter */
.challenge-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: ch; }
.challenge-steps > div { counter-increment: ch; }
.challenge-steps span, .challenge-result span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.challenge-steps span::before { content: counter(ch) " · "; color: var(--faint); }
.challenge-steps p { font-size: var(--fs-body); line-height: 1.55; color: var(--ink); }
.challenge-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.challenge-compare .mock-blank { aspect-ratio: 16 / 10; border-radius: 12px; }
.challenge-compare figcaption { margin-top: 12px; }
.challenge-compare figcaption b { display: block; font-size: var(--fs-small); font-weight: 700; }
.challenge-compare figcaption span { display: block; font-size: var(--fs-caption); color: var(--muted); margin-top: 2px; }
.challenge-result { padding-top: 24px; border-top: 1px solid var(--line); }
.challenge-result p { font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
@media (max-width: 760px) {
  .challenge-steps { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .challenge-compare { grid-template-columns: minmax(0, 1fr); }
}
/* Card the challenge chapter so it stands apart: an inverted, high-contrast card */
.chapter.challenge { --cc-fg: var(--paper); --cc-muted: color-mix(in srgb, var(--paper) 62%, transparent); --cc-line: color-mix(in srgb, var(--paper) 16%, transparent);
  background: var(--ink); color: var(--cc-fg); border-top: 0; border-radius: var(--r-lg); padding: clamp(32px, 5vw, 64px); margin: clamp(24px, 4vw, 48px) 0; }
.chapter.challenge + .chapter { border-top: 0; }
.challenge h2, .challenge .challenge-steps p, .challenge-compare figcaption b, .challenge .challenge-result p { color: var(--cc-fg); }
.challenge .chapter-label p, .challenge .challenge-steps span, .challenge .challenge-result span, .challenge-compare figcaption span { color: var(--cc-muted); }
.challenge .challenge-steps span::before { color: var(--cc-muted); }
.challenge .chapter-label .n { background: var(--paper); color: var(--ink); }
.challenge .mock-blank { background: color-mix(in srgb, var(--paper) 6%, transparent); border-color: var(--cc-line); color: var(--cc-muted); }
.challenge .challenge-result { border-top-color: var(--cc-line); }
.challenge .chapter-label { top: 120px; }
/* Dark theme: a raised charcoal card rather than an inverted (white) one */
:root[data-theme="dark"] .chapter.challenge { --cc-fg: var(--ink); --cc-muted: color-mix(in srgb, var(--ink) 60%, transparent); --cc-line: color-mix(in srgb, var(--ink) 14%, transparent);
  background: #24242C; }
:root[data-theme="dark"] .challenge .chapter-label .n { background: var(--ink); color: var(--paper); }
:root[data-theme="dark"] .challenge .mock-blank { background: color-mix(in srgb, var(--ink) 5%, transparent); }

/* Scannable bullet lists in case study prose */
.prose .list-title { margin-top: 24px; font-size: var(--fs-small); font-weight: 700; color: var(--ink); }
.facts-list { list-style: none; display: grid; gap: 10px; margin-top: 12px; }
.facts-list li { position: relative; padding-left: 20px; font-size: var(--fs-body); line-height: 1.5; color: var(--ink-2); }
.facts-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.card.solid .facts-list li { color: inherit; }
.card.solid .facts-list li::before, .big-stat.dark .facts-list li::before { background: currentColor; opacity: .8; }
.facts-list + p { margin-top: 16px; }

/* ==========================================================================
   Home · "simple" layout (inspired by ls.graphics): small, calm type, the hero
   in one rounded panel, and the work as a grid of image tiles with a short
   caption underneath. Remove class="simple" from <body> to switch it off.
   ========================================================================== */
.simple .hero h1 { margin-inline: auto; max-width: 18ch; font-size: clamp(30px, 3.6vw, 46px); }
.nobr { white-space: nowrap; }
.simple .brands { justify-content: center; border-top: 0; padding-top: 0; margin-top: 32px; }
.simple .brands .brand img { height: 20px; }

.simple .section-head h2 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; letter-spacing: -0.01em; }
@media (max-width: 700px) {
}

/* Home · case study showcase: names stay put on the left while the project cards
   on the right stack on top of each other as you scroll (js in main.js) */
.showcase { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 4vw, 56px); align-items: start; }
/* The list stays centred beside the pinned panel */
/* All spacing below sits on an 8px grid (8, 16, 24, 32, 40) */
/* Sizes and spacing match ls.graphics: 12/20 label, 24/32 names 21px apart,
   12/20 description, 32px-tall pill button */
.sc-side { position: sticky; top: 96px; height: calc(100vh - 120px); display: flex; flex-direction: column; justify-content: center; gap: 21px; }
/* Same type as the How I work heading */
.sc-eyebrow { margin: 0 0 8px; font-size: clamp(20px, 1.8vw, 24px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.08; color: var(--ink); }
.sc-list { list-style: none; display: flex; flex-direction: column; gap: 21px; }
.sc-name { display: block; font-size: 24px; font-weight: 500; letter-spacing: -0.5px; line-height: 32px;
  /* --a (0 to 1) is set from the scroll position, so names brighten and dim gradually */
  color: color-mix(in srgb, var(--ink) calc(var(--a, 0) * 100%), var(--faint)); }
button.sc-name { width: 100%; padding: 0; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; }
.sc-name:hover { color: var(--ink); }
.sc-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.2,.8,.2,1); }
.sc-detail > div { overflow: hidden; opacity: var(--d, 0); transform: translateY(calc((1 - var(--d, 0)) * 8px)); }
.sc-item.is-active .sc-detail { grid-template-rows: 1fr; }
/* Same hierarchy as the Cards view: outlined tag, name, grey description, text link */
.sc-kicker { display: inline-block; margin-bottom: 12px; padding: 4px 12px; border: 1px solid color-mix(in srgb, var(--ink) 55%, transparent); border-radius: 14px; font-size: 11px; font-weight: 500; line-height: 18px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.sc-desc { padding-top: 8px; font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 300px; }
.sc-link { display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 24px; font-size: 15px; font-weight: 500; color: var(--ink); }
.sc-link .arrow { transition: transform .25s; }
.sc-link:hover .arrow { transform: translateX(4px); }
.sc-stage { display: grid; gap: 12vh; }
.sc-slide, .sc-thumb { display: block; border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2); }
/* Every panel fills the screen and pins in the same spot; the next one slides up
   from below and covers it completely */
.sc-slide { position: sticky; top: 96px; height: calc(100vh - 120px); min-height: 420px; }
.sc-slide .project-media, .sc-thumb .project-media { height: 100%; padding: clamp(20px, 3.5vw, 56px); background: none; }
.sc-thumb { display: none; }
/* Desktop: the small label beside the panels replaces the section heading */
@media (min-width: 901px) { .work[data-view="scroll"] .sc-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; } }
/* Phones and tablets: every project open, each with its own image */
@media (max-width: 900px) {
  .showcase { grid-template-columns: minmax(0, 1fr); }
  .sc-side { position: static; height: auto; }
  .sc-eyebrow { display: none; }
  .sc-list { gap: 40px; }
  .sc-stage { display: none; }
  .sc-name { color: var(--ink); padding: 0; }
  .sc-detail { grid-template-rows: 1fr; }
  .sc-detail > div { opacity: 1; transform: none; }
  /* thumbnail first, then the name and details underneath */
  .sc-thumb { display: block; aspect-ratio: 4 / 3; margin-bottom: 16px; }
  .sc-link { margin: 16px 0 8px; }
}
/* Softer screenshot shadows on the plain showcase panels */
:is(.sc-slide, .sc-thumb) .screen-split { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent), 0 12px 32px -16px rgba(0,0,0,.25); }
:is(.sc-slide, .sc-thumb) .screen-combo img.mob { box-shadow: 0 12px 24px -12px rgba(0,0,0,.3); }

/* --------------------------------------------------------------------------
   Home · Selected work layout switch: the scroll showcase, or the original
   cards in neutral greys (no brand colour)
   -------------------------------------------------------------------------- */
.work:not([data-view="focus"]) .fader,
.work[data-view="focus"] .showcase,
.work[data-view="focus"] .projects:not(.fader-stage),
.work[data-view="cards"] .showcase,
.work[data-view="scroll"] .projects:not(.fader-stage) { display: none; }
.work-view { display: inline-flex; gap: 2px; margin-left: auto; padding: 2px; border-radius: 999px; background: var(--paper-2); }
.work-view button { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: background .2s, color .2s; }
.work-view button:hover { color: var(--ink); }
.work-view button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
@media (min-width: 901px) { .work[data-view="scroll"] .sc-head { margin-bottom: 16px; } }
:root[data-theme="dark"] .work-view button[aria-pressed="true"] { background: color-mix(in srgb, var(--ink) 14%, var(--paper-2)); }

.projects.is-mono .project { --pc: var(--paper-2); color: var(--ink); }
.projects.is-mono .project:hover { box-shadow: 0 30px 60px -30px rgba(0,0,0,.18); }
.projects.is-mono .project::before,
.projects.is-mono .project::after { display: none; }
.projects.is-mono .project p { color: var(--muted); }
.projects.is-mono .project-kicker { color: var(--muted); opacity: 1; }
.projects.is-mono .project-kicker .num { background: var(--card); color: var(--ink); }
.projects.is-mono .project-stats { border-top-color: var(--line); }
.projects.is-mono .project-stats small { color: var(--muted); }
.projects.is-mono .project-cta { background: var(--ink); color: var(--paper); }
.projects.is-mono .project-media.is-screen { background: none; }
.projects.is-mono .is-screen img,
.projects.is-mono .screen-split { box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 18px 40px -20px rgba(0,0,0,.3); }
.projects.is-mono .is-screen .screen-split img { box-shadow: none; }

/* Cards view hierarchy: outlined tag, large light headline, grey description,
   plain text link. Chips and stats are left out to keep it calm. */
.projects.is-mono .project-body { gap: 0; justify-content: center; }
.projects.is-mono .project-kicker { align-self: flex-start; padding: 6px 14px; line-height: 18px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--ink) 55%, transparent); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.projects.is-mono .project-kicker .num { display: none; }
.projects.is-mono .project h3 { margin-top: 24px; font-size: clamp(28px, 3vw, 40px); font-weight: 500; line-height: 1.18; letter-spacing: -0.015em; max-width: 20ch; }
.projects.is-mono .project p { margin-top: 16px; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.55; }
.projects.is-mono .chips,
.projects.is-mono .project-stats { display: none; }
.projects.is-mono .project-cta { margin-top: 28px; height: auto; padding: 0; background: none; color: var(--ink); font-size: 16px; font-weight: 500; gap: 12px; }
.projects.is-mono .project-cta .arrow { transition: transform .25s; }
.projects.is-mono .project:hover .project-cta .arrow { transform: translateX(4px); }
@media (max-width: 700px) { .projects.is-mono .project-kicker { font-size: 11px; letter-spacing: .04em; } }

/* Selected work · Focus view: the card pins while you scroll through the
   case studies; the words and thumbnail fade out and the next ones fade in */
.fader { position: relative; height: calc(var(--n, 4) * 70vh + 100vh); }
.fader-pin { position: sticky; top: max(96px, calc(50vh - var(--h, 0px) / 2 + 36px)); display: flex; align-items: center; }
.fader-stage { position: relative; flex: 1; display: grid; border-radius: var(--r-lg); background: var(--paper-2); overflow: hidden; }
/* every case study sits in the same grid cell, so the card is as tall as the longest one */
.fader-stage .project { grid-area: 1 / 1; min-height: 0; background: none; pointer-events: none; }
.fader-stage .project-body { padding: clamp(28px, 3.4vw, 48px); }
.fader-stage .project-media.is-screen { padding: clamp(24px, 3vw, 40px); padding-right: calc(clamp(24px, 3vw, 40px) + 24px); }
.fader-stage .project:hover { transform: none; box-shadow: none; }
.fader-stage .project.is-on { pointer-events: auto; }
.fader-stage.projects .project .project-body > *,
.fader-stage .project-media > * { opacity: 0; transition: opacity .45s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.fader-stage.projects .project .project-body > * { transform: translateY(16px); }
.fader-stage .project-media > * { transform: translateY(24px) scale(.97); }
.fader-stage.projects .project.is-on .project-body > *,
.fader-stage .project.is-on .project-media > * { opacity: 1; transform: none; transition-delay: .2s; }
.fader-stage .project.is-on .project-body > :nth-child(2) { transition-delay: .26s; }
.fader-stage .project.is-on .project-body > :nth-child(3) { transition-delay: .32s; }
.fader-stage .project.is-on .project-body > :last-child { transition-delay: .38s; }
.fader-stage .project.is-on .project-media > * { transition-delay: .28s; }
.fader-dots { position: absolute; right: clamp(12px, 1.6vw, 20px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.fader-dots li { width: 6px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 22%, transparent); transition: height .35s cubic-bezier(.2,.8,.2,1), background .35s; }
.fader-dots li.is-on { height: 24px; background: var(--ink); }
@media (max-width: 900px) {
  .fader-pin { top: 80px; }
  .fader-dots { top: auto; bottom: 30px; right: 24px; transform: none; flex-direction: row; }
  .fader-dots li.is-on { height: 6px; width: 24px; }
  .fader-dots li { transition: width .35s cubic-bezier(.2,.8,.2,1), background .35s; }
  .fader-stage .project { grid-template-rows: auto 1fr; }
  .fader-stage .project-media.is-screen { order: -1; aspect-ratio: 16 / 11; padding: 20px 20px 0; }
  .fader-stage .project-body { justify-content: flex-start; padding: 24px; }
  .fader-stage .project h3 { margin-top: 16px; font-size: 26px; }
  .fader-stage .project p { font-size: 15px; }
  .fader-stage .project-cta { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .fader-stage.projects .project .project-body > *, .fader-stage .project-media > * { transform: none !important; transition: opacity .2s !important; }
}

/* Cards view: each card fades and rises into place as it scrolls into view */
.projects.is-mono:not(.fader-stage) .project.will-reveal { opacity: 0; translate: 0 40px; transition: opacity 1.6s ease, translate 1.8s cubic-bezier(.2,.8,.2,1), transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.projects.is-mono:not(.fader-stage) .project.will-reveal.is-in { opacity: 1; translate: 0 0; }

/* Home hero, matched to the reference: a soft light from the top, grain, and
   the headline inside a browser window (outer glow ring, glass frame with a
   bright top edge, toolbar with glowing dots, grainy content area), fading
   out at the bottom */
/* clip-path trims the window shadow at the bottom edge, where the fade has
   already turned to the page colour, so there is no visible seam */
/* The hero slides up under the top bar so its glow, grain and dots start at the very top */
.simple .hero { clip-path: inset(-120px 0 0 0); margin-top: -80px; padding: 112px 0 0; background: radial-gradient(circle closest-corner at 50% 0, color-mix(in srgb, var(--ink) 15%, transparent), transparent); }
.hero-noise, .hw-body::before { position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* Very faint dot grid behind the window; dots lean towards the cursor (js/hero-canvas.js) */
.hero-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: .85;
  -webkit-mask-image: linear-gradient(#000 50%, transparent 85%); mask-image: linear-gradient(#000 50%, transparent 85%); }
.hero-noise { z-index: -1; opacity: .1; inset: 0; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.hero-window { position: relative; max-width: 1044px; margin: 0 auto; padding: 8px; border-radius: 24px;
  background: radial-gradient(circle farthest-side at 50% 0, color-mix(in srgb, var(--ink) 20%, transparent), transparent);
  box-shadow: inset 0 0 8px rgba(0,0,0,.4), 0 0 60px rgba(0,0,0,.2), 0 30px 120px rgba(0,0,0,.8); }
:root:not([data-theme="dark"]) .hero-window { box-shadow: inset 0 0 8px rgba(0,0,0,.08), 0 0 60px rgba(0,0,0,.06), 0 30px 120px rgba(0,0,0,.18); }
.hw-main { position: relative; overflow: hidden; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 0 10px rgba(0,0,0,.1), 0 0 12px rgba(0,0,0,.4); }
:root:not([data-theme="dark"]) .hw-main { box-shadow: inset 0 0 10px rgba(0,0,0,.04), 0 0 12px rgba(0,0,0,.1); }
.hw-glare { position: absolute; top: 0; left: 0; right: 0; z-index: 2; height: 2px; background: linear-gradient(to right, transparent 10%, var(--card) 50%, transparent 90%); }
:root[data-theme="dark"] .hw-glare { background: linear-gradient(to right, transparent 10%, #fff 50%, transparent 90%); }
.hw-bar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 12px 0 20px; border-radius: 16px 16px 0 0;
  background: linear-gradient(to right, color-mix(in srgb, var(--ink) 10%, transparent), color-mix(in srgb, var(--ink) 50%, transparent) 50%, color-mix(in srgb, var(--ink) 10%, transparent));
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); box-shadow: 0 10px 20px 4px rgba(0,0,0,.2); }
:root:not([data-theme="dark"]) .hw-bar { background: linear-gradient(to right, color-mix(in srgb, var(--ink) 6%, transparent), color-mix(in srgb, var(--ink) 18%, transparent) 50%, color-mix(in srgb, var(--ink) 6%, transparent)); box-shadow: 0 10px 20px 4px rgba(0,0,0,.05); }
.hw-dots { display: flex; gap: 10px; }
.hw-dots i { width: 12px; height: 12px; border-radius: 100px; border: 1px solid rgba(16,16,16,.25); background: #F46B5D; box-shadow: 0 0 20px 2px #F46B5D; }
.hw-dots i:nth-child(2) { background: #F9BD4E; box-shadow: 0 0 20px 2px #F9BD4E; }
.hw-dots i:nth-child(3) { background: #57C353; box-shadow: 0 0 20px 2px #57C353; }
.hw-plus { width: 24px; height: 24px; color: var(--ink); opacity: .2; }
.hw-body { position: relative; display: grid; padding: 96px 72px 200px; background: color-mix(in srgb, var(--paper) 70%, transparent); }
.hw-body::before { content: ""; opacity: .14; }
:root:not([data-theme="dark"]) .hw-body::before { opacity: .08; }
.hw-text { position: relative; width: 100%; max-width: 882px; margin: 0 auto; }
.simple .hero .hw-text h1 { margin: 0; max-width: none; font-size: clamp(40px, 6.67vw, 96px); line-height: .9; font-weight: 500; letter-spacing: -2.2px; }
:root[data-theme="dark"] .hw-text h1 { text-shadow: 0 5px 10px rgba(0,87,255,.15), 0 -5px 10px rgba(255,90,0,.1), 0 -5px 25px rgba(255,255,255,.3); }
.hw-text h1 .pill { font-size: .62em; }
.hw-about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 72px; }
.hw-about p { font-size: 24px; line-height: 33.6px; font-weight: 500; color: var(--ink); }
.hw-about b { display: block; font-weight: 500; }
.hw-about p span { display: block; font-weight: 400; color: color-mix(in srgb, var(--ink) 50%, transparent); }
/* Brand logos in the left column, level with the intro: a small label over a
   quiet row of logos that light up on hover */
.simple .hw-brands { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 14px; margin: 0; padding: 0 0 4px; border: 0; }
.hw-brands small { font-size: 12px; line-height: 12px; letter-spacing: .2px; font-weight: 400; color: color-mix(in srgb, var(--ink) 50%, transparent); }
.brands-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.simple .hw-brands .brand { height: 20px; }
.simple .hw-brands .brand img { height: 18px; max-width: 104px; filter: brightness(0) opacity(.45); }
:root[data-theme="dark"] .simple .hw-brands .brand img { filter: brightness(0) invert(1) opacity(.5); }
.simple .hw-brands .brand:hover img { filter: brightness(0) opacity(.9); }
:root[data-theme="dark"] .simple .hw-brands .brand:hover img { filter: brightness(0) invert(1); }
.hw-down { position: absolute; left: 50%; bottom: 76px; translate: -50% 0; width: 48px; height: 48px; color: var(--ink); }
.hw-down svg { width: 48px; height: 48px; animation: hw-bob 2.6s ease-in-out infinite; }
@keyframes hw-bob { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hw-down svg { animation: none; } }
/* Fades the bottom of the window into the page */
.hero-fade { position: relative; z-index: 1; height: 202px; margin: -200px 0 -2px; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--paper) 0%, transparent), var(--paper) 60%); }
@media (max-width: 760px) {
  .simple .hero { margin-top: -68px; padding-top: 84px; }
  .hw-bar { height: 32px; padding: 0 10px 0 14px; }
  .hw-dots { gap: 7px; }
  .hw-dots i { width: 10px; height: 10px; }
  .hw-body { padding: 48px 20px 160px; }
  .simple .hero .hw-text h1 { letter-spacing: -1.2px; }
  .hw-about { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .hw-about .hw-brands { order: 2; margin-top: 8px; }
  .brands-row { gap: 10px 22px; }
  .hw-about p { font-size: 18px; line-height: 1.45; }
  .hw-down { bottom: 96px; }
}

/* Selected work cards share the grain of the browser window at the top */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .14 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* ...and its colour: the page colour lifted slightly by the text colour, as the window is */
:root { --window: color-mix(in srgb, var(--ink) 5%, var(--paper)); }
.projects.is-mono .project { --pc: var(--window); }
.projects.is-mono .project, .fader-stage, .sc-slide, .sc-thumb { background-color: var(--window); background-image: var(--grain); }
.fader-stage .project { background-image: none; }

/* --------------------------------------------------------------------------
   Case study · clean layout (body.cs-clean), modelled on the reference:
   centred title with a soft glow, cover in a glass window, a two-column
   overview, a contents list on the right, sections that open with a glowing
   dot + small label + big heading, and media in large rounded highlight cards.
   Remove the class from <body> to switch it off.
   -------------------------------------------------------------------------- */
.cs-clean {
  --t-100: var(--ink); --t-60: color-mix(in srgb, var(--ink) 60%, transparent); --t-40: color-mix(in srgb, var(--ink) 40%, transparent);
  --t-25: color-mix(in srgb, var(--ink) 25%, transparent); --hair: color-mix(in srgb, var(--ink) 20%, transparent);
  --card-line: color-mix(in srgb, var(--ink) 12%, transparent); --tint: var(--c);
}
.cs-clean main { position: relative; }

/* Title area */
.cs-clean .case-hero { background: radial-gradient(circle farthest-side at 50% 0, color-mix(in srgb, var(--tint) 35%, transparent), transparent); color: var(--ink); padding: 48px 0 0; overflow: visible; }
.cs-clean .case-hero::before { content: ""; position: absolute; inset: 0; opacity: .1; pointer-events: none; background: var(--grain); -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.cs-clean .case-hero::after { display: none; }
.cs-clean .back { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px 10px 12px; border-radius: 100px; background: color-mix(in srgb, var(--ink) 15%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 4%, transparent); font-size: 16px; font-weight: 500; letter-spacing: -0.5px; color: var(--ink); }
.cs-clean .back:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 22%, transparent); }
.cs-title { margin: 24px auto 0; text-align: center; }
.cs-clean .cs-title h1 { display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; max-width: none; margin: 0; font-size: clamp(40px, 5vw, 72px); line-height: 1.11; font-weight: 500; letter-spacing: -1px;
  background: linear-gradient(var(--ink) 50%, color-mix(in srgb, var(--ink) 0%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .cs-title h1 { text-shadow: 0 5px 15px rgba(0,87,255,.2), 0 -5px 15px rgba(255,90,0,.15), 0 0 30px rgba(255,255,255,.25); }
.cs-year { margin-top: 16px; font-size: 18px; line-height: 22px; color: var(--ink); }
/* Cover: a slim browser window, no card or outline, fading into the page */
.cs-frame { position: relative; max-width: 1000px; margin: 48px auto 0; }
.cs-frame-in { position: relative; z-index: 1; max-width: 710px; margin: 0 auto; }
.cs-clean .case-cover.is-screen { margin: 0; border-radius: 0; background: none; padding: 0; }
@media (max-width: 760px) {
  .cs-frame { margin-top: 32px; }
  .cs-frame-in { margin: 0 6px; }
}
/* The cover melts into the page at the bottom instead of ending in a hard edge */
/* An eased fade (bright for longer, then a long soft tail) so there is no visible
   point where it starts */
.cs-clean .cs-frame { position: relative; -webkit-mask-image: linear-gradient(#000 40%, rgba(0,0,0,.92) 48%, rgba(0,0,0,.76) 57%, rgba(0,0,0,.55) 66%, rgba(0,0,0,.34) 75%, rgba(0,0,0,.17) 84%, rgba(0,0,0,.06) 92%, transparent 99%); mask-image: linear-gradient(#000 40%, rgba(0,0,0,.92) 48%, rgba(0,0,0,.76) 57%, rgba(0,0,0,.55) 66%, rgba(0,0,0,.34) 75%, rgba(0,0,0,.17) 84%, rgba(0,0,0,.06) 92%, transparent 99%); }
/* A soft glow in the project colour behind the cover, so the image melts into
   colour rather than flat grey */
.cs-clean .case-hero { overflow-x: clip; }
.cs-clean .case-hero .wrap { position: relative; isolation: isolate; }
.cs-clean .case-hero .wrap::after { content: ""; position: absolute; z-index: -1; left: 50%; bottom: -10%; width: min(1200px, 120%); height: 70%; translate: -50% 0; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tint) 30%, transparent), transparent); filter: blur(20px); }
/* Website covers sit in a browser window: tab row and address bar drawn in
   the card's own colour, so the mock blends into the card behind it */
.cs-browser { position: relative; width: 100%; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--window); }
.cs-chrome { --ch: color-mix(in srgb, var(--ink) 6%, var(--window)); }
.cs-tabs { display: flex; align-items: flex-end; gap: 10px; height: 36px; padding: 0 12px; }
.cs-dots { display: flex; gap: 7px; align-self: center; margin-right: 6px; }
.cs-dots i { width: 11px; height: 11px; border-radius: 50%; background: #F46B5D; }
.cs-dots i:nth-child(2) { background: #F9BD4E; }
.cs-dots i:nth-child(3) { background: #57C353; }
.cs-tab { width: min(180px, 24%); height: 28px; border-radius: 9px 9px 0 0; background: var(--ch); }
.cs-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: color-mix(in srgb, var(--ink) 55%, transparent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cs-tabs .cs-ico { align-self: center; }
.cs-kebab circle { fill: color-mix(in srgb, var(--ink) 55%, transparent); stroke: none; }
.cs-bar { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 12px; background: var(--ch); border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.cs-url { flex: 1; height: 24px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 7%, var(--window)); }
.cs-browser .screen-split, .cs-browser > img, .is-screen .cs-browser img { border-radius: 0; box-shadow: none; }
.cs-browser > img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) {
  .cs-tabs { height: 26px; gap: 6px; padding: 0 8px; }
  .cs-dots { gap: 5px; margin-right: 2px; }
  .cs-dots i { width: 8px; height: 8px; }
  .cs-tab { height: 20px; }
  .cs-bar { height: 28px; gap: 8px; padding: 0 8px; }
  .cs-ico { width: 12px; height: 12px; }
  .cs-url { height: 18px; }
}
/* Full-length page screenshots: show the top of the page and let the rest run into the fade */
.is-screen .screen-split.is-tall { aspect-ratio: 16 / 9.2; border-radius: 12px 12px 0 0; }
.is-screen .screen-split.is-tall img { height: 100%; object-fit: cover; object-position: left top; }
.is-screen .screen-split.is-tall img.right { object-position: right top; }

/* Overview: details on the left, the story on the right */
.cs-overview { padding: 56px 0 104px; }
.cs-two, .cs-clean .chapter-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; max-width: 1044px; margin: 0 auto; }
.cs-ov-left { display: grid; gap: 32px; align-content: start; }
.cs-ov-left > div, .cs-ov-right { display: grid; gap: 8px; align-content: start; }
.cs-ov-left h3, .cs-ov-right h3 { font-size: 14px; line-height: 18px; font-weight: 500; letter-spacing: .2px; color: var(--t-100); }
.cs-ov-left p, .cs-ov-right p, .cs-clean .prose p, .cs-clean .chapter > div > p:not(.list-title) { font-size: 16px; line-height: 24px; font-weight: 400; letter-spacing: .4px; color: var(--t-60); }
.cs-ov-left p { padding-right: 48px; }
.cs-ov-right p + p { margin-top: 16px; }
.cs-clean b, .cs-clean strong { font-weight: 500; color: var(--t-100); }
:root[data-theme="dark"] .cs-ov-left b { text-shadow: 0 0 10px rgba(242,242,242,.4); }

/* Contents list, fixed on the right where there's room */
.cs-toc { display: none; }
@media (min-width: 1280px) {
  .cs-toc { position: fixed; z-index: 40; top: 140px; right: max(24px, calc((100vw - 1044px) / 2 - 168px)); width: 120px; display: flex; flex-direction: column; }
  .cs-toc p { margin-bottom: 8px; font-size: 10px; line-height: 18px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--t-40); }
  .cs-toc a { padding: 4px 0; font-size: 11px; line-height: 17px; font-weight: 400; color: var(--t-40); transition: color .2s; }
  .cs-toc a:hover { color: var(--t-100); }
  .cs-toc a.is-on { color: var(--t-100); font-weight: 500; }
}

/* Sections: divider, glowing dot + small label, big heading, text on the right */
/* The divider sits halfway between sections, with equal space above and below */
.cs-clean .chapter { display: block; max-width: 1044px; margin: 112px auto 0; padding: 112px 0 0; border-top: 0; position: relative; }
.cs-clean .chapter:first-of-type { margin-top: 0; padding-top: 0; }
.cs-clean .chapter::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--hair); }
.cs-clean .chapter:first-of-type::before { display: none; }
.cs-clean .chapter-label { position: static; display: flex; align-items: center; gap: 12px; }
.cs-clean .chapter-label .n { display: none; }
.cs-clean .chapter .chapter-label p { margin: 0; font-size: 11px; line-height: 19px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--t-40); }
.cs-clean .chapter-label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 20px color-mix(in srgb, var(--ink) 90%, transparent); }
.cs-clean .chapter h2 { margin-top: 24px; max-width: none; font-size: clamp(30px, 3vw, 40px); line-height: 1.25; font-weight: 500; letter-spacing: -0.1px; }
.cs-clean .chapter .prose { margin: 48px 0 0 auto; width: calc(50% - 28px); max-width: none; }
.cs-clean .prose p { max-width: none; }
.cs-clean .list-title { margin-top: 24px; font-size: 14px; font-weight: 500; letter-spacing: .2px; color: var(--t-100); }
.cs-clean .facts-list li { font-size: 16px; line-height: 24px; color: var(--t-60); }
.cs-clean .facts-list li::before { background: var(--t-40); }
.cs-clean .chapter .block { margin-top: 64px; }

/* Highlight cards: large rounded panels with a coloured glare along the top */
.cs-clean :is(.mocks, .ia, .fidelity, .token-viewer, .challenge-compare, .phones, .card-fan, .figure.block, .block:has(> .figure), .compare) { position: relative; padding: 48px 24px 32px; border-radius: 24px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  background-image: radial-gradient(circle farthest-side at 50% 0, color-mix(in srgb, var(--tint) 8%, transparent), transparent 12%);
  box-shadow: 0 40px 100px rgba(0,0,0,.4); }
:root:not([data-theme="dark"]) .cs-clean :is(.mocks, .ia, .fidelity, .token-viewer, .challenge-compare, .phones, .card-fan, .figure.block, .block:has(> .figure), .compare) { box-shadow: 0 40px 100px rgba(0,0,0,.08); }
.cs-clean :is(.mocks, .ia, .fidelity, .token-viewer, .challenge-compare, .phones, .card-fan, .figure.block, .block:has(> .figure), .compare)::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent 15%, color-mix(in srgb, var(--tint) 70%, transparent) 50%, transparent 95%); }
.cs-clean .mocks figure img, .cs-clean .mock-blank, .cs-clean .figure .frame { border-radius: 16px; border: 1px solid var(--card-line); }
.cs-clean .mocks figcaption b, .cs-clean .fidelity figcaption b { font-size: 14px; font-weight: 500; }
.cs-clean .mocks figcaption, .cs-clean .fidelity figcaption, .cs-clean .mocks-label span { font-size: 12px; font-weight: 400; letter-spacing: .2px; color: var(--t-40); }
.cs-clean .mocks-label { font-size: 20px; font-weight: 500; letter-spacing: .2px; }

/* Small cards for stats, steps and reflections */
.cs-clean .big-stats, .cs-clean .reflections { gap: 16px; }
.cs-clean :is(.big-stat, .big-stat.dark, .reflection, .steps li) { padding: 24px; border-radius: 16px; border: 1px solid var(--card-line); background: var(--paper); box-shadow: 0 15px 40px rgba(0,0,0,.1); }
.cs-clean :is(.big-stat, .big-stat.dark) b { font-size: clamp(32px, 3vw, 40px); font-weight: 500; letter-spacing: -1px; color: var(--t-100); }
.cs-clean :is(.big-stat, .big-stat.dark) span { font-size: 14px; font-weight: 400; color: var(--t-60); }
.cs-clean .reflections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-clean .reflection { padding: 24px; }
.cs-clean .reflection::before { position: static; display: grid; margin-bottom: 16px; width: 32px; height: 32px; background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); font-weight: 500; }
.cs-clean .reflection h3, .cs-clean .steps h3 { font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: .2px; }
.cs-clean .reflection p, .cs-clean .steps p { font-size: 16px; line-height: 24px; color: var(--t-60); }
.cs-clean .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cs-clean .steps li { grid-template-columns: 1fr; gap: 12px; }
.cs-clean .steps li::before { padding: 0; font-size: 11px; font-weight: 500; letter-spacing: 1.5px; color: var(--t-40); }

/* The challenge: same section style as the others, no inverted panel */
:root .cs-clean .chapter.challenge { --cc-fg: var(--ink); --cc-muted: var(--t-60); --cc-line: var(--hair); background: none; color: var(--ink); border-radius: 0; padding: 112px 0 0; margin: 112px auto 0; }
.cs-clean .challenge .chapter-label .n { display: none; }
.cs-clean .chapter-label { top: auto; }

/* Quotes read as a centred callout, like the reference's highlight line */
.cs-clean .quote, .cs-clean .chapter > div > p.quote { margin-inline: auto; max-width: 30ch; padding: 0; border: 0; background: none; text-align: center; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.4; font-weight: 500; letter-spacing: .2px; color: var(--t-100); }
.cs-clean .quote::before, .cs-clean .quote::after { display: none; }
.cs-clean .figure .frame { background: var(--window); }

/* Next case study */
.cs-clean .next { max-width: 1044px; margin: 120px auto 0; }

@media (max-width: 760px) {
  .cs-two, .cs-clean .chapter-body { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cs-overview { padding: 64px 0; }
  .cs-ov-left p { padding-right: 0; }
  .cs-clean .chapter, :root .cs-clean .chapter.challenge { margin-top: 64px; padding-top: 64px; }
  .cs-clean .chapter:first-of-type { margin-top: 0; padding-top: 0; }
  .cs-clean .chapter .prose { width: auto; margin-top: 24px; }
  .cs-clean .steps, .cs-clean .reflections { grid-template-columns: minmax(0, 1fr); }
  .cs-frame { margin-top: 40px; }
  .cs-clean :is(.mocks, .ia, .fidelity, .token-viewer, .challenge-compare, .phones, .card-fan, .figure.block, .block:has(> .figure), .compare) { padding: 32px 16px 24px; }
}

/* A short title in the left column beside each section's text, as in the reference */
.cs-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; margin-top: 48px; }
.cs-clean .cs-pair .prose, .cs-clean .cs-pair > p { margin: 0; width: auto; }
.cs-sub { padding-right: 24px; font-size: 24px; line-height: 30px; font-weight: 500; letter-spacing: .1px; color: var(--t-100); }
@media (max-width: 760px) {
  .cs-pair { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 24px; }
  .cs-sub { font-size: 20px; line-height: 26px; }
}

/* Case studies: each piece fades up as it scrolls into view, like Apple's
   product pages (js in main.js). Skipped when reduced motion is on. */
@media (prefers-reduced-motion: no-preference) {
  .has-reveal .cs-reveal { opacity: 0; translate: 0 40px; transition: opacity 1s ease, translate 1.2s cubic-bezier(.2,.8,.2,1); transition-delay: var(--delay, 0s); }
  .has-reveal .cs-reveal.is-in { opacity: 1; translate: 0 0; }
}

/* Each case study section sits in its own card, in the same colour and grain
   as the Selected work cards, instead of being split by divider lines */
.cs-clean .chapter, :root .cs-clean .chapter.challenge { margin: 24px auto 0; padding: clamp(32px, 4.4vw, 64px); border-radius: 28px;
  background: var(--window); background-image: var(--grain); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
.cs-clean .chapter:first-of-type { margin-top: 0; padding-top: clamp(32px, 4.4vw, 64px); }
.cs-clean .chapter::before { display: none; }
.cs-clean :is(.big-stat, .big-stat.dark, .reflection, .steps li) { background: var(--paper); }
@media (max-width: 760px) {
  .cs-clean .chapter, :root .cs-clean .chapter.challenge { margin-top: 16px; padding: 24px 20px; border-radius: 20px; }
  .cs-clean .chapter:first-of-type { margin-top: 0; padding-top: 24px; }
}

/* Information architecture, in the style of the reference flow diagram: each
   section is a pill with a glowing dot and a number (0.0, 1.0 …), and a thin
   line runs down through its numbered pages (0.1, 0.2 …). Numbers come from
   CSS counters, so the HTML stays a plain list. */
.cs-clean .ia-panel { padding: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 40px); border-radius: 24px; background: var(--paper); border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.cs-clean .ia-sitemap { counter-reset: ia-col -1; gap: 24px 16px; }
.cs-clean .ia-col { position: relative; counter-increment: ia-col; counter-reset: ia-item; padding-left: 0; }
.cs-clean .ia-col::before { content: ""; position: absolute; left: 4px; top: 22px; bottom: 8px; width: 1px; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.cs-clean .ia-col::after { content: ""; position: absolute; left: 0; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 12px 2px color-mix(in srgb, var(--ink) 55%, transparent); }
.cs-clean .ia-col b { position: relative; display: inline-flex; justify-content: flex-start; gap: 8px; margin-left: 20px; padding: 9px 16px 9px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 4%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  font-size: 15px; font-weight: 500; letter-spacing: .1px; color: var(--ink); white-space: nowrap; }
.cs-clean .ia-col b::before { content: counter(ia-col) ".0"; font: 500 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: color-mix(in srgb, var(--ink) 45%, transparent); align-self: center; }
.cs-clean .ia-col b::after { content: none; }
.cs-clean .ia-col ul { margin-top: 36px; padding-left: 0; gap: 22px; }
.cs-clean .ia-col li { position: relative; counter-increment: ia-item; padding: 0 0 0 20px; font-size: 14px; line-height: 1.35; color: color-mix(in srgb, var(--ink) 72%, transparent); }
.cs-clean .ia-col li::before { content: counter(ia-col) "." counter(ia-item); display: block; margin-bottom: 4px; font: 500 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: color-mix(in srgb, var(--ink) 40%, transparent); }
.cs-clean .ia-col li::after { content: ""; position: absolute; left: 1px; top: 1px; width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 50%, var(--paper)); }
.cs-clean .ia-col li:hover { color: var(--ink); transform: none; }
/* The line stops at each column's last page: columns hug their content and the
   last item paints over the line below its dot */
.cs-clean .ia-col { align-self: start; }
.cs-clean .ia-col::before { bottom: 0; }
.cs-clean .ia-col li:last-child { background: linear-gradient(var(--paper), var(--paper)) 0 8px / 10px 100% no-repeat; }
@media (max-width: 760px) {
  .cs-clean .ia-sitemap { gap: 36px 12px; }
  .cs-clean .ia-col b { font-size: 14px; padding: 8px 12px 8px 10px; }
}

/* Design system panels use the same dark rounded panel as the information
   architecture */
.cs-clean :is(.palette-brand, .type-scale, .grid-spec), .cs-clean .token-viewer .shadow-grid { padding: clamp(28px, 3.4vw, 48px); border-radius: 24px; background: var(--paper); border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.cs-clean .palette { gap: 16px; }

/* Case study type scale, matched to the reference case study page:
   title 72/80, year 18/22, section label 11/19 uppercase, heading 40/50,
   subheading 24/30, card heading 20/28, callout 28/39, body 16/24 light
   (300) with .4px tracking at 60% strength, small labels 14/18 */
.cs-clean .chapter .chapter-label > p:not(.list-title):not(.quote) { font-size: 11px; line-height: 19px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--t-40); max-width: none; }
:root .cs-clean .chapter :is(.big-stat, .big-stat.dark) span { font-size: 16px; line-height: 24px; font-weight: 300; letter-spacing: .4px; }
.cs-clean :is(.cs-ov-left p, .cs-ov-right p, .prose p, .facts-list li, .reflection p, .steps p, .ia-col li, .big-stat span, .challenge-steps p),
.cs-clean .chapter > div > p:not(.list-title):not(.quote) { font-size: 16px; line-height: 24px; font-weight: 300; letter-spacing: .4px; }
.cs-clean :is(.reflection p, .steps p, .big-stat span, .facts-list li) { color: var(--t-60); }
.cs-clean .ia-col li { color: color-mix(in srgb, var(--ink) 72%, transparent); }
.cs-clean :is(.mocks, .fidelity) figcaption b { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: .2px; }
.cs-clean :is(.mocks, .fidelity) figcaption, .cs-clean .mocks-label span { font-size: 14px; line-height: 20px; font-weight: 300; letter-spacing: .2px; }
.cs-clean .tab { font-size: 16px; font-weight: 500; letter-spacing: .2px; }
.cs-clean .cs-toc a { font-weight: 300; }
.cs-clean .cs-toc a.is-on { font-weight: 500; }

/* Info cards (e.g. "Two platforms") match the step and reflection cards:
   page-colour card with a faint outline, small uppercase grey label,
   20/28 heading and light 16/24 body */
.cs-clean .card:not([style]), .cs-clean .card.tint, .cs-clean .card.solid { padding: 24px; border-radius: 16px; border: 1px solid var(--card-line); background: var(--paper); color: var(--ink); box-shadow: 0 15px 40px rgba(0,0,0,.1); }
.cs-clean .card .k { display: block; font-size: 11px; line-height: 19px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--t-40); }
.cs-clean .card h3 { margin-top: 12px; font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: .2px; color: var(--t-100); }
.cs-clean .card p { margin-top: 8px; font-size: 16px; line-height: 24px; font-weight: 300; letter-spacing: .4px; color: var(--t-60); }

/* A small icon in a soft circle beside each step number */
.cs-clean .steps li:has(.step-ico) { position: relative; }
.cs-clean .steps li:has(.step-ico)::before { padding-left: 46px; line-height: 34px; }
.step-ico { position: absolute; top: 24px; left: 24px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 8%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.step-ico svg { width: 17px; height: 17px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.cs-clean .card:has(.step-ico) { position: relative; }
.cs-clean .card:has(.step-ico) .k { padding-left: 46px; line-height: 34px; }

/* Drag-to-compare frame: Trackside underneath, SportNation on top and cut at
   --pos. A transparent range input covers the frame, so dragging, clicking,
   touch and arrow keys all work (js in main.js keeps --pos in sync). */
.compare { margin: 0; }
.compare-frame { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 16px; border: 1px solid var(--card-line, color-mix(in srgb, var(--ink) 12%, transparent)); background: var(--paper); }
.compare-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; user-select: none; -webkit-user-drag: none; }
.compare-b { clip-path: inset(0 0 0 var(--pos)); }
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; translate: -1px 0; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15), 0 0 16px rgba(0,0,0,.35); pointer-events: none; }
.compare-knob { position: absolute; top: 50%; left: 50%; translate: -50% -50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: #16161A; box-shadow: 0 6px 20px rgba(0,0,0,.35); transition: scale .2s; }
.compare-knob svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.compare-frame:hover .compare-knob, .compare-range:focus-visible ~ .compare-line .compare-knob { scale: 1.08; }
.compare-tag { position: absolute; top: 14px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; letter-spacing: .3px; color: #fff; background: rgba(16,16,20,.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none; transition: opacity .2s; }
.compare-tag-a { left: 14px; }
.compare-tag-b { right: 14px; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.compare-range:focus-visible + * { outline: none; }
.compare figcaption { margin-top: 14px; font-size: 14px; line-height: 20px; font-weight: 300; letter-spacing: .2px; color: var(--t-40, var(--muted)); text-align: center; }
@media (max-width: 760px) {
  .compare-frame { aspect-ratio: 4 / 3; border-radius: 12px; }
  .compare-tag { top: 8px; padding: 3px 8px; font-size: 10px; }
  .compare-tag-a { left: 8px; }
  .compare-tag-b { right: 8px; }
  .compare-knob { width: 32px; height: 32px; }
  .compare-knob svg { width: 15px; height: 15px; }
}

/* Layered phone stage: three framed phones at staggered heights, cropped by a
   rounded card with a deep glow in the project colour (always dark, like a
   product shot), and a caption with a small tag underneath */
.phone-stage { margin: 0; }
.ps-card { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 24px;
  background: radial-gradient(ellipse 75% 65% at 50% 58%, color-mix(in srgb, var(--tint, var(--c)) 34%, #0B1018), #07090D 78%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.ps-phone { position: absolute; width: 24%; aspect-ratio: 750 / 1714; padding: 1.1%; border-radius: 15% / 7%; background: #0C0C0E; cursor: zoom-in;
  box-shadow: inset 0 0 0 1.5px #3A3A40, 0 0 0 1px rgba(0,0,0,.6), 0 30px 60px -20px rgba(0,0,0,.7); transition: translate .5s cubic-bezier(.2,.8,.2,1); box-sizing: content-box; }
.ps-phone { container-type: inline-size; }
/* The screen: a status bar strip (time on the left, the island in the middle)
   above the screenshot, so the island never covers the app's header */
.ps-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 12.5% / 5.8%; background: var(--status-bar, #0E0F12); padding-top: 12%; box-sizing: border-box; }
.ps-screen::before { content: "9:41"; position: absolute; top: 3.6cqw; left: 10%; font: 600 5.2cqw/1 Manrope, system-ui, sans-serif; color: #fff; letter-spacing: .2px; }
.ps-screen::after { content: ""; position: absolute; top: 4.4cqw; right: 9%; width: 8cqw; height: 3.6cqw; border-radius: 1.2cqw; border: .5cqw solid rgba(255,255,255,.85); box-sizing: border-box; }
.ps-phone img { display: block; width: 100%; height: auto; aspect-ratio: 750 / 1624; object-fit: cover; object-position: top; }
/* Screenshots exported with a faint light edge: scale up a touch so the screen's edge hides it */
.ps-phone img { scale: 1.012; clip-path: inset(0.45% 0 0 0); }
.ps-island { position: absolute; top: 3.2%; left: 50%; width: 30%; height: 3.6%; translate: -50% 0; border-radius: 999px; background: #000; }
.ps-1 { left: 9%; top: -14%; }
.ps-2 { left: 50%; top: 5%; translate: -50% 0; }
.ps-3 { right: 9%; top: 34%; }
.ps-card:hover .ps-1 { translate: 0 -6px; }
.ps-card:hover .ps-2 { translate: -50% -6px; }
.ps-card:hover .ps-3 { translate: 0 -6px; }
.phone-stage figcaption { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; line-height: 20px; font-weight: 300; letter-spacing: .2px; color: var(--t-40, var(--muted)); }
.phone-stage figcaption b { font-weight: 500; color: var(--t-60, var(--ink)); margin-right: 4px; }
.ps-tag { padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); font: 500 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .8px; text-transform: uppercase; color: var(--t-60, var(--muted)); }
@media (max-width: 760px) {
  .ps-card { aspect-ratio: 4 / 5; border-radius: 18px; }
  .ps-phone { width: 34%; }
  .ps-1 { left: -4%; top: -6%; }
  .ps-2 { top: 14%; }
  .ps-3 { right: -4%; top: 34%; }
  .phone-stage figcaption { justify-content: flex-start; flex-wrap: wrap; }
}
/* Until a screen is added, the phone shows its name */
.ps-empty { position: absolute; inset: 12% 0 0; display: grid; place-content: center; gap: 1.5cqw; text-align: center; font: 500 6cqw/1.2 Manrope, system-ui, sans-serif; color: rgba(255,255,255,.75); }
.ps-empty small { font-size: 4.2cqw; font-weight: 300; color: rgba(255,255,255,.45); }
.ps-screen img { position: relative; }

/* Realistic phones: titanium edge with a sheen around a black bezel, side
   buttons, iOS status bar (time, signal, wifi, battery), camera lens in the
   island, home indicator, and a faint glass reflection. Frame sizes use the
   card's width (em, with the phone's font-size set to 1cqw of the card); screen details use the phone's width. */
.ps-card { container-type: inline-size; }
.ps-phone { font-size: 1cqw; padding: .5em; border: .26em solid transparent; border-radius: 4.4em;
  background: linear-gradient(#060607, #060607) padding-box,
              linear-gradient(140deg, #ECECEF 0%, #8E8E94 16%, #F6F6F8 32%, #6A6A70 50%, #D2D2D7 70%, #78787E 86%, #EFEFF2 100%) border-box;
  box-shadow: 0 0 0 .06em rgba(0,0,0,.85), 0 2.4em 4.8em -1.2em rgba(0,0,0,.75), 0 .6em 1.2em -.4em rgba(0,0,0,.5); }
/* Side buttons: action + volume on the left, power on the right */
.ps-phone::before, .ps-phone::after { content: ""; position: absolute; width: .3em; pointer-events: none; }
.ps-phone::before { left: -.56em; top: 15%; height: 25%; border-radius: .25em 0 0 .25em;
  background: linear-gradient(to bottom, #A4A4AA 0 10%, transparent 10% 22%, #A4A4AA 22% 58%, transparent 58% 66%, #A4A4AA 66% 100%); }
.ps-phone::after { right: -.56em; top: 25%; height: 15%; border-radius: 0 .25em .25em 0; background: linear-gradient(90deg, #8A8A90, #B8B8BE); }
/* Screen corners follow the frame: outer radius minus the border and bezel */
.ps-screen { border-radius: calc(4.4em - .76em); }
.ps-screen::before { content: none; }
.ps-screen::after { content: ""; position: absolute; inset: 0; top: 0; right: 0; width: auto; height: auto; z-index: 3; border: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,.03) 26%, rgba(255,255,255,0) 40%); }
/* Status bar */
.ps-status { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; height: 12cqw; padding: 0 7.5cqw 0 11cqw; color: #fff; }
.ps-status b { font: 600 4.8cqw/1 -apple-system, "SF Pro Text", Manrope, system-ui, sans-serif; letter-spacing: -.1cqw; }
.ps-icons { display: flex; align-items: center; gap: 1.5cqw; }
.ps-signal { width: 4.8cqw; height: 3.2cqw; fill: currentColor; }
.ps-wifi { width: 4.6cqw; height: 3.4cqw; fill: currentColor; }
.ps-batt { position: relative; display: grid; place-items: center; min-width: 6.6cqw; height: 3.6cqw; padding: 0 .5cqw; border-radius: 1.15cqw; background: #fff; }
.ps-batt span { font: 700 2.7cqw/1 -apple-system, "SF Pro Text", Manrope, system-ui, sans-serif; color: #000; }
.ps-batt::after { content: ""; position: absolute; right: -.75cqw; top: 50%; width: .45cqw; height: 1.3cqw; translate: 0 -50%; border-radius: 0 .4cqw .4cqw 0; background: rgba(255,255,255,.55); }
/* Island with a camera lens */
.ps-island { top: 3.4%; width: 31%; height: 3.5%; box-shadow: 0 0 0 .25cqw rgba(0,0,0,.4); }
.ps-island::after { content: ""; position: absolute; right: 9%; top: 50%; width: 2.6cqw; height: 2.6cqw; translate: 0 -50%; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3A4A6A 0 18%, #121826 40%, #050608 70%); box-shadow: inset 0 0 0 .3cqw #0E0F14; }
/* Home indicator: white, blended so it reads dark on light screens and light on dark ones */
.ps-home { position: absolute; bottom: 1.5%; left: 50%; z-index: 2; width: 35%; height: 1.25cqw; translate: -50% 0; border-radius: 1cqw; background: #fff; mix-blend-mode: difference; pointer-events: none; }

/* Stages, laid out in a row: every phone or browser window sits whole inside
   the glowing card with a clean label underneath. Each item is a container,
   so the phone frame scales with its own width (font-size = 1/24 of it). */
.ps-card { display: flex; justify-content: center; align-items: flex-start; gap: 5%; aspect-ratio: auto; padding: 6% 6% 4.5%; }
.ps-item { position: relative; flex: 0 0 22%; container-type: inline-size; display: grid; justify-items: center; }
.ps-card.is-4 { gap: 3.5%; padding-inline: 5%; }
.ps-card.is-4 .ps-item { flex-basis: 20%; }
.ps-card.is-4 .ps-label { width: 112%; }
.ps-phone, .ps-1, .ps-2, .ps-3 { position: relative; left: auto; right: auto; top: auto; translate: none; }
.ps-phone { font-size: 4.17cqw; width: calc(100% - 1.52em); display: grid; }
.ps-screen { height: auto; } /* stretches to the phone, even without an image */
.ps-card:hover :is(.ps-1, .ps-2, .ps-3) { translate: none; }
.ps-item:hover .ps-phone, .ps-item:hover .ds-window { translate: 0 -6px; }
.ps-label { width: 120%; margin: 7cqw 0 0; text-align: center; font: 300 14px/20px Manrope, system-ui, sans-serif; letter-spacing: .2px; color: rgba(255,255,255,.55); }
.ps-label b { display: block; font-weight: 500; font-size: 16px; line-height: 24px; color: #fff; }
.phone-stage figcaption { justify-content: flex-start; }
.phone-stage + .phone-stage { margin-top: 24px; }
/* SportNation: a stronger green glow */
.ps-sn .ps-card { background: radial-gradient(ellipse 80% 70% at 50% 55%, color-mix(in srgb, var(--sn) 62%, #06120B), #040806 82%); }

/* Desktop: browser windows showing the whole screen, nothing cropped */
.desk-stage .ps-card { gap: 4%; padding: 5.5% 5% 4%; }
.desk-stage .ps-item { flex: 1 1 0; }
.ds-window { width: 100%; overflow: hidden; border-radius: 1.6cqw; background: #1C1D21; cursor: zoom-in; transition: translate .5s cubic-bezier(.2,.8,.2,1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 0 0 1px rgba(0,0,0,.6), 0 4cqw 8cqw -3cqw rgba(0,0,0,.75); }
.ds-window:not([data-zoom]) { cursor: default; }
.ds-bar { display: flex; align-items: center; gap: 3cqw; height: 5.4cqw; padding: 0 2.4cqw; }
.ds-dots { display: flex; gap: .9cqw; }
.ds-dots i { width: 1.25cqw; height: 1.25cqw; border-radius: 50%; background: #FF5F57; }
.ds-dots i:nth-child(2) { background: #FEBC2E; }
.ds-dots i:nth-child(3) { background: #28C840; }
.ds-url { flex: 0 1 38%; height: 2.8cqw; margin-inline: auto; border-radius: 99px; background: rgba(255,255,255,.08); }
.ds-screen { position: relative; aspect-ratio: 16 / 10; margin: 0 .5cqw .5cqw; overflow: hidden; border-radius: 0 0 1.2cqw 1.2cqw; background: #0E0F12; }
.ds-screen img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.ds-screen .ps-empty { inset: 0; gap: .8cqw; font-size: 3cqw; }
.ds-screen .ps-empty small { font-size: 2.1cqw; }
.desk-stage .ps-label { margin-top: 3.5cqw; }

@media (max-width: 760px) {
  .ps-card { aspect-ratio: auto; gap: 4%; padding: 8% 4% 6%; border-radius: 18px; }
  .ps-item { flex-basis: 29%; }
  .ps-phone { width: calc(100% - 1.52em); }
  .ps-card.is-4 { flex-wrap: wrap; row-gap: 28px; }
  .ps-card.is-4 .ps-item { flex-basis: 40%; }
  .ps-label { font-size: 11px; line-height: 15px; }
  .ps-label b { font-size: 13px; line-height: 18px; }
  .ps-label { width: 100%; }
  .ps-label span { display: none; }
  .desk-stage .ps-card { flex-direction: column; align-items: stretch; gap: 24px; padding: 6% 5%; }
  .desk-stage .ps-label span { display: block; }
}

/* Low-fi and mid-fi wireframes: simple outline phones on a blueprint */
.bp-card { margin-top: 4px; border-radius: 20px;
  background:
    linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px) 0 0 / 100px 100px,
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px) 0 0 / 100px 100px,
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 20px 20px,
    radial-gradient(ellipse 80% 70% at 50% 45%, #1E5BB8, #0E3170 85%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.bp-phone { position: relative; width: 100%; padding: 3.5cqw; border: 1.5px solid rgba(255,255,255,.85); border-radius: 13cqw; box-sizing: border-box; cursor: zoom-in; transition: translate .5s cubic-bezier(.2,.8,.2,1); }
.bp-phone::before { content: ""; position: absolute; top: 6cqw; left: 50%; z-index: 1; width: 22%; height: 4.4cqw; translate: -50% 0; border-radius: 99px; border: 1.5px solid rgba(255,255,255,.85); background: #1A4FA3; }
.bp-phone img { display: block; width: 100%; aspect-ratio: 375 / 812; border-radius: 9.5cqw; animation: fid-in .35s ease both; }
.ps-item:hover .bp-phone { translate: 0 -6px; }
.bp-card .ps-label { color: rgba(255,255,255,.65); }
/* Blueprint glow: the same dark card as the other stages, with a blue glow
   whose centre shows the blueprint grid, fading out towards the edges */
.bp-card { background: radial-gradient(ellipse 75% 65% at 50% 55%, color-mix(in srgb, #2F7BFF 46%, #0B1018), #07090D 78%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.bp-card::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(150,200,255,.34) 1px, transparent 1px) -1px -1px / 96px 96px,
    linear-gradient(90deg, rgba(150,200,255,.34) 1px, transparent 1px) -1px -1px / 96px 96px,
    linear-gradient(rgba(150,200,255,.14) 1px, transparent 1px) -1px -1px / 24px 24px,
    linear-gradient(90deg, rgba(150,200,255,.14) 1px, transparent 1px) -1px -1px / 24px 24px;
  -webkit-mask: radial-gradient(ellipse 62% 60% at 50% 52%, #000 25%, transparent 78%);
          mask: radial-gradient(ellipse 62% 60% at 50% 52%, #000 25%, transparent 78%); }
.bp-card .ps-item { z-index: 1; }
.bp-phone::before { background: #10306A; }

/* In-car: a dashboard display with a thick black bezel and a soft sheen */
.car-stage .ps-card { gap: 3.5%; padding: 6% 4.5% 4.5%; }
.car-unit { position: relative; width: 100%; padding: 2.6cqw; border-radius: 5cqw; background: linear-gradient(160deg, #2A2B30, #0B0B0D 40%, #050506); box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 1px rgba(0,0,0,.6), 0 5cqw 9cqw -3cqw rgba(0,0,0,.8); transition: translate .5s cubic-bezier(.2,.8,.2,1); }
.car-screen { position: relative; aspect-ratio: 5 / 3; overflow: hidden; border-radius: 2.6cqw; background: #0A0C0B; }
.car-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.08), rgba(255,255,255,0) 40%); }
.car-screen img { display: block; width: 100%; height: 100%; object-fit: contain; }
.car-screen .ps-empty { inset: 0; gap: 1.4cqw; font-size: 5.6cqw; }
.car-screen .ps-empty small { font-size: 4cqw; }
.ps-item:hover .car-unit { translate: 0 -6px; }
.car-stage .ps-label { margin-top: 6cqw; }

/* SportsPick: red glow with a sporty texture (jersey mesh and speed
   stripes) that fades out from the centre, like the blueprint glow */
.ps-sp .ps-card { background: radial-gradient(ellipse 75% 65% at 50% 55%, color-mix(in srgb, var(--sp) 62%, #0B1018), #07090D 78%); }
.ps-sp .ps-card::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle, rgba(0,0,0,.45) 1.3px, transparent 1.8px) 0 0 / 9px 9px,
    radial-gradient(circle, rgba(0,0,0,.45) 1.3px, transparent 1.8px) 4.5px 4.5px / 9px 9px,
    repeating-linear-gradient(-58deg, transparent 0 46px, rgba(255,255,255,.13) 46px 60px, transparent 60px 72px, rgba(255,255,255,.09) 72px 77px, transparent 77px 150px);
  -webkit-mask: radial-gradient(ellipse 62% 60% at 50% 52%, #000 20%, transparent 78%);
          mask: radial-gradient(ellipse 62% 60% at 50% 52%, #000 20%, transparent 78%); }
.ps-sp .ps-item { z-index: 1; }
/* SportsPick screens already leave room for the status bar */
.ps-sp .ps-phone { aspect-ratio: 596 / 1200; }
.ps-sp .ps-screen { padding-top: 0; background: #fff; }
.ps-sp .ps-phone img { aspect-ratio: 596 / 1200; scale: 1; clip-path: none; }
.ps-dark .ps-status { color: #111; }
.ps-dark .ps-batt { background: #111; }
.ps-dark .ps-batt span { color: #fff; }
.ps-dark .ps-batt::after { background: rgba(0,0,0,.45); }
/* One sign-up screen is taller than a phone: it scrolls inside instead of being cropped */
.ps-scroll .ps-screen { overflow-y: auto; scrollbar-width: none; }
.ps-scroll .ps-screen::-webkit-scrollbar { display: none; }
.ps-sp .ps-scroll img { aspect-ratio: auto; height: auto; }
.ps-scroll .ps-status { position: sticky; margin-bottom: -12cqw; background: #FF0103; }
.ps-scroll .ps-home { position: sticky; display: block; bottom: 1.5%; margin: -2cqw auto 0; translate: none; left: auto; }
/* Many screens: wrap into rows */
.ps-card.is-3col, .ps-card.is-4col { flex-wrap: wrap; row-gap: 40px; }
.ps-card.is-3col .ps-item { flex-basis: 24%; }
.ps-card.is-4col { gap: 40px 4%; }
.ps-card.is-4col .ps-item { flex-basis: 19%; }
.ps-card.is-4col .ps-label { width: 112%; }
/* Kiosk: the main screen large, the other two below */
.kiosk-stage .ps-card { flex-wrap: wrap; gap: 40px 4%; padding: 6% 6% 4.5%; }
.kiosk-stage .ps-item { flex: 0 0 48%; }
.kiosk-stage .ps-item:first-child { flex-basis: 76%; }
.kiosk { cursor: zoom-in; }
.kiosk-stage .ps-label { margin-top: 4cqw; }
.phone-stage.ps-sp + .tabs, [data-tabs] .phone-stage { margin-top: 16px; }
@media (max-width: 760px) {
  .ps-card.is-3col .ps-item, .ps-card.is-4col .ps-item { flex-basis: 29%; }
  .ps-card.is-3col, .ps-card.is-4col { gap: 24px 4%; }
  .ps-card.is-4col .ps-label { width: 100%; }
  .kiosk-stage .ps-card { flex-wrap: nowrap; }
  .kiosk-stage .ps-item, .kiosk-stage .ps-item:first-child { flex-basis: auto; }
}
.car-screen img { position: relative; }
/* Desktop screens longer than the window scroll inside it rather than being cropped */
.ds-screen { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.ds-screen img { height: auto; object-fit: initial; }
/* Mock screens aren't clickable; they keep the hover lift */
.ps-phone, .ds-window, .car-unit, .bp-phone, .kiosk { cursor: default; }
.chapter[hidden] { display: none !important; }

/* Case studies: no top navigation; a floating Back button stays on screen
   while scrolling, so there's always a way back to the work */
.cs-clean .site-header { display: none; }
.cs-clean .back-float { position: fixed; top: 20px; left: 24px; z-index: 60;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.35); }
.cs-clean .back-float:hover { background: color-mix(in srgb, var(--paper) 85%, transparent); }
@media (max-width: 760px) { .cs-clean .back-float { top: 12px; left: 12px; padding: 8px 18px 8px 10px; font-size: 15px; } }

/* Page change: the top bar slides up and fades out, and slides back down on arrival */

/* Page change (main.js): leaving fades the page and lifts the top bar away;
   arriving fades the page in, rising slightly, and drops the top bar in */
html { background: var(--paper); }
body { transition: opacity .34s cubic-bezier(.4,0,.2,1); }
.site-header, .cs-clean .back-float { transition: opacity .3s cubic-bezier(.4,0,.2,1), translate .3s cubic-bezier(.4,0,1,1), padding .25s, background-color .25s; }
.pt-leave body { opacity: 0; }
.pt-leave :is(.site-header, .cs-clean .back-float) { opacity: 0; translate: 0 -100%; }
/* Arriving runs in CSS alone, so the page always ends up visible even if a
   script fails to load */
@keyframes pt-body-in { from { opacity: 0; translate: 0 24px; } }
@keyframes pt-bar-in { from { opacity: 0; translate: 0 -100%; } }
.pt-enter body { animation: pt-body-in .55s cubic-bezier(.2,.8,.2,1) .04s both; }
.pt-enter :is(.site-header, .cs-clean .back-float) { animation: pt-bar-in .5s cubic-bezier(.2,.8,.2,1) .24s both; }

/* Case study cards, after the reference: a thin bezel around each card with a
   bright highlight along the top edge, and on hover the background takes on
   the project's colour (Trackside purple, SportsPick red and so on). */
.projects.is-mono:not(.fader-stage) .project, .sc-slide, .fader-stage {
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ink) 3.5%, transparent), 0 0 0 7px color-mix(in srgb, var(--ink) 9%, transparent);
  transition: background-color .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s, transform .35s cubic-bezier(.2,.8,.2,1); }
.projects.is-mono:not(.fader-stage) .project::after, .sc-slide::after, .fader-stage::after {
  content: ""; display: block; position: absolute; inset: 0; height: auto; z-index: 3; pointer-events: none; border-radius: inherit; padding: 1px;
  background: radial-gradient(60% 40px at 50% 0, color-mix(in srgb, var(--ink) 55%, transparent), transparent), color-mix(in srgb, var(--ink) 8%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.projects.is-mono:not(.fader-stage) .project { position: relative; }
.projects.is-mono:not(.fader-stage) .project.ts, .sc-slide.ts { --brand: var(--ts); }
.projects.is-mono:not(.fader-stage) .project.sp, .sc-slide.sp { --brand: var(--sp); }
.projects.is-mono:not(.fader-stage) .project.cb, .sc-slide.cb { --brand: var(--cb); }
.projects.is-mono:not(.fader-stage) .project.ww, .sc-slide.ww { --brand: var(--ww); }
.projects.is-mono:not(.fader-stage) .project:hover, .sc-slide:hover {
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 8%, transparent), 0 0 0 7px color-mix(in srgb, var(--brand) 20%, transparent), 0 30px 60px -30px color-mix(in srgb, var(--brand) 55%, transparent); }
/* Hover glow, after the reference: the project's colour lights the top-left
   of the card and fades diagonally into the card colour. It sits on its own
   layer so it can fade in smoothly. */
.projects.is-mono:not(.fader-stage) .project, .sc-slide { isolation: isolate; }
.projects.is-mono:not(.fader-stage) .project::before, .sc-slide::before {
  content: ""; display: block; position: absolute; inset: 0; height: auto; z-index: -1; pointer-events: none; border-radius: inherit; opacity: 0;
  background:
    radial-gradient(ellipse 85% 75% at 25% 0%, color-mix(in srgb, var(--brand) 42%, var(--window)), transparent 70%),
    linear-gradient(155deg, color-mix(in srgb, var(--brand) 26%, var(--window)) 0%, var(--window) 70%);
  transition: opacity .5s cubic-bezier(.2,.8,.2,1); }
.projects.is-mono:not(.fader-stage) .project:hover::before, .sc-slide:hover::before { opacity: 1; }
/* No grain texture on the cards */
.projects.is-mono .project, .fader-stage, .sc-slide, .sc-thumb { background-image: none; }


/* Case study covers: square corners on the browser mock */
.case-cover .cs-browser, .case-cover .cs-browser .screen-split, .is-screen .case-cover .screen-split.is-tall, .case-cover .screen-split.is-tall { border-radius: 0; }
/* Labelled browser tabs with the brand logo as the site icon. Logos keep
   their own colours; the dark Trackside logo sits on a small white tile
   so it stays visible on a dark tab. */
.cs-tab.has-label { display: flex; align-items: center; gap: 8px; width: auto; min-width: 0; padding: 0 16px 0 10px; font: 500 12px/1 Manrope, system-ui, sans-serif; letter-spacing: .2px; white-space: nowrap; color: color-mix(in srgb, var(--ink) 60%, transparent); background: transparent; }
.cs-tab.has-label.is-on { background: var(--ch); color: var(--ink); }
.cs-fav { display: grid; place-items: center; flex: none; width: 18px; height: 18px; }
.cs-fav img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0; box-shadow: none; clip-path: none; }
.cs-fav.is-tile { width: 36px; height: 18px; padding: 3px 4px; border-radius: 4px; background: #fff; box-sizing: border-box; }
@media (max-width: 760px) {
  .cs-tab.has-label { gap: 5px; padding: 0 8px 0 6px; font-size: 10px; }
  .cs-fav { width: 14px; height: 14px; }
  .cs-fav.is-tile { width: 28px; height: 14px; padding: 2px 3px; }
}

/* Compare slider, sleeker: a browser window on a glowing card. The glow
   blends from Trackside purple to SportNation green as the handle moves,
   following whichever home page has more of the window. */
.cmp-card { position: relative; overflow: hidden; isolation: isolate; padding: 5.5% 6% 6%; border-radius: 24px; background: #07090D; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.cmp-card::before, .cmp-card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; transition: opacity .25s linear; }
.cmp-card::before { background: radial-gradient(ellipse 95% 85% at 50% 55%, color-mix(in srgb, var(--ts) 62%, #0B1018), #07090D 82%); opacity: var(--mix, .5); }
.cmp-card::after { background: radial-gradient(ellipse 95% 85% at 50% 55%, color-mix(in srgb, var(--sn) 55%, #0B1018), #07090D 82%); opacity: calc(1 - var(--mix, .5)); }
/* The glowing card is the stage, so no second card around it */
.cs-clean .compare.block:has(.cmp-card) { padding: 0; background: none; box-shadow: none; }
.cs-clean .compare.block:has(.cmp-card)::before { display: none; }
.cmp-window { overflow: hidden; border-radius: 12px; background: #1C1D21; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 0 0 1px rgba(0,0,0,.6), 0 40px 80px -30px rgba(0,0,0,.8); }
.cmp-bar { display: flex; align-items: center; gap: 16px; height: 34px; padding: 0 14px; }
.cmp-bar .ds-dots { gap: 6px; }
.cmp-bar .ds-dots i { width: 10px; height: 10px; }
.cmp-url { flex: 0 1 36%; height: 18px; margin-inline: auto; border-radius: 99px; background: rgba(255,255,255,.08); }
.cmp-window .compare-frame { border: 0; border-radius: 0; }
/* Slimmer handle: a hairline with a small frosted pill */
.cmp-card .compare-line { width: 1.5px; translate: -.75px 0; background: rgba(255,255,255,.9); box-shadow: 0 0 12px rgba(0,0,0,.35); }
.cmp-card .compare-knob { width: 30px; height: 46px; border-radius: 15px; color: #fff; background: rgba(20,20,24,.45); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 8px 20px -6px rgba(0,0,0,.5); }
.cmp-card .compare-knob svg { width: 16px; height: 16px; stroke-width: 1.8; }
/* Labels: frosted pills with each brand's logo in its own colours */
.cmp-card .compare-tag { display: inline-flex; align-items: center; gap: 7px; top: 12px; padding: 5px 11px 5px 6px; font-weight: 500; background: rgba(16,16,20,.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); transition: opacity .25s; }
.cmp-card .compare-tag img { position: static; display: block; width: auto; height: 16px; object-fit: contain; }
.cmp-card .compare-tag img.is-tile { height: 16px; padding: 3px 4px; border-radius: 4px; background: #fff; box-sizing: border-box; }
.cmp-card .compare-tag-a { left: 12px; }
.cmp-card .compare-tag-b { right: 12px; }
@media (max-width: 760px) {
  .cmp-card { padding: 6% 4% 5%; border-radius: 18px; }
  .cmp-bar { height: 24px; gap: 10px; padding: 0 9px; }
  .cmp-bar .ds-dots i { width: 7px; height: 7px; }
  .cmp-url { height: 12px; }
  .cmp-card .compare-knob { width: 24px; height: 36px; }
  .cmp-card .compare-tag { top: 8px; gap: 5px; padding: 3px 8px 3px 4px; font-size: 10px; }
  .cmp-card .compare-tag img, .cmp-card .compare-tag img.is-tile { height: 12px; }
  .cmp-card .compare-tag-a { left: 8px; } .cmp-card .compare-tag-b { right: 8px; }
}

/* How I work: dark rounded cards after the reference. A round number badge,
   the title, the step's illustration in an inset panel, then a short note.
   They fade up one after another as the row scrolls into view. */
.flow { gap: 20px; align-items: stretch; }
.flow-step { gap: 0; padding: 20px 20px 22px; border: 0; border-radius: 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 7%, var(--window)), var(--window));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 12%, transparent), 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent), 0 24px 48px -28px rgba(0,0,0,.55);
  transition: translate .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s; }
.flow-step::before { display: none; }
.flow-step:hover { translate: 0 -4px; box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ink) 18%, transparent), 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent), 0 30px 60px -28px rgba(0,0,0,.6); }
.flow-num { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 0 18px; border-radius: 50%; font-size: 15px; font-weight: 700; letter-spacing: 0; color: #0B1420; background: #B9D7FF; box-shadow: 0 0 0 4px color-mix(in srgb, #B9D7FF 18%, transparent); }
.flow-step:hover .flow-num, .flow-step:has(.flow-open:focus-visible) .flow-num { color: #0B1420; }
.flow-tag { margin-bottom: 6px; }
.flow-step h3 { font-size: clamp(20px, 1.7vw, 24px); font-weight: 600; line-height: 1.25; }
/* Sleek: text only, left-aligned, the note sitting at the foot of the card */
.flow-step { min-height: 240px; padding: 24px 24px 26px; }
.flow-step p { margin-top: auto; padding-top: 28px; text-align: left; font-size: 14px; line-height: 1.55; }
/* One by one as the row comes into view */
.flow.will-reveal .flow-step { opacity: 0; translate: 0 32px; transition: opacity .8s ease, translate .9s cubic-bezier(.2,.8,.2,1), box-shadow .45s; transition-delay: calc(var(--i, 0) * 140ms); }
.flow.will-reveal .flow-step.is-in { opacity: 1; translate: 0 0; }
.flow.will-reveal .flow-step.is-in:hover { translate: 0 -4px; transition-delay: 0s; }
