/* 0x: a black room with one lit window. Shared by every page; the home page adds its window
   (the hero scene) on top of this. Text sits in a narrow label column and a wide reading column. */
:root {
  --bg: #000;
  --line: #1b1b21;
  --text: #ececf1;
  --muted: #8a8c97;
  --lamp: #ff4632;
  --ember: #ffb46a;
  --lamp-glow: rgba(255, 70, 50, 0.45);
  --lamp-line: rgba(255, 70, 50, 0.5);
  --lamp-wash: rgba(255, 70, 50, 0.06);
  --ember-glow: rgba(255, 180, 106, 0.55);
  --mist: rgba(150, 175, 250, 0.35);
  --shade-top: rgba(0, 0, 0, 0.65);
  --vignette: rgba(0, 0, 0, 0.85);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* The odd face: a few letters of the headline's italic word are set in it. */
  --odd: "Windraw Aesthetic", var(--serif);
  --step--1: 0.75rem;
  --step-0: 1.0625rem;
  --step-1: 1.5rem;
  --step-2: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);
  --step-3: clamp(2.75rem, 1.5rem + 5vw, 6rem);
  --gutter: clamp(16px, 5vw, 72px);
  --bleed: 48px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--lamp); color: var(--bg); }
a { color: inherit; }
:focus-visible { outline: 1px dashed var(--text); outline-offset: 4px; }
.wrap { padding-inline: var(--gutter); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Top bar: the logo on the left, a couple of links on the right. */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 24px);
}
.toplinks { display: flex; gap: clamp(18px, 3vw, 32px); }
.mark { display: block; }
.logo-live { position: relative; display: block; width: 34px; height: 34px; }
.logo-live img { width: 100%; height: 100%; display: block; }
/* The live chrome canvas sits exactly over the static picture it replaces. It ignores the pointer,
   so a right click lands on the link and the browser offers no "Save image as". */
.logo-live canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.toplink {
  font: 400 var(--step--1)/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
}
.toplink:hover, .toplink[aria-current] { color: var(--text); }

h1 {
  margin: 0;
  font-weight: 300;
  font-size: var(--step-3);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}
h1 em { font-style: italic; }
.lede {
  margin: 20px 0 0;
  max-width: 36ch;
  color: var(--muted);
  line-height: 1.55;
}

/* The headline's italic word (data-mix) is split into letters. Each letter holds both faces
   stacked in one grid cell, so it can switch face without the word changing width. */
@font-face {
  font-family: "Windraw Aesthetic";
  src: url("windraw-aesthetic-italic.otf") format("opentype");
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Windraw Aesthetic";
  src: url("windraw-aesthetic-italic.otf") format("opentype");
  font-style: italic;
  font-display: swap;
}
[data-mix] .word { display: inline-block; white-space: nowrap; user-select: none; }
[data-mix] .ch { display: inline-grid; align-items: baseline; justify-items: center; }
[data-mix] .ch > span { grid-area: 1 / 1; }
[data-mix] .odd { font-family: var(--odd); font-weight: 400; opacity: 0; user-select: none; }
[data-mix] .ch.on .plain { opacity: 0; }
[data-mix] .ch.on .odd { opacity: 1; }

/* Figure captions and legends, in the manner of a paper. */
.legend { margin: 0; font: 400 0.6875rem/1.5 var(--mono); letter-spacing: 0.03em; color: var(--muted); }
.legend p { margin: 0 0 8px; color: var(--text); }
.legend dl { margin: 0; display: grid; gap: 5px; }
.legend dl div { display: flex; align-items: center; gap: 12px; }
.legend dt { width: 22px; display: flex; justify-content: center; }
.legend dd { margin: 0; }
.sw-ridge { width: 22px; height: 1px; background: var(--text); }
.sw-mist { width: 22px; height: 9px; background: var(--mist); filter: blur(1.5px); }
.sw-now { width: 7px; height: 7px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 10px 2px var(--lamp-glow); }
.sw-ember { width: 22px; height: 2px; background: var(--ember); }
.sw-dash { width: 22px; height: 0; border-top: 1px dashed var(--muted); }

/* The room */
.band {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(0, 3fr);
  gap: 24px clamp(24px, 4vw, 64px);
  max-width: 1240px;
  margin-inline: auto;
  padding-block: clamp(64px, 10vw, 128px);
  background: linear-gradient(var(--line), var(--line)) 50% 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.band:first-child { background: none; padding-top: clamp(40px, 6vw, 72px); }
.label {
  margin: 0;
  padding-top: 0.6em;
  font: 400 var(--step--1)/1.6 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.big {
  margin: 0;
  max-width: 30ch;
  font-weight: 300;
  font-size: var(--step-2);
  line-height: 1.32;
  font-variation-settings: "opsz" 48;
  text-wrap: pretty;
}
.aside { margin: 24px 0 0; max-width: 46ch; color: var(--muted); }
.copy p { margin: 0 0 1em; max-width: 52ch; }
.copy p:last-child { margin-bottom: 0; }

/* The number of a model, with its light. */
.id {
  display: inline-flex;
  align-items: center;
  align-self: start;
  gap: 10px;
  padding-top: 0.75em;
  font: 500 var(--step--1)/1 var(--mono);
  letter-spacing: 0.04em;
  color: var(--ember);
}
.id i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px 2px var(--ember-glow);
  animation: twinkle 4.4s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
/* A model still in development: its light is dimmer and blinks faster, like one still warming up. */
.dev.id { color: var(--muted); }
.dev.id i { background: var(--muted); box-shadow: none; animation-duration: 2.2s; }
.meta {
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 32px;
  font: 400 var(--step--1)/1.5 var(--mono);
  letter-spacing: 0.02em;
}
.meta div { display: flex; gap: 10px; min-width: 0; }
.meta dt { color: var(--muted); white-space: nowrap; }
.meta dd { margin: 0; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  padding: 17px 26px;
  font: 500 0.8125rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--lamp-line);
  background: var(--lamp-wash);
  box-shadow: 0 0 48px -10px var(--lamp-glow);
  transition: box-shadow 0.4s, border-color 0.4s;
}
.cta::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 10px 2px var(--lamp-glow);
}
.cta:hover { border-color: var(--lamp); box-shadow: 0 0 80px -6px var(--lamp-glow); }

