/* Farthest Light: farthestlight.gg
   Tokens follow the game's UI token sheet (LGTokens.uss) and the app-icon palette (make_icon.py).
   Every colour, size and radius below the :root block is a var(); no literal colours outside it. */

:root {
  /* surfaces */
  --c-ink: rgb(6, 8, 12);
  --c-navy: rgb(9, 15, 38);
  --c-haze: rgb(36, 62, 140);
  --c-violet: rgb(70, 40, 120);
  --c-glass-1: rgb(10, 13, 19);
  --c-glass-2: rgb(20, 25, 34);
  --c-tile: rgb(24, 30, 41);
  --c-tile-hover: rgb(33, 41, 55);
  --c-edge: rgb(44, 52, 66);
  --c-edge-hi: rgb(66, 78, 98);

  /* text */
  --c-text: rgb(242, 245, 249);
  --c-text-2: rgb(185, 193, 205);
  --c-text-3: rgb(152, 162, 176);
  --c-text-on-signal: rgb(6, 8, 12);

  /* signal, accent, resources, factions */
  --c-signal: rgb(207, 230, 255);
  --c-signal-hi: rgb(232, 243, 255);
  --c-azure: rgb(94, 176, 255);
  --c-gold: rgb(255, 212, 120);
  --c-alloy: rgb(169, 199, 232);
  --c-power: rgb(255, 194, 74);
  --c-ok: rgb(91, 227, 143);
  --c-chorale: rgb(94, 176, 255);
  --c-rift: rgb(255, 138, 110);

  /* translucent helpers (alpha variants of the above) */
  --a-star: rgba(242, 245, 249, 0.9);
  --a-star-dim: rgba(207, 230, 255, 0.55);
  --a-star-warm: rgba(255, 212, 120, 0.7);
  --a-azure-glow: rgba(94, 176, 255, 0.45);
  --a-azure-soft: rgba(94, 176, 255, 0.14);
  --a-signal-line: rgba(207, 230, 255, 0.35);
  --a-signal-sweep: rgba(232, 243, 255, 0.22);
  --a-scrim: rgba(3, 5, 9, 0.86);
  --a-ink-0: rgba(6, 8, 12, 0);
  --a-ink-80: rgba(6, 8, 12, 0.8);
  --a-haze: rgba(36, 62, 140, 0.35);
  --a-violet: rgba(70, 40, 120, 0.22);

  /* type */
  --f-display: "Exo 2", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --t-caption: 0.8125rem;
  --t-body: 1rem;
  --t-body-l: 1.125rem;
  --t-title: 1.25rem;
  --t-h2: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --t-h1: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  --t-lead: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --t-wordmark: clamp(3.75rem, 2rem + 12vw, 11rem);
  --t-overline: clamp(0.875rem, 0.6rem + 1.4vw, 1.5rem);
  --lh-body: 1.6;
  --lh-tight: 1.1;

  /* spacing: 4 / 8 grid */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* shape and size */
  --r-chip: 6px;
  --r-control: 10px;
  --r-card: 14px;
  --r-dock: 18px;
  --r-pill: 999px;
  --z-target: 44px;
  --z-edge: 1px;
  --z-focus: 2px;
  --w-page: 1120px;
  --w-prose: 62ch;
  --gutter: clamp(16px, 4vw, 40px);

  /* motion */
  --m-fast: 120ms;
  --m-base: 200ms;
  --m-drift: 180s;
  --m-sweep: 9s;

  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--c-ink);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 100%;
  line-height: var(--lh-body);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--c-ink);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, picture, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--c-signal); text-decoration-color: var(--a-signal-line); text-underline-offset: 0.15em; }
a:hover { color: var(--c-signal-hi); text-decoration-color: var(--c-signal-hi); }

:focus-visible {
  outline: var(--z-focus) solid var(--c-signal);
  outline-offset: 3px;
  border-radius: var(--r-chip);
}

