/*
 * bylucasloyola
 * Order: tokens, base, chrome (top bar, contact, viewer), home, case study, about, play, small screens.
 */

@font-face {
  font-family: 'Geist';
  src: url('../font/Geist/webfonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --wash: #eff2f5; /* figure panels */
  --ink: #0b1d2e; /* deep blue ink */
  --ink-2: #4a5969; /* supporting text, 7:1 on paper */
  --rule: #d5dbe1;
  --mark: #cbf0d2; /* "what changed": the diff highlight */
  --mark-ink: #0a5a30;

  --font: 'Geist', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: clamp(1.25rem, 4.5vw, 4rem);
  --measure: 42rem;
  --r: 0.625rem; /* figures */
  --r-lg: clamp(0.875rem, 1.4vw, 1.375rem); /* promo loops */
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.1875rem, 1.05rem + 0.6vw, 1.4375rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --fs-h2: clamp(1.625rem, 1.3rem + 1.5vw, 2.375rem);
  --fs-h1: clamp(2.375rem, 1.4rem + 4.6vw, 4.75rem);
  --fs-figure: clamp(2.75rem, 2rem + 3.4vw, 4.5rem);
}

/* ---------- base ---------- */

/* Product artifacts: direct access, native video controls, no autoplay. */
.case-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.artifact-button { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; min-height: 48px; padding: 0.75rem 1.125rem; border: 1px solid var(--ink); border-radius: var(--r); background: var(--ink); color: var(--paper); font-weight: 580; text-decoration: none; line-height: 1.4; }
.artifact-button:hover { background: var(--ink-2); text-decoration: none; }
.artifact-button--secondary { background: var(--paper); color: var(--ink); }
.artifact-button--secondary:hover { background: var(--wash); }
.experience { min-width: 0; }
.experience__intro { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1.5rem; }
.experience__intro > div { flex: 1 1 24rem; }
.experience__intro p:not(.experience__eyebrow) { margin-top: 0.875rem; color: var(--ink-2); }
.experience__eyebrow { margin-bottom: 0.75rem; font-size: var(--fs-small); font-weight: 600; }
.experience__tasks { margin-top: 1.5rem; padding-block: 1rem; border-block: 1px solid var(--rule); }
.experience__tasks > span { font-size: var(--fs-small); font-weight: 600; }
.experience__tasks ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 0.5rem; padding-left: 1.25rem; list-style: disc; color: var(--ink-2); }
.experience__film { margin-top: 1.75rem; padding: clamp(1rem, 2vw, 1.5rem); border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--wash); }
.experience__film-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.experience__film-heading span, .experience__film figcaption { font-size: var(--fs-small); color: var(--ink-2); }
.experience__film video { width: 100%; max-height: 70vh; object-fit: contain; background: var(--ink); border-radius: var(--r); }
.experience__film figcaption { margin-top: 0.75rem; }
.experience > .disclosure { margin-top: 1rem; }
.prototype { margin-top: 1.5rem; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--wash); overflow: hidden; }
.prototype__controls { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; padding: 1rem; }
.prototype__controls span { margin-right: auto; font-size: var(--fs-small); }
.prototype__controls button { min-height: 44px; padding: 0.5rem 0.75rem; border: 1px solid var(--rule); border-radius: 6px; background: white; font-size: var(--fs-small); }
.prototype__viewport { position: relative; overflow: hidden; margin-inline: auto; background: var(--wash); }
.prototype iframe { position: absolute; border: 0; top: 0; left: 50%; transform-origin: top left; }
.prototype > .fine { padding: 0 1rem 1rem; }
.prototype:fullscreen { overflow: auto; width: 100%; height: 100%; background: var(--paper); }
/* phone body for mobile prototypes (data-device="phone") */
.prototype__device { position: absolute; left: 50%; transform-origin: top left; border-radius: 60px; background: #0c0e0f; box-shadow: inset 0 0 0 1.5px #3a4146, inset 0 0 0 5px #15181a, 0 0 0 1px rgba(0,0,0,.35), 0 40px 70px -28px rgba(20,24,28,.55), 0 14px 28px -14px rgba(20,24,28,.4); }
.prototype__device::before, .prototype__device::after { content: ""; position: absolute; width: 4px; border-radius: 2px; background: #2a3034; }
.prototype__device::before { left: -4px; top: 168px; height: 64px; box-shadow: 0 84px 0 #2a3034; }
.prototype__device::after { right: -4px; top: 222px; height: 96px; }
.prototype__device iframe { left: 13px; top: 13px; border-radius: 47px; background: #1a2024; transform: none; }
.prototype__island { position: absolute; top: 23px; left: 50%; width: 104px; height: 26px; margin-left: -52px; border-radius: 13px; background: #000; pointer-events: none; }
.prototype__home { position: absolute; bottom: 20px; left: 50%; width: 128px; height: 4px; margin-left: -64px; border-radius: 2px; background: rgba(255,255,255,.42); pointer-events: none; }

@media (max-width: 900px) { .case-head .case-actions { order: 3; width: 100%; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  letter-spacing: -0.006em;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, dl, dd, ol, ul, figure, blockquote, table { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img, video { display: block; max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--mark); color: var(--ink); }

h1, h2, h3 { font-weight: 580; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1; letter-spacing: -0.042em; }
h2 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.032em; }
h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.022em; }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: 90rem; margin-inline: auto; padding-inline: var(--gutter); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 10; padding: 0.5rem 0.875rem; background: var(--ink); color: var(--paper); }
.skip:focus { top: 0.75rem; }

/* the mark: only on what changed or what resulted */
.mark {
  background: var(--mark);
  padding: 0.08em 0.28em;
  margin-inline: -0.1em;
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.more { margin-top: 1rem; font-weight: 520; }
.fine { margin-top: 1rem; font-size: var(--fs-small); color: var(--ink-2); max-width: var(--measure); }

/* ---------- top bar ---------- */

.top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.5rem; }
.top__brand { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.625rem; text-decoration: none; }
.top__name { font-weight: 640; letter-spacing: -0.02em; font-size: 1.0625rem; }
.top__role { color: var(--ink-2); font-size: var(--fs-small); }
.top__nav { display: flex; gap: clamp(1rem, 2.5vw, 1.75rem); font-size: 1rem; font-weight: 500; }
.top__nav a { text-decoration: none; padding-block: 0.25rem; }
.top__nav a:hover, .top__nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.4em; }
/* language switch: EN / PT-BR, with flags; the current language is the filled half */
.top__nav { align-items: center; }
.lang { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--rule); border-radius: 999px; }
.lang__opt { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 1.75rem; padding: 0 0.5rem; border-radius: 999px; color: var(--ink-2); font-size: var(--fs-small); font-weight: 560; line-height: 1; letter-spacing: 0.02em; }
.top__nav .lang a { padding-block: 0; text-decoration: none; }
.top__nav .lang a:hover { color: var(--ink); background: var(--wash); text-decoration: none; }
.lang__opt[aria-current] { background: var(--wash); color: var(--ink); }
.flag { flex: none; width: 1.125rem; height: 0.75rem; border-radius: 2px; box-shadow: 0 0 0 1px rgb(11 29 46 / 0.14); }
@media (max-width: 30rem) {
  .top__nav { gap: 0.5rem 0.75rem; flex-wrap: wrap; }
  .lang__opt { padding: 0 0.375rem; }
  .lang__code { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- footer (every page ends here) ----------*/

.foot {
  --portrait-periwinkle: #9b99d2;
  --portrait-blue: #598fd4;
  --portrait-cyan: #6dc3d2;
  container-type: inline-size; position: relative; isolation: isolate; overflow: hidden;
  margin-top: clamp(5rem, 10vw, 9rem); background: var(--paper); color: var(--ink);
}
.foot__panel { position: relative; isolation: isolate; }
.foot__bg {
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000, rgb(0 0 0 / 0.85) 22%, rgb(0 0 0 / 0.28) 48%, transparent 79%);
  mask-image: linear-gradient(to top, #000, rgb(0 0 0 / 0.85) 22%, rgb(0 0 0 / 0.28) 48%, transparent 79%);
}
/* The portrait's tiled backdrop */
.foot__bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M0 24H48M24 0V48' fill='none' stroke='%2324425e' stroke-opacity='.11' stroke-width='.7'/%3E%3Ccircle cx='24' cy='24' r='1.8' fill='%23193950' fill-opacity='.23'/%3E%3C/svg%3E");
  background-size: 48px 48px;
}
.foot__bg i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(clamp(38px, 5cqw, 76px));
  animation: foot-drift 26s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.foot__bg i:nth-child(1) {
  left: -16%; bottom: -51%; width: 72%; height: 108%;
  background: var(--portrait-blue); opacity: 0.65;
}
.foot__bg i:nth-child(2) {
  left: 9%; bottom: -54%; width: 61%; height: 112%;
  background: var(--portrait-periwinkle); opacity: 0.82;
  animation-name: foot-breathe; animation-duration: 31s; animation-delay: -12s;
}
.foot__bg i:nth-child(3) {
  right: -10%; bottom: -60%; width: 70%; height: 116%;
  background: var(--portrait-cyan); opacity: 0.48;
  animation-duration: 37s; animation-direction: alternate-reverse; animation-delay: -19s;
}
.foot.is-in-view .foot__bg i { animation-play-state: running; will-change: transform, translate; }
@keyframes foot-drift { from { transform: translate(-6%, 2%) scale(1.02); } to { transform: translate(8%, -6%) scale(1.1); } }
@keyframes foot-breathe { from { transform: translate(8%, 3%) scale(1.03); } to { transform: translate(-9%, -8%) scale(1.08); } }
.foot__grain { position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: 0.16; mix-blend-mode: soft-light; }

.foot__in { container-type: inline-size; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: start; column-gap: clamp(1.5rem, 4vw, 4rem); width: 100%; max-width: 90rem; margin-inline: auto; padding: clamp(3.5rem, 6vw, 6rem) var(--gutter) clamp(1.5rem, 2vw, 2rem); }
.foot__title { font-size: clamp(2.5rem, 1.4rem + 4.4cqw, 4.25rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.04em; }
.foot__ways { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: clamp(1.5rem, 2.6cqw, 2.25rem); }
/* the address is the copy button: click to copy, the icon turns into a tick */
.foot__mail { display: inline-flex; align-items: center; gap: 0.625rem; padding: 0.6rem 0.95rem 0.6rem 1.15rem; border: 1px solid rgb(11 29 46 / 0.18); border-radius: 999px; background: rgb(255 255 255 / 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 0.9375rem; font-weight: 520; transition: border-color 0.2s, background-color 0.2s; }
.foot__mail:hover { border-color: var(--ink); background: #fff; }
.foot__mail[data-done] { background: var(--ink); border-color: var(--ink); color: #fff; }
.copy__icon { width: 1rem; height: 1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.copy { padding: 0.3rem 0.75rem; border: 1px solid rgb(11 29 46 / 0.2); border-radius: 999px; font-size: var(--fs-small); font-weight: 500; transition: border-color 0.2s; }
.copy:hover { border-color: var(--ink); }
.copy[data-done] { background: var(--ink); border-color: var(--ink); color: #fff; }
.foot__book { margin-left: 0; padding: 0.6rem 1.15rem; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.9375rem; font-weight: 520; text-decoration: none; transition: background-color 0.2s; }
.foot__book:hover { background: #1d3550; }
.foot__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; padding-top: 0.5rem; font-size: 0.9375rem; }
.foot__nav ul { display: grid; gap: 0.625rem; align-content: start; }
.foot__nav a { color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.foot__nav a:hover { color: var(--ink); }
.foot__mark {
  grid-column: 1 / -1; margin: clamp(3.5rem, 4cqw, 4.75rem) 0 0 -0.035em;
  font-size: 16.8cqw; font-weight: 450; line-height: 1; letter-spacing: -0.065em;
  white-space: nowrap; user-select: none; color: rgb(255 255 255 / 0.6);
}
.foot__base { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: clamp(1.25rem, 1.6cqw, 1.75rem); font-size: var(--fs-small); font-weight: 500; color: var(--ink); }
.foot__base a { text-decoration: none; }
.foot__base a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
[data-clock] { font-variant-numeric: tabular-nums; }

/* ---------- media, figures ---------- */

.fig { background: var(--fig-bg, var(--wash)); padding: clamp(0.75rem, 2vw, 1.75rem); border-radius: var(--r); }
.fig figcaption { margin-top: 0.875rem; font-size: var(--fs-small); line-height: 1.45; color: var(--ink-2); }
.media { position: relative; display: block; width: 100%; aspect-ratio: var(--ar); overflow: hidden; border-radius: calc(var(--r) * 0.5); }
.media img, .media video { width: 100%; height: 100%; object-fit: contain; }
.media--img { cursor: zoom-in; }
.fig--tall .media { max-width: 24rem; margin-inline: auto; }
.fig--small .media { max-width: 44rem; margin-inline: auto; }
.media__toggle {
  position: absolute; left: 0.75rem; bottom: 0.75rem;
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 50%;
}
.media__toggle svg { width: 0.875rem; height: 0.875rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.media__toggle .i-play { fill: currentColor; stroke-linejoin: round; display: none; }
.media__toggle[aria-pressed='true'] .i-pause { display: none; }
.media__toggle[aria-pressed='true'] .i-play { display: inline; }

/* ---------- viewer ---------- */

.viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); overflow: auto; }
.viewer::backdrop { background: var(--paper); }
.viewer[open] { display: grid; grid-template-rows: 1fr auto; animation: viewer-in 0.18s ease-out; }
@keyframes viewer-in { from { opacity: 0; } }
.viewer__close { position: fixed; top: 1rem; right: var(--gutter); z-index: 2; padding: 0.45rem 1rem; background: var(--ink); color: var(--paper); border-radius: 999px; font-size: var(--fs-small); font-weight: 520; }
.viewer__stage { display: grid; place-items: center; gap: 1.5rem; padding: 4.25rem var(--gutter) 1rem; min-height: 0; }
.viewer__stage > img, .viewer__stage > video { max-width: 100%; max-height: calc(100dvh - 9rem); width: auto; object-fit: contain; background: var(--wash); }
.viewer__stage > img.is-tall { max-height: none; width: min(100%, 60rem); }
.viewer__cap { padding: 0 var(--gutter) 1.5rem; font-size: var(--fs-small); color: var(--ink-2); text-align: center; }
.viewer__cap:empty { display: none; }
.viewer__about { width: min(100%, 60rem); justify-self: center; display: grid; gap: 0.5rem; padding-bottom: 1rem; }
.viewer__about h2 { font-size: var(--fs-h3); }
.viewer__about p { max-width: var(--measure); }
.viewer__about .fine { margin-top: 0; }

/* several pictures of one piece: a carousel, one at a time */
.carousel { width: min(100%, 72rem); justify-self: center; display: grid; gap: 1rem; }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: var(--r); background: var(--wash); }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { display: grid; place-items: center; scroll-snap-align: center; min-height: 0; }
.carousel__slide img { max-width: 100%; max-height: min(calc(100dvh - 22rem), 46rem); width: auto; object-fit: contain; }
.carousel__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.carousel__count { font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.carousel__btns { display: flex; gap: 0.5rem; }
.carousel__btn { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper); transition: border-color 0.2s; }
.carousel__btn:hover:not(:disabled) { border-color: var(--ink); }
.carousel__btn:disabled { opacity: 0.35; cursor: default; }
.carousel__btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.carousel__dots { display: flex; gap: 0.375rem; }
.carousel__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--rule); transition: background-color 0.2s, width 0.3s var(--ease); }
.carousel__dot[aria-current='true'] { width: 1.5rem; border-radius: 999px; background: var(--ink); }

/* ---------- promo loops ---------- */

.cover { position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 1200 / 1576; border-radius: var(--r-lg); background: var(--tint, var(--wash)); }
.cover video { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 1576; object-fit: contain; }
.cover .media__toggle { z-index: 3; opacity: 0; transition: opacity 0.2s; }
.cover:hover .media__toggle, .cover .media__toggle:focus-visible, .cover .media__toggle[aria-pressed='true'] { opacity: 1; }
@media (hover: none) { .cover .media__toggle { opacity: 1; } }

/* ---------- home ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: end; gap: 2rem clamp(2rem, 5vw, 5rem); padding-top: clamp(1.5rem, 4vw, 3.75rem); }
.hero h1 { max-width: 19ch; font-size: clamp(2.5rem, 1.4rem + 3.4vw, 4rem); line-height: 1; letter-spacing: -0.044em; }
.hero__side { display: grid; gap: 1.5rem; padding-bottom: 0.375rem; }
.hero__intro { max-width: var(--measure); font-size: var(--fs-lead); line-height: 1.42; letter-spacing: -0.016em; }
.hero__side .hero__intro { font-size: 1.0625rem; line-height: 1.5; letter-spacing: -0.008em; }
.hero__where { display: grid; gap: 0.375rem; font-size: var(--fs-small); }
.hero__where div { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; padding-top: 0.375rem; border-top: 1px solid var(--rule); }
.hero__where dt { color: var(--ink-2); }

.reel { position: relative; margin-top: clamp(2rem, 4vw, 3.5rem); }
.reel__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.75rem, 1.5vw, 1.375rem); }
.card { position: relative; }
.card__cover { display: block; border-radius: var(--r-lg); }
.cover video { pointer-events: none; }
/* Keep promo pixels stable: no hover zoom or transformed video scaling. */
.card__text { padding: 1.125rem 0.25rem 0; }
.card__role { font-size: var(--fs-small); color: var(--ink-2); }
.card__title { font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.024em; }
.card__title a { text-decoration: none; }
.card:hover .card__title a, .card__title a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.14em; }
.card__title a:focus-visible { outline: 0; }
.card:has(.card__title a:focus-visible) .cover { outline: 2px solid var(--ink); outline-offset: 4px; }
.card__role { margin-top: 0.875rem; padding-top: 0.625rem; border-top: 1px solid var(--rule); }

/* "View case" follows the pointer over a card (pointer devices only; js/site.js) */
.pill { position: fixed; left: 0; top: 0; z-index: 20; padding: 0.55rem 1rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: var(--fs-small); font-weight: 520; white-space: nowrap; pointer-events: none; opacity: 0; scale: 0.6; transition: opacity 0.2s, scale 0.3s var(--ease); }
.pill.is-on { opacity: 1; scale: 1; }
@media (hover: none), (pointer: coarse) { .pill { display: none; } }

/* the one load sequence, first visit only (html.intro, set in <head>): headline, then the loops unveil left to right */
.intro .hero h1, .intro .hero__side { animation: rise 0.9s var(--ease) both; }
.intro .hero__side { animation-delay: 0.12s; }
.intro .card .cover { animation: unveil 1.1s var(--ease) both; animation-delay: calc(0.22s + var(--i) * 0.09s); }
.intro .card__text { animation: rise 0.9s var(--ease) both; animation-delay: calc(0.5s + var(--i) * 0.09s); }
@keyframes rise { from { opacity: 0; transform: translateY(1.25rem); } }
@keyframes unveil { from { clip-path: inset(18% 0 0 0 round var(--r-lg)); opacity: 0; transform: translateY(2.5rem); } to { clip-path: inset(0 round var(--r-lg)); } }

.clients { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.clients__label { font-size: var(--fs-small); color: var(--ink-2); }
.clients ul { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem clamp(1.5rem, 3.2vw, 2.75rem); }
.clients img { height: calc(var(--h, 20) * 1px); width: auto; filter: grayscale(1) brightness(0.3); opacity: 0.72; }
/* CENTRL is white letters on a dark box: darkening it would turn the letters grey */
.clients img[alt='CENTRL'] { filter: grayscale(1); }

.block { margin-top: clamp(4.5rem, 9vw, 8.5rem); }
.block__title { font-size: var(--fs-h2); }
.block__lead { margin-top: 0.625rem; color: var(--ink-2); max-width: var(--measure); }
#play .block__lead { max-width: none; }

.also__scroll { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.also thead th { padding-bottom: 0.625rem; font-size: var(--fs-small); color: var(--ink-2); }
.also tbody tr { border-top: 1px solid var(--rule); }
.also th, .also td { padding: 1.125rem 2rem 1.125rem 0; vertical-align: top; }
.also td:last-child { padding-right: 0; }
.also tbody th { width: 28%; font-weight: 580; letter-spacing: -0.015em; line-height: 1.3; }
.also tbody td:nth-child(2) { width: 40%; color: var(--ink-2); }

/* the result highlight */

.also .mark { background: linear-gradient(var(--mark), var(--mark)) no-repeat 0 0 / 100% 100%; }
.also.marks-ready .mark { background-size: 0% 100%; transition: background-size 0.9s var(--ease) calc(0.15s + var(--row, 0) * 0.12s); }
.also.marks-ready.is-in .mark { background-size: 100% 100%; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.strip a { display: block; text-decoration: none; font-size: var(--fs-small); font-weight: 520; }
.tile__media { display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--r); background: var(--wash); }
.tile__media img, .tile__media video { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.strip .tile__media { margin-bottom: 0.625rem; }
.strip a:hover span { text-decoration: underline; }

/* ---------- case study ---------- */

.case-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 2.5rem clamp(2rem, 3vw, 3rem); padding-top: clamp(1.5rem, 4vw, 3.5rem); }
.case-head__cover { min-width: 0; width: 100%; max-width: 37.5rem; justify-self: end; }
.crumb { font-size: var(--fs-small); color: var(--ink-2); }
.crumb a { color: var(--ink); font-weight: 520; }
.case-head h1 { margin-top: 1rem; max-width: none; font-size: clamp(2.25rem, 1.25rem + 2.6vw, 3.625rem); line-height: 1.06; letter-spacing: -0.035em; }
.tldr { display: grid; margin-top: clamp(2rem, 4vw, 3.25rem); }
.tldr div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.5rem; padding-block: 0.875rem; border-top: 1px solid var(--rule); }
.tldr div:first-child { border-top-color: var(--ink); }
.case-head .tldr div { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
.tldr dt { font-size: var(--fs-small); font-weight: 600; padding-top: 0.15em; }
.tldr dd { line-height: 1.5; max-width: 36rem; }
.tldr .mark { background: linear-gradient(var(--mark), var(--mark)) no-repeat 0 0 / 100% 100%; animation: mark-in 0.9s 0.45s var(--ease) backwards; }
@keyframes mark-in { from { background-size: 0% 100%; } }

.case-body { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: clamp(2rem, 4vw, 4.5rem); margin-top: clamp(3.5rem, 7vw, 6rem); }
.toc { font-size: var(--fs-small); }
.toc ol { position: sticky; top: 5.25rem; display: grid; gap: 0.125rem; }
.toc__back { position: sticky; top: 2rem; z-index: 1; display: block; margin-bottom: 1.5rem; padding-left: 0.875rem; line-height: 1.45; color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.toc__back:hover { color: var(--ink); }
.toc__back:hover .toc__here { text-decoration: underline; text-underline-offset: 0.25em; }
.toc__here { color: var(--ink); font-weight: 560; }
.toc__sep { opacity: 0.5; }
.toc a { display: block; padding: 0.25rem 0 0.25rem 0.875rem; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--ink); font-weight: 600; border-left-color: var(--ink); }

.sec { margin-top: clamp(4rem, 8vw, 7rem); scroll-margin-top: 2rem; }
.sec--first { margin-top: 0; }
.row { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr); column-gap: clamp(2rem, 4vw, 4rem); margin-top: 1.375rem; }
.row:first-child { margin-top: 0; }
.row__main { min-width: 0; }
.row--wide .row__main { grid-column: 1 / -1; }
.case-main .row:not(.row--noted) > .row__main { grid-column: 1 / -1; }
.row:has(.fig), .row:has(.heard), .row:has(.killed), .row:has(.quote), .row:has(.decision), .row:has(.metrics) { margin-top: 2.25rem; }
.row:has(.fig) + .row, .row:has(.decision) + .row { margin-top: 2.25rem; }
.row__note { align-self: start; max-width: 19rem; padding-top: 0.625rem; border-top: 1px solid var(--ink); font-size: var(--fs-small); line-height: 1.5; color: var(--ink-2); }
.disclosure { margin-top: 0.875rem; font-size: var(--fs-small); color: var(--ink-2); }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2rem clamp(1.5rem, 3.5vw, 3.5rem); }
.metric dt { font-size: var(--fs-figure); font-weight: 580; line-height: 0.95; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.metric__label { margin-top: 0.75rem; max-width: 18rem; line-height: 1.35; font-weight: 500; }
.metric__src { margin-top: 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); max-width: 20rem; font-size: var(--fs-small); line-height: 1.45; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem clamp(1.5rem, 3.5vw, 3.5rem); margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: var(--fs-small); }
.facts dt { color: var(--ink-2); }
.facts dd { max-width: 20rem; line-height: 1.45; }

.heard th { padding: 0 1.5rem 0.5rem 0; font-size: var(--fs-small); color: var(--ink-2); }
.heard td { width: 50%; padding: 0.875rem 1.5rem 0.875rem 0; border-top: 1px solid var(--rule); vertical-align: top; line-height: 1.45; }
.heard td:last-child { padding-right: 0; }

.quote blockquote { font-size: clamp(1.375rem, 1.15rem + 1vw, 1.875rem); font-weight: 520; line-height: 1.22; letter-spacing: -0.028em; text-wrap: balance; }
.quote figcaption { margin-top: 0.75rem; font-size: var(--fs-small); color: var(--ink-2); }

.cost { padding: 0.125rem 0 0.125rem 1rem; border-left: 2px solid var(--ink); }
.cost__label { display: block; font-size: var(--fs-small); font-weight: 600; }

.killed li { padding-block: 1rem; border-top: 1px solid var(--rule); }
.killed li:last-child { border-bottom: 1px solid var(--rule); }
.killed__status { display: inline-block; padding: 0.1rem 0.55rem; border: 1px solid var(--ink-2); border-radius: 999px; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-2); }
.killed__status--kept { border-color: var(--mark); background: var(--mark); color: var(--ink); }
.killed__title { margin-top: 0.5rem; font-weight: 580; letter-spacing: -0.015em; }
.killed__why { margin-top: 0.25rem; color: var(--ink-2); line-height: 1.5; }

.decision { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--rule); }
.decision div { padding: clamp(1rem, 2.5vw, 1.75rem); }
.decision div:nth-child(even) { border-left: 1px solid var(--rule); }
.decision div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
.decision dt { font-size: var(--fs-small); color: var(--ink-2); }
.decision dd { margin-top: 0.375rem; line-height: 1.45; }
.decision__before dd, .decision__after dd { font-size: var(--fs-h3); font-weight: 560; line-height: 1.25; letter-spacing: -0.022em; }
.decision__before dd { color: var(--ink-2); }

.shot { display: grid; gap: 1.25rem; margin-top: clamp(3rem, 6vw, 5rem); }
.shot:first-child { margin-top: 0; }
.shot__text { min-width: 0; }
.shot__text p { margin-top: 0.5rem; }
.shot__text .cost { margin-top: 1.125rem; }
.facts-line { max-width: none; margin-top: clamp(2rem, 4vw, 3.25rem); padding-top: 1.125rem; border-top: 1px solid var(--rule); font-size: var(--fs-small); line-height: 1.55; color: var(--ink-2); }
.deeper { max-width: var(--measure); margin-top: clamp(3.5rem, 7vw, 6rem); padding-left: 1rem; border-left: 2px solid var(--mark-ink); color: var(--ink-2); }
.deeper a { color: var(--ink); font-weight: 520; white-space: nowrap; }
.shot--tall { grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); align-items: start; column-gap: clamp(2rem, 4vw, 4rem); }
.shot--tall .shot__text { grid-column: 1 / -1; }
.shot--tall > .fig { grid-column: 1 / -1; justify-self: center; width: 100%; }

.rows div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding-block: 1rem; border-top: 1px solid var(--rule); }
.rows dt { font-weight: 600; }
.rows dd { line-height: 1.5; }

.next { margin-top: clamp(4.5rem, 9vw, 8rem); }
.next a { display: grid; grid-template-columns: clamp(6.5rem, 12vw, 10rem) minmax(0, 1fr); align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem); padding-top: 1.5rem; border-top: 1px solid var(--ink); text-decoration: none; }
.next__thumb { display: block; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--r); background: var(--tint, var(--wash)); }
.next__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.next a:hover .next__thumb img { transform: scale(1.05); }
.next__text { display: block; min-width: 0; }
.next__label, .next__meta { display: block; font-size: var(--fs-small); color: var(--ink-2); }
.next__title { display: block; max-width: 20ch; margin-block: 0.5rem; font-size: var(--fs-h2); font-weight: 580; line-height: 1.08; letter-spacing: -0.032em; }
.next a:hover .next__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.14em; }

