/* Brickmann.Design — carousel portfolio
   Layout: full-viewport stage, horizontal project carousel, floating dock that
   doubles as loader, CTA bar and menu sheet. */

:root {
  --ink: #1d1d1d;
  --ink-2: #6b6b6b;
  --mute: #8d8d8d;
  --line: #ddd;
  --paper: #fff;
  --sheet: #eee;
  --tile: #fff;
  --accent: #ff4d2e;
  --ease: cubic-bezier(.77, .03, .19, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --r-s: 8px;
  --r-m: clamp(8px, .36vw + 3px, 12px);
  --r-l: 16px;
  --dock-w: min(436px, calc(100vw - 24px));
  --gap: 12px;
  --font: "Inter Tight", "Neue Haas Grotesk Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font: 400 15px/1.35 var(--font);
  letter-spacing: -.01em;
  color: var(--ink);
  background: var(--paper);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: pan-y;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
small { font-size: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Stage + track ---------- */
.bd-stage {
  position: fixed; inset: 0;
  cursor: grab;
  user-select: none;
}
.bd-stage.is-drag { cursor: grabbing; }
.bd-track { list-style: none; position: absolute; inset: 0; }

.bd-card {
  position: absolute; left: 50%; top: 50%;
  width: var(--cw); height: var(--ch);
  margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2);
  will-change: transform, clip-path;
  transform-origin: 50% 50%;
}
.bd-card a { position: relative; display: block; width: 100%; height: 100%; }
/* Legibility scrim for the fullscreen title + chrome; fades in with the expand. */
.bd-card a::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .1) 55%, transparent),
              linear-gradient(rgba(0, 0, 0, .35), transparent 18%);
  opacity: var(--shade, 0);
}
.bd-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--sheet);
  pointer-events: none;
  -webkit-user-drag: none;
}
.bd-card-cap {
  position: absolute; left: 0; right: 0; top: calc(100% + 14px);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 13px; color: var(--mute);
  opacity: var(--cap, 0);
  transition: opacity .3s;
}
.bd-card-cap b { font-weight: 400; color: var(--ink); }

/* ---------- Fullscreen (expanded) mode ---------- */
.bd-chrome, .bd-fs-title, .bd-counter, .bd-hint {
  position: fixed; z-index: 20;
  pointer-events: none;
  transition: opacity .6s var(--ease), color .6s var(--ease);
}
.bd-chrome {
  top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; gap: 24px;
  padding: 24px 30px;
  opacity: 0;
  color: #fff;
}
.bd-chrome-tag span { opacity: .45; }

.bd-fs-title {
  left: 30px; top: 50%; transform: translateY(-50%);
  max-width: 40vw;
  color: #fff;
  opacity: 0;
}
.bd-fs-title h2 { font-weight: 400; font-size: clamp(32px, 3.6vw, 64px); line-height: 1; letter-spacing: -.035em; }
.bd-fs-title p { margin-top: 14px; font-size: 13px; opacity: .6; }

.bd-counter {
  left: 30px; bottom: 30px;
  padding: 6px 8px; border-radius: 4px;
  font-size: 13px; font-variant-numeric: tabular-nums;
  background: var(--sheet);
}
.bd-hint {
  right: 30px; bottom: 30px;
  width: 56px; height: 56px; border-radius: var(--r-m);
  background: var(--sheet);
  display: grid; place-items: center;
  opacity: 0;
}
.bd-hint span {
  width: 16px; height: 26px; border: 1.4px solid currentColor; border-radius: 10px; position: relative;
}
.bd-hint span::after {
  content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 5px; margin-left: -1.5px;
  border-radius: 2px; background: currentColor;
  animation: bd-wheel 1.8s var(--ease) infinite;
}
@keyframes bd-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(8px); opacity: 0; } 100% { opacity: 0; } }