/* Model pages: a heading, a living figure, a few lines, and the way to the next model. */
.model-head {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(0, 3fr);
  gap: 24px clamp(24px, 4vw, 64px);
  max-width: 1240px;
  margin-inline: auto;
  padding-block: clamp(56px, 9vw, 112px) clamp(36px, 5vw, 56px);
}
.model-head .id { padding-top: 1.1em; }
.model-head .big { margin-top: 22px; color: var(--muted); }
/* A page with no model number: its heading sits in the reading column. */
.model-head > .solo { grid-column: 2; }
/* Access: the ways a model can be given out, each a step further into the dark. */
.forms p {
  margin: 0 0 1em;
  max-width: 40ch;
  font-weight: 300;
  font-size: var(--step-1);
  line-height: 1.4;
  font-variation-settings: "opsz" 36;
  color: var(--muted);
}
.forms p:last-child { margin-bottom: 0; }
.forms b { font-weight: 400; color: var(--text); }
.forms p:nth-child(2) b { color: #b6b7c0; }
.forms p:nth-child(3) b { color: #7b7c86; }
/* Models on the home page: just their names, large, each with one line beside it. */
.index {
  max-width: 1240px;
  margin-inline: auto;
  padding-block: clamp(64px, 10vw, 128px);
  background: linear-gradient(var(--line), var(--line)) 50% 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.names {
  --size: clamp(2.75rem, 1rem + 5.2vw, 6.25rem);
  list-style: none;
  margin: clamp(28px, 4vw, 48px) 0 0;
  padding: 0;
}
.names a {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 10px clamp(32px, 5vw, 80px);
  align-items: center;
  text-decoration: none;
  transition: opacity 0.6s;
}
.nm {
  font-weight: 300;
  font-size: var(--size);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 72;
}
/* The number sits up against the top of the name's capitals. */
.nm sup {
  margin-left: 0.6em;
  font: 500 var(--step--1)/1 var(--mono);
  letter-spacing: 0.04em;
  vertical-align: calc(var(--size) * 0.62 - 0.75em);
  color: var(--muted);
  transition: color 0.25s;
}
.names li + li { margin-top: clamp(4px, 1vw, 14px); }
.ds { max-width: 44ch; color: var(--muted); }
.ds small {
  display: block;
  margin-top: 6px;
  font: 400 var(--step--1)/1.6 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Pointing at one model puts the others out. */
@media (hover: hover) {
  .names:has(a:hover) a:not(:hover) { opacity: 0.2; transition-duration: 0.25s; }
  .names a:hover sup { color: var(--ember); }
}

.figure { max-width: 1240px; margin: 0 auto; }
.figure .stage {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
}
.figure canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 48px; margin-top: 16px; }
.figure figcaption > p { margin: 0; max-width: 62ch; font: 400 0.6875rem/1.6 var(--mono); letter-spacing: 0.03em; color: var(--muted); }
.figure figcaption b { color: var(--text); font-weight: 400; }
/* A single number that matters, set large. */
.stat { display: grid; gap: 4px; align-content: start; }
.stat strong { font: 300 clamp(3rem, 2rem + 4vw, 5.5rem)/1 var(--serif); letter-spacing: -0.02em; color: var(--text); }
.stat span { font: 400 var(--step--1)/1.5 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: 1240px;
  margin-inline: auto;
  padding-block: 28px;
  font: 400 var(--step--1)/1.5 var(--mono);
  letter-spacing: 0.04em;
  background: linear-gradient(var(--line), var(--line)) 50% 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.pager a { color: var(--muted); text-decoration: none; transition: color 0.3s; }
.pager a:hover { color: var(--text); }
.pager b { color: var(--ember); font-weight: 500; margin-inline: 6px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 1240px;
  margin-inline: auto;
  padding-block: 28px 44px;
  font: 400 var(--step--1)/1.5 var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
  background: linear-gradient(var(--line), var(--line)) 50% 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}

@media (max-width: 720px) {
  .band, .model-head, .names a { grid-template-columns: minmax(0, 1fr); }
  .names li + li { margin-top: 28px; }
  .label, .id, .model-head .id { padding-top: 0; }
  .model-head > .solo { grid-column: 1; }
  .figure .stage { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .id i { animation: none; }
}
