/* =========================================================
   Tokens (the world is always dark, by design)
   ========================================================= */
:root {
  --bg: #0E0B08;
  --ink: #F3EADB;
  --body: #CFC2B0;
  --muted: #9C8D7B;
  --dim: #66594B;
  --line: rgba(243, 234, 219, .12);
  --panel: rgba(24, 19, 14, .86);
  --ai: #94A9D6;
  --auto: #E8B867;
  --soft: #A3C9A4;
  --cons: #E2906F;
  --shadow: 0 20px 40px -20px rgba(0, 0, 0, .9);

  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --gutter: 20px;
  --max: 1240px;
  --radius: 4px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --head: 64px;
  --foot: 56px;
  --col-x: max(var(--gutter), calc(50vw - var(--max) / 2 + var(--gutter)));
  /* phones: whatever is left after the text gets its room goes to the illustration */
  --illo-h: clamp(150px, calc(100svh - var(--head) - var(--foot) - 330px), 42svh);
  color-scheme: dark;
}
@media (min-width: 760px) { :root { --gutter: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 70px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(120% 80% at 50% 30%, #22190F 0%, var(--bg) 60%) fixed var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: -0.012em; line-height: 1.08; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--auto); color: var(--bg); }
:focus-visible { outline: 2px solid var(--auto); outline-offset: 3px; border-radius: 2px; }
[tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ink); color: var(--bg); padding: 8px 12px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Chapter label: a number, a short rule, a word */
.idx { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: var(--dim); margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.idx span { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.idx span::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }

/* =========================================================
   World layers
   ========================================================= */
#world { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(8,5,2,.8) 100%); }
main { position: relative; z-index: 2; }

/* =========================================================
   Header, HUD, chapters
   ========================================================= */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 30; }
.site-header::before { content: ""; position: absolute; inset: 0 0 -40px 0; z-index: -1; pointer-events: none; background: linear-gradient(rgba(14,11,8,.92), rgba(14,11,8,.55) 55%, transparent); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--head); padding: 0 var(--col-x); }
.brand { display: flex; align-items: center; }
.brand a { display: block; border-radius: 2px; }
.brand svg { display: block; height: 30px; width: auto; }
@media (max-width: 480px) { .brand svg { height: 27px; } }
.brand-dot { fill: var(--muted); }
/* The u in the logo blinks once as the page opens, and again on hover */
.brand-eye { transform-box: fill-box; transform-origin: center; animation: blink .32s ease-in-out 1.4s; }
.brand-co:hover .brand-eye, .brand-co:focus-visible .brand-eye { animation: blink2 .32s ease-in-out; }
@keyframes blink { 50% { transform: scaleY(.08); } }
@keyframes blink2 { 50% { transform: scaleY(.08); } }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a { font-size: 15px; color: var(--muted); text-decoration: none; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--ink); padding-bottom: 2px; border-bottom: 1px solid var(--auto); }
.nav .nav-cta:hover { color: var(--auto); }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-toggle { display: block; font: inherit; font-size: 15px; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--muted); border-radius: 0; padding: 4px 0; cursor: pointer; }
  .nav {
    position: fixed; inset: 64px 0 auto 0; display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 28px; background: rgba(14,11,8,.97); border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { font-family: var(--display); font-size: 30px; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { color: var(--auto); border-bottom: 0; }
}

.hud { position: fixed; inset: auto 0 0 0; z-index: 25; pointer-events: none; font-size: 13px; color: var(--muted); height: calc(56px + var(--safe-b)); background: linear-gradient(to top, rgba(14,11,8,.9), rgba(14,11,8,0)); }
.hud-stage { position: absolute; right: var(--gutter); bottom: calc(20px + var(--safe-b)); }
.hud-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(243,234,219,.06); }
.hud-bar i { position: absolute; inset: 0; background: var(--auto); opacity: .6; transform-origin: left; transform: scaleX(0); }
.no-webgl .hud { display: none; }
@media (max-width: 760px) {
  .hud-stage { right: auto; left: var(--gutter); bottom: calc(14px + var(--safe-b)); }
}