::selection { background: var(--c-signal); color: var(--c-text-on-signal); }

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: calc(-1 * var(--s-10));
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--c-signal);
  color: var(--c-text-on-signal);
  border-radius: var(--r-control);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--w-page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------------------------------------------------------- type */

.display { font-family: var(--f-display); font-weight: 800; line-height: var(--lh-tight); letter-spacing: -0.01em; }

.overline {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: var(--t-caption);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

.section-head { max-width: var(--w-prose); margin-bottom: var(--s-7); }
.section-head .overline { margin-bottom: var(--s-3); }
.section-head h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--t-h2);
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  margin-bottom: var(--s-4);
}
.section-head p { font-size: var(--t-lead); color: var(--c-text-2); }

/* ---------------------------------------------------------------- header */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: var(--s-8);
  padding-top: var(--s-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--t-caption);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-text);
  text-decoration: none;
  min-height: var(--z-target);
}
.brand img { width: 28px; height: 28px; border-radius: var(--r-chip); }

.site-nav ul { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--z-target);
  padding: 0 var(--s-3);
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--c-text-2);
  text-decoration: none;
  border-radius: var(--r-control);
  transition: color var(--m-fast), background-color var(--m-fast);
}
.site-nav a:hover { color: var(--c-text); background: var(--c-tile); }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: var(--s-10) 0 var(--s-9);
  background:
    radial-gradient(120% 70% at 50% 110%, var(--a-haze) 0%, var(--a-ink-0) 60%),
    radial-gradient(60% 40% at 15% 15%, var(--a-violet) 0%, var(--a-ink-0) 70%),
    linear-gradient(180deg, var(--c-navy) 0%, var(--c-ink) 70%);
}

/* three star layers with different tile sizes; drift very slowly, parallax by depth */
.stars, .stars::before, .stars::after {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  z-index: -1;
}
.stars {
  background-image:
    radial-gradient(circle at 13px 17px, var(--a-star) 0 1px, transparent 1.6px),
    radial-gradient(circle at 141px 83px, var(--a-star-dim) 0 1px, transparent 1.5px),
    radial-gradient(circle at 229px 201px, var(--a-star) 0 0.8px, transparent 1.4px),
    radial-gradient(circle at 77px 260px, var(--a-star-warm) 0 1px, transparent 1.6px),
    radial-gradient(circle at 301px 44px, var(--a-star-dim) 0 0.8px, transparent 1.4px);
  background-size: 340px 340px;
  animation: drift var(--m-drift) linear infinite;
}
.stars::before {
  content: "";
  background-image:
    radial-gradient(circle at 41px 93px, var(--a-star-dim) 0 0.7px, transparent 1.2px),
    radial-gradient(circle at 173px 21px, var(--a-star) 0 0.9px, transparent 1.4px),
    radial-gradient(circle at 109px 203px, var(--a-star-dim) 0 0.7px, transparent 1.2px),
    radial-gradient(circle at 211px 157px, var(--a-star-warm) 0 0.7px, transparent 1.2px);
  background-size: 260px 260px;
  animation: drift calc(var(--m-drift) * 1.6) linear infinite reverse;
}
.stars::after {
  content: "";
  background-image:
    radial-gradient(circle at 59px 31px, var(--a-star-dim) 0 0.6px, transparent 1px),
    radial-gradient(circle at 17px 117px, var(--a-star-dim) 0 0.5px, transparent 1px),
    radial-gradient(circle at 131px 71px, var(--a-star) 0 0.6px, transparent 1.1px);
  background-size: 180px 180px;
  animation: drift calc(var(--m-drift) * 2.4) linear infinite;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-340px, 120px, 0); }
}

/* the lit limb of a dark world, as on the app icon */
.horizon {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: calc(100% - var(--s-8));
  width: 240vw;
  min-width: 1200px;
  max-width: 3200px;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--c-ink);
  border-top: var(--z-edge) solid var(--c-signal-hi);
  box-shadow:
    0 -2px 24px var(--a-azure-glow),
    0 -24px 120px var(--a-azure-soft);
  pointer-events: none;
}
@media (min-width: 900px) { .horizon { top: calc(100% - var(--s-9)); } }

