/* Varun Khandelwal: portfolio. Every value comes from design.md. One font: Geist. */

:root {
  /* retro pixel cursors (tools/cursors.mjs draws them); the keyword after each is the fallback */
  --cur: url(/cursors/arrow.svg) 0 0, default;
  --cur-pointer: url(/cursors/pointer.svg) 10 1, pointer;
  --cur-grab: url(/cursors/grab.svg) 12 12, grab;
  --cur-grabbing: url(/cursors/grabbing.svg) 12 13, grabbing;
  --cur-text: url(/cursors/text.svg) 5 12, text;
  --cur-ew: url(/cursors/ew.svg) 14 7, ew-resize;
  --cur-zoomout: url(/cursors/zoomout.svg) 9 8, zoom-out;
  --paper: #FFFFFF;
  --surface: #F1F1F3;
  --ink: #141413;
  --ink-2: #57564F;
  --ink-3: #6B6A64; /* at least 4.8:1 on white and on the case-study tiles (#F0F2F5, #EEF3FE, #F5F6F4) */
  --rule: rgba(20, 20, 19, 0.10);
  --accent: #2E54D1;

  --night: #0B0D14;
  --night-panel: rgba(20, 26, 44, 0.72);
  --night-ink: #F2F1EC;
  --night-ink-2: #A9ADBE;
  --night-rule: rgba(242, 241, 236, 0.12);

  /* Text that sits directly on the sky. main.js retints these as the day turns to night. */
  --on-sky: var(--ink);
  --on-sky-2: var(--ink-2);

  /* Glass: containers that sit on the sky. main.js retints these with the sky (light by day, dark at night). */
  --g-bg: rgba(250, 251, 255, 0.3);
  --g-ink: #141413;
  --g-ink-2: #3D3E46;
  --g-ink-3: #62646F;
  --g-rule: rgba(20, 20, 19, 0.12);
  --g-surface: rgba(255, 255, 255, 0.34);
  --g-edge: rgba(255, 255, 255, 0.55);
  --g-blur: blur(34px) saturate(1.9) brightness(1.04);

  --f: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;

  --t-display-xl: clamp(2.6rem, 5.6vw, 5.25rem);
  --t-display-l: clamp(2.1rem, 4.2vw, 3.75rem);
  --t-display-m: clamp(1.6rem, 2.6vw, 2.25rem);
  --t-numeral: clamp(2rem, 3.4vw, 3rem);
  --t-title: 1.125rem;
  --t-body-l: 1.1875rem;
  --t-body: 1rem;
  --t-body-s: 0.875rem;
  --t-caption: 0.8125rem;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1240px;
  --col: 960px;
  --measure: 64ch;

  --r-s: 8px; --r-l: 24px; --r-pill: 999px;
  --shadow: 0 30px 60px -40px rgba(30, 45, 100, 0.35);

  --enter: cubic-bezier(0.16, 1, 0.3, 1);
  --move: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ───────── base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--s-7); }
/* the arrow everywhere, the finger on anything you can click, the bar where you type */
html { cursor: var(--cur); }
a[href], button, [role="button"], summary, select, label[for], input[type="checkbox"], input[type="radio"], input[type="range"] { cursor: var(--cur-pointer); }
input:not([type]), input[type="text"], input[type="email"], input[type="search"], textarea, [contenteditable="true"] { cursor: var(--cur-text); }
body {
  margin: 0; background: var(--paper); color: var(--ink-2);
  font: 400 var(--t-body)/1.65 var(--f);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, blockquote, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: var(--cur-pointer); }
::selection { background: #DCE3F7; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: fixed; left: 16px; top: 16px; z-index: 100; padding: 8px 16px; background: var(--ink); color: var(--paper); border-radius: var(--r-pill); transform: translateY(-200%); }
.skip:focus { transform: none; }
.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

/* ───────── type ───────── */
.display-xl, .display-l, .display-m { font-weight: 400; color: var(--ink); text-wrap: balance; }
.display-xl { font-size: var(--t-display-xl); line-height: 1.02; letter-spacing: -0.045em; }
.display-l { font-size: var(--t-display-l); line-height: 1.05; letter-spacing: -0.04em; }
.display-m { font-size: var(--t-display-m); line-height: 1.12; letter-spacing: -0.03em; }
/* Emphasis is tone, not style: the phrase steps back to the secondary ink. */
em { font-style: normal; color: var(--ink-3); }
.body-l { font-size: var(--t-body-l); line-height: 1.55; letter-spacing: -0.01em; }
.caption { font-size: var(--t-caption); line-height: 1.45; color: var(--ink-3); }
.prose { max-width: var(--measure); }
.ink { color: var(--ink); }
strong { font-weight: 500; color: var(--ink); }

.on-sky, .on-sky a { color: var(--on-sky); transition: color 400ms linear; }
.on-sky em, .on-sky-2 { color: var(--on-sky-2); transition: color 400ms linear; }

.text-link {
  display: inline-block; font-size: var(--t-body-s); font-weight: 500; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: text-decoration-color 200ms var(--enter);
}
.text-link:hover { text-decoration-color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border-radius: var(--r-pill); font-size: var(--t-body-s); font-weight: 500; transition: background-color 300ms var(--enter), color 300ms var(--enter); }
.btn--light { background: var(--night-ink); color: var(--night); }
.btn--night { height: 34px; padding: 0 16px; color: var(--night-ink); box-shadow: inset 0 0 0 1px var(--night-rule); }
.btn--night.is-done { background: var(--night-ink); color: var(--night); }

/* ───────── the sky ───────── */
.sky { display: block; pointer-events: none; image-rendering: pixelated; }
.sky--page { position: fixed; left: 0; top: 0; z-index: -1; }
.sky--local { position: absolute; left: 0; top: 0; }

/* ───────── home ───────── */
/* Headline centred on the first screen. The four project cards float around it in a fixed layer and fly into
   their slots in My work as you scroll (main.js, "Hero deck"). */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; }
.hero__inner { position: relative; z-index: 6; text-align: center; pointer-events: none; padding-bottom: 22svh; }
.hero__title { margin-inline: auto; max-width: 12.5em; }
.deck { display: none; }
.js .deck { display: block; position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.js .deck.is-docked { visibility: hidden; }
.deck__card { --pad: 10px; --go: 1; position: absolute; left: 0; top: 0; border-radius: var(--r-s); pointer-events: auto; will-change: transform; visibility: hidden; }
/* A glass frame 10px around each floating card; main.js fades it out (--go) as the card lands in My work. */
.deck__card::before {
  content: ''; position: absolute; z-index: -1; inset: calc(var(--pad) * -1); border-radius: calc(var(--r-s) + var(--pad));
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 45%), var(--g-bg);
  -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
  box-shadow: inset 0 1px 0 var(--g-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  opacity: var(--go); pointer-events: none;
}
.deck.is-set .deck__card { visibility: visible; }
.deck.is-docked .deck__card { visibility: hidden; }
.deck__face { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; background: var(--surface); }
.deck__face .media { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--enter); }
/* the pixel art a video starts as (main.js, "Pixel morph"): one canvas pixel per cell, over the footage */
.pixel-morph { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; pointer-events: none; }
.deck__card:hover .media { transform: scale(1.04); }
/* While the stand-ins are in flight, the real cards' media wait underneath them. */
.deck-flying [data-dock-target] { visibility: hidden; }
.hero__title { max-width: 13em; }

.sheets { padding-bottom: var(--s-9); }
.band { padding-top: var(--s-10); }
.band:first-child { padding-top: var(--s-6); }
.band__title { margin-bottom: var(--s-7); max-width: 14em; }
.sheet { position: relative; padding: clamp(20px, 3.2vw, 44px); border-radius: var(--r-l); }
/* Glass re-points the ink tokens, so everything inside a sheet follows the sky's tone. */
.glass {
  --ink: var(--g-ink); --ink-2: var(--g-ink-2); --ink-3: var(--g-ink-3); --rule: var(--g-rule); --surface: var(--g-surface);
  color: var(--ink-2);
  /* a soft sheen from the top-left, over a thin tint, over a heavy blur of the sky */
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 42%), var(--g-bg);
  -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
  box-shadow: inset 0 1px 0 var(--g-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.sheet__peek { position: absolute; right: clamp(24px, 5vw, 72px); top: 1px; width: clamp(112px, 11vw, 150px); transform: translateY(-86%); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8) var(--s-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }

.card__link { display: block; }
.card__media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface); border-radius: var(--r-s); }
.card--big .card__media { aspect-ratio: 4 / 3; }
.card__media--portrait { aspect-ratio: 4 / 5; }
.card__media .media { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--enter); }
.card__link:hover .media, .next:hover .media { transform: scale(1.02); }
.card__text { padding-top: var(--s-4); }
.card__title { font-size: var(--t-title); line-height: 1.35; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
.card__text .caption { margin-top: 2px; }
.card__desc { margin-top: var(--s-2); max-width: 52ch; font-size: var(--t-body-s); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__over {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 64px clamp(16px, 2vw, 24px) clamp(14px, 1.8vw, 22px);
  font-size: var(--t-body-s); line-height: 1.5; color: var(--night-ink); pointer-events: none;
  background: linear-gradient(to top, rgba(11, 13, 20, 0.8), rgba(11, 13, 20, 0.4) 60%, rgba(11, 13, 20, 0));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to top, #000 62%, transparent); mask-image: linear-gradient(to top, #000 62%, transparent);
  opacity: 0; transform: translateY(12px); transition: opacity 420ms var(--enter), transform 700ms var(--enter);
}
/* With a mouse, a card's description lives on the media and rises in on hover. Touch keeps it under the title. */
@media (hover: hover) and (pointer: fine) {
  .card__link:hover .card__over, .card__link:focus-visible .card__over { opacity: 1; transform: none; }
  .card__media:has(.card__over) ~ .card__text .card__desc { display: none; }
}
@media not ((hover: hover) and (pointer: fine)) { .card__over { display: none; } }
.card--soon .media { filter: blur(2px) saturate(0.7); opacity: 0.85; }
.card__soon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 8px 16px; border-radius: var(--r-pill); background: var(--g-bg); color: var(--ink); font-size: var(--t-body-s); font-weight: 500; -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); box-shadow: inset 0 0 0 1px var(--g-edge); }

.about { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-8); align-items: start; }
.about__photo { position: sticky; top: var(--s-7); }
.about__body > .body-l { max-width: var(--measure); }
.about__body .text-link { margin-top: var(--s-7); }
.block { margin-top: var(--s-7); }
.block > .caption { margin-bottom: var(--s-3); }
.rows { border-bottom: 1px solid var(--rule); }
.rows li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: var(--s-4); align-items: baseline; padding: 14px 0; border-top: 1px solid var(--rule); }
.rows__role { color: var(--ink); }
.rows__org, .rows__when { font-size: var(--t-body-s); color: var(--ink-3); }
.rows__when { text-align: right; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips li { padding: 6px 14px; border-radius: var(--r-pill); background: var(--surface); font-size: var(--t-body-s); color: var(--ink-2); }
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.tools li { display: flex; align-items: center; gap: 10px; font-size: var(--t-body-s); color: var(--ink); }
.tools img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }

.district { padding-bottom: var(--s-9); }
/* The game, live: the deployed game's own renderer in an iframe (district-embed.html). The whole stage links to it. */
.stage { position: relative; overflow: hidden; height: clamp(460px, 78vh, 780px); border-radius: var(--r-l); background: #06060f; isolation: isolate; }
.stage__poster, .stage__game { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.stage__poster { object-fit: cover; }
.stage__game { opacity: 0; pointer-events: none; transition: opacity 1200ms var(--enter); }
.stage.is-live .stage__game { opacity: 1; }
.stage__info {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-6);
  padding: clamp(20px, 3.2vw, 44px); padding-top: 120px; pointer-events: none; color: var(--night-ink-2);
  background: linear-gradient(to top, rgba(6, 6, 15, 0.88), rgba(6, 6, 15, 0.55) 50%, rgba(6, 6, 15, 0));
}
.stage__text { max-width: 46ch; }
.stage__info .caption { color: var(--night-ink-2); }
.stage__name { margin-top: 2px; color: var(--night-ink); }
.stage__lede { margin: var(--s-3) 0; font-size: var(--t-body-s); line-height: 1.55; }
.stage__cta { flex: none; transition: transform 500ms var(--enter); }
.stage__link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.stage__link:focus-visible { outline-offset: -4px; }
.stage:hover .stage__cta { transform: translateY(-2px); }
.stage::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px var(--night-rule); }