body.is-full .bd-chrome,
body.is-full .bd-fs-title { opacity: 1; }
body.is-full .bd-hint { opacity: 1; pointer-events: auto; }
body.is-full .bd-counter,
body.is-full .bd-hint { background: rgba(29, 29, 29, .72); color: #fff; backdrop-filter: blur(12px); }
body.is-full .bd-card-cap { opacity: 0; }

/* ---------- Dock ---------- */
.bd-dock {
  position: fixed; z-index: 50;
  left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  width: var(--dock-w);
  transform: translate(-50%, 0);
  border-radius: var(--r-l);
  padding: var(--gap);
  /* Liquid glass: a thin, saturated frost over whatever is behind it, a bright rim on top,
     a soft lens shadow below and a specular sheen (::after). Tiles inside are frosted too. */
  --tile: rgba(255, 255, 255, .5);
  --line: rgba(0, 0, 0, .07);
  background: rgba(244, 244, 244, .38);
  -webkit-backdrop-filter: blur(22px) saturate(1.8) brightness(1.04);
  backdrop-filter: blur(22px) saturate(1.8) brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 0 0 1px rgba(255, 255, 255, .35),
    inset 0 -1px 1px rgba(0, 0, 0, .05),
    0 10px 34px -8px rgba(0, 0, 0, .22),
    0 2px 6px rgba(0, 0, 0, .06);
  transition: transform 1.1s var(--ease), background .4s;
}
.bd-dock::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(120% 70% at 18% -10%, rgba(255, 255, 255, .55), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 40% 75%, rgba(255, 255, 255, .12));
}
body.is-menu .bd-dock { background: rgba(244, 244, 244, .58); }
.bd-dock .bd-tile, .bd-dock .bd-stat, .bd-dock .bd-burger { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bd-dock { background: rgba(238, 238, 238, .94); }
}
body.is-loading .bd-dock { transform: translate(-50%, calc(-50vh + 50% + max(24px, env(safe-area-inset-bottom)))); background: rgba(166, 166, 166, .5); }
body.is-loading { background: #000; }
body.is-loading .bd-stage, body.is-loading .bd-counter { opacity: 0; }
.bd-stage, .bd-counter { transition: opacity .8s var(--ease) .35s; }
body { transition: background .6s var(--ease); }

.bd-bar { display: flex; align-items: center; gap: 18px; height: 56px; }
.bd-logo {
  flex: none; width: 56px; height: 56px; border-radius: var(--r-s);
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  font-size: 21px; letter-spacing: -.04em;
  transition: background .4s, color .4s;
}
.bd-cta { flex: 1; font-size: 17px; overflow: hidden; white-space: nowrap; }
.bd-cta span { display: inline-block; transition: transform .5s var(--ease), opacity .5s; }
.bd-cta.is-swap span { transform: translateY(110%); opacity: 0; transition: none; }
.bd-pct { display: none; font-size: 13px; font-variant-numeric: tabular-nums; }
body.is-loading .bd-pct { display: block; }
body.is-loading .bd-cta, body.is-loading .bd-burger { display: none; }
body.is-loading .bd-bar { justify-content: space-between; }

.bd-burger {
  flex: none; width: 56px; height: 56px; border-radius: var(--r-s);
  background: var(--tile);
  display: grid; place-content: center; gap: 6px;
  transition: background .3s;
}
.bd-burger span { width: 22px; height: 1.4px; background: currentColor; transition: transform .5s var(--ease); }
.bd-burger:hover { background: var(--line); }
body.is-menu .bd-burger { background: rgba(0, 0, 0, .1); }
body.is-menu .bd-burger span:first-child { transform: translateY(3.7px) rotate(45deg); }
body.is-menu .bd-burger span:last-child { transform: translateY(-3.7px) rotate(-45deg); }
body.is-menu .bd-logo { background: var(--tile); color: var(--ink); }
body.is-menu .bd-cta span { opacity: 0; transform: translateY(-110%); }

/* ---------- Menu sheet ---------- */
.bd-sheet {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .8s var(--ease);
}
.bd-sheet > * { min-height: 0; }
body.is-menu .bd-sheet { grid-template-rows: 1fr; }
.bd-sheet-inner { overflow: hidden; }
.bd-sheet { overflow: hidden; }
.bd-grab { display: block; width: 112px; height: 8px; margin: 8px auto clamp(20px, 5vh, 52px); border-radius: 8px; background: #d9d9d9; }

.bd-pages {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  max-height: calc(100dvh - 230px);
}
.bd-pages::-webkit-scrollbar { display: none; }
.bd-page {
  scroll-snap-align: start;
  display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
  align-content: start;
  overflow-y: auto; scrollbar-width: none;
}
.bd-tile {
  position: relative;
  height: clamp(140px, 20vh, 228px);
  border-radius: var(--r-s);
  background: var(--tile);
  padding: 14px;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  transition: transform .5s var(--ease-out);
}
a.bd-tile:hover { transform: scale(.98); }
.bd-tile-wide { grid-column: 1 / -1; height: auto; }
.bd-tile-label { position: relative; display: flex; flex-direction: column; font-size: 15px; }
.bd-tile-label small { color: var(--mute); }

.bd-tile-media { height: clamp(140px, 20vh, 228px); color: #fff; }
.bd-tile-media.bd-reel { height: auto; aspect-ratio: 16 / 9; }
.bd-tile-media.bd-archive { height: clamp(110px, 15vh, 160px); }
.bd-tile-media.bd-archive img { object-position: 60% 50%; }
.bd-reel-yt { position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 16 / 9; border: 0; transform: translate(-50%, -50%) scale(1.2); opacity: 0; pointer-events: none; transition: opacity 1s var(--ease-out); }
.bd-reel.is-playing .bd-reel-yt { opacity: 1; }
.bd-tile-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.bd-tile-media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .55)); }
.bd-tile-media .bd-tile-label { z-index: 2; }
.bd-tile-media .bd-tile-label small { color: rgba(255, 255, 255, .7); }
.bd-tile-media:hover img { transform: scale(1.05); }
button.bd-tile { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
button.bd-tile:hover { transform: scale(.98); }
.bd-round-play::after { content: ""; margin-left: 4px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; }
.bd-round {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px;
  background: rgba(255, 255, 255, .22); backdrop-filter: blur(10px);
}

.bd-tile-art { position: absolute; inset: 14px 14px auto 14px; height: calc(100% - 78px); color: var(--ink); }
.bd-art-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.bd-art-grid i { background: var(--sheet); border-radius: 4px; transition: transform .6s var(--ease); }
a.bd-tile:hover .bd-art-grid i:nth-child(1) { transform: translate(-3px, -3px); }
a.bd-tile:hover .bd-art-grid i:nth-child(4) { transform: translate(3px, 3px); }
.bd-art-mono { display: grid; place-items: center; font-size: 44px; letter-spacing: -.06em; color: var(--line); }


.bd-slide {
  position: relative;
  height: clamp(72px, 10vh, 92px); border-radius: 100px;
  background: var(--line);
  padding: 6px;
  display: flex; align-items: center;
  overflow: hidden;
}
.bd-slide::before { content: ""; position: absolute; inset: 0; width: calc(var(--p, 0) * 100% + 1px); background: rgba(0, 0, 0, .1); border-radius: inherit; }
.bd-knob {
  position: relative; z-index: 2;
  height: 100%; aspect-ratio: 1; flex: none; border-radius: 50%;
  background: var(--tile);
  display: grid; place-items: center;
  transform: translateX(var(--x, 0));
  touch-action: none; cursor: grab;
}
.bd-slide.is-snap .bd-knob { transition: transform .5s var(--ease); }
.bd-slide-text { position: absolute; left: 0; right: 0; text-align: center; padding-left: 60px; color: var(--mute); font-size: 15px; opacity: calc(1 - var(--p, 0) * 1.6); pointer-events: none; }
.bd-slide-text b { font-weight: 400; color: var(--ink); }

.bd-page-stats { grid-template-columns: 1fr 1fr; }
.bd-stat { height: clamp(110px, 17vh, 196px); background: var(--tile); border-radius: var(--r-s); padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.bd-stat b { font-weight: 400; font-size: 56px; letter-spacing: -.05em; line-height: 1; }
.bd-stat small { color: var(--mute); }
.bd-contact { gap: 6px; justify-content: center; padding: 18px 14px; }
.bd-contact a { font-size: 17px; }
.bd-contact a:hover { color: var(--accent); }

.bd-dots { display: flex; justify-content: center; gap: 8px; padding: 18px 0 16px; }
.bd-dots button { width: 6px; height: 6px; border-radius: 50%; background: #c8c8c8; transition: background .3s; }
.bd-dots button.on { background: var(--ink); }

.bd-scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, .25);
  opacity: 0; pointer-events: none;
  transition: opacity .6s var(--ease);
}
body.is-menu .bd-scrim { opacity: 1; pointer-events: auto; }

/* When a project is fullscreen, the dock sits on imagery: let the sheet go
   slightly translucent so the project still reads behind it. */


.bd-noscript { position: fixed; inset: auto 24px 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .bd-chrome { padding: 18px; font-size: 13px; }
  .bd-chrome-tag { display: none; }
  .bd-fs-title { left: 18px; top: 84px; transform: none; max-width: 80vw; }
  .bd-counter { left: 18px; top: 18px; bottom: auto; }
  body.is-full .bd-counter { top: auto; bottom: 120px; }
  .bd-hint { display: none; }
  .bd-dock { bottom: max(12px, env(safe-area-inset-bottom)); }
  body.is-loading .bd-dock { transform: translate(-50%, calc(-50vh + 50% + max(12px, env(safe-area-inset-bottom)))); }
  .bd-grab { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- Home view toggle ---------- */
.bd-views {
  display: inline-flex; gap: 2px; padding: 3px;
  border-radius: var(--r-s); background: var(--sheet);
  font-size: 13px;
}
.bd-views a { padding: 6px 10px; border-radius: 6px; color: var(--mute); transition: color .3s, background .3s; }
.bd-views a:hover { color: var(--ink); }
.bd-views a[aria-current] { background: var(--tile); color: var(--ink); }
.bd-views-home { position: fixed; z-index: 20; top: 24px; right: 30px; transition: opacity .6s var(--ease); }
body.is-full .bd-views-home, body.is-loading .bd-views-home { opacity: 0; pointer-events: none; }

/* ---------- Document pages (case studies, work) ---------- */
body.bd-doc { overflow: visible; height: auto; touch-action: auto; overscroll-behavior: auto; }
.bd-wrap { width: 100%; max-width: 1500px; margin: 0 auto; padding: 0 30px; }
.bd-top {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 30px; max-width: 1500px; margin: 0 auto;
}
.bd-top-tag span { color: var(--mute); }
.bd-brand img, .bd-chrome-brand img { display: block; width: auto; height: 38px; }
.bd-foot-mark { display: block; width: auto; height: clamp(56px, 7vw, 96px); margin-top: clamp(40px, 6vw, 80px); }
a.bd-logo { color: #fff; }
body.is-menu a.bd-logo { color: var(--ink); }

.cs-intro { padding-top: clamp(48px, 9vh, 112px); padding-bottom: clamp(32px, 6vh, 64px); }
.cs-chips { display: flex; gap: 6px; margin-bottom: 28px; font-size: 13px; }
.cs-chip { padding: 6px 10px; border-radius: 6px; background: var(--sheet); }
.cs-chip-ghost { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--mute); }
.cs-statement {
  max-width: 15.5em;
  font-weight: 400; font-size: clamp(32px, 3.9vw, 56px); line-height: 1.14; letter-spacing: -.035em;
  text-wrap: balance;
}
.cs-client { display: flex; gap: 14px; margin-top: 28px; font-size: 15px; }
.cs-client span { color: var(--mute); }

.cs-hero { margin-bottom: 8px; }
.cs-hero img { width: 100%; height: auto; aspect-ratio: 1920 / 950; object-fit: cover; border-radius: var(--r-s); background: var(--sheet); }

.cs-body { padding-top: clamp(56px, 10vh, 120px); }
.cs-ch {
  display: grid; grid-template-columns: clamp(250px, 23vw, 340px) 1fr; gap: clamp(24px, 3vw, 56px);
  padding-bottom: clamp(56px, 10vh, 120px);
}
.cs-aside { position: relative; }
.cs-index { list-style: none; position: sticky; top: 24px; display: grid; gap: 14px; font-size: 15px; }
.cs-aside.is-tall .cs-index { position: static; }
.cs-index a { color: #b5b5b5; transition: color .3s; }
.cs-index a:hover { color: var(--ink); }
.cs-index h2 { display: flex; align-items: baseline; gap: 10px; font-weight: 400; font-size: 15px; }
.cs-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); transform: translateY(-1px); }
.cs-index > li:not(.is-on) { padding-left: 17px; }
.cs-text { margin: 12px 0 10px 17px; color: var(--ink-2); font-size: 14px; line-height: 1.5; letter-spacing: 0; }
.cs-text > * + * { margin-top: .8em; }
.cs-text h3 { margin-top: 1.4em; font-weight: 500; font-size: 14px; color: var(--ink); }
.cs-text ul { list-style: none; display: grid; gap: 4px; }
.cs-text li { position: relative; padding-left: 14px; }
.cs-text li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 1px; background: currentColor; }

.cs-gallery { display: grid; gap: 8px; align-content: start; min-width: 0; }
.cs-row { display: flex; gap: 8px; }
.cs-m {
  position: relative; flex: var(--ar, 1) 1 0; min-width: 0;
  border-radius: var(--r-s); overflow: hidden; background: #f4f4f4;
}
.cs-m img, .cs-m video { width: 100%; height: auto; }
.cs-row-1 .cs-m img { max-height: 86vh; object-fit: contain; }
.cs-row:not(.cs-row-1) .cs-m img { aspect-ratio: var(--ar); object-fit: cover; height: 100%; }
.cs-cap {
  position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
  padding: 5px 9px; border-radius: 6px;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px);
  font-size: 12px; color: var(--ink);
}
.js .cs-m, .js .cs-quote, .js .wk-card { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); }
.js .is-in { opacity: 1; transform: none; }