.hero-inner {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--s-5);
  width: 100%;
}

.emblem {
  width: min(62vw, 420px);
  margin-bottom: calc(-1 * var(--s-5));
}

.wordmark {
  display: grid;
  justify-items: center;
  font-family: var(--f-display);
  line-height: 1;
  color: var(--c-text);
}
.wordmark__lead {
  display: block;
  font-weight: 300;
  font-size: var(--t-overline);
  letter-spacing: 0.5em;
  text-indent: 0.5em; /* balances the trailing tracking so the word sits centred */
  text-transform: uppercase;
  color: var(--c-signal);
  margin-bottom: var(--s-2);
}
.wordmark__last {
  display: block;
  position: relative;
  font-weight: 800;
  font-size: var(--t-wordmark);
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  text-transform: uppercase;
  background-image: linear-gradient(100deg, var(--c-text) 40%, var(--c-signal-hi) 50%, var(--c-text) 60%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sweep var(--m-sweep) ease-in-out infinite;
}
@keyframes sweep {
  0%, 55% { background-position: 100% 0; }
  85%, 100% { background-position: 0% 0; }
}

.rule {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: min(100%, 420px);
  color: var(--c-signal);
}
.rule::before, .rule::after { content: ""; flex: 1; height: var(--z-edge); background: var(--a-signal-line); }
.rule span { width: 6px; height: 6px; background: currentColor; transform: rotate(45deg); }

.tagline {
  font-size: var(--t-lead);
  color: var(--c-text-2);
  max-width: 30ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-2);
}

.pill, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--z-target);
  padding: 0 var(--s-5);
  border-radius: var(--r-pill);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: var(--t-body);
  text-decoration: none;
  white-space: nowrap;
}
.pill {
  color: var(--c-text);
  background: var(--c-glass-2);
  border: var(--z-edge) solid var(--c-edge-hi);
}
.pill::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-signal);
  box-shadow: 0 0 10px var(--c-signal);
}
.button {
  color: var(--c-text-on-signal);
  background: var(--c-signal);
  border: var(--z-edge) solid var(--c-signal);
  transition: background-color var(--m-fast), transform var(--m-fast);
}
.button:hover { background: var(--c-signal-hi); color: var(--c-text-on-signal); }
.button:active { transform: scale(0.97); }
.button--ghost { color: var(--c-text); background: transparent; border-color: var(--c-edge-hi); }
.button--ghost:hover { color: var(--c-text); background: var(--c-tile); }

.platforms {
  display: flex;
  gap: var(--s-4);
  font-size: var(--t-caption);
  color: var(--c-text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- sections */

.section { padding: var(--s-9) 0; }
.section + .section { border-top: var(--z-edge) solid var(--c-edge); }
@media (min-width: 900px) { .section { padding: var(--s-10) 0; } }

/* hero shot framed like a device glass */
.showcase { padding-top: 0; margin-top: calc(-1 * var(--s-8)); position: relative; z-index: 1; }
.frame {
  position: relative;
  padding: var(--s-2);
  background: var(--c-glass-1);
  border: var(--z-edge) solid var(--c-edge);
  border-top-color: var(--c-edge-hi);
  border-radius: var(--r-dock);
  box-shadow: 0 -40px 160px var(--a-azure-soft);
}
.frame img { width: 100%; border-radius: var(--r-control); }
.frame figcaption, .shot figcaption, .pair figcaption {
  padding: var(--s-3) var(--s-2) var(--s-1);
  font-size: var(--t-caption);
  color: var(--c-text-3);
}

/* what it is */
.split {
  display: grid;
  gap: var(--s-7);
  align-items: start;
}
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr 0.9fr; gap: var(--s-9); } }
.prose p { font-size: var(--t-body-l); color: var(--c-text-2); max-width: var(--w-prose); }
.prose p + p { margin-top: var(--s-4); }
.prose strong { color: var(--c-text); font-weight: 600; }