/* ───────── contact ───────── */
.contact { position: relative; padding: var(--s-9) 0 calc(var(--s-9) + 48px); }
.contact--own { --on-sky: var(--night-ink); --on-sky-2: var(--night-ink-2); background: var(--night); margin-top: var(--s-10); overflow: hidden; }
.contact__inner { position: relative; z-index: 1; }
.contact__links { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); margin-top: var(--s-7); }
.contact__links a { font-size: var(--t-body-l); text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: rgba(127, 127, 127, 0.35); }
.contact__links a:hover { text-decoration-color: currentColor; }
.terminal {
  position: relative; max-width: 480px; margin-top: var(--s-9); padding: var(--s-5);
  border-radius: var(--r-l); background: var(--night-panel); border: 1px solid var(--night-rule); color: var(--night-ink-2);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.contact__peek { position: absolute; z-index: 2; width: clamp(110px, 11vw, 140px); right: 28px; top: 1px; transform: translateY(-84%); pointer-events: none; }
.terminal .caption { color: var(--night-ink-2); }
.terminal__title { color: var(--night-ink); font-weight: 500; }
.terminal__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-4); }
.terminal code { font-family: var(--f); font-size: var(--t-body-s); font-variant-numeric: tabular-nums; color: var(--night-ink); overflow-wrap: anywhere; }
.contact__base { margin-top: var(--s-9); }

/* ───────── dock: nav + music (bottom) ───────── */
.dock {
  position: fixed; z-index: 50; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; white-space: nowrap; transform: translateX(-50%);
  transition: opacity 800ms var(--enter), transform 800ms var(--enter);
}
.js .dock { opacity: 0; transform: translate(-50%, 16px); }
.js.is-ready .dock { opacity: 1; transform: translateX(-50%); }
/* Floating controls: clear glass. Mostly see-through, the page behind blurred and brightened, a sheen across the top
   and a bright rim, so the dock reads as a pane of glass over whatever sits under it. */
.float {
  border-radius: var(--r-pill);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.14) 55%, rgba(255, 255, 255, 0.24)), rgba(246, 248, 255, 0.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.9) brightness(1.08); backdrop-filter: blur(18px) saturate(1.9) brightness(1.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(255, 255, 255, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 0 1px rgba(20, 20, 19, 0.06);
  transition: background-color 500ms var(--enter), box-shadow 500ms var(--enter);
}
/* Chromium: the glass refracts (main.js, "Glass"). Lightly frosted so the words stay clear while the rim visibly bends, with a bright rim
   light along the top edge and a soft one along the bottom, like light caught in the thickness of the glass. */
.float.is-lens {
  -webkit-backdrop-filter: blur(3px) var(--lens) saturate(1.8) brightness(1.08); backdrop-filter: blur(3px) var(--lens) saturate(1.8) brightness(1.08);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.32)), rgba(246, 248, 255, 0.18);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.45), inset 1px 0 0 rgba(255, 255, 255, 0.4), inset -1px 0 0 rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 0 1px rgba(20, 20, 19, 0.07);
}
.is-dark .float.is-lens {
  -webkit-backdrop-filter: blur(3px) var(--lens) saturate(1.5) brightness(0.85); backdrop-filter: blur(3px) var(--lens) saturate(1.5) brightness(0.85);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.06)), rgba(20, 26, 44, 0.22);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.is-dark .float {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0.06)), rgba(20, 26, 44, 0.34);
  -webkit-backdrop-filter: blur(18px) saturate(1.6) brightness(0.92); backdrop-filter: blur(18px) saturate(1.6) brightness(0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.nav { position: relative; display: flex; align-items: center; padding: 6px; }
.nav__item { position: relative; z-index: 1; padding: 10px 16px; font-size: var(--t-body-s); font-weight: 500; line-height: 20px; color: var(--ink-2); transition: color 200ms var(--enter); }
.nav__item:hover, .nav__item.is-active, .nav__home { color: var(--ink); }
/* home: the VK mark instead of the full name, a little blue badge with notched pixel corners like the cursors and tips */
.nav__home { padding-inline: 12px; }
.nav__vk { display: grid; place-items: center; height: 24px; padding: 0 7px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; line-height: 1;
  clip-path: polygon(2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px), 0 2px, 2px 2px); }
/* the highlight: a pale sky-blue pill, dithered like the home sky, with pixel-stepped ends. It moves in 4px steps,
   the leading edge first and the trailing edge after it, like a sprite (main.js, "Nav"). */
.nav__pill {
  position: absolute; top: 6px; bottom: 6px; left: 6px; right: auto; z-index: 0; width: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cg fill='%23AFC0EE'%3E%3Crect width='2' height='2'/%3E%3Crect x='4' y='4' width='2' height='2'/%3E%3Crect x='4' width='2' height='2' y='0' opacity='0'/%3E%3Crect x='2' y='6' width='2' height='2'/%3E%3Crect x='6' y='2' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 8px 8px, #CFD9F6; image-rendering: pixelated; opacity: 0;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, calc(100% - 12px) 2px, calc(100% - 6px) 2px, calc(100% - 6px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 6px, calc(100% - 2px) 6px, calc(100% - 2px) 12px, 100% 12px, 100% calc(100% - 12px), calc(100% - 2px) calc(100% - 12px), calc(100% - 2px) calc(100% - 6px), calc(100% - 4px) calc(100% - 6px), calc(100% - 4px) calc(100% - 4px), calc(100% - 6px) calc(100% - 4px), calc(100% - 6px) calc(100% - 2px), calc(100% - 12px) calc(100% - 2px), calc(100% - 12px) 100%, 12px 100%, 12px calc(100% - 2px), 6px calc(100% - 2px), 6px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 6px), 2px calc(100% - 6px), 2px calc(100% - 12px), 0 calc(100% - 12px), 0 12px, 2px 12px, 2px 6px, 4px 6px, 4px 4px, 6px 4px, 6px 2px, 12px 2px);
  transition: opacity 300ms var(--enter);
}
.nav__pill.is-on { opacity: 1; }
.nav__item { color: rgba(20, 20, 19, 0.7); }
.nav .nav__item.is-lit { color: var(--ink); }
.is-dark .nav__item { color: rgba(242, 241, 236, 0.66); }
.is-dark .nav__item:hover, .is-dark .nav__item.is-active, .is-dark .nav__home { color: var(--night-ink); }
.is-dark .nav__pill { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Cg fill='%23435089'%3E%3Crect width='2' height='2'/%3E%3Crect x='4' y='4' width='2' height='2'/%3E%3Crect x='4' width='2' height='2' y='0' opacity='0'/%3E%3Crect x='2' y='6' width='2' height='2'/%3E%3Crect x='6' y='2' width='2' height='2'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 8px 8px, #2B3566; }
.is-dark .nav .nav__item.is-lit { color: #fff; }
/* the dock keeps its place while pages change, so the highlight can travel from the last page's tab to this one */
.nav { view-transition-name: nav-bar; } .radio__bar { view-transition-name: music-bar; } /* on the bars, not the dock: a named parent would cut their glass off from the page behind */

/* Music */
/* The bar and the menu are siblings: a blurred parent would stop the menu blurring the page behind it. */
.radio { position: relative; color: var(--ink); }
.radio__bar { display: flex; align-items: center; gap: 4px; padding: 6px; }
.is-dark .radio { color: var(--night-ink); }
.radio__play { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--disc-hue, var(--ink)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(20, 20, 19, 0.08); transition: background-color 600ms var(--enter), color 300ms var(--enter), transform 300ms var(--enter); }
.radio__play:active { transform: scale(0.94); }
.is-dark .radio__play { background: var(--disc-hue, var(--night-ink)); color: #fff; }
.radio__icon { width: 15px; height: 15px; fill: currentColor; }
.radio__icon--pause, .radio[data-state="playing"] .radio__icon--play, .radio[data-state="loading"] .radio__icon--play { display: none; }
.radio[data-state="playing"] .radio__icon--pause, .radio[data-state="loading"] .radio__icon--pause { display: block; }
.radio[data-state="loading"] .radio__play { animation: breathe 1.4s var(--move) infinite alternate; }
@keyframes breathe { to { opacity: 0.45; } }
.radio__name { display: flex; align-items: center; gap: 10px; max-width: 210px; height: 40px; padding: 0 10px 0 3px; font-size: var(--t-body-s); font-weight: 500; line-height: 20px; }
.radio__label { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* the disc: a silvery, faintly rainbow surface with a hole in the middle, a clear hub, and a printed label in the
   station's dithered art. The label is lopsided, so you can see it turn. */
.rdisc { position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; }
.rdisc__spin { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, transparent 0 46%, rgba(255, 255, 255, 0.5) 47%, transparent 49%),
    conic-gradient(from 30deg, #E9ECF3, #C7D2E8, #F4E6F1, #DCEFE7, #CCD5EC, #F3EEE3, #DDE3F0, #E9ECF3);
  -webkit-mask: radial-gradient(circle, transparent 0 9%, #000 9.5%); mask: radial-gradient(circle, transparent 0 9%, #000 9.5%);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.12); }
.rdisc__spin::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0 22%, transparent 42% 60%, rgba(255, 255, 255, 0.4) 80%); mix-blend-mode: soft-light; }
.rdisc__label { position: absolute; inset: 13%; border-radius: 50%; background: var(--disc-art, #E6E9F2) center / cover; image-rendering: pixelated; }
.rdisc__label::after { content: ""; position: absolute; inset: 31%; border-radius: 50%; background: rgba(236, 240, 248, 0.9); box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.1); }

/* the case in the dock: a square sleeve with the disc half out of its right side */
.rcase { position: relative; flex: none; width: 52px; height: 36px; }
.rcase__slot { position: absolute; left: 17px; top: 1px; width: 34px; height: 34px; }
.rcase__sleeve { position: absolute; left: 0; top: 0; z-index: 1; width: 36px; height: 36px; overflow: hidden; border-radius: 7px; background: var(--accent); box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.1), 2px 0 4px -1px rgba(20, 20, 19, 0.25); }
.rcase__sleeve::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(150deg, rgba(255, 255, 255, 0.45), transparent 45%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.rcase__art { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.rcase__art:not([src]) { visibility: hidden; }
.rdisc__spin { animation: disc-spin 2.6s linear infinite; animation-play-state: paused; }
.radio[data-state="playing"] .rcase .rdisc__spin { animation-play-state: running; }
@keyframes disc-spin { to { transform: rotate(360deg); } }
.rcase .rdisc { transition: transform 400ms var(--enter); }
.radio__name:hover .rcase .rdisc { transform: translateX(3px); }
.rcase__sleeve { transition: transform 300ms var(--enter); }

/* the picker: the stations as discs in a row */
.radio__menu {
  position: absolute; right: 0; bottom: calc(100% + 10px); width: min(400px, calc(100vw - 32px)); padding: 10px;
  border-radius: 22px; white-space: normal; text-align: left;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.3) 60%), rgba(246, 248, 255, 0.5); color: var(--ink-2);
  -webkit-backdrop-filter: blur(26px) saturate(1.7) brightness(1.06); backdrop-filter: blur(26px) saturate(1.7) brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 0 0 1px rgba(20, 20, 19, 0.06);
  opacity: 0; visibility: hidden; transform: translateY(8px) scale(0.98); transform-origin: 100% 100%;
  transition: opacity 260ms var(--enter), transform 420ms var(--enter), visibility 0s linear 420ms;
}
.radio.is-open .radio__menu { opacity: 1; visibility: visible; transform: none; transition: opacity 260ms var(--enter), transform 420ms var(--enter), visibility 0s; }
.radio__head { padding: 6px 8px 4px; }
.radio__head a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.radio__discs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 12px 6px 4px; list-style: none; }
.rpick { display: block; width: 100%; padding: 0; border-radius: 50%; }
.rpick__slot { position: relative; display: block; border-radius: 50%; }
/* where a disc sits in the row: an empty ring shows once its disc is in the case */
.rpick__slot::before { content: ""; position: absolute; inset: 4%; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--rule); background: radial-gradient(circle, var(--rule) 0 8%, transparent 9%); opacity: 0; transition: opacity 300ms var(--enter); }
.rpick .rdisc { transition: transform 450ms var(--enter), opacity 250ms var(--enter); }
.rpick .rdisc__spin { transition: transform 700ms var(--enter); animation: none; }
.rpick:hover .rdisc, .rpick:focus-visible .rdisc { transform: translateY(-6px); }
.rpick:hover .rdisc__spin, .rpick:focus-visible .rdisc__spin { transform: rotate(70deg); }
.rpick[aria-current="true"] .rdisc { opacity: 0; transform: scale(0.9); }
.rpick[aria-current="true"] .rpick__slot::before { opacity: 1; }
.rpick:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* the flying disc, between the row and the case */
.rdisc--fly { position: fixed; z-index: 90; left: 0; top: 0; pointer-events: none; will-change: transform; }
.radio__info { display: flex; gap: 8px; align-items: baseline; min-height: 20px; padding: 8px 8px 2px; font-size: var(--t-caption); line-height: 18px; }
.radio__info-name { font-size: var(--t-body-s); font-weight: 500; color: var(--ink); white-space: nowrap; }
.radio__info-desc { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-3); }
.radio__foot { margin-top: 8px; padding: 10px 8px 4px; border-top: 1px solid var(--rule); }
.radio__now { font-size: var(--t-caption); line-height: 18px; color: var(--ink-2); }
.radio__now:empty { display: none; }
.radio__now + .radio__vol { margin-top: 10px; }

/* volume: speaker, a soft pill track that fills with ink, a white knob that grows as you hold it, louder speaker, the number */
.radio__vol { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.radio__vol-ico { flex: none; width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 0; opacity: 0.55; }
.radio__vol-wave { fill: none; stroke-width: 1.4; stroke-linecap: round; }
.radio__vol-num { flex: none; width: 2.2em; text-align: right; font-size: var(--t-caption); font-variant-numeric: tabular-nums; color: var(--ink-3); }
.radio__vol input { flex: 1; height: 22px; margin: 0; color: inherit; background: none; -webkit-appearance: none; appearance: none; cursor: var(--cur-pointer); }
.radio__vol input::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, currentColor var(--v, 60%), rgba(20, 20, 19, 0.1) var(--v, 60%)); box-shadow: inset 0 1px 1px rgba(20, 20, 19, 0.08); }
.radio__vol input::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(20, 20, 19, 0.1); }
.radio__vol input::-moz-range-progress { height: 6px; border-radius: 6px; background: currentColor; }
.radio__vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(20, 20, 19, 0.14), 0 2px 5px rgba(20, 20, 19, 0.22); transition: transform 200ms var(--enter); }
.radio__vol input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(20, 20, 19, 0.14), 0 2px 5px rgba(20, 20, 19, 0.22); transition: transform 200ms var(--enter); }
.radio__vol input:hover::-webkit-slider-thumb { transform: scale(1.12); }
.radio__vol input:active::-webkit-slider-thumb { transform: scale(1.25); }
.radio__vol input:active::-moz-range-thumb { transform: scale(1.25); }
.radio__vol input:focus-visible { outline: none; }
.radio__vol input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent), 0 2px 5px rgba(20, 20, 19, 0.22); }
.is-dark .radio__menu {
  --ink: var(--night-ink); --ink-2: var(--night-ink-2); --ink-3: #8F96AC; --rule: var(--night-rule); --surface: rgba(242, 241, 236, 0.08);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03) 60%), rgba(20, 26, 44, 0.62); color: var(--ink-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px var(--night-rule);
}
.is-dark .radio__vol input::-webkit-slider-runnable-track { background: linear-gradient(90deg, currentColor var(--v, 60%), rgba(255, 255, 255, 0.14) var(--v, 60%)); }
.is-dark .radio__vol input::-moz-range-track { background: rgba(255, 255, 255, 0.14); }
@media (max-width: 720px) { .radio__name { max-width: 150px; } }