.cs-quote {
  display: grid; grid-template-columns: 110px 1fr; gap: 28px; align-items: start;
  padding: clamp(28px, 4vw, 56px); border-radius: var(--r-s); background: var(--sheet);
}
.cs-avatar { width: 110px; height: 110px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 34px; letter-spacing: -.04em; }
.cs-quote p { font-size: clamp(20px, 2vw, 30px); line-height: 1.22; letter-spacing: -.025em; text-wrap: pretty; }
.cs-quote footer { margin-top: 18px; font-size: 13px; color: var(--mute); }

.cs-label { margin-bottom: 24px; font-weight: 400; font-size: 13px; color: var(--mute); }
.cs-credits { padding-top: 24px; padding-bottom: clamp(56px, 10vh, 120px); }
.cs-credits dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.cs-credits dt { margin-bottom: 8px; font-size: 13px; color: var(--mute); }
.cs-credits dd { font-size: 15px; }
.cs-list dd + dd { margin-top: 2px; }
.cs-next { padding-bottom: clamp(56px, 10vh, 120px); }

/* ---------- Work grid ---------- */
.wk { padding-top: clamp(40px, 8vh, 96px); padding-bottom: clamp(56px, 10vh, 120px); }
.wk-statement {
  max-width: 17em; margin-bottom: clamp(40px, 8vh, 96px);
  font-weight: 400; font-size: clamp(32px, 3.9vw, 56px); line-height: 1.14; letter-spacing: -.035em;
}
.wk-statement span { display: block; color: var(--mute); }
.wk-grid { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wk-card a { display: block; }
.wk-media { display: block; aspect-ratio: 3 / 2; border-radius: var(--r-s); overflow: hidden; background: var(--sheet); }
.wk-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.wk-card a:hover .wk-media img { transform: scale(1.04); }
.wk-cap { display: flex; justify-content: space-between; gap: 16px; padding: 12px 2px 28px; font-size: 15px; }
.wk-cap h2, .wk-cap h3 { font-weight: 400; font-size: inherit; }
.wk-cap > span { color: var(--mute); }

/* ---------- Footer ---------- */
.bd-foot {
  margin: 0 auto; max-width: 1500px; padding: clamp(56px, 10vh, 120px) 30px 140px;
  border-top: 1px solid var(--line);
}
.bd-foot-big { max-width: 12em; font-size: clamp(40px, 6vw, 96px); line-height: 1; letter-spacing: -.045em; }
.bd-foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(40px, 8vh, 96px); font-size: 15px; }
.bd-foot-cols small { display: block; margin-bottom: 6px; color: var(--mute); font-size: 13px; }
.bd-foot-cols a:hover { color: var(--accent); }
.bd-foot-legal { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; font-size: 13px; color: var(--mute); }

@media (max-width: 900px) {
  .cs-ch { grid-template-columns: 1fr; }
  .cs-index { position: static; }
  .cs-index > li:not(.is-on) { display: none; }
  .cs-text { margin-left: 17px; }
}
@media (max-width: 720px) {
  .bd-wrap, .bd-top { padding-left: 18px; padding-right: 18px; }
  .bd-top { padding-top: 18px; padding-bottom: 18px; font-size: 13px; }
  .bd-brand img { height: 30px; }
  .bd-top-tag { display: none; }
  .bd-views-home { top: 14px; right: 14px; }
  .cs-hero img { aspect-ratio: 1; }
  .cs-row { flex-direction: column; }
  .cs-row .cs-m { flex: none; }
  .cs-row:not(.cs-row-1) .cs-m img { height: auto; }
  .cs-quote { grid-template-columns: 1fr; }
  .cs-avatar { width: 64px; height: 64px; font-size: 22px; }
  .wk-grid { grid-template-columns: 1fr; }
  .bd-foot { padding-left: 18px; padding-right: 18px; }
  .bd-foot-cols { grid-template-columns: 1fr 1fr; }
  .bd-foot-legal { flex-direction: column; }
}

/* ---------- Curated story (process-led case) ---------- */
.cs-m { background: var(--bg, #f4f4f4); }
.st-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-top: 24px; padding-top: 20px; padding-bottom: 20px;
}
.st-facts div { border-top: 1px solid var(--line); padding-top: 14px; }
.st-facts dt { font-size: 13px; color: var(--mute); margin-bottom: 4px; }
.st-facts dd { font-size: 15px; }

.st { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(32px, 4vw, 72px); padding-top: clamp(40px, 8vh, 96px); }
.st-rail { position: sticky; top: 28px; align-self: start; display: flex; gap: 14px; font-size: 14px; }
.st-rail ol { list-style: none; display: grid; gap: 10px; }
.st-rail a { display: flex; gap: 10px; color: #b5b5b5; transition: color .4s; }
.st-rail a span { font-variant-numeric: tabular-nums; }
.st-rail a:hover, .st-rail a.is-on { color: var(--ink); }
.st-rail-bar { order: -1; width: 2px; border-radius: 2px; background: var(--sheet); position: relative; overflow: hidden; }
.st-rail-bar i { position: absolute; inset: 0; background: var(--ink); transform-origin: top; transform: scaleY(var(--prog, 0)); }

.st-flow { min-width: 0; }
.st-phase { display: grid; gap: 8px; padding-bottom: clamp(80px, 14vh, 160px); scroll-margin-top: 24px; }
.st-phase > :not(.cs-row) { margin: 32px 0; }
.st-phase > .st-phase-head { margin: 0 0 32px; }
.st-phase-head { display: grid; gap: 20px; }
.st-phase-n { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--mute); }
.st-phase-n span { padding: 4px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-variant-numeric: tabular-nums; }
.st-phase-head h2 { max-width: 16em; font-weight: 400; font-size: clamp(30px, 3.3vw, 48px); line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.st-lead { max-width: 40em; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; letter-spacing: -.01em; color: var(--ink-2); text-wrap: pretty; }
.st-kicker { font-size: 13px; color: var(--mute); }

.st-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 3vw, 48px); align-items: center; }
.st-split.is-flip > :first-child { order: 2; }
.st-split-text { display: grid; gap: 12px; align-content: center; max-width: 30em; }
.st-split-text h3 { font-weight: 400; font-size: clamp(22px, 2vw, 30px); letter-spacing: -.03em; line-height: 1.15; }
.st-split-text p:not(.st-kicker) { color: var(--ink-2); line-height: 1.55; }
.st-split .cs-m img { aspect-ratio: var(--ar); object-fit: cover; }