.stats {
  display: grid;
  gap: var(--s-3);
}
.stat {
  padding: var(--s-5);
  background: var(--c-glass-1);
  border: var(--z-edge) solid var(--c-edge);
  border-radius: var(--r-card);
}
.stat dt { font-size: var(--t-caption); color: var(--c-text-3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--s-1); }
.stat dd { font-family: var(--f-display); font-weight: 600; font-size: var(--t-h1); line-height: var(--lh-tight); }
.stat--alloy dd { color: var(--c-alloy); }
.stat--power dd { color: var(--c-power); }

/* factions */
.factions { display: grid; gap: var(--s-4); }
@media (min-width: 720px) { .factions { grid-template-columns: 1fr 1fr; gap: var(--s-5); } }
.faction {
  position: relative;
  padding: var(--s-6);
  background: var(--c-glass-1);
  border: var(--z-edge) solid var(--c-edge);
  border-radius: var(--r-dock);
  overflow: hidden;
}
.faction::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
}
.faction::after {
  content: "";
  position: absolute;
  right: calc(-1 * var(--s-8));
  top: calc(-1 * var(--s-8));
  width: var(--s-10);
  height: var(--s-10);
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.12;
  filter: blur(24px);
}
.faction--chorale { --accent: var(--c-chorale); }
.faction--rift { --accent: var(--c-rift); }
.faction .overline { color: var(--accent); margin-bottom: var(--s-3); }
.faction h3 { font-family: var(--f-display); font-weight: 800; font-size: var(--t-h2); line-height: var(--lh-tight); margin-bottom: var(--s-3); }
.faction p { color: var(--c-text-2); font-size: var(--t-body-l); }
.faction .traits { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.trait {
  padding: var(--s-1) var(--s-3);
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--c-text-2);
  background: var(--c-tile);
  border-radius: var(--r-pill);
}
.vs {
  display: none;
}