/* ───────── case study & pages: one column, top to bottom ───────── */
.cs-hero, .cs-sec { width: min(100% - 2 * var(--gutter), var(--col)); margin-inline: auto; }
.cs-hero { padding-top: var(--s-10); }
.cs-hero__title { margin-top: var(--s-3); }
.cs-hero__side { margin-top: var(--s-5); }
.cs-hero__side > .body-l { max-width: var(--measure); }
.cs-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); margin-top: var(--s-7); }
.cs-meta div { padding-top: var(--s-3); border-top: 1px solid var(--rule); }
.cs-meta dd { margin-top: 2px; color: var(--ink); font-size: var(--t-body-s); }
.cs-cover { width: min(100% - 2 * var(--gutter), var(--maxw)); margin: var(--s-8) auto 0; }

.panel { position: relative; overflow: hidden; background: var(--surface); border-radius: var(--r-s); padding: 10px; border: 1px solid #E9EDEF; }
.panel .media { width: 100%; height: auto; margin-inline: auto; }
/* an image or recording cropped to its picture, without the margin or black bars baked into the file */
.crop { position: relative; display: block; overflow: hidden; aspect-ratio: var(--ar); }
.crop .media { position: absolute; left: var(--cl); top: var(--ct); width: var(--cw); height: var(--ch); max-width: none; object-fit: fill; }
.panel--cover, .panel--next, .panel--portrait, .panel--reel, .fig--bare .panel { padding: 0; }
.panel--cover { margin-top: var(--s-8); aspect-ratio: 16 / 9; }
.panel--next { aspect-ratio: 16 / 9; margin-top: var(--s-5); }
.panel--portrait, .panel--reel { aspect-ratio: 4 / 5; }
.panel--cover .media, .panel--next .media, .panel--portrait .media, .panel--reel .media { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--enter); }

.cs-sec { margin-top: var(--s-10); }
.cs-sec__head h2 { margin-top: var(--s-3); max-width: 20em; }
.cs-sec__body { margin-top: var(--s-6); }
.cs-sec__body > * + * { margin-top: var(--s-5); }
.cs-sec__body > :is(.fig, .figs, .pair, .stats, .bars, .dtable, .items, .lx, .eras, .tline, .pull, .note, .links, .toolrows, .block) { margin-top: var(--s-7); }
.cs-sec__body > :first-child { margin-top: 0; }
.cs-h3 { font-size: var(--t-title); line-height: 1.35; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
.cs-sec__body > .cs-h3 { margin-top: var(--s-8); }
/* a step of a redesign: its own titled part, the title as big as a section's, the text under it in two steps down */
.cs-sec__body > .cs-step { margin-top: var(--s-10); }
.cs-step__t { margin-top: var(--s-3); max-width: 22em; text-wrap: balance; color: var(--ink); }
.cs-step + .ink { margin-top: var(--s-5); }
.cs-step ~ .pull p { max-width: 26em; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.3; letter-spacing: -0.02em; }

.pull p { max-width: 22em; font-size: var(--t-display-m); line-height: 1.2; letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
/* The night sweep (main.js): the principle and every call to action. A canvas under the words paints the dithered sky,
   and a white copy of the words is uncovered as far as the sky has reached. */
.sweep { position: relative; isolation: isolate; }
.sweep__cv { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; border-radius: inherit; image-rendering: pixelated; pointer-events: none; }
.sweep__t { position: relative; }
.sweep__w { position: absolute; inset: 0; display: flex; align-items: center; justify-content: inherit; padding: inherit; color: #fff; white-space: nowrap; text-decoration: none; clip-path: inset(0 calc(100% - var(--w, 0%)) 0 0); pointer-events: none; }
/* the principle: a grey highlight at rest */
.principle__x { position: relative; display: inline-block; padding: 0 0.3em; border-radius: 8px; background: #ECEDEF; color: var(--ink); white-space: nowrap; cursor: var(--cur); outline: none; isolation: isolate; }
.principle__x .sweep__w { display: block; }
.principle__x:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 720px) { .principle__x { white-space: normal; } }
/* text links take the sweep in a little box of their own; the underline steps aside while it plays */
.text-link.sweep { padding: 3px 7px; margin: -3px -7px; border-radius: 6px; }
.text-link.sweep .sweep__w { display: block; }
.text-link.is-night { text-decoration-color: transparent; }
/* the way back from a project, at the top of its page */
.cs-back { position: fixed; z-index: 45; top: 20px; left: var(--gutter); display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: var(--r-pill); font-size: 1rem; font-weight: 500; color: var(--ink);
  background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6); box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.12); }
.cs--dark .cs-back { background: rgba(23, 23, 26, 0.82); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.cs-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.note { max-width: var(--measure); padding: var(--s-5); background: var(--surface); border-radius: var(--r-s); font-size: var(--t-body-s); line-height: 1.6; }
/* Image with its text beside it. Text on the left by default; .pair--r puts it on the right. */
.pair { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-6); align-items: start; }
.pair--r { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.pair--r .pair__text { order: 2; }
.pair--narrow.pair--r { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); align-items: center; }
.pair__text > * + * { margin-top: var(--s-4); }
.pair__text { padding-top: var(--s-2); }
.pair__hint { padding-top: var(--s-2); }
.cs-sec__body > .pair + .pair { margin-top: var(--s-8); }
.tipnote { margin-top: var(--s-2); font-size: var(--t-caption); line-height: 1.5; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .tipnote { display: none; } }
@media not ((hover: hover) and (pointer: fine)) { .pair__hint { display: none; } }

/* The thought that follows the cursor over [data-tip]: a little pixel box like the cursors, pale sky inside a 2px ink
   outline with notched corners, typing itself out behind a blinking block cursor. */
.tip {
  position: fixed; left: 0; top: 0; z-index: 60; max-width: 300px; padding: 7px 12px 8px;
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 14px; line-height: 1.4; font-weight: 400; color: var(--ink); white-space: nowrap;
  background: #EEF2FC; box-shadow: inset 0 0 0 2px var(--ink);
  clip-path: polygon(2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px), 0 2px, 2px 2px);
  pointer-events: none; opacity: 0; transition: opacity 160ms steps(3, end);
}
.tip.is-on { opacity: 1; }
.tip.is-typing::after { content: ''; display: inline-block; width: 0.6em; height: 1.05em; margin-left: 2px; vertical-align: -0.18em; background: var(--accent); animation: tip-blink 700ms steps(1) infinite; }
@keyframes tip-blink { 50% { opacity: 0; } }
.fig figcaption { margin-top: var(--s-3); max-width: var(--measure); font-size: var(--t-caption); line-height: 1.5; color: var(--ink-3); }
.fig figcaption strong { color: var(--ink-2); }
.figs { display: grid; gap: var(--s-4); align-items: start; }
.figs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Rive animations: a canvas that fills the space held for its artboard; it fades in once the first frame is drawn */
.rive { position: relative; display: block; width: 100%; }
.rive canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 500ms linear; }
.rive.is-ready canvas { opacity: 1; }
.figs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figs .panel { padding: 10px; }