.st-cards { display: grid; gap: 16px; }
.st-cards ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-cards li {
  display: flex; flex-direction: column; gap: 10px;
  min-height: clamp(200px, 22vw, 280px); padding: 22px;
  border-radius: var(--r-s); background: var(--sheet);
}
.st-card-n { margin-bottom: auto; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.st-cards h3 { font-weight: 400; font-size: clamp(19px, 1.6vw, 24px); letter-spacing: -.025em; line-height: 1.15; }
.st-cards p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.st-cards-problem .st-card-n { color: var(--accent); }
.st-cards-principle li { background: var(--tint); color: #fff; }
.st-cards-principle li p, .st-cards-principle .st-card-n { color: rgba(255, 255, 255, .72); }
.st-cards-outcome li { background: var(--ink); color: #fff; }
.st-cards-outcome li p, .st-cards-outcome .st-card-n { color: rgba(255, 255, 255, .6); }

.st-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.st-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; padding: 22px; border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--line); }
.st-stats dd { font-size: clamp(44px, 5vw, 72px); line-height: .9; letter-spacing: -.05em; }
.st-stats dt { font-size: 14px; color: var(--mute); }

/* Product impact: the claim on the left, four illustrated proof tiles on the right. */
.st-impact { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 3vw, 48px); align-items: center; }
.st-impact ol { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-impact li { display: flex; flex-direction: column; gap: 16px; padding: clamp(18px, 2vw, 28px); border-radius: var(--r-s); background: var(--bg); }
.st-impact figure { flex: 1; display: grid; place-items: center; min-height: clamp(140px, 14vw, 220px); }
.st-impact img { width: auto; max-width: 100%; max-height: clamp(140px, 14vw, 220px); height: auto; }
.st-impact p { display: grid; gap: 4px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.st-impact p b { font-weight: 400; font-size: clamp(26px, 2.4vw, 38px); line-height: 1; letter-spacing: -.04em; color: var(--ink); }

/* KPI cards: a headline number and a legacy vs new bar pair, all on one 0–100% scale. */
.st-kpis { display: grid; gap: clamp(24px, 3vw, 40px); }
.st-kpis .st-split-text { max-width: 40em; }
.st-kpis > ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-kpis > ol > li { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r-s); background: var(--sheet); }
.st-kpis .st-card-n { margin-bottom: 18px; }
.st-kpis h3 { font-weight: 400; font-size: clamp(19px, 1.6vw, 24px); letter-spacing: -.025em; line-height: 1.15; }
.st-kpi-big { display: grid; gap: 6px; margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.st-kpi-big b { font-weight: 400; font-size: clamp(44px, 5vw, 72px); line-height: .9; letter-spacing: -.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.st-kpi-bars { list-style: none; display: grid; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.st-kpi-bars li { display: grid; grid-template-columns: 4.5em 1fr 3.4em; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); }
.st-kpi-bars i { height: 10px; border-radius: 0 4px 4px 0; background: linear-gradient(90deg, #b9b9b9 var(--v), color-mix(in srgb, var(--line) 60%, transparent) var(--v)); }
.st-kpi-bars li.is-new i { background: linear-gradient(90deg, var(--tint) var(--v), color-mix(in srgb, var(--line) 60%, transparent) var(--v)); }
.st-kpi-bars b { font-weight: 400; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

.st-statement { display: grid; gap: 18px; padding: clamp(28px, 5vw, 72px); border-radius: var(--r-s); background: var(--sheet); }
.st-statement p:last-child { max-width: 20em; font-size: clamp(26px, 3vw, 44px); line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }

.st-tools { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-tools li { display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 22px; border-radius: var(--r-s); background: var(--sheet); }
.st-tool-step { padding: 6px 6px 2px; font-size: 13px; color: var(--mute); }
.st-tool-media { border-radius: 6px; overflow: hidden; background: #fff; }
.st-tool-media img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.st-tools h3, .st-tools p { padding: 0 12px; }
.st-tools h3 { margin-top: 6px; font-weight: 400; font-size: 20px; letter-spacing: -.02em; }
.st-tools p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }

.st-findings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-findings .st-kicker { grid-column: 1 / -1; margin-bottom: 8px; }
.st-find { padding: clamp(22px, 3vw, 36px); border-radius: var(--r-s); background: var(--sheet); }
.st-find h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-weight: 400; font-size: 20px; letter-spacing: -.02em; }
.st-find h3 span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: #fff; background: #1f8a5b; }
.st-find-bad h3 span { background: var(--accent); }
.st-find ul { list-style: none; display: grid; gap: 16px; }
.st-find li { display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.st-find li b { font-weight: 400; font-size: 16px; color: var(--ink); }

.st-steps { list-style: none; display: grid; gap: 8px; }
.st-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 20px; border-radius: var(--r-s); background: var(--sheet); font-size: 15px; line-height: 1.5; }
.st-steps span { color: var(--mute); font-variant-numeric: tabular-nums; }
.st-split-list { align-items: start; }
.st-split-video .cs-video video { display: block; }

/* Screen showcase: a framed product window on the brand tint, stepping
   through a flow. Tabs autoplay while in view. */
.st-show { display: grid; gap: 20px; }
.st-show-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 3vw, 48px); align-items: end; }
.st-show-head h3 { display: flex; gap: 12px; align-items: baseline; font-weight: 400; font-size: clamp(24px, 2.4vw, 36px); letter-spacing: -.03em; line-height: 1.1; }
.st-show-head h3 .st-show-n { flex: none; font-size: 13px; letter-spacing: 0; color: var(--mute); }
.st-show-head p { max-width: 36em; color: var(--ink-2); line-height: 1.55; }
.st-stage {
  position: relative; overflow: hidden;
  padding: clamp(20px, 4.5vw, 72px) clamp(16px, 5.5vw, 96px) 0;
  border-radius: var(--r-l);
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(255, 255, 255, .22), transparent 60%),
    linear-gradient(160deg, var(--tint), color-mix(in srgb, var(--tint) 70%, #1a1446));
}
.st-window {
  border-radius: 12px 12px 0 0; overflow: hidden; background: #fff;
  box-shadow: 0 40px 100px -20px rgba(10, 8, 60, .55), 0 0 0 1px rgba(255, 255, 255, .25);
}
.st-chrome { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: #f3f3f6; border-bottom: 1px solid #e6e6ec; font-size: 12px; color: var(--mute); }
.st-chrome i { width: 9px; height: 9px; border-radius: 50%; background: #d9d9e0; }
.st-chrome span { margin: 0 auto; transform: translateX(-24px); }
.st-screens { position: relative; aspect-ratio: var(--sar, 16 / 9); cursor: zoom-in; }
.st-screens figure { position: absolute; inset: 0; transition: opacity .6s var(--ease-out), visibility .6s; }
.st-screens figure[hidden] { display: block; opacity: 0; visibility: hidden; }
.st-screens img { width: 100%; height: 100%; object-fit: cover; }
.st-note { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; justify-content: center; padding: 0 16px 16px; pointer-events: none; }
.st-note span { padding: 8px 14px; border-radius: 100px; background: rgba(20, 18, 50, .78); backdrop-filter: blur(12px); color: #fff; font-size: 13px; }
.st-note span[hidden] { display: none; }
.st-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tabs button {
  position: relative; flex: 1 0 auto; overflow: hidden;
  display: flex; gap: 8px; align-items: baseline;
  padding: 12px 14px; border-radius: var(--r-s);
  background: var(--sheet); font-size: 13px; text-align: left; white-space: nowrap;
  transition: background .3s, color .3s;
}
.st-tabs button span { color: var(--mute); font-variant-numeric: tabular-nums; }
.st-tabs button:hover { background: var(--line); }
.st-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.st-tabs button[aria-selected="true"] span { color: rgba(255, 255, 255, .55); }
.st-tabs button i { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: rgba(255, 255, 255, .7); transform: scaleX(0); transform-origin: left; }
.st-show.is-play button[aria-selected="true"] i { animation: st-prog var(--dur, 4.5s) linear forwards; }
.st-show.is-hold button[aria-selected="true"] i { animation-play-state: paused; }
@keyframes st-prog { to { transform: scaleX(1); } }

/* Process timeline: who owned which step */
.st-timeline { display: grid; gap: 16px; }
.st-timeline ol { list-style: none; display: grid; grid-template-columns: repeat(var(--n, 7), 1fr); gap: 4px; counter-reset: tl; }
.st-timeline li { display: grid; gap: 6px; align-content: start; padding: 16px 14px 18px; border-radius: var(--r-s); background: var(--sheet); }
.st-timeline li span { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 18px; border-radius: 50%; background: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }
.st-timeline li b { font-weight: 400; font-size: 15px; line-height: 1.25; }
.st-timeline li small { font-size: 12px; color: var(--mute); }
.st-timeline li.is-mine { background: var(--tint); color: #fff; }
.st-timeline li.is-mine span { background: rgba(255, 255, 255, .2); }
.st-timeline li.is-mine small { color: rgba(255, 255, 255, .75); }

/* YouTube: poster + play button, swapped for the player on click */
.st-yt { aspect-ratio: 16 / 9; background: #000; }
.st-yt button, .st-yt iframe { display: block; width: 100%; height: 100%; border: 0; }
.st-yt button { position: relative; cursor: pointer; }
.st-yt img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; transition: transform 1s var(--ease-out), opacity .4s; }
.st-yt button:hover img { transform: scale(1.03); opacity: .9; }
.st-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); transition: transform .4s var(--ease-out); }
.st-play::after { content: ""; position: absolute; left: 31px; top: 25px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent var(--ink); }
.st-yt button:hover .st-play { transform: scale(1.08); }
.cs-hero { position: relative; }
.cs-film { position: absolute; z-index: 2; left: 52px; bottom: 22px; display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 100px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); font-size: 14px; transition: transform .4s var(--ease-out); }
.cs-film .st-play { position: relative; left: auto; top: auto; width: 36px; height: 36px; margin: 0; background: var(--ink); box-shadow: none; }
.cs-film .st-play::after { left: 14px; top: 11px; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff; }
.cs-film:hover { transform: translateY(-2px); }
.bd-film { margin: auto; padding: 0; border: 0; background: transparent; width: min(92vw, 160vh); }
.bd-film::backdrop { background: rgba(10, 10, 12, .92); backdrop-filter: blur(6px); }
.bd-film-frame { aspect-ratio: 16 / 9; border-radius: var(--r-s); overflow: hidden; background: #000; }
.bd-film-frame iframe { width: 100%; height: 100%; border: 0; }
.bd-film button { position: fixed; top: 18px; right: 18px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; }

/* Lightbox */
.bd-lightbox { margin: auto; padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.bd-lightbox::backdrop { background: rgba(10, 10, 12, .88); backdrop-filter: blur(6px); }
.bd-lightbox img { max-width: 96vw; max-height: 94vh; width: auto; height: auto; border-radius: var(--r-s); background: #fff; }
.bd-lightbox button { position: fixed; top: 18px; right: 18px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; }
.cs-m img { cursor: zoom-in; }

@media (max-width: 1100px) {
  .st { grid-template-columns: 1fr; }
  .st-rail { display: none; }
}
@media (max-width: 900px) {
  .st-facts, .st-stats { grid-template-columns: 1fr 1fr; }
  .st-impact { grid-template-columns: 1fr; }
  .st-kpis > ol { grid-template-columns: 1fr; }
  .st-split, .st-show-head { grid-template-columns: 1fr; }
  .st-split.is-flip > :first-child { order: 0; }
  .st-cards ol, .st-tools, .st-findings { grid-template-columns: 1fr; }
  .st-timeline ol { grid-template-columns: repeat(2, 1fr); }
  .cs-film { left: 30px; bottom: 12px; }
  .st-cards li { min-height: 0; }
  .st-card-n { margin-bottom: 18px; }
}
@media (max-width: 720px) {
  .st-tabs button { flex: none; }
  .st-note { display: none; }
  .st-chrome span { display: none; }
}

/* ---------- Motion (assets/bd-motion.js; off under reduced motion) ---------- */
.bd-motion .bd-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.bd-motion .bd-w > span { display: inline-block; transform: translate3d(0, 110%, 0); transition: transform 1.1s var(--ease-out) var(--d, 0ms); }
.bd-motion .bd-split.is-in .bd-w > span { transform: none; }
.bd-motion .bd-rise { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .9s var(--ease-out) var(--d, 0ms), transform 1.1s var(--ease-out) var(--d, 0ms); }
.bd-motion .bd-rise.is-in { opacity: 1; transform: none; }

/* media opens from a clipped band while the image settles from a slight zoom */
.bd-motion .cs-m { opacity: 1; transform: none; clip-path: inset(14% 4% 0 4% round var(--r-s)); transition: clip-path 1.4s var(--ease-out); }
.bd-motion .cs-m > img, .bd-motion .cs-m > video, .bd-motion .st-yt button > img { transform: scale(1.14); transition: transform 1.8s var(--ease-out), opacity .4s; }
.bd-motion .cs-m.is-in { clip-path: inset(0 round var(--r-s)); }
.bd-motion .cs-m.is-in > img, .bd-motion .cs-m.is-in > video, .bd-motion .st-yt.is-in button > img { transform: none; }
.bd-motion .st-yt.is-in button:hover > img { transform: scale(1.03); transition-duration: 1s; }

.cs-hero picture { position: relative; display: block; overflow: hidden; border-radius: var(--r-s); }
.cs-hero-yt { position: absolute; left: 50%; top: 50%; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; transform: translate(-50%, -50%) scale(1.2); opacity: 0; pointer-events: none; transition: opacity 1s var(--ease-out); }
.cs-hero.is-playing .cs-hero-yt { opacity: 1; }
@media (max-width: 720px) { .cs-hero-yt { width: auto; height: 100%; } }
.bd-motion .cs-hero img { transform: scale(1.12); will-change: transform; animation: bd-hero-in 1.6s var(--ease-out) both; }
@keyframes bd-hero-in { from { clip-path: inset(10% 6% 0 6% round var(--r-s)); } to { clip-path: inset(0 round var(--r-s)); } }
.st-stats dd { font-variant-numeric: tabular-nums; }

/* ---------- Micro-interactions ---------- */
.wk-cap h2, .wk-cap h3 { transition: transform .6s var(--ease-out); }
.wk-cap h2::after, .wk-cap h3::after { content: " →"; display: inline-block; opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .6s var(--ease-out); }
.wk-card a:hover .wk-cap h2::after, .wk-card a:hover .wk-cap h3::after,
.wk-card a:focus-visible .wk-cap h2::after, .wk-card a:focus-visible .wk-cap h3::after { opacity: 1; transform: none; }
.wk-media { transition: border-radius .6s var(--ease-out); }
.wk-card a:hover .wk-media { border-radius: calc(var(--r-s) * 2.5); }
.bd-foot-cols a, .cs-text a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease-out), color .3s; }
.bd-foot-cols a:hover, .cs-text a:hover { background-size: 100% 1px; }
.st-rail a { transition: color .3s, transform .5s var(--ease-out); }
.st-rail a:hover { transform: translateX(4px); }
.st-cards li { transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out); }
.bd-motion .st-cards li.is-in:hover { transform: translateY(-4px); }
.st-tabs [role="tab"] { transition: color .3s, background .3s, transform .4s var(--ease-out); }
.st-tabs [role="tab"]:active { transform: scale(.97); }
.bd-brand img { transition: opacity .3s; }
.bd-brand:hover img { opacity: .7; }

/* ---------- Page transition ----------
   Cross-document view transition: the old page sinks into a rounded card on
   a grey backdrop while the next page rises from below and opens to full. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition { background: #d9d9d9; }
  ::view-transition-group(root) { animation-duration: 1.15s; }
  ::view-transition-old(root) { animation: bd-vt-out 1.15s var(--ease) both; transform-origin: 50% 0; }
  ::view-transition-new(root) { animation: bd-vt-in 1.15s var(--ease) both; transform-origin: 50% 100%; }
}
@keyframes bd-vt-out {
  0% { transform: none; border-radius: 0; }
  45% { transform: scale(.9) translateY(4%); border-radius: 18px; filter: brightness(1); }
  100% { transform: scale(.9) translateY(-8%); border-radius: 18px; filter: brightness(.8); }
}
@keyframes bd-vt-in {
  0% { transform: translateY(100%) scale(.9); border-radius: 18px; }
  55% { transform: translateY(6%) scale(.9); border-radius: 18px; }
  100% { transform: none; border-radius: 0; }
}

/* rows of portrait phone screens: narrower on desktop, a swipe strip on mobile */
.cs-row-phones { max-width: 1040px; margin-inline: auto; }
@media (max-width: 900px) {
  .cs-row.cs-row-phones { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -18px; padding-inline: 18px; scroll-padding-inline: 18px; }
  .cs-row-phones::-webkit-scrollbar { display: none; }
  .cs-row.cs-row-phones .cs-m { flex: 0 0 64%; scroll-snap-align: start; }
}

/* ---------- Dock as reading progress (doc pages) ----------
   A darker fill sweeps across the dock behind its contents as the page is
   read; it reaches the right edge at the end of the page. */
.bd-dock::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: rgba(0, 0, 0, .08);
  clip-path: inset(0 calc((1 - var(--prog, 0)) * 100%) 0 0);
  transition: opacity .4s;
  pointer-events: none;
}
body.is-menu .bd-dock::before, body.is-loading .bd-dock::before { opacity: 0; }

/* brand mark (white on transparent) inside the black logo tiles */
.bd-logo img, .cs-avatar img, .bd-art-mono img { display: block; width: 72%; height: auto; transition: filter .4s; }
body.is-menu .bd-logo img { filter: invert(1); }
.bd-art-mono img { width: 46%; filter: invert(1); opacity: .22; }

/* ---------- Rationale blocks: decisions, pivot, retro ---------- */
.st-decide ol, .st-pivot ol, .st-retro ul { list-style: none; display: grid; gap: 8px; margin-top: 14px; }
.st-decide ol { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.st-decide li { display: grid; align-content: start; gap: 12px; padding: 24px; border-radius: var(--r-s); background: var(--sheet); }
.st-decide li p { font-size: 15px; line-height: 1.45; }
.st-decide li p b, .st-pivot li b, .st-retro-next b { display: block; margin-bottom: 4px; font-weight: 400; font-size: 12px; letter-spacing: .02em; text-transform: uppercase; color: var(--mute); }
.st-decide li p:nth-of-type(1) { font-size: clamp(17px, 1.4vw, 21px); letter-spacing: -.02em; line-height: 1.2; }
.st-decide li p:nth-of-type(2) { color: var(--ink-2); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); }
.st-decide li p:nth-of-type(3) b { color: var(--tint); }
.st-layers ol { list-style: none; display: grid; gap: 8px; }
.st-layers li { padding: clamp(20px, 3vw, 36px); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.st-layers h3 { font-size: clamp(20px, 2vw, 28px); font-weight: 400; letter-spacing: -.02em; }
.st-layers li p { color: var(--ink-2); margin-top: 6px; }
.st-layers li ul { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.st-layers li ul li { padding: 14px; font-size: 15px; background: var(--sheet); box-shadow: none; }
.st-layers li.is-key { background: var(--tint); color: #fff; box-shadow: none; }
.st-layers li.is-key p { color: rgba(255, 255, 255, .85); }
.st-layers figcaption { margin-top: 12px; color: var(--mute); font-size: 14px; }
@media (max-width: 720px) { .st-layers li ul { grid-template-columns: 1fr; } }
.st-pivot ol { grid-template-columns: repeat(3, 1fr); counter-reset: pv; }
.st-pivot li { position: relative; padding: 24px; border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--line); }
.st-pivot li:last-child { background: var(--tint); color: #fff; box-shadow: none; }
.st-pivot li:last-child b { color: rgba(255, 255, 255, .72); }
.st-pivot li:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 50%; z-index: 1; width: 20px; margin-top: -10px; text-align: center; color: var(--mute); background: var(--paper); }
.st-pivot li p { font-size: 16px; line-height: 1.45; }
.st-retro ul { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.st-retro li { padding: 24px 0 0; border-top: 1px solid var(--ink); }
.st-retro h3 { font-weight: 400; font-size: clamp(18px, 1.5vw, 22px); letter-spacing: -.02em; margin-bottom: 8px; }
.st-retro p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.st-retro-next { margin-top: 24px; padding: 20px 24px; border-radius: var(--r-s); background: var(--sheet); font-size: 15px; line-height: 1.5; }
@media (max-width: 900px) {
  .st-pivot ol { grid-template-columns: 1fr; }
  .st-pivot li:not(:last-child)::after { content: "↓"; right: auto; left: 24px; top: auto; bottom: -14px; margin-top: 0; }
}

/* ---------- About: a short CV on a dark ground ---------- */
body.ab-dark { background: #131313; color: #f2f2f2; }
.ab-dark .bd-top, .ab-dark main, .ab-dark .bd-foot { --ink: #f2f2f2; --ink-2: #b4b4b4; --mute: #8a8a8a; --line: #2a2a2a; --sheet: #1c1c1c; color: var(--ink); }
.ab-dark .bd-brand img, .ab-dark .bd-foot-mark { filter: invert(1); }
/* The dock follows the dark ground: same layout, dark sheet and tiles. */
.ab-dark .bd-dock {
  --ink: #f2f2f2; --ink-2: #b4b4b4; --mute: #8a8a8a; --line: rgba(255, 255, 255, .1); --sheet: #1f1f1f; --tile: rgba(255, 255, 255, .08);
  color: var(--ink); background: rgba(28, 28, 28, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .07), 0 10px 34px -8px rgba(0, 0, 0, .6);
}
.ab-dark .bd-dock::after { background: radial-gradient(120% 70% at 18% -10%, rgba(255, 255, 255, .1), transparent 55%); }
.ab-dark.is-menu .bd-dock { background: rgba(28, 28, 28, .62); }
.ab-dark .bd-dock .bd-tile, .ab-dark .bd-dock .bd-stat, .ab-dark .bd-dock .bd-burger { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.ab-dark .bd-dock::before { background: rgba(255, 255, 255, .08); }
.ab-dark .bd-logo { background: #f2f2f2; }
.ab-dark .bd-logo img { filter: invert(1); }
.ab-dark.is-menu .bd-logo img { filter: none; }
.ab-dark.is-menu .bd-burger { background: #444; }
.ab-dark .bd-grab, .ab-dark .bd-dots button { background: #444; }
.ab-dark .bd-dots button.on { background: var(--ink); }
.ab-dark .bd-slide::before { background: #474747; }
.ab-dark .bd-art-mono img { filter: none; opacity: .18; }
.ab-dark .bd-scrim { background: rgba(0, 0, 0, .5); }

.ab { padding-top: clamp(24px, 6vh, 72px); }
.ab-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 72px); align-items: end; }
.ab-name { font-size: clamp(44px, 6vw, 96px); font-weight: 400; line-height: .95; letter-spacing: -.035em; margin: 18px 0 10px; }
.ab-role { color: var(--mute); font-size: 18px; margin-bottom: 28px; }
.ab-intro > p:not(.cs-chips):not(.ab-role):not(.ab-actions) { max-width: 34em; font-size: 18px; line-height: 1.45; color: var(--ink-2); margin-bottom: 10px; }
.ab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 28px; font-size: 15px; }
.ab-actions a { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .3s; }
.ab-actions a:hover { border-color: var(--ink); }
.ab-actions .cs-film { position: static; color: #1d1d1d; }
.ab-actions .cs-film .st-play { background: #1d1d1d; }
/* the photo's own dark ground (#121212–#191919) melts into the page */
.ab-portrait { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 40% 30%;
  -webkit-mask-image: radial-gradient(ellipse 62% 70% at 50% 42%, #000 52%, transparent 100%);
          mask-image: radial-gradient(ellipse 62% 70% at 50% 42%, #000 52%, transparent 100%); }
.ab-stats { margin-top: clamp(40px, 7vh, 80px); }
.ab-sec { padding-top: clamp(56px, 9vh, 104px); }
.ab-label { font-size: 13px; font-weight: 400; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ab-label ~ .ab-label { margin-top: 48px; }
.ab-tl { list-style: none; }
.ab-tl > li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.ab-when { color: var(--mute); font-size: 14px; font-variant-numeric: tabular-nums; }
.ab-co h3 { font-size: clamp(22px, 2vw, 30px); font-weight: 400; letter-spacing: -.02em; margin-bottom: 8px; }
.ab-co ul { list-style: none; display: grid; gap: 12px; }
.ab-co li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
.ab-co h4, .ab-tl-s h4 { font-size: 16px; font-weight: 500; }
.ab-co li p { grid-column: 1 / -1; color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.ab-co li .ab-when { font-size: 13px; }
.ab-kind { color: var(--mute); font-size: 15px; margin: -2px 0 16px; }
.ab-case { color: var(--ink); margin-left: 6px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.ab-case:hover { border-color: var(--ink); }
.ab-tl-s > li { grid-template-columns: 120px minmax(0, 1fr); padding: 14px 0; }
.ab-tl-s p { color: var(--ink-2); font-size: 14px; }
.ab-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 96px); }
.ab-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; }
.ab-tags li { padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px; font-size: 14px; }
.ab-langs { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; padding-top: 18px; }
.ab-langs li { display: flex; flex-direction: column; font-size: 16px; }
.ab-langs small { color: var(--mute); font-size: 13px; }
.ab-dark .bd-foot { border-color: var(--line); }
@media (max-width: 720px) {
  .ab-hero, .ab-cols { grid-template-columns: 1fr; }
  .ab-portrait { order: -1; aspect-ratio: 1; object-position: 44% 30%; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 46%, #000 50%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 46%, #000 50%, transparent 100%); }
  .ab-stats { grid-template-columns: 1fr 1fr; }
  .ab-tl > li { grid-template-columns: 1fr; gap: 6px; }
  .ab-tl-s > li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Case reel view: highlight slides on a dark ground ---------- */
.cs-views[hidden], .rl[hidden] { display: none; }
.rl {
  position: fixed; inset: 0; z-index: 30;
  overflow: hidden; outline: none;
  background: #131313; color: #f2f2f2;
  --ink: #f2f2f2; --mute: #8a8a8a; --line: #2a2a2a;
}
html:has(body.is-reel) { overflow: hidden; }
body.is-reel main, body.is-reel .bd-foot { visibility: hidden; }
body.is-reel .bd-top {
  position: fixed; z-index: 35; top: 0; left: 0; right: 0;
  --ink: #f2f2f2; --mute: #8a8a8a; --sheet: #262626; --tile: #3a3a3a;
}
body.is-reel .bd-brand img { filter: invert(1); }

.rl-track { list-style: none; display: flex; height: 100%; transition: transform 1s var(--ease); touch-action: pan-y; cursor: grab; user-select: none; }
.rl-slide {
  position: relative; flex: 0 0 100%; height: 100%;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center;
  gap: clamp(32px, 4vw, 72px);
  padding: 110px 30px 128px;
  max-width: 1500px; margin: 0 auto;
}
/* keep every slide full-width even though the content is capped */
.rl-track > .rl-slide { max-width: none; padding-inline: max(30px, calc((100vw - 1500px) / 2 + 30px)); }

.rl-kick { display: flex; gap: 12px; font-size: 13px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.rl-kick span { color: var(--ink); font-variant-numeric: tabular-nums; }
.rl-line { margin-top: 22px; font-weight: 400; font-size: clamp(30px, 3.1vw, 54px); line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; }
.rl-stat { margin-top: clamp(28px, 5vh, 56px); padding-top: 18px; border-top: 1px solid var(--line); }
.rl-stat dt { font-size: clamp(48px, 5.4vw, 96px); line-height: 1; letter-spacing: -.04em; }
.rl-stat dd { margin-top: 8px; font-size: 14px; color: var(--mute); }

.rl-media {
  position: relative; height: 100%; min-height: 0;
  display: grid; place-items: center;
  border-radius: var(--r-l); overflow: hidden;
  background: var(--bg, #1c1c1c);
}
.rl-media img, .rl-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.rl-media[style] img { padding: clamp(12px, 2.4vw, 40px); }

/* cover: the case hero, full bleed, with the statement over a scrim */
.rl-cover { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; }
.rl-bg, .rl-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rl-cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, .15) 60%, transparent), linear-gradient(transparent 40%, rgba(0, 0, 0, .55)); }
.rl-cover .rl-text { position: relative; z-index: 2; }
.rl-cover .rl-kick { color: rgba(255, 255, 255, .7); }
.rl-cover .rl-line { font-size: clamp(32px, 3.6vw, 64px); }
.rl-client { margin-top: 18px; font-size: 14px; color: rgba(255, 255, 255, .7); }

/* text-only and end slides */
.rl-plain { grid-template-columns: minmax(0, 1fr); }
.rl-plain .rl-text { max-width: 1040px; }
.rl-plain .rl-line { font-size: clamp(36px, 4.6vw, 80px); }
.rl-actions { margin-top: 32px; }
.rl-btn { display: inline-flex; padding: 14px 22px; border-radius: 100px; background: #f2f2f2; color: #131313; font-size: 15px; transition: transform .4s var(--ease-out); }
.rl-btn:hover { transform: translateY(-2px); }
.rl-nextcase { color: #fff; }
.rl-nextcase img { object-fit: cover; transition: transform 1.2s var(--ease-out); }
.rl-nextcase:hover img { transform: scale(1.04); }
.rl-nextcase span { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 4px; padding: 60px 24px 22px; font-size: 13px; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.rl-nextcase b { font-weight: 400; font-size: clamp(22px, 2vw, 32px); letter-spacing: -.02em; }

/* entrance of the active slide */
.rl-slide .rl-kick, .rl-slide .rl-stat, .rl-slide .rl-client, .rl-slide .rl-actions { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease-out) .5s, transform .8s var(--ease-out) .5s; }
.rl-slide .rl-kick { transition-delay: .25s; }
.rl-slide .rl-media > * { transform: scale(1.06); transition: transform 1.6s var(--ease-out) .2s; }
.rl-slide.is-on .rl-kick, .rl-slide.is-on .rl-stat, .rl-slide.is-on .rl-client, .rl-slide.is-on .rl-actions { opacity: 1; transform: none; }
.rl-slide.is-on .rl-media > * { transform: none; }

.rl-count {
  position: absolute; z-index: 3; left: 30px; bottom: 30px;
  padding: 6px 8px; border-radius: 4px;
  font-size: 13px; font-variant-numeric: tabular-nums;
  background: rgba(29, 29, 29, .72); backdrop-filter: blur(12px);
}
.rl-nav { position: absolute; z-index: 3; right: 30px; bottom: 30px; display: flex; gap: 8px; }
.rl-nav button {
  width: 56px; height: 56px; border-radius: var(--r-m);
  background: rgba(29, 29, 29, .72); backdrop-filter: blur(12px);
  display: grid; place-items: center; transition: background .3s, opacity .3s;
}
.rl-nav button:hover { background: #333; }
.rl-nav button:disabled { opacity: .35; cursor: default; }
.rl-nav button::before { content: ""; width: 10px; height: 10px; border: solid currentColor; border-width: 1.4px 1.4px 0 0; transform: translateX(-2px) rotate(45deg); }
.rl-nav .rl-prev::before { transform: translateX(2px) rotate(-135deg); }

@media (prefers-reduced-motion: reduce) {
  .rl-track, .rl-slide .rl-kick, .rl-slide .rl-stat, .rl-slide .rl-client, .rl-slide .rl-actions, .rl-slide .rl-media > * { transition: none; }
}

@media (max-width: 720px) {
  body.is-reel .bd-top { padding: 14px 18px; }
  .rl-slide, .rl-cover {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch; gap: 22px;
  }
  .rl-track > .rl-slide { padding: 76px 18px 168px; }
  .rl-text { order: 2; }
  .rl-media { order: 1; height: auto; }
  .rl-cover, .rl-plain { grid-template-rows: auto; align-content: end; }
  .rl-plain { align-content: center; }
  .rl-line { margin-top: 14px; font-size: clamp(24px, 6.6vw, 32px); }
  .rl-cover .rl-line, .rl-plain .rl-line { font-size: clamp(28px, 8vw, 40px); }
  .rl-stat { margin-top: 18px; padding-top: 12px; display: flex; align-items: baseline; gap: 12px; }
  .rl-stat dt { font-size: 40px; }
  .rl-stat dd { margin: 0; }
  .rl-count { left: 18px; bottom: 112px; }
  .rl-nav { right: 18px; bottom: 108px; }
  .rl-nav button { width: 40px; height: 40px; }
  .rl-end .rl-media { max-height: 34vh; }
}

/* ---------- Archive: earlier work in a depth field ---------- */
/* Without JS (no .ar-js) the panels below are simply the page. */
.ar { padding: clamp(32px, 6vh, 72px) 30px 160px; max-width: 1500px; margin: 0 auto; }
.ar-title { font-size: clamp(40px, 5vw, 80px); font-weight: 400; line-height: .95; letter-spacing: -.035em; }
.ar-sub { max-width: 24em; margin-top: 14px; color: var(--ink-2); font-size: 15px; }
.ar-index { list-style: none; margin-top: 28px; max-width: 300px; }
.ar-index button { width: 100%; display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; transition: color .3s; }
.ar-index small { color: var(--mute); font-variant-numeric: tabular-nums; }
.ar-index button:hover, .ar-index button[aria-expanded="true"] { color: var(--mute); }
.ar-index button[aria-expanded="true"] span::before { content: "→ "; }
.ar-field, .ar-hint { display: none; }
.ar-panels { display: grid; gap: 12px; margin-top: 48px; }
.ar-panel { padding: 24px; border-radius: var(--r-l); background: var(--sheet); }
.ar-close { display: none; }
.ar-kick { font-size: 13px; color: var(--mute); }
.ar-name { margin: 6px 0 14px; font-size: clamp(26px, 2.2vw, 34px); font-weight: 400; line-height: 1.05; letter-spacing: -.03em; }
.ar-panel > p:not(.ar-kick) { font-size: 15px; line-height: 1.45; color: var(--ink-2); margin-bottom: 10px; max-width: 34em; }
.ar-facts { display: grid; gap: 8px; margin: 18px 0; font-size: 13px; }
.ar-facts div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.ar-facts dt { color: var(--mute); }
.ar-photos { list-style: none; display: grid; gap: 8px; margin-top: 18px; }
.ar-photos img { width: 100%; height: auto; border-radius: 8px; background: var(--tile); }
.ar-link { display: inline-block; margin-top: 2px; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 14px; }

/* With JS: a fixed stage — the field fills the screen, the copy floats over it. */
html.ar-js, html.ar-js body.ar-page { height: 100%; overflow: hidden; overscroll-behavior: none; }
.ar-js .ar-page .bd-top { position: fixed; z-index: 5; left: 0; right: 0; max-width: none; pointer-events: none; }
.ar-js .ar-page .bd-top > * { pointer-events: auto; }
.ar-js .ar { padding: 0; max-width: none; }
.ar-js .ar-intro { position: fixed; z-index: 4; left: 30px; top: 104px; width: 360px; padding: 24px; border-radius: var(--r-l);
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: opacity .5s var(--ease), transform .7s var(--ease); }
.ar-js .ar-title { font-size: clamp(40px, 4vw, 64px); }
.ar-js .ar-index { max-width: none; }
.ar-js .ar-field { display: block; position: fixed; inset: 0; overflow: hidden; perspective: 1000px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.ar-js .ar-field.is-drag { cursor: grabbing; }
.ar-space { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.ar-item { position: absolute; left: 0; top: 0; will-change: transform, opacity; transition: opacity .5s var(--ease); cursor: pointer; }
.ar-item img { width: 100%; height: auto; border-radius: 6px; background: var(--sheet); -webkit-user-drag: none; pointer-events: none; }
.ar-item figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; font-size: 14px; line-height: 1.2; pointer-events: none; }
.ar-item small { color: var(--mute); font-variant-numeric: tabular-nums; }
.ar-js .ar-hint { display: block; position: fixed; z-index: 4; right: 30px; bottom: 30px; padding: 6px 8px; border-radius: 4px; background: var(--sheet); font-size: 13px; color: var(--ink-2); transition: opacity .5s var(--ease); }
.ar-hint-touch { display: none; }
@media (pointer: coarse) { .ar-hint-wheel { display: none; } .ar-hint-touch { display: inline; } }

.ar-js .ar-panels { display: block; margin: 0; }
.ar-js .ar-panel {
  position: fixed; z-index: 7; left: 30px; top: 104px; width: min(440px, calc(100vw - 60px));
  max-height: calc(100dvh - 104px - 120px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  background: rgba(238, 238, 238, .92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; visibility: hidden; transform: translate3d(-12px, 0, 0);
  transition: opacity .5s var(--ease), transform .7s var(--ease), visibility 0s .7s;
}
.ar-js .ar-panel::-webkit-scrollbar { display: none; }
.ar-js .ar-photos li:first-child { display: none; }   /* the cover is already up front in the field */
.ar-js .ar-keep-cover li:first-child { display: block; }
.ar-js .ar-panel.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .5s var(--ease) .1s, transform .7s var(--ease) .1s; }
.ar-js .ar-panel:focus { outline: none; }
.ar-js .ar-close { display: grid; place-items: center; position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 8px; background: var(--tile); }
.ar-close span, .ar-close span::after { display: block; width: 14px; height: 1.4px; background: currentColor; transform: rotate(45deg); }
.ar-close span::after { content: ""; transform: rotate(90deg); }
.ar-panel .ar-kick { padding-right: 44px; }
body.ar-open .ar-intro { opacity: 0; transform: translate3d(-12px, 0, 0); pointer-events: none; }
body.ar-open .ar-hint { opacity: 0; }

@media (max-width: 720px) {
  .ar { padding: 24px 18px 140px; }
  .ar-js .ar-intro { left: 0; right: 0; top: 64px; width: auto; padding: 12px 18px; border-radius: 0; background: linear-gradient(rgba(255, 255, 255, .92) 60%, rgba(255, 255, 255, 0)); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ar-js .ar-sub { display: none; }
  .ar-js .ar-title { font-size: 34px; }
  .ar-js .ar-index { display: flex; gap: 6px; max-width: none; margin: 14px -18px 0; padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
  .ar-js .ar-index::-webkit-scrollbar { display: none; }
  .ar-js .ar-index button { width: auto; white-space: nowrap; padding: 7px 10px; border: 0; border-radius: 6px; background: var(--sheet); font-size: 13px; }
  .ar-js .ar-index small { display: none; }
  .ar-js .ar-hint { left: 50%; right: auto; bottom: 96px; transform: translateX(-50%); white-space: nowrap; }
  .ar-js .ar-panel { left: 12px; right: 12px; top: auto; bottom: 92px; width: auto; max-height: 48dvh; padding: 20px; transform: translate3d(0, 16px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ar-item, .ar-js .ar-panel, .ar-js .ar-panel.is-open, .ar-js .ar-intro { transition: none; }
}
.wk-more { margin-top: 28px; font-size: 15px; }
.wk-more a { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .3s; }
.wk-more a:hover { border-color: var(--ink); }

/* ---------- About: the method, four steps in a dark container ---------- */
.ab-method {
  display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(24px, 4vw, 72px);
  margin-top: clamp(56px, 9vh, 104px); padding: 32px; border-radius: var(--r-l); background: #1d1d1d;
}
.mt-text { display: flex; flex-direction: column; min-height: clamp(440px, 62vh, 600px); }
.mt-label { font-size: 17px; font-weight: 400; }
.mt-lead { margin-top: 8px; max-width: 26em; color: var(--mute); font-size: 15px; }
.mt-steps { list-style: none; margin-top: auto; padding-top: 48px; }
.mt-step h3 { font: inherit; }
.mt-step button { width: 100%; padding: 20px 0 18px; text-align: left; font-size: 15px; transition: color .3s; }
.mt-step:not(.is-on) button:hover { color: var(--mute); }
.mt-step button span { font-variant-numeric: tabular-nums; }
.mt-body { display: grid; grid-template-rows: 1fr; }
.mt-body > div { overflow: hidden; }
.mt-body p { max-width: 30em; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.mt-body .mt-ai { margin-top: 10px; color: var(--mute); font-size: 14px; }
.mt-ai span { color: var(--ink); }
.js .mt-body { grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.js .mt-step.is-on .mt-body { grid-template-rows: 1fr; }
.js .mt-step.is-on .mt-body > div { padding-bottom: 20px; }
.mt-bar { position: relative; display: block; height: 1.4px; background: #3a3a3a; overflow: hidden; }
.mt-bar i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }
.mt-step.is-on .mt-bar i { transform: none; }
.is-auto .mt-step.is-on .mt-bar i { animation: mt-fill 7s linear both paused; }
.is-auto.is-run .mt-step.is-on .mt-bar i { animation-play-state: running; }
.is-auto.is-run:hover .mt-step.is-on .mt-bar i, .is-auto.is-run:focus-within .mt-step.is-on .mt-bar i { animation-play-state: paused; }
@keyframes mt-fill { from { transform: scaleX(0); } to { transform: none; } }

.mt-media { position: relative; border-radius: var(--r-m); overflow: hidden; min-height: 320px; }
.mt-shot { position: absolute; inset: 0; background: var(--bg, #f3f3f3); }
.js .mt-shot { opacity: 0; transition: opacity .7s var(--ease); }
.js .mt-shot.is-on { opacity: 1; }
.js .mt-shot img { transform: scale(1.03); transition: transform 1.4s var(--ease-out); }
.js .mt-shot.is-on img { transform: none; }
.mt-shot img { position: absolute; inset: clamp(16px, 3vw, 48px) clamp(16px, 3vw, 48px) 56px; width: calc(100% - 2 * clamp(16px, 3vw, 48px)); height: calc(100% - clamp(16px, 3vw, 48px) - 56px); object-fit: contain; }
.mt-shot figcaption { position: absolute; left: 16px; bottom: 14px; padding: 5px 8px; border-radius: 4px; background: rgba(29, 29, 29, .82); color: #f2f2f2; font-size: 12px; }
html:not(.js) .mt-shot:not(:first-child) { display: none; }
html:not(.js) .mt-text { min-height: 0; }

@media (max-width: 900px) {
  .ab-method { grid-template-columns: 1fr; padding: 22px 18px 18px; }
  .mt-text { min-height: 0; }
  .mt-steps { padding-top: 28px; }
  .mt-media { min-height: 0; aspect-ratio: 4 / 3; }
  .mt-shot img { inset: 14px 14px 44px; width: calc(100% - 28px); height: calc(100% - 58px); }
  .mt-shot figcaption { left: 10px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .mt-body, .js .mt-shot, .js .mt-shot img { transition: none; }
}
