/* ==========================================================================
   Sjoerd van Rijen, portfolio
   Edit colors and type in the tokens below. Everything else follows.
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --surface: #F6F6F7;
  --text: #282828;
  --text-2: #282828;
  --muted: #B7B7B7;
  --soft: #B7B7B7;            /* the light gray used for emphasis in headlines */
  --line: #ECECEE;
  --btn-bg: #282828;
  --btn-text: #FFFFFF;
  --btn2-bg: #F1F1F3;
  --btn2-text: #282828;
  --green: #008A1E;
  --green-bg: #EEF8F0;
  --peek-frame: #D6D6DA;

  /* pastel project tints, each with a matching ink */
  --cream: #F8F2EB;    --cream-ink: #5B4632;
  --mint: #F5FBF7;     --mint-ink: #2F5A3E;
  --blush: #FFF5F5;    --blush-ink: #7A3B3B;
  --ice: #F2F8FB;      --ice-ink: #2E5466;
  --lavender: #F8F4FA; --lavender-ink: #54406A;

  --radius: 20px;
  --gutter: 16px;
  --card-inset: 4px;          /* space around the image card, top and left */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Style Script", cursive;
  --mono: "Fragment Mono", ui-monospace, "SFMono-Regular", monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

/* smooth cross-page navigation in browsers that support it */
@view-transition { navigation: auto; }
.card { view-transition-name: sidecard; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

/* ---------- Layout: sticky card left, content right ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 51fr) minmax(0, 49fr);
  gap: clamp(32px, 4.5vw, 64px);
  padding: var(--card-inset) var(--gutter) var(--card-inset) var(--card-inset);
  min-height: 100vh; min-height: 100svh;
}
.card {
  position: sticky; top: var(--card-inset); align-self: start;
  height: calc(100vh - var(--card-inset) * 2);
  height: calc(100svh - var(--card-inset) * 2);
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); isolation: isolate;
}
.card > img { width: 100%; height: 100%; object-fit: cover; }
.card::after { display: none; /* vignette, unused now that cards have no overlays */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 62%, rgba(0,0,0,.38) 100%);
}
.card .logo {
  position: absolute; top: 22px; left: 28px; z-index: 2;
  font: 400 40px/1 var(--script); color: #fff; text-decoration: none;
}
.card .tagline {
  position: absolute; left: 32px; bottom: 30px; right: 32px; z-index: 2;
  font-style: italic; font-size: 17px; line-height: 1.4; color: rgba(255,255,255,.92); max-width: 26em;
}
.card .tagline b { display: block; font-style: normal; font-weight: 500; font-size: 22px; color: #fff; margin-bottom: 2px; }
.tags { position: absolute; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; }
.tags.top-right { top: 26px; right: 26px; justify-content: flex-end; max-width: 60%; }
.tags.float { right: 32px; bottom: 104px; flex-direction: column; align-items: flex-end; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; font-size: 14px; line-height: 1.2; color: #fff;
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.tags.float .pill:nth-child(2) { margin-right: 28px; }
.tags.float .pill:nth-child(3) { margin-right: 8px; }

/* tinted card variant, for projects without a hero image */
.card.tint { display: flex; align-items: center; justify-content: center; }
.card.tint::after { display: none; }
.card.tint .logo { color: var(--ink); }
.card.tint .tagline { color: var(--ink); opacity: .85; }
.card.tint .tagline b { color: var(--ink); }
.card.tint .tint-mark { font-weight: 600; font-size: clamp(48px, 6vw, 88px); letter-spacing: -.03em; color: var(--ink); text-align: center; line-height: 1; padding: 0 32px; }
.card.tint .tint-mark small { display: block; margin-top: 14px; font: 400 14px/1.4 var(--mono); letter-spacing: 0; opacity: .7; }

.main { min-width: 0; display: flex; flex-direction: column; padding-right: clamp(0px, 3vw, 48px); }

/* ---------- Nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0 0; }
.nav ul { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; }
.nav a {
  display: inline-block; padding: 6px 12px; border-radius: 999px; text-decoration: none;
  font-size: 15px; font-weight: 500; color: var(--text-2); transition: background-color .2s, color .2s;
}
@media (hover: hover) { .nav a:hover { color: var(--text); background: var(--btn2-bg); } }
.nav a[aria-current="page"] { color: var(--text); background: var(--btn2-bg); }

/* ---------- Type ---------- */
.hero { padding: clamp(80px, 18vh, 200px) 0 clamp(56px, 8vh, 96px); }
.hero.home { margin-block: auto; padding-block: 48px 15vh; }
.hero.page { padding-top: clamp(64px, 14vh, 150px); }
h1, .h1 { font-size: clamp(40px, 4.4vw, 56px); line-height: 1.08; font-weight: 600; letter-spacing: -.025em; }
h2, .h2 { font-size: clamp(32px, 3.2vw, 44px); line-height: 1.12; font-weight: 600; letter-spacing: -.02em; }
h3, .h3 { font-size: clamp(24px, 2.3vw, 32px); line-height: 1.2; font-weight: 500; letter-spacing: -.015em; }
h4 { font-size: 17px; line-height: 1.35; font-weight: 600; }
.soft { color: var(--soft); }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--text-2); max-width: 34em; }
.lead + .lead { margin-top: 1em; }
p { color: var(--text-2); max-width: 40em; }
p + p { margin-top: 1em; }
.label { font: 400 13px/1.4 var(--mono); color: var(--muted); letter-spacing: .01em; }
.hero h1 + .lead, .hero .h1 + .lead { margin-top: 24px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px;
  padding: 6px 14px 6px 12px; border-radius: 999px; background: var(--green-bg);
  color: var(--green); font-size: 14px; font-weight: 500;
}
.badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 0 currentColor; animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,138,30,.35); } 70%,100% { box-shadow: 0 0 0 7px rgba(0,138,30,0); } }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none; border: 0; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-text);
  transition: transform .25s var(--ease), opacity .25s var(--ease), background-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn.secondary { background: var(--btn2-bg); color: var(--btn2-text); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vh, 104px) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.section-head a { font-size: 15px; font-weight: 500; color: var(--text-2); text-decoration: none; }