.chapters { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 25; display: none; flex-direction: column; gap: 4px; }
@media (min-width: 1000px) { .chapters { display: flex; } }
.chapters button {
  all: unset; cursor: pointer; display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  height: 20px; font-size: 12px; color: transparent; transition: color .25s;
}
.chapters button::after { content: ""; width: 14px; height: 1px; background: var(--dim); transition: width .25s, background .25s; }
.chapters button:hover, .chapters button:focus-visible { color: var(--muted); }
.chapters button.is-on { color: var(--ink); }
.chapters button.is-on::after { width: 28px; background: var(--ink); }
/* Narrower screens: the label would sit on top of the illustration, so it only shows on hover */
@media (max-width: 1279px) {
  .chapters button.is-on:not(:hover):not(:focus-visible) { color: transparent; }
}

/* =========================================================
   The flight: pinned film with timed titles
   ========================================================= */
.flight { position: relative; }
.film { position: sticky; top: 0; height: 100vh; height: 100svh; z-index: 3; pointer-events: none; overflow: hidden; }
.film::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgba(14,11,8,.86) 0%, rgba(14,11,8,.7) 34%, rgba(14,11,8,0) 60%);
}
/* The illustration, right of the text */
#illo {
  position: absolute; display: block; pointer-events: none; opacity: 0;
  top: var(--head); left: 50%;
  width: min(calc(50% - 40px), calc(var(--max) / 2 + 40px));
  height: calc(100% - var(--head) - var(--foot));
}
.no-webgl #illo { display: none; }
.beats { margin-top: -100vh; margin-top: -100svh; }
.beat { height: 110vh; height: 110svh; }
.beat-station { height: 125vh; height: 125svh; }