/* features */
.features { display: grid; gap: var(--s-3); }
@media (min-width: 600px) { .features { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature {
  padding: var(--s-5);
  background: var(--c-glass-1);
  border: var(--z-edge) solid var(--c-edge);
  border-radius: var(--r-card);
  transition: border-color var(--m-fast), background-color var(--m-fast);
}
.feature:hover { border-color: var(--c-edge-hi); background: var(--c-glass-2); }
.feature svg { width: 28px; height: 28px; color: var(--c-signal); margin-bottom: var(--s-4); }
.feature h3 { font-family: var(--f-display); font-weight: 600; font-size: var(--t-title); line-height: 1.25; margin-bottom: var(--s-2); }
.feature p { color: var(--c-text-2); font-size: var(--t-body); }

/* platforms */
.pair { display: grid; gap: var(--s-5); }
@media (min-width: 800px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair figure {
  background: var(--c-glass-1);
  border: var(--z-edge) solid var(--c-edge);
  border-radius: var(--r-dock);
  padding: var(--s-2);
}
.pair img { border-radius: var(--r-control); width: 100%; }
.pair figcaption strong { display: block; color: var(--c-text); font-size: var(--t-body); margin-bottom: var(--s-1); }
.controls {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-6);
}
@media (min-width: 800px) { .controls { grid-template-columns: repeat(3, 1fr); } }
.controls li {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  color: var(--c-text-2);
  font-size: var(--t-body);
}
.controls li::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  margin-top: 0.55em;
  background: var(--c-signal);
  transform: rotate(45deg);
}
.controls strong { color: var(--c-text); font-weight: 600; }

/* score */
.score {
  position: relative;
  overflow: hidden;
  padding: var(--s-7);
  background: var(--c-glass-1);
  border: var(--z-edge) solid var(--c-edge);
  border-radius: var(--r-dock);
}
.score::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 80%;
  background: radial-gradient(50% 60% at 50% 100%, var(--a-haze) 0%, var(--a-ink-0) 70%);
  pointer-events: none;
}
.score .section-head { margin-bottom: var(--s-6); }
.states { display: grid; gap: var(--s-3); position: relative; }
@media (min-width: 720px) { .states { grid-template-columns: repeat(3, 1fr); gap: var(--s-4); } }
.state {
  padding: var(--s-5);
  background: var(--c-glass-2);
  border-radius: var(--r-card);
  border: var(--z-edge) solid var(--c-edge);
}
.state .wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: var(--s-6);
  margin-bottom: var(--s-4);
}
.state .wave i {
  flex: 1;
  background: var(--c-signal);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
  height: 40%;
}
.state--calm .wave i { background: var(--c-alloy); }
.state--build .wave i { background: var(--c-signal); }
.state--battle .wave i { background: var(--c-power); }
/* bar heights per state: a quiet line, a rising line, a loud line */
.state--calm .wave i:nth-child(1) { height: 30%; }
.state--calm .wave i:nth-child(2) { height: 42%; }
.state--calm .wave i:nth-child(3) { height: 36%; }
.state--calm .wave i:nth-child(4) { height: 48%; }
.state--calm .wave i:nth-child(5) { height: 40%; }
.state--calm .wave i:nth-child(6) { height: 34%; }
.state--calm .wave i:nth-child(7) { height: 44%; }
.state--calm .wave i:nth-child(8) { height: 38%; }
.state--build .wave i:nth-child(1) { height: 40%; }
.state--build .wave i:nth-child(2) { height: 55%; }
.state--build .wave i:nth-child(3) { height: 48%; }
.state--build .wave i:nth-child(4) { height: 66%; }
.state--build .wave i:nth-child(5) { height: 58%; }
.state--build .wave i:nth-child(6) { height: 72%; }
.state--build .wave i:nth-child(7) { height: 64%; }
.state--build .wave i:nth-child(8) { height: 78%; }
.state--battle .wave i:nth-child(1) { height: 70%; }
.state--battle .wave i:nth-child(2) { height: 100%; }
.state--battle .wave i:nth-child(3) { height: 82%; }
.state--battle .wave i:nth-child(4) { height: 96%; }
.state--battle .wave i:nth-child(5) { height: 76%; }
.state--battle .wave i:nth-child(6) { height: 100%; }
.state--battle .wave i:nth-child(7) { height: 88%; }
.state--battle .wave i:nth-child(8) { height: 94%; }
.state h3 { font-family: var(--f-display); font-weight: 600; font-size: var(--t-title); margin-bottom: var(--s-1); }
.state p { color: var(--c-text-2); font-size: var(--t-body); }
.score .credit { margin-top: var(--s-6); font-size: var(--t-caption); color: var(--c-text-3); position: relative; }

/* gallery */
.gallery { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.shot { margin: 0; }
.shot a {
  display: block;
  padding: var(--s-2);
  background: var(--c-glass-1);
  border: var(--z-edge) solid var(--c-edge);
  border-radius: var(--r-card);
  transition: border-color var(--m-fast), transform var(--m-base);
}
.shot a:hover { border-color: var(--c-edge-hi); transform: translateY(-2px); }
.shot a:focus-visible { outline-offset: 2px; }
.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--r-chip);
  background: var(--c-glass-2);
}
.gallery-note { margin-top: var(--s-5); font-size: var(--t-caption); color: var(--c-text-3); }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  width: min(96vw, 1400px);
  max-width: none;
  height: fit-content;
  max-height: 96vh;
  margin: auto;
  padding: var(--s-2);
  overflow: hidden;
  background: var(--c-glass-1);
  color: var(--c-text);
  border: var(--z-edge) solid var(--c-edge-hi);
  border-radius: var(--r-dock);
}
.lightbox::backdrop { background: var(--a-scrim); }
.lightbox img { width: 100%; max-height: calc(96vh - var(--s-10)); object-fit: contain; border-radius: var(--r-control); background: var(--c-ink); }
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-2) var(--s-1);
}
.lightbox-bar p { font-size: var(--t-caption); color: var(--c-text-2); }
.lightbox-bar .controls-row { display: flex; gap: var(--s-2); }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--z-target);
  height: var(--z-target);
  padding: 0;
  color: var(--c-text);
  background: var(--c-tile);
  border: var(--z-edge) solid var(--c-edge);
  border-radius: var(--r-control);
  cursor: pointer;
  transition: background-color var(--m-fast);
}
.icon-button:hover { background: var(--c-tile-hover); }
.icon-button svg { width: 20px; height: 20px; }