/* ---------- about ---------- */

.about-head { display: grid; gap: 1.75rem; padding-top: clamp(2.5rem, 7vw, 6rem); }
.about-head__photo { width: 7.5rem; height: 7.5rem; border-radius: 50%; }
.about-head h1 { max-width: 24ch; font-size: clamp(2rem, 1.3rem + 3.4vw, 4rem); line-height: 1.02; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem clamp(2rem, 4vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--ink); }
.about .block { margin-top: clamp(3.5rem, 7vw, 6rem); }
.about-grid .block__title { font-size: var(--fs-h3); }
.prose { display: grid; gap: 1.125rem; max-width: var(--measure); font-size: var(--fs-lead); line-height: 1.45; letter-spacing: -0.014em; }
.roles tr { border-bottom: 1px solid var(--rule); }
.roles tr:first-child { border-top: 1px solid var(--rule); }
.roles th, .roles td { padding: 0.875rem 1.5rem 0.875rem 0; vertical-align: top; }
.roles th { font-weight: 580; letter-spacing: -0.015em; }
.roles td { color: var(--ink-2); }
.roles td:last-child { padding-right: 0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.spec div { display: grid; grid-template-columns: minmax(6rem, 11rem) minmax(0, 1fr); gap: 1.5rem; padding-block: 0.875rem; border-bottom: 1px solid var(--rule); }
.spec div:first-child { border-top: 1px solid var(--rule); }
.spec dt { color: var(--ink-2); }

/* ---------- play ---------- */

.play-head { padding-top: clamp(2.5rem, 7vw, 6rem); display: grid; gap: 1rem; }
.play-head h1 { font-size: var(--fs-h1); }
.play-head .hero__intro { max-width: none; }

/* the filter: plain words with a count; the chosen one is inked and underlined */
.filter { display: flex; flex-wrap: wrap; gap: 0.25rem clamp(1rem, 2.4vw, 2rem); margin-top: clamp(1rem, 2vw, 1.75rem); padding-top: 1rem; border-top: 1px solid var(--rule); }
.filter[hidden] { display: none; }
.filter__btn { padding: 0.25rem 0; color: var(--ink-2); font-weight: 500; text-underline-offset: 0.4em; text-decoration-thickness: 2px; transition: color 0.2s; }
.filter__btn:hover { color: var(--ink); }
.filter__btn[aria-pressed='true'] { color: var(--ink); text-decoration-line: underline; }
.filter__btn sup { margin-left: 0.2em; font-size: 0.6875rem; font-weight: 400; font-variant-numeric: tabular-nums; vertical-align: super; line-height: 0; }

/* the grid: a masonry. Each piece keeps its own proportions; title on the left, year on the right */
.tiles { columns: 3; column-gap: clamp(1rem, 1.6vw, 1.5rem); margin-top: clamp(2rem, 4vw, 3.25rem); }
.tiles__item { break-inside: avoid; padding-bottom: clamp(2.25rem, 4.2vw, 4rem); }
.tiles__item[hidden] { display: none; }
.tile { display: block; text-decoration: none; cursor: zoom-in; }
.tiles .tile__media { aspect-ratio: var(--ar, 4 / 3); }
.tile__cap { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 0.75rem; }
.tile__title { font-weight: 560; letter-spacing: -0.015em; line-height: 1.3; }
.tile:hover .tile__title { text-decoration: underline; text-underline-offset: 0.2em; }
.tile__year { font-size: var(--fs-small); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.lost { padding-block: clamp(4rem, 12vw, 10rem); display: grid; gap: 1.5rem; }

/* ---------- page to page: the promo loop morphs from the home card into the case header ---------- */

@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 0.55s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

/* ---------- narrower screens ---------- */

@media (max-width: 1180px) {
  .case-body { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: sticky; top: 0; z-index: 5; margin-inline: calc(-1 * var(--gutter)); margin-bottom: 2.5rem; background: var(--paper); border-block: 1px solid var(--rule); }
  .toc { display: flex; align-items: center; }
  .toc__back { position: static; flex: none; margin: 0; padding: 0.75rem 0.875rem 0.75rem var(--gutter); border-right: 1px solid var(--rule); color: var(--ink); font-weight: 520; white-space: nowrap; }
  .toc__sep, .toc__here { display: none; }
  .toc ol { position: static; flex: 1; min-width: 0; display: flex; gap: 0; overflow-x: auto; padding-inline: calc(var(--gutter) - 0.75rem); scrollbar-width: none; }
  .toc ol::-webkit-scrollbar { display: none; }
  .toc a { padding: 0.75rem; border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .toc a[aria-current] { border-bottom-color: var(--ink); }
  html { scroll-padding-top: 4rem; }
  .sec { scroll-margin-top: 4rem; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .reel__list { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .card .cover { aspect-ratio: 1200 / 1576; }
  .case-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  /* the promo loop comes straight after the title, before the summary */
  .case-head { gap: 0; }
  .case-head__text { display: contents; }
  .case-head__cover { order: 1; width: 100%; max-width: none; margin-top: 1.75rem; justify-self: start; }
  .case-head .tldr { order: 2; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row__note { margin-top: 1rem; max-width: var(--measure); }
  .shot--tall { grid-template-columns: minmax(0, 1fr); }
  .shot--tall .shot__text { position: static; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .tiles { columns: 2; }
  .foot__in { grid-template-columns: minmax(0, 1fr); }
  .foot__nav { padding-top: 2rem; }
  .foot__bg { -webkit-mask-image: linear-gradient(to top, #000, rgb(0 0 0 / 0.6) 18%, transparent 53%); mask-image: linear-gradient(to top, #000, rgb(0 0 0 / 0.6) 18%, transparent 53%); }
  .foot__bg i { filter: blur(38px); }
  .foot__bg i:nth-child(1) { width: 100%; height: 65%; bottom: -35%; left: -35%; }
  .foot__bg i:nth-child(2) { width: 90%; height: 64%; bottom: -36%; left: 4%; }
  .foot__bg i:nth-child(3) { width: 100%; height: 67%; bottom: -40%; right: -35%; }
  .foot__base { gap: 0.5rem 1.5rem; }


  /* tables read as stacked records */
  .also thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .also tbody tr { display: grid; gap: 0.5rem; padding-block: 1.125rem; }
  .also th, .also td { display: block; width: auto !important; padding: 0; }
  .roles tr { display: grid; grid-template-columns: 1fr auto; gap: 0.125rem 1rem; padding-block: 0.875rem; }
  .roles th, .roles td { display: block; padding: 0; }
  .roles th { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .heard thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .heard tr { display: grid; gap: 0.5rem; padding-block: 0.875rem; border-top: 1px solid var(--rule); }
  .heard td { display: block; width: auto; padding: 0; border: 0; }
  .decision { grid-template-columns: minmax(0, 1fr); }
  .decision div:nth-child(even) { border-left: 0; }
  .decision div:nth-child(n + 2) { border-top: 1px solid var(--rule); }
  .rows div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .tldr div, .case-head .tldr div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .spec div { grid-template-columns: minmax(0, 1fr); gap: 0.125rem; }
  .tiles { columns: 1; }
  .foot__book { margin-left: 0; }
  .foot__ways { column-gap: 0.75rem; }
  .foot__base { display: grid; gap: 0.5rem; }
  .foot__base a { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; }
  .foot__nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot__nav ul { gap: 0; }
  .top { padding-block: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .also.marks-ready .mark { transition: none; }
  .carousel__track { scroll-behavior: auto; }
  .tldr .mark, .viewer[open], .intro .hero h1, .intro .hero__side, .intro .card .cover, .intro .card__text { animation: none; }
  .next__thumb img { transition: none; }
  .card .cover video, .tile__media img, .tile__media video, .pill, .foot__book { transition: none; }
  .foot__bg i { animation: none; translate: none !important; will-change: auto; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

@media print {
  .top__nav, .toc, .media__toggle, .viewer, .next { display: none; }
  .foot { background: none; color: var(--ink); }
  .foot__bg { display: none; }
  .foot__mark { color: var(--ink); }
}