.cap {
  position: absolute; left: var(--col-x);
  top: var(--head); bottom: calc(var(--foot) + var(--safe-b));
  width: calc(50% - var(--col-x) - 8px);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.cap.on { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.cap h1, .cap h2 { text-wrap: balance; }
.cap h1 { font-size: clamp(36px, 4.5vw, 72px); line-height: 1.04; max-width: 17ch; }
.cap h2 { font-size: clamp(30px, 3.5vw, 54px); line-height: 1.08; max-width: 19ch; }
.cap .w { display: inline-block; opacity: 0; transform: translateY(.25em); transition: opacity 1s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i) * 60ms); }
.cap.on .w { opacity: 1; transform: none; }
.cap .kicker, .cap .idx, .cap .sub, .cap .legend, .cap .chips { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.cap.on .kicker, .cap.on .idx { opacity: 1; transform: none; }
.cap.on .sub, .cap.on .legend, .cap.on .chips { opacity: 1; transform: none; transition-delay: .5s; }

.kicker { font-size: 15px; color: var(--muted); margin-bottom: 22px; }
.cap .sub { margin-top: 24px; font-size: clamp(17px, 1.45vw, 20px); color: var(--body); max-width: 560px; }
.cap .note { padding-left: 16px; border-left: 2px solid var(--auto); }
.cap-station .idx { color: var(--c); }
.cap-station .idx::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.legend { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; font-size: 15px; color: var(--body); }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend li::before { content: ""; width: 22px; height: 2px; background: var(--c); }
.chips { display: flex; flex-wrap: wrap; margin-top: 22px; font-size: 15px; color: var(--muted); }
/* trails the item, so a wrapped line never starts with a slash */
.chips li:not(:last-child)::after { content: "/"; margin: 0 12px; color: var(--dim); }

.scroll-cue { position: absolute; left: 50%; bottom: calc(26px + var(--safe-b)); transform: translateX(-50%); font-size: 12px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: opacity .4s; }
.scroll-cue span { width: 1px; height: 36px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; left: 0; right: 0; height: 12px; background: var(--ink); animation: drip 1.8s ease-in-out infinite; }
@keyframes drip { from { top: -12px; } to { top: 100%; } }
.film.past-hero .scroll-cue { opacity: 0; }

/* Phones and tall tablets: the illustration sits above the text */
@media (max-width: 639px), (max-width: 899px) and (orientation: portrait) {
  .film::before { background: linear-gradient(to top, rgba(14,11,8,.92) 0%, rgba(14,11,8,.78) 52%, rgba(14,11,8,0) 76%); }
  #illo { left: 0; width: 100%; height: var(--illo-h); }
  .cap { left: var(--gutter); right: var(--gutter); width: auto; top: calc(var(--head) + var(--illo-h)); }
  .scroll-cue { display: none; }
}
@media (max-width: 760px) {
  .cap .sub { margin-top: 18px; font-size: 16px; }
  .kicker { margin-bottom: 14px; }
  .idx { margin-bottom: 12px; }
  .chips { font-size: 14px; margin-top: 16px; }
}
/* Phones on their side: keep the two columns, drop what won't fit */
@media (max-height: 520px) and (orientation: landscape) {
  .cap h1, .cap h2 { font-size: clamp(22px, 3.2vw, 34px); }
  .cap .sub { margin-top: 10px; font-size: 14px; line-height: 1.45; }
  .cap .kicker, .cap .idx { margin-bottom: 8px; }
  .cap .chips, .cap .legend { display: none; }
  .scroll-cue { display: none; }
}

/* No JS: show the titles as a normal page */
html:not(.js) .film { position: relative; height: auto; overflow: visible; }
html:not(.js) .film::before, html:not(.js) .beats, html:not(.js) #illo { display: none; }
html:not(.js) .cap { position: relative; display: block; width: auto; top: auto; opacity: 1; visibility: visible; margin: 0 0 30vh; bottom: auto; padding-top: 30vh; }

/* =========================================================
   The deck
   ========================================================= */
.section { position: relative; padding: 140px 0; }
@media (max-width: 760px) { .section { padding: 96px 0; } }
.h2 { font-size: clamp(30px, 3.8vw, 56px); max-width: 20ch; text-wrap: balance; }
.lede { margin-top: 22px; font-size: 18px; color: var(--body); max-width: 600px; }

.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.js .rv.is-in { opacity: 1; transform: none; }

/* ---------- Case files ---------- */
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.swipe-hint { display: none; font-size: 14px; color: var(--muted); padding-bottom: 8px; white-space: nowrap; }
.swipe-hint::after { content: " \2192"; }
.projects {
  max-width: var(--max); margin: 56px auto 0; padding: 0 var(--gutter);
  display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr);
}
.case {
  display: flex; flex-direction: column; gap: 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 26px;
}
.case-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--dim); font-variant-numeric: tabular-nums; }
.case-top .cats { color: var(--muted); }
.case-top .draft { color: var(--cons); }

.case-media { position: relative; margin: 0 -4px; border-radius: 2px; overflow: hidden; aspect-ratio: 16 / 9; background: #1A140F; }
.case-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.case:hover .case-media img { transform: scale(1.03); }
.case-media figcaption { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 2px; font-size: 12px; color: var(--ink); background: rgba(14,11,8,.78); }

/* Drawn diagrams, for work that can't show a screenshot */
.drawn { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 22px 26px 16px; }
.drawn-cap { font-size: 13px; color: var(--muted); }
.stores { display: grid; grid-template-columns: 96px 1fr; gap: 28px; align-items: center; }
.wh { display: grid; place-items: center; height: 96px; border-radius: 3px; font-size: 13px; color: var(--bg); background: var(--soft); }
.store-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.store-grid i { aspect-ratio: 1; max-height: 30px; width: 100%; border-radius: 2px; background: color-mix(in srgb, var(--soft) 22%, transparent); animation: stock 4.25s ease-in-out infinite; animation-delay: calc(var(--i) * 250ms); }
@keyframes stock { 0%, 12%, 100% { background: color-mix(in srgb, var(--soft) 22%, transparent); } 5% { background: var(--auto); } }
.board { display: grid; gap: 13px; }
.bar { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 14px; font-size: 14px; color: var(--body); }
.bar div { height: 10px; border-radius: 5px; background: rgba(243,234,219,.06); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); border-radius: 5px; background: var(--c); }