.section-head a:hover { color: var(--text); }

/* logo marquee (text wordmarks, easy to swap for SVG logos) */
.marquee {
  overflow: hidden; margin-top: 64px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--soft); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* project cards on home */
.cards { display: grid; gap: 16px; }
.pcard {
  display: grid; grid-template-columns: 1fr; border-radius: var(--radius); overflow: hidden; text-decoration: none;
  background: var(--tint, var(--surface)); color: var(--ink, var(--text));
  transition: transform .35s var(--ease);
}
@media (hover: hover) { .pcard:hover { transform: translateY(-4px); } }
.pcard .thumb { aspect-ratio: 16 / 9; overflow: hidden; margin: 12px 12px 0; border-radius: 12px; background: rgba(0,0,0,.04); }
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard:hover .thumb img { transform: scale(1.03); }
.pcard .thumb.mark { aspect-ratio: 2.4 / 1; display: grid; place-items: center; font-weight: 600; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.03em; }
.pcard .meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 20px 24px 22px; }
.pcard h3 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.pcard p { color: inherit; opacity: .75; font-size: 15px; margin-top: 2px; }
.pcard .label { color: inherit; opacity: .6; white-space: nowrap; }
.t-cream { --tint: var(--cream); --ink: var(--cream-ink); }
.t-mint { --tint: var(--mint); --ink: var(--mint-ink); }
.t-blush { --tint: var(--blush); --ink: var(--blush-ink); }
.t-ice { --tint: var(--ice); --ink: var(--ice-ink); }
.t-lavender { --tint: var(--lavender); --ink: var(--lavender-ink); }
.card.t-cream, .card.t-mint, .card.t-blush, .card.t-ice, .card.t-lavender { background: var(--tint); }