/* closing CTA */
.closing {
  text-align: center;
  padding: var(--s-9) 0;
  background:
    radial-gradient(60% 80% at 50% 120%, var(--a-haze) 0%, var(--a-ink-0) 70%),
    var(--c-ink);
  border-top: var(--z-edge) solid var(--c-edge);
}
.closing .overline { margin-bottom: var(--s-3); }
.closing h2 { font-family: var(--f-display); font-weight: 800; font-size: var(--t-h2); line-height: var(--lh-tight); margin-bottom: var(--s-4); }
.closing p { color: var(--c-text-2); font-size: var(--t-lead); max-width: 44ch; margin-inline: auto; }
.closing .cta-row { margin-top: var(--s-6); }

/* footer */
.site-footer {
  border-top: var(--z-edge) solid var(--c-edge);
  padding: var(--s-7) 0;
  font-size: var(--t-caption);
  color: var(--c-text-3);
}
.site-footer .wrap {
  display: grid;
  gap: var(--s-5);
}
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer .brand { margin-bottom: var(--s-3); }
.site-footer p { max-width: var(--w-prose); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
.site-footer a { color: var(--c-text-2); }
.site-footer a:hover { color: var(--c-text); }

/* ---------------------------------------------------------------- credits + 404 pages */

.page { padding: var(--s-10) 0 var(--s-9); }
.page .section-head { margin-bottom: var(--s-7); }
.page h2 { font-family: var(--f-display); font-weight: 600; font-size: var(--t-h1); line-height: var(--lh-tight); margin: var(--s-8) 0 var(--s-4); }
.page h2:first-of-type { margin-top: 0; }
.page p, .page li { color: var(--c-text-2); font-size: var(--t-body-l); max-width: var(--w-prose); }
.page p + p { margin-top: var(--s-4); }
.page ul { display: grid; gap: var(--s-3); }
.page li { padding: var(--s-4) var(--s-5); background: var(--c-glass-1); border: var(--z-edge) solid var(--c-edge); border-radius: var(--r-card); }
.page li strong { color: var(--c-text); font-weight: 600; }
.page code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; color: var(--c-text); }
.page .back { display: inline-flex; align-items: center; min-height: var(--z-target); margin-bottom: var(--s-6); font-weight: 600; text-decoration: none; }
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; position: relative; isolation: isolate; overflow: hidden; }
.notfound .code { font-family: var(--f-display); font-weight: 800; font-size: var(--t-wordmark); line-height: 1; color: var(--c-signal); letter-spacing: 0.06em; }
.notfound p { color: var(--c-text-2); font-size: var(--t-lead); margin: var(--s-4) 0 var(--s-6); }

/* ---------------------------------------------------------------- motion + print */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars, .stars::before, .stars::after, .wordmark__last { animation: none; }
  .wordmark__last { background-position: 50% 0; }
  .shot a, .button, .feature { transition: none; }
}

@media print {
  .site-header, .lightbox, .skip-link { display: none; }
  body { background: none; color: black; }
}

/* balanced wrapping for headings and short lead lines (no widows) */
h1, h2, h3, p { text-wrap: pretty; }
.hero p, .lead { text-wrap: balance; }
.tagline { text-wrap: balance; }