.case h3 { font-size: clamp(30px, 2.8vw, 40px); }
.case .sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.case .outcome { font-size: 18px; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 14px 12px 14px 0; }
.stats div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.stats b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.1; color: var(--auto); }
.stats span { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); margin-top: 4px; }
.highlights { display: grid; gap: 8px; }
.highlights li { position: relative; padding-left: 22px; color: var(--body); font-size: 16px; }
.highlights li::before { content: ""; position: absolute; left: 0; top: .78em; width: 12px; height: 1px; background: var(--auto); }

.case details { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.case summary { cursor: pointer; font-size: 15px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; min-height: 36px; align-items: center; }
.case summary::-webkit-details-marker { display: none; }
.case summary::after { content: "+"; color: var(--auto); font-size: 20px; }
.case details[open] summary::after { content: "\2212"; }
.case dl { margin: 10px 0 0; display: grid; gap: 14px; }
.case dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.case dd { margin: 3px 0 0; color: var(--body); font-size: 15px; }
.stack { display: flex; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--muted); }
.stack span + span::before { content: "·"; margin: 0 8px; color: var(--dim); }
.case a.view { align-self: flex-start; color: var(--ink); font-size: 15px; text-decoration: none; border-bottom: 1px solid var(--auto); padding-bottom: 1px; }
.case a.view:hover { color: var(--auto); }

@media (max-width: 899px) {
  .swipe-hint { display: block; }
  .projects {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(86vw, 420px);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scroll-padding: 0 var(--gutter); padding-bottom: 8px; scrollbar-width: none;
  }
  .projects::-webkit-scrollbar { display: none; }
  .case { scroll-snap-align: start; padding: 18px 18px 22px; }
  .stats b { font-size: 22px; }
  .stats span { font-size: 12px; }
}