/* project list (projects page) */
.plist { list-style: none; border-top: 1px solid var(--line); }
.plist li { border-bottom: 1px solid var(--line); }
.plist a {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) 5.5em; align-items: center; gap: 16px;
  padding: 24px 0; text-decoration: none;
}
.plist .name { transition: transform .3s var(--ease); }
.plist a:focus-visible .name { transform: translateX(10px); }
@media (hover: hover) and (pointer: fine) { .plist a:hover .name { transform: translateX(10px); } }
.plist .name { font-weight: 500; font-size: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plist .cat { color: var(--text-2); font-size: 15px; }
.plist .year { font: 400 14px/1 var(--mono); color: var(--text-2); text-align: right; }
.new { font-size: 13px; font-weight: 500; color: var(--green); background: var(--green-bg); padding: 3px 9px; border-radius: 999px; }

/* about: facts table, timeline */
.facts { display: grid; grid-template-columns: 9em 1fr; border-top: 1px solid var(--line); margin-top: 8px; }
.facts dt, .facts dd { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 400 13px/1.6 var(--mono); color: var(--muted); padding-top: 18px; }
.facts dd { color: var(--text-2); }
.timeline { list-style: none; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.timeline .label { padding-top: 3px; }
.timeline h4 { color: var(--text); margin-bottom: 4px; }
.timeline p { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { font-size: 14px; padding: 6px 13px; border-radius: 999px; background: var(--btn2-bg); color: var(--text-2); }

/* ---------- Case study ---------- */
.case-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.case-meta div { display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--text); }
.prose { padding: clamp(40px, 6vh, 64px) 0; }
.prose h2 { margin-bottom: 20px; }
.prose h3 { margin: 48px 0 14px; }
.prose ul { margin: 16px 0 0 1.1em; color: var(--text-2); }
.prose li + li { margin-top: 6px; }
.figure { margin: 32px 0 0; }
.figure img, .figure video { display: block; width: 100%; border-radius: 16px; background: var(--surface); }
.figure figcaption { margin-top: 12px; font: 400 13px/1.5 var(--mono); color: var(--muted); }
.quote { margin: 48px 0; padding: 6px 0 6px 24px; border-left: 2px solid var(--text); }
.quote p { font-size: clamp(21px, 2vw, 26px); line-height: 1.4; font-style: italic; font-weight: 500; color: var(--text); letter-spacing: -.01em; }
.quote cite { display: block; margin-top: 12px; font: normal 400 13px/1.4 var(--mono); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.stat { padding: 24px; border-radius: 16px; background: var(--tint, var(--surface)); color: var(--ink, var(--text)); }
.stat b { display: block; font-size: clamp(32px, 3vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.stat span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.45; opacity: .8; }
.prose .impact { margin-left: 0; }
.impact { list-style: none; border-top: 1px solid var(--line); margin-top: 24px; }
.impact li { display: grid; grid-template-columns: 12em 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.impact b { font-weight: 600; color: var(--text); }
.impact span { color: var(--text-2); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.steps div { padding: 20px; border-radius: 16px; background: var(--surface); }
.steps .label { display: block; margin-bottom: 10px; }
.steps b { display: block; font-weight: 600; color: var(--text); }
.steps span { font-size: 15px; color: var(--text-2); }
.note { margin-top: 28px; padding: 16px 20px; border-radius: 14px; background: var(--surface); font-size: 14px; color: var(--text-2); }

.next { display: block; text-decoration: none; padding: 40px 0 0; margin-top: 24px; border-top: 1px solid var(--line); }
.next .label { display: block; margin-bottom: 10px; }
.next .h2 { transition: color .3s; }
.next:hover .h2 { color: var(--text-2); }

/* projects page: card swaps to the hovered project's visual */
.card.switch > img.layer-default { width: 100%; height: 100%; object-fit: cover; transition: opacity .45s var(--ease); }
.card.switch .layer { position: absolute; inset: 0; opacity: 0; transition: opacity .45s var(--ease); }
.card.switch .layer img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); transition: transform .8s var(--ease); }
.card.switch .layer.on { opacity: 1; }
.card.switch .layer.on img { transform: none; }
.card.switch.has-active > img.layer-default { opacity: 0; }
.tint-fill { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--tint); }
.tint-fill .tint-mark { font-weight: 600; font-size: clamp(48px, 6vw, 88px); letter-spacing: -.03em; color: var(--ink); text-align: center; line-height: 1; padding: 0 32px; }
@media (prefers-reduced-motion: reduce) { .card.switch .layer, .card.switch .layer img, .card.switch > img.layer-default { transition: none; } }

/* link preview: a 6:9 card that follows the cursor over intro links */
.peek {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none;
  width: 200px; padding: 8px; border-radius: 14px;
  background: var(--peek-frame); box-shadow: 0 18px 48px rgba(20,20,30,.22), 0 2px 6px rgba(20,20,30,.08);
  opacity: 0; transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(.92) rotate(-2deg);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.peek.on { opacity: 1; transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(1) rotate(0deg); }
.peek img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 6px; background: var(--surface); }
@media (hover: none) { .peek { display: none; } }
@media (prefers-reduced-motion: reduce) { .peek { transition: opacity .15s linear; } }

/* video embed: poster first, Vimeo player loads on click */
.video { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; }
.video .play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 999px;
  display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.video .play svg { width: 26px; height: 26px; margin-left: 3px; }
.video:hover .play { transform: scale(1.08); background: rgba(255,255,255,.32); }

.callout { margin-top: 28px; padding: 24px; border-radius: 16px; background: var(--tint, var(--mint)); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.callout p { color: var(--ink, var(--mint-ink)); font-weight: 500; max-width: 26em; }
.figure figcaption a { color: inherit; }

.impact.credits { margin-top: 12px; }
.impact.credits a { color: inherit; }

/* side projects and mini-obsessions: colour-coded tags with hover previews */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 24px; font: 400 13px/1.4 var(--mono); color: var(--muted); }
.legend .lg { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 8px; height: 8px; border-radius: 999px; background: var(--ink); }
.chips.tagcloud { margin-top: 16px; }
.tag { background: var(--tint); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent; transition: transform .2s var(--ease), border-color .2s var(--ease); }
a.tag:hover, a.tag:focus-visible { transform: translateY(-2px); border-color: var(--ink); }
.tag .ext { font-size: 12px; opacity: .55; }
.c-side { --tint: var(--mint); --ink: var(--mint-ink); }
.c-design { --tint: var(--cream); --ink: var(--cream-ink); }
.c-type { --tint: var(--lavender); --ink: var(--lavender-ink); }
.c-art { --tint: var(--blush); --ink: var(--blush-ink); }
.c-music { --tint: var(--ice); --ink: var(--ice-ink); }

.written { list-style: none; border-top: 1px solid var(--line); }
.written li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.written a { color: var(--text); text-decoration-color: var(--soft); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.written a:hover { text-decoration-color: var(--text); }

/* homepage greeting stays on one line and scales with the column */
h1.oneline { white-space: nowrap; font-size: clamp(28px, 3.7vw, 56px); }
@media (max-width: 900px) { h1.oneline { font-size: clamp(26px, 8.4vw, 56px); } }

/* homepage: name swaps to common mispronunciations, then back to Sjoerd */
.swap { display: inline-block; will-change: transform, opacity, filter; }
.swap.clickable { cursor: pointer; border-radius: 6px; transition: color .2s; }
h1[data-aliases], h1[data-aliases] * { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.swap.clickable:hover { color: var(--text); }
.swap.out { animation: swapOut .18s var(--ease) forwards; }
.swap.in { animation: swapIn .35s var(--ease) both; }
@keyframes swapOut { to { transform: translateY(-0.45em); opacity: 0; filter: blur(6px); } }
@keyframes swapIn { from { transform: translateY(0.45em); opacity: 0; filter: blur(6px); } to { transform: none; opacity: 1; filter: none; } }

/* video lightbox: page blurs behind, video plays large */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) 24px max(24px, env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  opacity: 0; transition: opacity .3s var(--ease);
}
.lightbox.open { opacity: 1; }
.lb-frame {
  position: relative; width: min(1280px, 100%, calc((100vh - 120px) * 16 / 9)); aspect-ratio: 16 / 9;
  border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(40,40,40,.18);
  transform: scale(.96); transition: transform .35s var(--ease);
}
.lightbox.open .lb-frame { transform: none; }
.lb-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lb-close {
  position: fixed; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--text); background: rgba(40,40,40,.08);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background-color .2s;
}
.lb-close:hover { background: rgba(40,40,40,.16); }
.lb-close svg { width: 20px; height: 20px; }
.lb-lock, .lb-lock body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .lightbox, .lb-frame { transition: none; } }

/* ---------- Footer ---------- */
.footer { margin-top: auto; padding: 64px 0 24px; }
.footer .cta { padding: 48px 0; border-top: 1px solid var(--line); }
.footer .cta h2 { max-width: 14em; }
.footer .bottom { display: flex; margin-top: 48px; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer .bottom ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; }
.footer .bottom a { text-decoration: none; color: var(--text-2); }
.footer .bottom a:hover { color: var(--text); }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.words .w { color: var(--soft); transition: color .35s linear; }
.words .w.on { color: var(--text); }
.words .w.keep-soft.on { color: var(--soft); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track, .badge::before { animation: none; }
  .words .w { color: var(--text); }
  .words .w.keep-soft { color: var(--soft); }
  * { scroll-behavior: auto !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: var(--gutter); }
  .card { position: relative; top: 0; height: min(78vh, 560px); order: 0; margin: 8px calc(var(--card-inset) - var(--gutter)) 0; }
  .main { order: -1; display: contents; }
  .main > .nav { order: -2; }
  .main > :not(.nav) { order: 1; min-width: 0; }
  .nav { min-width: 0; }
  .nav { padding: 0 0 4px; }
  .nav .mobile-logo { display: block; }
  .nav ul { gap: 0; flex-wrap: nowrap; }
  .nav a { padding: 6px 9px; font-size: 14px; }
  .nav-right { display: flex; align-items: center; gap: 2px; }
  .hero { padding: 48px 0 40px; }
  .hero.home { margin-block: auto; padding-block: 48px 15vh; }
.hero.page { padding-top: 48px; }
  .card .logo { display: none; }
  .card.tint { height: 260px; }
  .card.tint .tint-mark { font-size: 44px; }
  .card.tint .tagline { display: none; }
  .plist a { grid-template-columns: 1fr auto; }
  .plist .cat { grid-column: 1; grid-row: 2; font-size: 14px; margin-top: -12px; }
  .plist .year { grid-column: 2; grid-row: 1 / span 2; }
  .facts, .timeline li, .impact li { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
  .timeline li { gap: 4px; }
  .impact li { gap: 2px; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .stats, .steps { grid-template-columns: 1fr; }
  .tags.float { display: none; }
}
@media (max-width: 420px) {
  .nav a { padding: 6px 7px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
}
