/* Shared primitives: tokens, type, label, button, stat, quote card, step chain, reveal. */

:root {
  --navy: #10283a;
  --navy-deep: #0a1c2a;
  --navy-2: #1b3a50;
  --cream: #f8f4ea;
  --paper: #fffdf7;
  --tan: #efe3bf;
  --line: #ddd2b4;
  --line-dark: rgba(255, 255, 255, 0.14);
  --ink: #16222c;
  --muted: #55626b;
  --muted-dark: #a9bcc4;
  --teal: #1b6d62;          /* text-safe on cream 5.6:1 and tan 4.8:1 */
  --teal-bright: #5fd1c1;   /* text-safe on navy */
  --ember: #b24a27;         /* the constraint / leak signal; 4.9:1 on cream, 5.05:1 under button text */
  --ember-ink: #fff6f1;
  --radius: 6px;
  --shadow-hard: 0 4px 0 var(--navy);
  --wrap: 1120px;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--cream); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.025em; margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: 4px; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; }
.skip { position: absolute; left: 8px; top: -80px; background: #fff; color: var(--ink); padding: 10px 14px; z-index: 20; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* label: the small mono tag above headings */
.label {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal); display: block; margin-bottom: 12px;
}
.on-dark .label { color: var(--teal-bright); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: 600 15px/1 var(--body); padding: 14px 20px; border-radius: var(--radius); border: 0;
  background: var(--ember); color: var(--ember-ink); box-shadow: 0 3px 0 #7a2f15;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #7a2f15; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #7a2f15; }
.btn.line { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.line:hover, .btn.line:active { box-shadow: inset 0 0 0 1.5px currentColor; }

/* stat: one number, its window, and how it was counted */
.stat .num { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.04em; line-height: 1; }
.stat .num small { font: 500 0.95rem var(--body); letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.on-dark .stat .num small { color: var(--muted-dark); }
.stat .what { font-weight: 600; margin-top: 8px; }
.stat .how { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.on-dark .stat .how { color: var(--muted-dark); }
.chip {
  display: inline-block; font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: #f6dfd3; color: #8a3517;
}
.chip.teal { background: #d6efea; color: #17584f; }

/* quote card: what someone who worked with me actually said */
.quote-card { margin: 0; }
.quote-card blockquote { margin: 0; font-family: var(--display); font-weight: 500; font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em; }
.quote-card blockquote::before { content: "\201C"; display: block; font-size: 3rem; line-height: 0.6; color: var(--ember); margin-bottom: 8px; }
.quote-card figcaption { margin-top: 14px; font-size: 15px; }
.quote-card figcaption strong { display: block; }
.quote-card figcaption span { color: var(--muted); display: block; }
.on-dark .quote-card figcaption span { color: var(--muted-dark); }
.quote-card .watch { display: inline-block; margin-top: 10px; font: 500 13px var(--mono); letter-spacing: 0.04em; }

/* chain: an ordered sequence, drawn as connected steps */
.chain { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 0; font: 500 13px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.chain li { display: flex; align-items: center; }
.chain li + li::before { content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: 0.45; margin: 0 6px; }
.chain li span { padding: 6px 10px; border: 1.5px solid currentColor; border-radius: 999px; }
.chain li.hot span { background: var(--ember); border-color: var(--ember); color: var(--ember-ink); }

/* reveal: meaning-first motion, CSS only. Content is fully visible without support or with reduced motion. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* player: a local poster that loads the video host only when pressed */
.player { position: relative; aspect-ratio: 9 / 16; max-height: 520px; background: var(--navy); border-radius: var(--radius); overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; }
.play img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out), filter 400ms var(--ease-out); filter: saturate(0.9); }
.play:hover img { transform: scale(1.02); filter: saturate(1); }
.play-badge { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 999px; background: var(--ember); color: var(--ember-ink); font: 600 14px/1 var(--body); box-shadow: 0 3px 0 #7a2f15; }
.play-badge svg { width: 18px; height: 18px; fill: currentColor; }
.play:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .play img { transition: none; } }
.play-badge { white-space: nowrap; }

/* photos: real images from the asset catalog, captioned in the owner's words */
.photo { margin: 30px 0; }
.photo img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--tan); }
.photo figcaption { font: 500 12.5px/1.5 var(--mono); letter-spacing: 0.02em; color: var(--muted); margin-top: 10px; }
.on-dark .photo img { border-color: var(--line-dark); }
.on-dark .photo figcaption { color: var(--muted-dark); }
.photo.side { float: right; width: 300px; margin: 6px 0 22px 32px; }
.photo.wide { max-width: 640px; }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 30px 0; clear: both; }
.photo-pair .photo { margin: 0; }
@media (max-width: 700px) {
  .photo.side { float: none; width: min(320px, 78%); margin: 24px 0; }
  .photo-pair { gap: 12px; }
}
@media print { .photo { break-inside: avoid; } }
.photo-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 30px 0; clear: both; }
.photo-row .photo { margin: 0; }
@media (max-width: 700px) { .photo-row { grid-template-columns: 1fr 1fr; gap: 12px; } .photo-row .photo:first-child { grid-column: 1 / -1; max-width: 78%; } }