.stats { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stats--2 { --cols: 2; } .stats--3 { --cols: 3; } .stats--4 { --cols: 4; }
.stat { padding: var(--s-5) var(--s-4) var(--s-5) 0; }
.stat + .stat { padding-left: var(--s-5); border-left: 1px solid var(--rule); }
.stat__num { font-size: var(--t-numeral); font-weight: 400; line-height: 1.05; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat__k { margin-top: var(--s-3); font-size: var(--t-body-s); color: var(--ink); }
.stat .caption { margin-top: 2px; }

/* ───────── the results dashboard (Accenture) and its report (build.mjs, dash()) ─────────
   A grid of soft tiles, no rules: four numbers, three charts, then satisfaction beside the outcome. */
.dash { --dash-green: #2F7A3E; --dash-tile: #F5F6F4; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; color: var(--ink); }
.cs-sec__body > .dash { margin-top: var(--s-7); }
.dash__tile { padding: var(--s-5); border-radius: 16px; background: var(--dash-tile); }
.dash__kpi { grid-column: span 3; }
.dash__chart { grid-column: span 4; display: flex; flex-direction: column; }
.dash__csat { grid-column: span 5; display: flex; align-items: center; gap: var(--s-5); }
.dash__out { grid-column: span 7; display: flex; flex-direction: column; align-items: flex-start; background: var(--ink); color: #fff; }
.dash__num { font-size: clamp(1.75rem, 2.4vw, 2.25rem); line-height: 1.05; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash__k { margin-top: var(--s-4); font-size: var(--t-body-s); font-weight: 500; }
.dash__t { font-size: var(--t-body-s); font-weight: 500; }
.dash__s { margin-top: 4px; font-size: var(--t-caption); line-height: 1.5; color: var(--ink-3); }
/* charts: the line, the old journey dotted behind it, March shaded as the redesign */
.dash__svg { display: block; width: 100%; height: auto; margin-top: auto; padding-top: var(--s-5); overflow: visible; }
.dash__band { fill: var(--dash-green); opacity: 0.08; }
.dash__plot { margin-top: auto; padding-top: var(--s-4); }
.dash__tag { display: block; text-align: right; font-size: 1rem; font-weight: 500; color: var(--dash-green); }
.dash__plot .dash__svg { margin-top: 6px; padding-top: 0; }
.dash__ours { fill: none; stroke: var(--dash-green); stroke-width: 2.2; stroke-linecap: round; }
.dash__theirs { fill: none; stroke: #BFC3BD; stroke-width: 1.6; stroke-dasharray: 2 4; stroke-linecap: round; }
.dash__end { fill: var(--dash-green); stroke: var(--dash-tile); stroke-width: 2.5; }
.dash__months { display: flex; justify-content: space-between; margin-top: 8px; font-size: 1rem; color: var(--ink-3); }
.dash__bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; height: 150px; margin-top: auto; padding-top: var(--s-5); }
.dash__col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.dash__val { font-size: var(--t-caption); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dash__bar { display: block; width: 100%; height: calc(var(--h) * 0.72); border-radius: 6px; background: #E3E5E1; transform-origin: 50% 100%; }
.dash__m { font-size: 1rem; color: var(--ink-3); }
.dash__col.is-on .dash__bar { background: var(--dash-green); }
.dash__col.is-on :is(.dash__val, .dash__m) { color: var(--dash-green); font-weight: 500; }
/* satisfaction */
.dash__ring { position: relative; flex: none; width: 104px; height: 104px; }
.dash__ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.dash__ring circle { fill: none; stroke-width: 8; }
.dash__ring-bg { stroke: #E3E5E1; }
.dash__ring-fg { stroke: var(--dash-green); stroke-linecap: round; stroke-dasharray: var(--c); stroke-dashoffset: var(--o); }
.dash__ring-v { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.375rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
/* the outcome, the one dark tile */
.dash__out .dash__s { margin-top: 0; color: rgba(255, 255, 255, 0.6); }
.dash__big { margin-top: var(--s-2); font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -0.04em; }
.dash__more { margin-top: auto; padding: 10px 18px; border-radius: var(--r-pill); background: #fff; color: var(--ink); font-size: var(--t-body-s); font-weight: 500; transition: transform 300ms var(--enter), background-color 300ms var(--enter); }
.dash__out .dash__big + .dash__more { margin-top: var(--s-6); }
.dash__more:active { transform: scale(0.97); }
/* drawn as it comes into view: lines from left to right, bars up from the floor, the ring round */
.js .dash .dash__wipe { transform: scaleX(0); transform-box: fill-box; transform-origin: 0 50%; transition: transform 1600ms cubic-bezier(0.65, 0, 0.35, 1) 300ms; }
.js .dash.in .dash__wipe { transform: none; }
.js .dash .dash__bar { transform: scaleY(0); transition: transform 1100ms cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(500ms + var(--i) * 140ms); }
.js .dash.in .dash__bar { transform: none; }
.js .dash .dash__ring-fg { stroke-dashoffset: var(--c); transition: stroke-dashoffset 1600ms cubic-bezier(0.65, 0, 0.35, 1) 600ms; }
.js .dash.in .dash__ring-fg { stroke-dashoffset: var(--o); }
@media (max-width: 900px) {
  .dash__kpi { grid-column: span 6; }
  .dash__chart, .dash__csat, .dash__out { grid-column: span 12; }
}

/* the report: the full numbers, in a sheet over the page */
.report { width: min(760px, calc(100vw - 32px)); max-width: none; max-height: min(88vh, 900px); margin: auto; padding: 0; border: 1px solid #E9EDEF; border-radius: 18px; background: #fff; color: var(--ink); overflow: auto; overscroll-behavior: contain; }
.report::backdrop { background: rgba(20, 20, 19, 0.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.report[open] { animation: report-in 420ms cubic-bezier(0.22, 1, 0.36, 1); }
.report[open]::backdrop { animation: report-fade 300ms linear; }
@keyframes report-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
@keyframes report-fade { from { opacity: 0; } }
.report__in { padding: var(--s-6) var(--s-6) var(--s-5); }
.report__head { position: sticky; top: calc(-1 * var(--s-6)); z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); margin: calc(-1 * var(--s-6)) calc(-1 * var(--s-6)) 0; padding: var(--s-6) var(--s-6) var(--s-4); background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid #EFF0EE; }
.report__head h3 { font-size: var(--t-title); font-weight: 500; letter-spacing: -0.015em; }
.report__sub { margin-top: 2px; font-size: var(--t-caption); color: var(--ink-3); }
.report__x { padding: 7px 14px; border-radius: 8px; border: 1px solid #DCDDD8; font-size: var(--t-caption); font-weight: 500; transition: background-color 250ms var(--enter); }
.report__x:hover { background: #F3F3F1; }
.report__sec { margin-top: var(--s-6); }
.report__sec h4 { font-size: var(--t-body-s); font-weight: 500; }
.report__scroll { margin-top: var(--s-3); overflow-x: auto; }
.report table { width: 100%; border-collapse: collapse; font-size: var(--t-caption); font-variant-numeric: tabular-nums; }
.report th, .report td { padding: 10px 0 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid #EFF0EE; }
.report thead th { font-weight: 400; color: var(--ink-3); }
.report tbody th { padding-left: 0; text-align: left; font-weight: 400; color: var(--ink-2); }
.report td:last-child { font-weight: 500; }
.report__pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.report dl { margin: var(--s-3) 0 0; font-size: var(--t-caption); font-variant-numeric: tabular-nums; }
.report dl div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #EFF0EE; }
.report dt { color: var(--ink-2); }
.report dd { margin: 0; font-weight: 500; }
.report__foot { margin-top: var(--s-6); font-size: var(--t-caption); color: var(--ink-3); }
@media (max-width: 720px) { .report__pairs { grid-template-columns: 1fr; } .report__in { padding: var(--s-5) var(--s-4); } .report__head { top: calc(-1 * var(--s-5)); margin: calc(-1 * var(--s-5)) calc(-1 * var(--s-4)) 0; padding: var(--s-5) var(--s-4) var(--s-4); } }

/* ───────── lists, each in the shape it had on the original site (build.mjs, list()) ───────── */
.cs-sec { --measure: none; }
/* a black case study (LV X Cred): the page's tokens flipped, so text, rules, panels and frames all stay readable */
body:has(.cs--dark) { background: #0A0A0A; }
.cs--dark { --paper: #0A0A0A; --ink: #F2F1EC; --ink-2: #C4C2BA; --ink-3: #9C9A93; --rule: rgba(255, 255, 255, 0.16); --surface: #17171A; color: var(--ink-2); background: #0A0A0A; }
.cs--dark .panel { border-color: #2A2A2E; }
.cs--dark .lx--columns li:nth-child(5n + 4) { --c: #6F8CFF; }
.cs--dark .lx--columns li:nth-child(5n + 2) { --c: #E0A21A; }
/* case studies: headings at a whole 32px, then body at 16px */
.cs .cs-h3 { font-size: 20px; line-height: 28px; } /* sub-headings inside a section, like "What we did" */
.cs .cs-sec__head h2, .cs .cs-step__t { font-size: 32px; line-height: 40px; max-width: none; text-wrap: wrap; } /* run the full column width, no early breaks */
@media (max-width: 720px) { .cs .cs-sec__head h2, .cs .cs-step__t { font-size: 28px; line-height: 36px; } }
/* short questions, plain text in small grey boxes */
.lx--qboxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lx--qboxes li { padding: 14px var(--s-5); border-radius: 12px; background: var(--soft); color: var(--ink); }
@media (max-width: 720px) { .lx--qboxes { grid-template-columns: 1fr; } }
/* case studies: nothing under 16px; small text keeps its place by colour, not by shrinking */
.cs { --t-caption: 1rem; --t-body-s: 1rem; }
/* the labels over each section, step and the project line are tags: capitals, a little tracked */
.cs .cs-sec__head > .caption, .cs .cs-step > .caption, .cs .cs-hero__grid > div > .caption, .cs .cs-meta dt {
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; color: var(--ink-3); } /* text in a case study runs the full width of its column */
.lx { --soft: #F0F2F5; --tint: #EEF3FE; --tint-ink: #2E54D1; --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  margin: 0; padding: 0; list-style: none; font-size: var(--t-body); line-height: 1.6; color: var(--ink-2); }
.lx strong { font-weight: 500; color: var(--ink); }
.lx__t { font-weight: 500; color: var(--ink); }
.lx__x { margin: 0; }
/* a numbered list */
.lx--ol { display: grid; gap: 10px; counter-reset: lx; }
.lx--ol li { display: grid; grid-template-columns: 1.9em minmax(0, 1fr); counter-increment: lx; }
.lx--ol li::before { content: counter(lx) "."; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lx--rule { padding: 2px 0 2px var(--s-5); border-left: 2px solid var(--rule); }
/* a bulleted list */
.lx--bullets { display: grid; gap: 8px; }
.lx--bullets li { position: relative; padding-left: 1.4em; }
.lx--bullets li::before { content: ""; position: absolute; left: 0.35em; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
/* a soft panel of numbered rows */
.lx--rows { padding: var(--s-2) var(--s-6); border-radius: 14px; background: var(--soft); }
.lx--rows li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); padding: var(--s-4) 0; color: var(--ink); }
.lx--rows li + li { border-top: 1px solid rgba(20, 20, 19, 0.07); }
.lx__n { padding-top: 0.1em; font-family: var(--mono); font-size: 1rem; color: var(--ink-3); }
/* cards side by side */
.lx--cards, .lx--tint, .lx--chips { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 12px; }
.lx--cards li { display: flex; flex-direction: column; justify-content: flex-end; min-height: 220px; padding: var(--s-5); border-radius: 12px; background: var(--soft); }
.lx--cards .lx__x, .lx--tint .lx__x { margin-top: 6px; }
.lx--tint li { min-height: 240px; padding: var(--s-5); border-radius: 12px; background: var(--tint); color: var(--ink); }
.lx--tint .lx__t { color: var(--tint-ink); }
.lx--chips li { padding: 18px var(--s-5); border-radius: 12px; background: var(--tint); color: var(--tint-ink); }
/* stacked boxes */
.lx--boxes { display: grid; gap: 10px; }
.lx--boxes li { padding: var(--s-5) var(--s-6); border-radius: 12px; background: var(--soft); }
.lx--boxes .lx__t { font-family: var(--mono); font-size: 1rem; font-weight: 400; letter-spacing: 0; }
.lx--caps .lx__t { text-transform: uppercase; letter-spacing: 0.03em; }
.lx--num .lx__t { font-family: inherit; font-size: var(--t-title); font-weight: 500; letter-spacing: -0.01em; }
.lx--boxes .lx__x { margin-top: 8px; }
/* big questions */
.lx--questions { display: grid; gap: 2px; }
.lx--questions li { font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.2; font-weight: 500; letter-spacing: -0.025em; color: var(--ink); }
/* titled columns, each title in its own colour */
.lx--columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-7) var(--s-6); }
.lx--columns li { --c: #F2603D; }
.lx--columns li:nth-child(5n + 2) { --c: #A87300; } .lx--columns li:nth-child(5n + 3) { --c: #1F9D63; } .lx--columns li:nth-child(5n + 4) { --c: #2E54D1; } .lx--columns li:nth-child(5n + 5) { --c: #D6336C; }
.lx--columns .lx__t { font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--c); }
.lx--columns .lx__x { margin-top: var(--s-3); }
/* a framed list */
.lx--framed { display: grid; gap: var(--s-4); padding: var(--s-6) var(--s-7); border: 1.5px solid var(--ink); border-radius: 20px; }
.lx--framed li { position: relative; padding-left: 1.4em; }
.lx--framed li::before { content: ""; position: absolute; left: 0.3em; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.lx--framed .lx__t { font-size: var(--t-title); line-height: 1.4; }
.lx--framed .lx__x { margin-top: 4px; }
@media (max-width: 720px) {
  .lx--cards, .lx--tint, .lx--chips { grid-template-columns: 1fr; }
  .lx--cards li, .lx--tint li { min-height: 0; }
  .lx--rows, .lx--boxes li { padding-inline: var(--s-4); }
  .lx--framed { padding: var(--s-5); }
}

/* numbers, in the shape they had on the original site */
.stats--dark, .stats--tint { gap: 12px; border: 0; }
.stats--dark .stat, .stats--tint .stat { padding: var(--s-5); border: 0; border-radius: 14px; }
.stats--dark .stat { background: #2A2B2F; }
.stats--dark .stat__num { color: #fff; }
.stats--dark .stat__k { color: rgba(255, 255, 255, 0.78); }
.stats--dark .caption { margin-top: var(--s-3); color: #B6DE74; }
.stats--tint .stat { display: flex; flex-direction: column; justify-content: flex-end; min-height: 170px; background: #EEF3FE; }
.stats--tint .stat__num { font-size: 1.5rem; letter-spacing: -0.02em; color: #2E54D1; }
.stats--tint .stat__k { margin-top: var(--s-2); }
.stats--inline { display: flex; justify-content: center; gap: clamp(28px, 6vw, 72px); border: 0; text-align: center; }
.stats--inline .stat, .stats--inline .stat + .stat { padding: 0; border: 0; }
.stats--inline .stat__num { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 1.375rem; letter-spacing: 0; }
.stats--inline .stat__k { margin-top: 4px; color: var(--ink-3); }
@media (max-width: 720px) { .stats--dark, .stats--tint { grid-template-columns: 1fr; } .stats--inline { flex-wrap: wrap; } }

.items { border-bottom: 1px solid var(--rule); }
.items li { padding: var(--s-5) 0; border-top: 1px solid var(--rule); }
.items__title { font-size: var(--t-title); line-height: 1.35; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
.items__title + .items__x { margin-top: var(--s-2); }
.items__x { max-width: var(--measure); }
.items--compact li { padding: 14px 0; }
.items--compact .items__x { color: var(--ink); }

.links { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); }
.toolrows { border-bottom: 1px solid var(--rule); }
.toolrows li { display: flex; align-items: center; gap: var(--s-4); padding: 14px 0; border-top: 1px solid var(--rule); color: var(--ink); }
.toolrows__icons { display: flex; flex: 0 0 56px; }
.toolrows__icons img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 2px var(--paper); }
.toolrows__icons img + img { margin-left: -10px; }
.tline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.tline li { padding-top: var(--s-4); border-top: 1px solid var(--ink); }
.tline__v { display: block; margin-top: 2px; color: var(--ink); font-weight: 500; }

.dtable table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dtable th { text-align: left; font-weight: 400; padding-bottom: var(--s-3); }
.dtable th:not(:first-child), .dtable td.num { text-align: right; }
.dtable td { padding: var(--s-4) 0; border-top: 1px solid var(--rule); color: var(--ink); }
.dtable tr:last-child td { border-bottom: 1px solid var(--rule); color: var(--ink-3); }
.dtable__foot { display: flex; align-items: baseline; gap: var(--s-4); margin-top: var(--s-5); }

.bars figcaption .caption { margin-top: 2px; }
.bars__plot { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--s-4); height: 240px; margin-top: var(--s-7); border-bottom: 1px solid var(--ink); }
.bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bar__col { width: min(100%, 64px); height: var(--h); background: #D6D3CA; border-radius: 4px 4px 0 0; transform-origin: 50% 100%; transition: transform 1100ms var(--enter); transition-delay: calc(var(--i) * 90ms + 200ms); }
.bar.is-after .bar__col { background: var(--ink); }
.bar__v { margin-bottom: var(--s-2); font-size: var(--t-caption); color: var(--ink); font-variant-numeric: tabular-nums; }
.bar__k { position: absolute; bottom: -28px; font-size: var(--t-caption); color: var(--ink-3); }
.js .bars:not(.in) .bar__col { transform: scaleY(0); }
.bars__legend { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-8); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: #D6D3CA; }
.sw--after { background: var(--ink); margin-left: var(--s-4); }

.compare { padding: 0; touch-action: pan-y; }
.compare__img { width: 100%; height: auto; }
.compare__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); background: var(--surface); }
.compare__before .compare__img { height: 100%; object-fit: cover; }
.compare__tag { position: absolute; top: 14px; z-index: 2; padding: 4px 12px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: var(--t-caption); font-weight: 500; }
.compare__tag--l { left: 14px; } .compare__tag--r { right: 14px; }
/* the divider: a dark line you can always see, with a round grip in the middle to drag */
.compare__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--ink); z-index: 2; pointer-events: none; }
.compare__line span { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); transition: transform 250ms var(--enter); }
.compare__line span::before, .compare__line span::after { content: ""; position: absolute; top: 50%; width: 2px; height: 14px; margin-top: -7px; border-radius: 2px; background: var(--ink); }
.compare__line span::before { left: 14px; } .compare__line span::after { right: 14px; }
.compare:hover .compare__line span { transform: scale(1.08); }
.compare__range { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: var(--cur-ew); }
.compare:has(.compare__range:focus-visible) .compare__line span { outline: 2px solid var(--accent); outline-offset: 2px; }

.eras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6) var(--s-4); }
.eras .panel { padding: 10px; }
.eras .items__title { margin-top: var(--s-4); }
.eras .items__x { margin-top: var(--s-2); font-size: var(--t-body-s); line-height: 1.5; }

.cs-next { width: min(100% - 2 * var(--gutter), var(--col)); margin: var(--s-10) auto 0; }
.next { display: block; padding-top: var(--s-5); border-top: 1px solid var(--rule); }
.next__title { margin: var(--s-3) 0 var(--s-2); }
.cs-end { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--rule); color: var(--ink); }

/* About: the pinned video hero, as on the original site */
.vhero { position: relative; height: 280vh; background: var(--night); }
.vhero__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.vhero__video { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.vhero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.55) 100%), linear-gradient(0deg, rgba(0,0,0,0.35), rgba(0,0,0,0) 40%); }
.vhero__text {
  position: absolute; inset: 0; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  padding: 85vh 0 60vh; pointer-events: none;
}
.vhero__title, .vhero__intro { width: min(520px, 100%); }
.vhero__title { color: var(--night-ink); }
.vhero__intro { color: var(--night-ink); }
.vhero__intro strong { color: var(--night-ink); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(242, 241, 236, 0.35); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.page--about .cs-sec:first-of-type { margin-top: var(--s-9); }

.masonry { width: min(100% - 2 * var(--gutter), var(--maxw)); margin: var(--s-7) auto 0; }
.masonry { columns: 4; column-gap: var(--s-3); }
.masonry li { break-inside: avoid; margin-bottom: var(--s-3); }
.masonry .media { width: 100%; border-radius: var(--r-s); background: var(--surface); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* the gaming stack: six disc cases standing in a row, seen from a little above and to the left, so each shows its
   spine and its cover. Every case is a real box (spine, cover, back, opening edge, top, bottom) in blue plastic.
   Hover one and it rises out of the row. */
.gstack { --H: clamp(150px, 22vw, 320px); --W: calc(var(--H) * 0.8); --D: calc(var(--H) * 0.1); --plastic: #2B57E0; --plastic-2: #1E43C4;
  display: flex; justify-content: center; margin: var(--s-7) auto 0; padding: calc(var(--H) * 0.22) var(--gutter) calc(var(--H) * 0.5); overflow-x: clip; overflow-y: visible; }
.gstack__row { display: flex; gap: calc(var(--H) * 0.16); margin: 0; padding: 0 calc(var(--W) * 0.62) 0 0; list-style: none; }
.gcase { position: relative; width: var(--D); height: var(--H); flex: none; transition: transform 600ms var(--enter); }
.gcase__box { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 0 100%; transform: perspective(2200px) rotateX(-28deg) rotateY(-40deg); }
.gcase__face { position: absolute; left: 0; top: 0; overflow: hidden; backface-visibility: hidden; background: var(--plastic); }
.gcase__face img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.gcase__spine { width: var(--D); height: var(--H); transform: translateZ(calc(var(--W) / 2)); }
.gcase__cover, .gcase__back { width: var(--W); height: var(--H); left: calc((var(--D) - var(--W)) / 2); }
.gcase__cover { transform: rotateY(90deg) translateZ(calc(var(--D) / 2)); }
.gcase__back { transform: rotateY(-90deg) translateZ(calc(var(--D) / 2)); background: var(--plastic-2); }
.gcase__edge { width: var(--D); height: var(--H); transform: rotateY(180deg) translateZ(calc(var(--W) / 2)); background: var(--plastic-2); }
.gcase__top, .gcase__bottom { width: var(--D); height: var(--W); top: calc((var(--H) - var(--W)) / 2); }
.gcase__top { transform: rotateX(90deg) translateZ(calc(var(--H) / 2)); background: linear-gradient(90deg, #3F6BF0, var(--plastic)); }
.gcase__bottom { transform: rotateX(-90deg) translateZ(calc(var(--H) / 2)); background: var(--plastic-2); }
/* a thin plastic rim around the cover and spine art, like the sleeve sitting under the case's clear front */
.gcase__spine::after, .gcase__cover::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 calc(var(--H) * 0.008) rgba(30, 67, 196, 0.85), inset 0 0 0 calc(var(--H) * 0.012) rgba(255, 255, 255, 0.12); pointer-events: none; }
.gcase__cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(105deg, rgba(255, 255, 255, 0.16) 0 18%, transparent 34%); pointer-events: none; }
/* coming into view, they drop into the row one after another; on hover, one rises out of it */
.js .gstack .gcase { transform: translateY(calc(var(--H) * -0.35)); opacity: 0; transition: transform 900ms var(--enter), opacity 500ms linear; transition-delay: calc(var(--i) * 90ms); }
.js .gstack.in .gcase { transform: none; opacity: 1; }
.js .gstack.in .gcase:hover { transform: translateY(calc(var(--H) * -0.12)); transition-delay: 0ms; transition-duration: 450ms; }
.js .gstack.in .gcase:hover ~ .gcase { transform: translateX(calc(var(--H) * 0.05)); transition-delay: 0ms; }

.reel {
  --inset: max(var(--gutter), (100vw - var(--col)) / 2);
  margin-top: var(--s-8); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--inset); scrollbar-width: none; cursor: var(--cur-grab);
}
.reel::-webkit-scrollbar { display: none; }
.reel.is-dragging { cursor: var(--cur-grabbing); scroll-snap-type: none; }
.reel.is-dragging * { pointer-events: none; }
.reel__track { display: flex; gap: var(--s-5); padding-inline: var(--inset); width: max-content; }
.reel__item { flex: 0 0 clamp(260px, 30vw, 400px); scroll-snap-align: start; }
.reel__item .items__title { margin-top: var(--s-4); }
.reel__item .items__x { margin-top: var(--s-2); font-size: var(--t-body-s); line-height: 1.5; }
.reel .media { user-select: none; -webkit-user-drag: none; }

/* ───────── playground: the tape shelf ───────── */
/* One straight, endless row of VHS spines across the full width. The tape in the middle turns to show its cover. */
.page--shelf { padding-bottom: 0; }
.shelf {
  --W: clamp(160px, min(17vw, 27svh), 300px); --H: calc(var(--W) * 1.74); --D: calc(var(--W) * 0.29);
  position: relative; overflow: hidden; padding: 0 0 var(--s-9);
}
/* A centred statement on the sky, like the home hero but a size smaller. */
.shelf__hero { padding: clamp(72px, 16svh, 168px) 0 var(--s-7); text-align: center; }
.shelf__statement { max-width: 15em; margin: var(--s-3) auto 0; }
.shelf__kicker { font-weight: 500; }
.shelf__tabs { display: flex; width: max-content; max-width: calc(100% - 2 * var(--gutter)); margin: 0 auto; border: 1px solid var(--on-sky); border-radius: 4px; overflow: hidden; background: var(--g-bg); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); transition: border-color 400ms linear; }
.shelf__tabs button { padding: 7px 16px; font-size: var(--t-body-s); font-weight: 500; color: var(--on-sky); white-space: nowrap; transition: background-color 200ms var(--enter), color 200ms var(--enter); }
.shelf__tabs button + button { border-left: 1px solid var(--on-sky); }
.shelf__tabs button:hover { background: var(--g-surface); }
.shelf__tabs button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.shelf__stage { position: relative; height: calc(var(--H) * 1.12); margin-top: var(--s-5); perspective: 3400px; perspective-origin: 50% 40%; outline: none; touch-action: pan-y; cursor: var(--cur-grab); }
.shelf__stage:active { cursor: var(--cur-grabbing); }
/* the row stands on something: a soft contact shadow along its foot */
.shelf__stage::after { content: ''; position: absolute; left: 0; right: 0; top: calc(50% + var(--H) / 2 - 6px); height: 28px; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, rgba(20, 20, 19, 0.28), rgba(20, 20, 19, 0) 70%); filter: blur(2px); }
.shelf__stage:focus-visible { outline: 2px solid var(--accent); outline-offset: -8px; }

.tape {
  position: absolute; left: 50%; top: 50%; width: var(--W); height: var(--H); margin: calc(var(--H) / -2) 0 0 calc(var(--W) / -2);
  padding: 0; transform-style: preserve-3d; transform-origin: 50% 100%; will-change: transform;
}
/* Fades go on the faces, never the tape: opacity or a filter on a 3D box flattens it and shows the hidden sides. */
.tape__face, .tape .cassette { transition: opacity 400ms var(--enter), filter 400ms var(--enter); }
.tape__box { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 700ms cubic-bezier(0.34, 1.45, 0.64, 1); }
.tape__face { position: absolute; display: block; overflow: hidden; color: var(--hue, #2E54D1); backface-visibility: hidden;
  /* printed on paper, like the rest of the site: flat, inked in the tape's own colour */
  background: var(--sleeve, #FFFFFF);
}
.tape__face::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  /* old printed card: a fine paper grain over everything, and the edges a touch worn and grey */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2  0 0 0 0 .2  0 0 0 0 .2  0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 180px 180px; opacity: 0.16; mix-blend-mode: multiply;
  box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.06), inset 0 0 calc(var(--W) * 0.06) rgba(20, 20, 19, 0.1); }
.tape__front {
  inset: 0; transform: translateZ(calc(var(--D) / 2)); border-radius: 5px;
  /* the case: black plastic, a rim round the paper insert, a little light caught along its left edge */
  padding: 5%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.1) 0 3%, rgba(255, 255, 255, 0) 9% 91%, rgba(255, 255, 255, 0.05)), #141416;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
/* the paper insert behind the clear front: the tape's stripes across the top, the art, then the label */
.tape__front > .tape__insert {
  display: grid; grid-template-rows: 1fr auto; height: 100%; padding: 11% 7% 6%; border-radius: 2px; color: var(--hue, #2E54D1);
  background:
    linear-gradient(to bottom, transparent 3%, var(--hue) 3% 4.4%, transparent 4.4% 5.2%, color-mix(in srgb, var(--hue) 60%, #fff) 5.2% 6.6%, transparent 6.6% 7.4%, color-mix(in srgb, var(--hue) 30%, #fff) 7.4% 8.8%, transparent 8.8%),
    var(--sleeve, #FFFFFF);
}
/* plastic sleeve over the cover: a glint that follows the cursor (--gx / --gy) plus a fixed diagonal sheen */
.tape__front::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: soft-light;
  /* the sleeve's clear plastic: just a soft glint that follows the cursor (--gx / --gy) */
  background: radial-gradient(55% 40% at var(--gx, 30%) var(--gy, 18%), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 70%); }
.tape__top { grid-area: top; font-size: max(9px, calc(var(--W) * 0.045)); font-weight: 500; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.tape__title { grid-area: title; margin-top: 3%; font-size: calc(var(--W) * 0.13); line-height: 1; letter-spacing: -0.03em; font-weight: 500; text-wrap: balance; }
.tape__art { position: relative; overflow: hidden; border-radius: 2px; background: color-mix(in srgb, var(--hue, #2E54D1) 12%, var(--sleeve, #FFFFFF)); }
.tape__art .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: contrast(1.04) saturate(0.88); }
/* scan lines over the art, like a still from a tape */
.tape__art::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(20, 20, 19, 0.07) 0 1px, transparent 1px 3px); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hue) 70%, #000); border-radius: inherit; }
.tape__label { display: grid; grid-template-areas: 'top' 'title' 'kind'; padding-top: 7%; }
.tape__kind { grid-area: kind; margin-top: 3%; font-size: max(9px, calc(var(--W) * 0.05)); font-weight: 500; color: color-mix(in srgb, var(--hue) 70%, #141413); }
.tape__badge { padding: 1px 5px; border: 1.5px solid currentColor; border-radius: 3px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.2; }
.tape__badge--front { grid-area: badge; justify-self: end; align-self: start; display: grid; place-items: center; width: calc(var(--W) * 0.16); height: calc(var(--W) * 0.16); margin-top: calc(var(--W) * -0.1); padding: 0;
  border: 0; border-radius: 50%; background: var(--hue); color: #fff; font-size: max(8px, calc(var(--W) * 0.045)); transform: rotate(-12deg);
  /* a round rental sticker, a dashed ring printed inside its edge */
  box-shadow: inset 0 0 0 calc(var(--W) * 0.012) var(--hue), inset 0 0 0 calc(var(--W) * 0.02) rgba(255, 255, 255, 0.75); }
.tape__spine {
  top: 0; height: 100%; width: var(--D); left: calc((var(--W) - var(--D)) / 2); border-radius: 5px;
  padding: calc(var(--D) * 0.14);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 22% 78%, rgba(0, 0, 0, 0.25)), #141416;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.tape__spine > .tape__insert {
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; padding: calc(var(--H) * 0.085) 0 calc(var(--H) * 0.08); border-radius: 2px; color: var(--hue, #2E54D1);
  background:
    linear-gradient(to bottom, transparent 2.6%, var(--hue) 2.6% 3.6%, transparent 3.6% 4.2%, color-mix(in srgb, var(--hue) 60%, #fff) 4.2% 5.2%, transparent 5.2% 5.8%, color-mix(in srgb, var(--hue) 30%, #fff) 5.8% 6.8%, transparent 6.8% 93.2%, color-mix(in srgb, var(--hue) 30%, #fff) 93.2% 94.2%, transparent 94.2% 94.8%, color-mix(in srgb, var(--hue) 60%, #fff) 94.8% 95.8%, transparent 95.8% 96.4%, var(--hue) 96.4% 97.4%, transparent 97.4%),
    var(--sleeve, #FFFFFF);
}
/* the clear plastic over the spine: a soft vertical glint off-centre */
.tape__spine::before { content: none; }
.tape__spine--r { transform: rotateY(90deg) translateZ(calc(var(--W) / 2)); }
.tape__spine--l { transform: rotateY(-90deg) translateZ(calc(var(--W) / 2)); }
.tape__spine-art { position: relative; width: 74%; aspect-ratio: 1; overflow: hidden; border-radius: 2px; background: color-mix(in srgb, var(--hue, #2E54D1) 12%, var(--sleeve, #FFFFFF)); display: grid; place-items: center; }
.tape__spine-art .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tape__emblem { font-size: calc(var(--D) * 0.26); font-weight: 500; letter-spacing: -0.02em; }
.tape__hatch { position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'%3E%3Cg fill='%23141413' fill-opacity='.13'%3E%3Crect width='3' height='3'/%3E%3Crect x='6' width='3' height='3'/%3E%3Crect y='6' width='3' height='3'/%3E%3Crect x='6' y='6' width='3' height='3'/%3E%3C/g%3E%3C/svg%3E"); background-size: 12px 12px; }
/* The one place the site leaves Geist: tape spines print in Silkscreen, a pixel face, like the label on a VHS. */
.tape__spine-title, .tape__spine-foot { font-family: 'Silkscreen', 'Geist', ui-monospace, monospace; font-weight: 400; }
.tape__spine-title { align-self: center; writing-mode: vertical-rl; font-size: calc(var(--D) * 0.27); line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; max-height: 100%; padding: 10% 0; }
.tape__spine-foot { display: grid; justify-items: center; gap: 6px; font-size: max(9px, calc(var(--D) * 0.13)); letter-spacing: 0.04em; text-transform: uppercase; }
.tape__spine-foot .tape__badge { font-family: 'Geist', ui-sans-serif, system-ui, sans-serif; font-weight: 500; }
.tape__spine-foot .tape__badge { font-size: calc(var(--D) * 0.18); }
.tape__lid { top: calc((var(--H) - var(--D)) / 2); left: 0; width: 100%; height: var(--D); transform: rotateX(90deg) translateZ(calc(var(--H) / 2)); background: linear-gradient(180deg, #232327, #18181B); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.tape--blank { --hue: #8F8C83; }
.tape__art--blank { display: grid; place-items: center; text-align: center; background: var(--sleeve, #FFFFFF); box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.08); }
.tape__blank-note { position: relative; font-size: calc(var(--W) * 0.05); line-height: 1.4; font-weight: 500; }

/* The tape in the middle comes off the shelf a little, tilted, and casts a soft shadow onto the ones behind. */
/* The middle tape also turns a few degrees toward the cursor (--rx / --ry from main.js), like holding it. */
.tape.is-center .tape__box { transform: translateY(-2%) rotateZ(-2.5deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); animation: tape-pop 720ms cubic-bezier(0.34, 1.3, 0.64, 1) both; }
@keyframes tape-pop {
  /* on top of its resting pose: it starts level in the row, overshoots up and over, then settles */
  0% { translate: 0 2%; rotate: z 2.5deg; }
  45% { translate: 0 -4%; rotate: z -1.5deg; }
  100% { translate: 0 0; rotate: z 0deg; }
}
.tape.is-center.is-held .tape__box { transition-duration: 300ms; transition-timing-function: var(--enter); }
.tape.is-center .tape__front { box-shadow: 0 30px 50px -24px rgba(20, 20, 19, 0.45); }
@media (hover: hover) {
  /* hovering a spine slides that tape up out of the row, like pulling it halfway off the shelf */
  .tape.is-spine:not(.is-dim):hover .tape__box { transform: translateY(-8%); transition: transform 520ms cubic-bezier(0.34, 1.5, 0.64, 1); }
  .tape.is-spine:not(.is-dim):hover .tape__spine { filter: brightness(1.08); }
}
.tape.is-spine .tape__front, .tape.is-spine .tape__lid, .tape.is-spine .cassette { visibility: hidden; }
.tape.is-dim { pointer-events: none; }
.tape.is-dim .tape__face { opacity: 0.22; filter: grayscale(0.8); }
.is-opening .tape:not(.is-pulled) .tape__face { opacity: 0.16; filter: blur(1px); }
.is-locked, .is-locked body { overflow: hidden; }

/* The cassette inside each sleeve: a moulded black shell (grip ridges down both sides, a screw in each corner, a
   raised rim), a paper label, a smoked window onto the reels, and the door at the foot with its record tab. The tape
   wound on the reels is the tape's own colour, deepened. It slides out of the top when you open a tape. */
@property --wound-a { syntax: '<percentage>'; inherits: true; initial-value: 74%; }
@property --wound-b { syntax: '<percentage>'; inherits: true; initial-value: 44%; }
.cassette {
  --pack: color-mix(in srgb, var(--hue, #2E54D1) 62%, #121014); --pack-hi: color-mix(in srgb, var(--hue, #2E54D1) 78%, #ffffff 4%); --pack-lo: color-mix(in srgb, var(--hue, #2E54D1) 38%, #08070a);
  position: absolute; left: 7%; right: 7%; top: 3%; bottom: 3%; transform: translateZ(0); border-radius: 6px;
  background:
    /* grip ridges down both long edges */
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 4px) left 0 top 18% / 5% 64% no-repeat,
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 4px) right 0 top 18% / 5% 64% no-repeat,
    /* a faint moulded texture and a soft top light */
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 60%),
    linear-gradient(180deg, #26252b, #18171c 55%, #1e1d22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 0 0 4px #17161b, inset 0 0 0 5px rgba(255, 255, 255, 0.05), inset 0 2px 0 rgba(255, 255, 255, 0.1), inset 0 -12px 18px -12px rgba(0, 0, 0, 0.9);
  display: grid; grid-template-rows: auto 1fr auto; gap: 5%; padding: 10% 10% 7%; visibility: hidden;
}
.cassette::before, .cassette::after { content: none; }
/* four screws, one in each corner */
.cassette__screws { position: absolute; inset: 2.6% 3.4%; pointer-events: none;
  --screw: radial-gradient(circle at 40% 38%, #9b98a2 0 18%, #4a4850 36%, #1d1c21 62%, transparent 66%);
  background: var(--screw) left top / 9px 9px no-repeat, var(--screw) right top / 9px 9px no-repeat, var(--screw) left bottom / 9px 9px no-repeat, var(--screw) right bottom / 9px 9px no-repeat; }
/* the paper label: three stripes in the tape's colour, the title, a ruled line and the speed */
.cassette__label {
  position: relative; display: grid; gap: 4px; padding: 13% 7% 7%; border-radius: 3px; color: #1b1712; text-align: center;
  background:
    linear-gradient(to bottom, var(--hue) 0 9%, transparent 9% 13%, color-mix(in srgb, var(--hue) 55%, #fff) 13% 19%, transparent 19%),
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(20, 20, 19, 0.08) 9px 10px), #FBFBF9;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(20, 20, 19, 0.06);
}
.cassette__title { display: block; font-size: calc(var(--W) * 0.05); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.2; }
.cassette__note { display: block; justify-self: end; font-family: 'Geist Mono', ui-monospace, monospace; font-size: max(8px, calc(var(--W) * 0.028)); letter-spacing: 0.06em; color: color-mix(in srgb, var(--hue) 70%, #141413); }
/* the window: recessed, smoked clear plastic with a glare across it */
.cassette__window {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; border-radius: 6px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)), rgba(12, 11, 15, 0.75);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 3px 8px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.06);
}
.cassette__window::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, transparent 0 28%, rgba(255, 255, 255, 0.1) 30% 38%, transparent 40% 52%, rgba(255, 255, 255, 0.05) 54% 57%, transparent 59%); }
/* the tape running from one reel to the other, down the side of the window */
.cassette__strand { position: absolute; top: 22%; bottom: 22%; right: 19%; width: 2px; border-radius: 1px; background: linear-gradient(180deg, var(--pack-hi), var(--pack)); opacity: 0.9; z-index: 1; }
/* a reel: clear flange, then the wound tape in the tape's colour (fine grooves catching the light), then the hub */
.reel {
  position: relative; z-index: 1; width: 60%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 calc(var(--wound) - 0.5%), rgba(255, 255, 255, 0.08) var(--wound), transparent calc(var(--wound) + 1%)),
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px),
    radial-gradient(circle, transparent 0 18%, var(--pack-lo) 19%, var(--pack) 34%, var(--pack-hi) calc(var(--wound) - 8%), var(--pack) calc(var(--wound) - 2%), var(--pack-lo) var(--wound), rgba(255, 255, 255, 0.04) calc(var(--wound) + 0.5%) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.35);
}
/* (the Fun page's scroller is also called .reel; none of its spacing or scrolling applies to a cassette's reels) */
.cassette .reel { margin: 0; overflow: visible; scroll-snap-type: none; cursor: inherit; }
.reel:first-child { --wound: var(--wound-a); }
.reel:last-child { --wound: var(--wound-b); }
/* the hub: white, six teeth round a dark spindle hole, so you can see it turn */
.reel::after { content: ''; position: absolute; inset: 31%; border-radius: 50%;
  background:
    radial-gradient(circle, #121014 0 20%, transparent 21%),
    conic-gradient(from 0deg, #f4f1ea 0 7%, #cfc9bd 7% 16.6%, #f4f1ea 16.6% 23.6%, #cfc9bd 23.6% 33.3%, #f4f1ea 33.3% 40.3%, #cfc9bd 40.3% 50%, #f4f1ea 50% 57%, #cfc9bd 57% 66.6%, #f4f1ea 66.6% 73.6%, #cfc9bd 73.6% 83.3%, #f4f1ea 83.3% 90.3%, #cfc9bd 90.3%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.5); }
/* the door at the foot: ridged, with the record tab in the tape's colour */
.cassette__foot { position: relative; display: block; height: calc(var(--W) * 0.07); border-radius: 3px; background: repeating-linear-gradient(90deg, #0d0c10 0 3px, #2a2830 3px 6px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.cassette__tab { position: absolute; left: 6%; top: 22%; width: 10%; height: 56%; border-radius: 1px; background: var(--hue); opacity: 0.9; }
/* while it plays, tape winds from one reel onto the other */
@keyframes wind { to { --wound-a: 62%; --wound-b: 58%; } }
.tape.is-pulled .reel:last-child::after { animation-duration: 1500ms; }
@keyframes spin { to { transform: rotate(360deg); } }

.shelf__info { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-6); padding: 0 var(--gutter); margin-top: var(--s-4); text-align: center; }
.shelf__step { justify-self: start; padding: 8px 16px; border-radius: var(--r-pill); font-size: var(--t-body-s); font-weight: 500; color: var(--on-sky); background: var(--g-bg); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); box-shadow: inset 0 1px 0 var(--g-edge); transition: color 200ms var(--enter), background-color 200ms var(--enter); }
.shelf__step + .shelf__now + .shelf__step { justify-self: end; }
.shelf__step:hover { background: var(--g-surface); }
/* the tape's name sits on a small glass plate, so it reads over any part of the sky */
.shelf__now { justify-self: center; text-align: center; padding: var(--s-4) var(--s-6); border-radius: var(--r-l); }
.shelf__title { color: var(--ink); min-height: 1.15em; }
.shelf__sub { margin-top: var(--s-2); font-size: var(--t-caption); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.shelf__year { margin-top: 2px; color: var(--ink-2); }

/* Opened tape: a glass card floats over the shelf, the cover on the right and the details on the left. Nothing is
   drawn behind it: the shelf and the sky show through the card's blur. Its ink follows the sky like every glass sheet. */
.tape-view { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--gutter); cursor: var(--cur-pointer); }
.tape-view[hidden] { display: none; }
/* behind the card: the tape's artwork at a big grain (main.js, "artField"), drawn one canvas pixel per cell */
.tape-view { overflow: hidden; }
.tape-view__field { position: absolute; left: 0; top: 0; image-rendering: pixelated; }
/* the covers: dithered artwork, kept crisp */
.tape__dither { image-rendering: pixelated; }
.btn--ink { background: var(--ink); color: var(--paper); }
/* on glass the button follows the sky: dark with light text by day, light with dark text by night */
.glass .btn--ink { color: var(--g-ink-inv); }

@media (max-width: 720px) {
  .shelf { --W: clamp(140px, 44vw, 190px); }
  .shelf__tabs button { padding: 6px 10px; }
  .shelf__info { grid-template-columns: auto 1fr auto; gap: var(--s-2); }
  .shelf__title { font-size: 1.5rem; }
    }

/* ───────── resume printer ───────── */
/* A sheet of paper tucked in at the right edge of the page. Hovering pulls it out a little; opening the printer tucks
   it away. The paper keeps a real shadow: it's an object, not a container. */
.cvtab { position: fixed; right: 0; top: 24vh; z-index: 55; width: 72px; height: 90px; padding: 0; transform: translateX(26px) rotate(-7deg); transform-origin: 100% 50%; transition: transform 600ms cubic-bezier(0.34, 1.45, 0.64, 1); cursor: var(--cur-pointer); }
.cvtab__sheet { position: absolute; inset: 0; display: block; padding: 10px 11px; border-radius: 3px; background: linear-gradient(170deg, #fff 60%, #f2f2f4); box-shadow: 0 1px 1px rgba(20, 20, 19, 0.08), 0 8px 18px -8px rgba(20, 20, 19, 0.35); text-align: left; }
.cvtab__sheet::after { content: ""; position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; background: linear-gradient(225deg, transparent 50%, #e4e2dc 50%); border-radius: 0 0 3px 0; }
.cvtab__mark { display: inline-block; padding: 1px 4px; border-radius: 3px; background: var(--accent); color: #fff; font-size: 8px; font-weight: 600; letter-spacing: 0.04em; line-height: 1.4; }
.cvtab__cv { display: block; margin-top: 5px; font-size: 15px; font-weight: 600; line-height: 1; color: #141413; letter-spacing: -0.01em; }
.cvtab__ln { display: block; height: 2px; margin-top: 5px; border-radius: 1px; background: #dcdad4; }
.cvtab__ln:nth-child(3) { margin-top: 8px; width: 80%; }
.cvtab__ln:nth-child(5) { width: 60%; }
.cvtab:hover, .cvtab:focus-visible { transform: translateX(6px) rotate(-3deg); }
.cvtab.is-tucked { transform: translateX(120%) rotate(-7deg); transition-duration: 400ms; transition-timing-function: var(--enter); }
@media (max-width: 720px) { .cvtab { top: auto; bottom: 22vh; width: 58px; height: 72px; transform: translateX(22px) rotate(-7deg); } .cvtab__sheet { padding: 8px 9px; } .cvtab__cv { font-size: 13px; } }

/* The drawer: a sheet of paper-coloured page that slides in from the right over a dimmed site. */
.cvd { position: fixed; inset: 0 0 0 auto; width: min(720px, 100vw); height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--cvd-bg); color: var(--ink); transform: translateX(100%); transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; }
/* the panel is a soft daytime sky blue with a faint dot screen, so the white page it prints stands off it */
.cvd { --cvd-bg: radial-gradient(circle, rgba(46, 84, 209, 0.13) 0.9px, transparent 1.3px) 0 0 / 7px 7px, linear-gradient(180deg, #E3E8F5, #EEF1F8); }
.cvd.is-open { transform: none; }
.cvd::backdrop { background: rgba(14, 14, 22, 0.42); opacity: 0; transition: opacity 500ms linear; }
.cvd.is-open::backdrop { opacity: 1; }
.cvd__in { position: relative; display: flex; flex-direction: column; height: 100%; }
.cvd__x { position: absolute; z-index: 2; top: 20px; right: 20px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #141413; color: #FFFFFF; transition: transform 300ms var(--enter); }
.cvd__x:hover { transform: rotate(90deg); }
.cvd__x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.cvd__stage { position: relative; flex: 1; min-height: 0; outline: none; }
.cvd__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cvd__stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
/* until the printer loads (or without WebGL) the page itself sits in the drawer */
.cvd__flat { position: absolute; left: 50%; top: 50%; width: min(70%, 380px); height: auto; transform: translate(-50%, -46%) rotate(-3deg); border-radius: 2px; box-shadow: 0 24px 40px -24px rgba(20, 20, 19, 0.45); transition: opacity 300ms linear; }
.cvd.is-3d .cvd__flat { opacity: 0; pointer-events: none; }
.cvd__status { min-height: 1.5em; padding: 0 28px 24px; font-size: var(--t-body-s); color: var(--ink-2); }
.cvd__status a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cvd__status strong { color: var(--ink); font-weight: 500; }

/* ───────── page transitions ─────────
   Moving between pages (a cross-document view transition; browsers without it just navigate). The page you're on
   shrinks to 80% over the home page's dithered sky; the next page rises from below at that size, covers it, then grows to
   fill the screen. About 1.2s. With reduced motion the next page simply fades in. */
@view-transition { navigation: auto; }
::view-transition { background: #BDCBEF url(/transition-sky.png) center / cover; image-rendering: pixelated; }
::view-transition-group(root) { animation-duration: 1180ms; }
::view-transition-image-pair(root) { isolation: auto; }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; transform-origin: 50% 50%; border-radius: 18px; overflow: clip; outline: 1px solid rgba(20, 20, 19, 0.1); }
::view-transition-old(root) { animation: vt-shrink 1180ms both; }
::view-transition-new(root) { animation: vt-rise 1180ms both; }
@keyframes vt-shrink {
  0% { transform: scale(1); animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
  32.2%, 100% { transform: scale(0.8); }
}
@keyframes vt-rise {
  0%, 25.4% { transform: translateY(100%) scale(0.8); animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  64.4% { transform: translateY(0) scale(0.8); animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
  100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tape.is-center .tape__box { animation: none; }
  ::view-transition-group(root) { animation-duration: 200ms; }
  ::view-transition-old(root) { animation: none; }
  ::view-transition-new(root) { animation: vt-fade 200ms ease-out both; }
}
@keyframes vt-fade { from { opacity: 0; } }

/* ───────── journey globe (home) ─────────
   A pinned section, 420vh tall, with no background of its own: the globe is drawn in the page sky's colours on the
   sky's own 3px grid, dissolves in out of the sky's dither and back into it at the end. The avatar and the frosted
   place labels (always light, so they read at any hour) are placed over it by main.js; the words use the sky's ink like every heading on the page. */
.journey { position: relative; height: 420vh; }
.journey__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.journey__globe, .journey__routes { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.journey__globe { image-rendering: pixelated; }
.journey__routes { pointer-events: none; }
.journey__me { position: absolute; left: 0; top: 0; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 18px; background: #F4F5F8 var(--avatar) 50% 22% / 205% auto no-repeat; box-shadow: 0 0 0 4px rgba(244, 245, 248, 0.4); opacity: 0; will-change: transform, opacity; }
.journey__tag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 14px; white-space: nowrap; background: rgba(250, 250, 252, 0.86); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7); opacity: 0; transition: opacity 400ms var(--enter); will-change: transform; pointer-events: none; }
.journey__tag strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.25; color: #141413; }
.journey__tag strong + span { display: block; font-size: 12px; line-height: 1.3; color: #57564F; }
.journey__flag { width: 20px; height: 14px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(20, 20, 19, 0.12); }
.journey__text { position: absolute; left: 0; right: 0; bottom: clamp(100px, 13vh, 140px); opacity: 0; }
/* the words sit on a glass sheet like the rest of the page's content, so they read over any part of the sunset */
.journey__card { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: var(--s-6); padding: clamp(20px, 2.6vw, 36px); border-radius: var(--r-l); }
.journey__title { color: var(--ink); }
.journey__title em { color: var(--ink-3); font-style: normal; }
.journey__x { max-width: 40ch; color: var(--ink-2); }
.journey.is-static .journey__text { opacity: 1; }
@media (max-width: 720px) {
  .journey__text { padding-right: 64px; }
  .journey__card { grid-template-columns: 1fr; gap: var(--s-3); }
  .journey__me { width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 14px; }
  .journey__tag { padding: 6px 10px 6px 8px; gap: 8px; }
  .journey__tag strong { font-size: 13px; }
  .journey__tag strong + span { font-size: 11px; }
}


/* ── An opened tape: a VHS clamshell case ──
   The case flies out of the shelf to the middle of the screen, then its cover swings open on the left hinge like a
   book: the liner notes print on the inside of the cover, the tray holds the project's image and the cassette.
   --cw / --ch are the closed case's size (main.js); --ink-hue is the tape's colour deepened enough to read on paper. */
.tape-view { perspective: 2400px; perspective-origin: 50% 45%; }
.case { --ink-hue: color-mix(in srgb, var(--hue, #2E54D1) 76%, #141413); --W: var(--cw);
  /* the plastic: black, like the case on the shelf, a shade darker on the inside */
  --plastic: #1A1A1D; --plastic-in: #111113;
  position: fixed; left: 0; top: 0; z-index: 1; width: var(--cw); height: var(--ch); transform-origin: 0 0; transform-style: preserve-3d; cursor: var(--cur); }
/* everything inside sits in real depth: the tray floor at z 0, its walls up to --T, the lid from --T to --T + --L */
.case__rig { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 0 50%; }
.case__tray, .case__hinge { position: absolute; inset: 0; transform-style: preserve-3d; }
.tray__floor { position: absolute; inset: 0; border-radius: 7px; background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 60%), var(--plastic-in);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.08), inset 0 0 24px rgba(20, 20, 19, 0.12); }
/* the two spindle pegs the cassette's reels sit over */
.tray__peg { position: absolute; left: 50%; width: 15%; aspect-ratio: 1; margin-left: -7.5%; border-radius: 50%; background: radial-gradient(circle, #cfcac0 0 30%, #bdb7ac 31% 60%, transparent 61%); box-shadow: inset 0 1px 2px rgba(20, 20, 19, 0.25); }
.tray__peg:first-child { top: 36%; } .tray__peg:last-child { top: 62%; }
/* walls: each a strip of plastic standing up from an edge (rotated about that edge into depth) */
.tray__wall, .lid__wall { position: absolute; transform-style: preserve-3d; background: var(--plastic); box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.1); }
.tray__wall--l, .tray__wall--r { top: 0; width: var(--T); height: 100%; transform-origin: 0 50%; }
.tray__wall--t, .tray__wall--b { left: 0; width: 100%; height: var(--T); transform-origin: 50% 0; }
.tray__wall--l { left: 0; transform: rotateY(-90deg); background: linear-gradient(90deg, var(--plastic-in), var(--plastic)); }
.tray__wall--r { left: 100%; transform: rotateY(-90deg); background: linear-gradient(90deg, color-mix(in srgb, var(--plastic) 80%, #000), var(--plastic)); }
.tray__wall--t { top: 0; transform: rotateX(90deg); background: linear-gradient(180deg, var(--plastic-in), var(--plastic)); }
.tray__wall--b { top: 100%; transform: rotateX(90deg); background: linear-gradient(180deg, color-mix(in srgb, var(--plastic) 86%, #000), var(--plastic)); }
/* the cassette, standing in its well, the label end up, reels over the pegs */
.tray__well { position: absolute; inset: 5% 7%; transform: translateZ(calc(var(--T) * 0.55)); transform-style: preserve-3d; }
.tray__well .cassette { position: absolute; inset: 0; visibility: visible; transform: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 2px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.4), 0 calc(var(--T) * 0.5) calc(var(--T) * 0.6) -4px rgba(20, 20, 19, 0.35); }
.tray__well .cassette__title { font-family: 'Silkscreen', 'Geist', monospace; font-weight: 400; letter-spacing: 0.06em; font-size: max(10px, calc(var(--cw) * 0.045)); }
.tray__well .cassette__screws { --s: max(8px, calc(var(--cw) * 0.022)); background-size: var(--s) var(--s); }
.case.is-open .tray__well .cassette { animation: wind 8s linear infinite alternate; }
.case.is-open .tray__well .reel::after { animation: spin 1600ms linear infinite; }
/* the lid, hinged on the spine edge at the top of the tray's walls */
.case__hinge { transform-origin: 0 50%; transform: translateZ(var(--T)); }
.lid__wall--l, .lid__wall--r { top: 0; width: var(--L); height: 100%; transform-origin: 0 50%; }
.lid__wall--t, .lid__wall--b { left: 0; width: 100%; height: var(--L); transform-origin: 50% 0; }
.lid__wall--l { left: 0; transform: rotateY(-90deg); } .lid__wall--r { left: 100%; transform: rotateY(-90deg); }
.lid__wall--t { top: 0; transform: rotateX(90deg); } .lid__wall--b { top: 100%; transform: rotateX(90deg); }
/* outside: the cover art under the clear plastic sleeve */
.lid__out { position: absolute; inset: 0; border-radius: 6px; overflow: hidden; transform: translateZ(var(--L)); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 0 0 1px rgba(20, 20, 19, 0.12); }
.lid__out .tape__front { position: absolute; inset: 0; transform: none; }
.lid__out::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.28) 42%, rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 40%); }
/* inside: moulded plastic with a paper leaflet held in by two clips */
.lid__in { position: absolute; inset: 0; border-radius: 6px; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 60%), var(--plastic-in);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.1), inset 0 0 22px rgba(20, 20, 19, 0.12); }
.lid__clip { position: absolute; z-index: 2; left: 50%; width: 22%; height: 2.2%; margin-left: -11%; border-radius: 2px; background: var(--plastic); box-shadow: 0 1px 2px rgba(20, 20, 19, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.lid__clip--t { top: 3.6%; } .lid__clip--b { bottom: 3.6%; }
/* the leaflet: a printed page, a running head and foot in the tape's colour */
.case__liner { position: absolute; inset: 5% 6%; display: grid; grid-template-rows: auto 1fr auto; padding: 8% 8% 6%; border-radius: 2px; color: #141413; background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(20, 20, 19, 0.18), 0 6px 14px -8px rgba(20, 20, 19, 0.35); }
.case__head, .case__foot { display: flex; justify-content: space-between; gap: 12px; font-size: max(10px, calc(var(--cw) * 0.028)); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-hue); }
.case__head { padding-bottom: 8px; border-bottom: 1px solid color-mix(in srgb, var(--ink-hue) 30%, transparent); }
.case__foot { padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--ink-hue) 30%, transparent); }
.case__body { align-self: center; }
.case__shot { margin: 0 0 8%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(20, 20, 19, 0.08); }
.case__shot .media { width: 100%; height: 100%; object-fit: contain; }
.case__client, .case__meta { font-size: max(11px, calc(var(--cw) * 0.032)); line-height: 1.4; color: #57564F; }
.case__title { margin: 4px 0 8px; font-size: clamp(22px, calc(var(--cw) * 0.09), 38px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 500; color: var(--ink-hue); text-wrap: balance; }
.case__desc { margin-top: 12px; font-size: max(12px, calc(var(--cw) * 0.037)); line-height: 1.45; color: #3D3E46; }
.case__cta { margin-top: 16px; height: 38px; padding: 0 18px; background: var(--ink-hue); color: #FFFFFF; }
/* the chrome around it: a Close button in the corner and a quiet hint at the bottom */
.tape-view__close { position: absolute; z-index: 3; top: var(--s-4); right: var(--s-4); padding: 9px 18px; border-radius: var(--r-pill); font-size: var(--t-body-s); font-weight: 500; color: #141413; background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.1); transition: background-color 200ms var(--enter); }
.tape-view__close:hover { background: #fff; }
.tape-view__hint { position: absolute; z-index: 3; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 6px 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; color: #3D3E46; background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.08); pointer-events: none; }
.tape.is-out .tape__box { visibility: hidden; }
@media (hover: none) { .tape-view__hint { display: none; } }


/* ───────── photography: the photo journal on an endless canvas ─────────
   A white page the size of the screen. The photographs gather into a spinning ring, then spread out to scattered
   places on a plane you drag around (main.js, "Photo canvas"). */
body[data-page="photos"] { background: #fff; overflow: hidden; }
.photos { position: fixed; inset: 0; background: #fff; }
.photos__stage { position: absolute; inset: 0; perspective: 1300px; cursor: var(--cur-grab); touch-action: none; outline: none; overflow: hidden; }
.photos.is-dragging .photos__stage { cursor: var(--cur-grabbing); }
.photos__world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.photo { position: absolute; left: 0; top: 0; margin: 0; overflow: hidden; border-radius: 4px; background: #f1f1f1; opacity: 0;
  box-shadow: 0 1px 2px rgba(20, 20, 19, 0.08), 0 14px 30px -16px rgba(20, 20, 19, 0.35); will-change: transform; transform-origin: 50% 50%; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.photos.is-live .photo { transition: box-shadow 300ms var(--enter); }
.photos.is-live .photo:hover { box-shadow: 0 2px 4px rgba(20, 20, 19, 0.1), 0 22px 40px -18px rgba(20, 20, 19, 0.45); }
.photos__head { position: fixed; z-index: 5; top: clamp(16px, 3vh, 32px); left: calc(var(--gutter) - 16px); padding: 12px 18px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); pointer-events: none; }
.photos__title { margin-top: var(--s-2); font-size: var(--t-display-m); line-height: 1.02; letter-spacing: -0.03em; font-weight: 500; color: var(--ink); }
.photos__title em { color: var(--ink-3); font-style: normal; }
/* the way out, back to the shelf (the header card ignores the pointer so drags pass through; this link takes it back) */
.photos__back { pointer-events: auto; display: inline-flex; align-items: center; height: 34px; margin-top: var(--s-3); padding: 0 16px; border-radius: var(--r-pill); font-size: var(--t-body-s); font-weight: 500; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.14); transition: background-color 300ms var(--enter), color 300ms var(--enter), box-shadow 300ms var(--enter); }
.photos__back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.photos__hint { position: fixed; z-index: 5; left: 50%; bottom: 104px; transform: translate(-50%, 8px); padding: 7px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--ink-2); background: #fff; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.1); opacity: 0; pointer-events: none; transition: opacity 500ms var(--enter), transform 500ms var(--enter); }
.photos.is-live .photos__hint { opacity: 1; transform: translate(-50%, 0); }
/* one photograph, large, with its story */
.photos__view { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 8vh var(--gutter) 14vh; cursor: var(--cur-zoomout); }
.photos__view[hidden] { display: none; }
.photos__big { margin: 0; display: grid; grid-template-columns: auto minmax(220px, 320px); align-items: end; gap: var(--s-7); max-width: 1120px; cursor: var(--cur); }
.photos__big img { display: block; max-width: min(60vw, 720px); max-height: 72vh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 24px 60px -30px rgba(20, 20, 19, 0.5); transform-origin: 0 0; }
.photos__big figcaption { display: grid; gap: var(--s-2); }
.photos__big-title { font-size: var(--t-display-m); line-height: 1.04; letter-spacing: -0.03em; font-weight: 500; color: var(--ink); }
.photos__big-text { margin-top: var(--s-3); font-size: var(--t-body); line-height: 1.55; color: var(--ink-2); }
.photos__close { position: fixed; top: var(--s-4); right: var(--s-4); padding: 9px 18px; border-radius: var(--r-pill); font-size: var(--t-body-s); font-weight: 500; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, 0.12); }
.photos__close:hover { background: #f4f4f4; }
@media (max-width: 720px) {
  .photos__big { grid-template-columns: 1fr; gap: var(--s-4); }
  .photos__big img { max-width: 100%; max-height: 52vh; }
  .photos__title { font-size: 28px; }
}
/* the way in, on Playground */
.shelf__explore { margin-top: var(--s-6); }

/* ───────── motion ───────── */
.js [data-rv] { opacity: 0; transform: translateY(20px); transition: opacity 800ms var(--enter), transform 1000ms var(--enter); transition-delay: calc(var(--rd, 0) * 1ms); }
.js [data-rv].in { opacity: 1; transform: none; }
.js [data-sheet] { opacity: 0; transform: translateY(48px) scale(0.985); transition: opacity 900ms var(--enter), transform 1200ms var(--enter); }
.js [data-sheet].in { opacity: 1; transform: none; }
.js [data-kin] .w { display: inline-block; opacity: 0; padding-block: 0.22em; margin-block: -0.22em; -webkit-mask-size: 12px 12px; mask-size: 12px 12px; }
.js [data-kin].in .w { opacity: 1; animation: dz 560ms step-end both, dzr 900ms var(--enter) both; animation-delay: calc(var(--i) * 55ms + var(--rd, 0) * 1ms); }
@keyframes dz {
  0% { -webkit-mask-image: var(--dz1); mask-image: var(--dz1); }
  14% { -webkit-mask-image: var(--dz2); mask-image: var(--dz2); }
  28% { -webkit-mask-image: var(--dz3); mask-image: var(--dz3); }
  42% { -webkit-mask-image: var(--dz4); mask-image: var(--dz4); }
  57% { -webkit-mask-image: var(--dz5); mask-image: var(--dz5); }
  71% { -webkit-mask-image: var(--dz6); mask-image: var(--dz6); }
  85% { -webkit-mask-image: var(--dz7); mask-image: var(--dz7); }
  100% { -webkit-mask-image: none; mask-image: none; }
}
@keyframes dzr { from { transform: translateY(0.12em); } }

@media (prefers-reduced-motion: reduce) {
  .radio[data-state="loading"] .radio__play { animation: none; }
  .js [data-rv], .js [data-sheet], .js [data-kin] .w { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .js .bars:not(.in) .bar__col { transform: none; }
}

/* ───────── responsive ───────── */
@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 1fr; }
  .about__photo { position: static; max-width: 420px; }
  .stats--4 { --cols: 2; }
  .stats--4 .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats--4 .stat:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .eras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masonry { columns: 3; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .district__inner, .cs-meta { grid-template-columns: 1fr; }
  .stage { height: clamp(520px, 82svh, 720px); }
  .stage__info { flex-direction: column; align-items: flex-start; gap: var(--s-4); padding-top: 80px; }
  .stage__lede { display: none; }
  .grid-2 { row-gap: var(--s-7); }
  .band { padding-top: var(--s-9); }
  .cs-hero { padding-top: var(--s-9); }
  .cs-meta { gap: 0; }
  .cs-meta div { padding: var(--s-3) 0; }
  .stats--2, .stats--3, .stats--4 { --cols: 1; }
  .stat + .stat, .stats--4 .stat:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .figs--2, .figs--3 { grid-template-columns: 1fr; }
  .pair, .pair--r, .pair--narrow.pair--r { grid-template-columns: 1fr; gap: var(--s-4); }
  .pair--r .pair__text { order: 0; }
  .pair--narrow .fig { max-width: 160px; }
  .tline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-5); }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rows li { grid-template-columns: 1fr auto; }
  .rows__org { grid-column: 1; grid-row: 2; }
  .rows__when { grid-row: 1 / span 2; grid-column: 2; align-self: start; }
  .masonry { columns: 2; }
  .cs-end { flex-direction: column; align-items: flex-start; }
  .vhero__text { align-items: flex-start; }
  .vhero__shade { background: linear-gradient(0deg, rgba(0,0,0,0.6), rgba(0,0,0,0.15)); }
  .nav__last { display: none; }
  .nav__item { padding: 10px 12px; }
}
@media (max-width: 560px) {
  /* six nav items on a phone: "Playground" becomes "Play" and the items tighten up */
  .nav__long { display: none; }
  .nav__item { padding: 10px 9px; font-size: 0.8125rem; }
  .dock { flex-direction: column-reverse; align-items: flex-end; gap: 8px; }
  .dock { left: 0; right: 0; width: max-content; margin-inline: auto; transform: none; }
  .js .dock { transform: translateY(16px); }
  .js.is-ready .dock { transform: none; }
}
