/* The long page's ground: the two faces, the motion tokens (Memoir's own, from shared/theme.css), the type, the
   sections and the buttons. The page is black from top to bottom, with no glow anywhere. */
@font-face {
  font-family: "Memoir Unbounded";
  src: url("../fonts/Unbounded-subset.woff2") format("woff2");
  font-weight: 200 900;
  font-display: block;
}
/* Unbounded for words other than MEMOIR (the wordmark keeps its own few letters above): Latin, 200 to 900 */
@font-face {
  font-family: "Unbounded";
  src: url("../fonts/Unbounded-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
/* Inter, Memoir's own (rsms/inter 4.1, Open Font License, with the plain 1 in tabular digits) */
@font-face {
  font-family: "Memoir Inter";
  src: url("../fonts/InterVariable-memoir.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --clock: min(56vh, 78vw);
  --word: min(15vw, 16.5vh);
  --inter: "Memoir Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Memoir Inter", system-ui, sans-serif;

  /* Memoir's motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --sheet: cubic-bezier(0.45, 0, 0.15, 1);
  --pop: cubic-bezier(0.32, 1.24, 0.5, 1);

  /* the page's greys */
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;
  --ink-3: #8e8e93;
  --ink-4: #636366;
  --line: rgba(255, 255, 255, 0.09);
  --plate: #111114;
  --plate-2: #1c1c1e;
  --ring: 0 0 0 3px rgba(245, 245, 247, 0.28);

  --gutter: clamp(20px, 4vw, 56px);
  --wide: 1280px;
}
@supports (height: 1svh) {
  :root { --clock: min(56svh, 78vw); --word: min(15vw, 16.5svh); }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  background: #000;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: #000;
  color: var(--ink);
  font-family: var(--inter);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: rgba(255, 255, 255, 0.22); }
img, svg, canvas { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
em, i, cite, address { font-style: normal; }
b, strong { font-weight: 650; }

.skip {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #000;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transform: translate(-50%, -160%);
  transition: transform 0.3s var(--ease-out);
}
.skip:focus-visible { transform: translate(-50%, 0); outline: none; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- sections ---------- */
.sec {
  position: relative;
  padding: clamp(110px, 20vh, 220px) var(--gutter) 0;
}
/* a section not built yet takes no room */
.sec:empty { display: none; }
.sec-in {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
}
.sec-head { max-width: 46em; }
.sec-head.center { margin: 0 auto; text-align: center; }
.kicker {
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kicker .n { font-variant-numeric: tabular-nums; color: var(--ink-3); }
/* the important ones: a small solid tag beside the kicker */
.key {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--ink);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.h2 {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 68px);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.h2 .soft { color: var(--ink-4); }
.lede {
  margin: 22px 0 0;
  max-width: 34em;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}
.sec-head.center .lede { margin-left: auto; margin-right: auto; }
.fine {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
  text-wrap: pretty;
}
.ill {
  position: relative;
  margin-top: clamp(40px, 7vh, 80px);
}

/* a chapter: a big word in Unbounded between groups of sections */
.chapter {
  position: relative;
  padding: clamp(120px, 20vh, 240px) var(--gutter) 0;
  text-align: center;
}
.chapter h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(44px, 9vw, 150px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.chapter p { margin: 22px auto 0; max-width: 30em; color: var(--ink-3); font-size: clamp(16px, 1.3vw, 19px); text-wrap: balance; }
.chapter .ch-l { display: inline-block; white-space: pre; }
.js .chapter:not(.played) :is(h2, p) { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .js .chapter:not(.played) :is(h2, p) { opacity: 1; } }

/* ---------- buttons and links ---------- */
.pill {
  --press: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #000;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transform: scale(var(--press));
  transition: transform 0.3s var(--ease-out), background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.pill:hover { background: #fff; }
.pill:active { --press: 0.96; transition-duration: 0.08s, 0.2s, 0.2s, 0.2s; }
.pill:focus-visible { outline: none; box-shadow: var(--ring); }
.pill.ghost { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.pill.ghost:hover { background: rgba(255, 255, 255, 0.14); }
.pill.sm { height: 36px; padding: 0 16px; font-size: 14px; }
.pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s var(--ease);
}
.link:hover { text-decoration-color: currentColor; }
.link:focus-visible { outline: none; border-radius: 4px; box-shadow: var(--ring); }

/* ---------- reveals (motion.js, sections/index.js) ---------- */
/* a section's head waits out of sight until the section plays (boot.js marks the page .js first, so a page whose
   scripts never run still shows everything); its headline's words each sit in a mask to rise, drop or slide out of */
.w { display: inline-block; overflow: clip; overflow-clip-margin: 0.14em; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.w > span { display: inline-block; }
.js :is(.sec, .chapter):not(.played) :is(.kicker, .h2, .lede, .fine, [data-in]) { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .js :is(.sec, .chapter):not(.played) :is(.kicker, .h2, .lede, .fine, [data-in]) { opacity: 1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .sec { padding-top: 120px; }
  .kicker { margin-bottom: 14px; font-size: 12px; }
}