/* ---------- Problem picker ---------- */
.fix { margin-top: 48px; display: grid; gap: 24px; }
@media (min-width: 960px) { .fix { grid-template-columns: minmax(240px, 300px) 1fr; gap: 72px; align-items: start; } }
.fix-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.fix-tabs button {
  font: inherit; font-size: 15px; color: var(--muted); cursor: pointer; text-align: left;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  transition: color .25s, border-color .25s;
}
.fix-tabs button:hover { color: var(--ink); }
.fix-tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--auto); }
@media (min-width: 960px) {
  .fix-tabs { flex-direction: column; flex-wrap: nowrap; gap: 0; border-top: 1px solid var(--line); }
  .fix-tabs button { width: 100%; padding: 16px 0; font-size: 17px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .fix-tabs button::after { content: "\2192"; color: var(--auto); opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s; }
  .fix-tabs button[aria-selected="true"]::after { opacity: 1; transform: none; }
}
.fix-panel { margin: 0; min-height: 390px; border-top: 1px solid var(--line); }
.fix-row { display: grid; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.fix-row dt { font-size: 14px; color: var(--muted); }
.fix-row dd { margin: 0; font-family: var(--display); font-size: clamp(20px, 2vw, 27px); line-height: 1.25; animation: fixIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 80ms); }
.fix-row:last-child dd { color: var(--auto); }
@keyframes fixIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Smaller jobs ---------- */
.also { margin-top: 72px; }
.also h3 { font-size: clamp(24px, 2.4vw, 32px); }
.also ul { margin-top: 24px; display: grid; gap: 0 48px; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .also ul { grid-template-columns: repeat(2, 1fr); } }
.also li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.also b { display: block; font-weight: 600; color: var(--ink); }
.also span { display: block; margin-top: 2px; font-size: 16px; color: var(--body); }

/* ---------- Background ---------- */
.bg-grid { margin-top: 56px; display: grid; gap: 56px; }
@media (min-width: 960px) { .bg-grid { grid-template-columns: 1.35fr 1fr; gap: 88px; } }
.bg-title { font-size: clamp(24px, 2.4vw, 32px); }
.bg-note { margin-top: 10px; color: var(--body); }
.timeline { margin-top: 24px; border-top: 1px solid var(--line); }
.timeline li { display: grid; gap: 4px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 620px) { .timeline li { grid-template-columns: 124px 1fr; } }
.when { font-size: 14px; color: var(--muted); padding-top: 3px; font-variant-numeric: tabular-nums; }
.timeline h4, .ventures h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 23px; line-height: 1.2; }
.timeline .role { font-size: 15px; color: var(--muted); }
.timeline p + p { margin-top: 8px; }
.timeline div > p:last-child, .ventures p { color: var(--body); font-size: 16px; }
.ventures { margin-top: 24px; border-top: 1px solid var(--line); }
.ventures li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.ventures p { margin-top: 4px; }
.ventures a { text-decoration: none; border-bottom: 1px solid var(--auto); }
.ventures a:hover { color: var(--auto); }
.tools { margin-top: 64px; }
.tools dl { margin: 24px 0 0; border-top: 1px solid var(--line); }
.tools dl div { display: grid; gap: 2px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 620px) { .tools dl div { grid-template-columns: 180px 1fr; } }
.tools dt { font-size: 15px; color: var(--muted); }
.tools dd { margin: 0; color: var(--body); font-size: 16px; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 36px; }
@media (min-width: 960px) { .faq-grid { grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; } }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; position: relative; padding: 22px 40px 22px 0; font-family: var(--display); font-size: clamp(19px, 1.8vw, 23px); line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 18px; font-family: var(--sans); font-size: 24px; color: var(--auto); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--body); padding-bottom: 22px; max-width: 620px; }
.faq details a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--auto); }

/* ---------- End ---------- */
.stage-end { min-height: 170vh; min-height: 170svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 0; }
.end { text-align: center; padding-bottom: 4vh; display: flex; flex-direction: column; align-items: center; }
.end-title { font-size: clamp(40px, 5.8vw, 92px); line-height: 1.05; text-shadow: 0 0 60px rgba(255, 200, 140, .2); text-wrap: balance; }
.end-sub { margin: 22px auto 0; font-size: 18px; color: var(--body); max-width: 540px; }
.end-mail {
  display: inline-block; margin-top: 34px; padding-bottom: 4px;
  font-family: var(--display); font-size: clamp(24px, 3.4vw, 44px); color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--auto); transition: color .25s;
  max-width: 100%; overflow-wrap: anywhere;
}
.end-mail:hover { color: var(--auto); }
.end-links { margin-top: 22px; font-size: 15px; display: flex; gap: 16px; }
.end-links a { color: var(--muted); display: inline-block; padding: 8px; }
@media (max-height: 520px) and (orientation: landscape) {
  .end-title { font-size: 30px; }
  .end-sub { margin-top: 8px; font-size: 15px; line-height: 1.45; max-width: 620px; }
  .end-mail { margin-top: 10px; font-size: 22px; }
  .end-links { margin-top: 4px; }
}
.site-footer { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; padding: 20px var(--gutter) calc(52px + var(--safe-b)); font-size: 14px; color: var(--dim); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv, .cap .w, .cap .sub, .cap .idx, .cap .kicker, .cap .legend, .cap .chips { opacity: 1; transform: none; }
}
