/*
 * Reapers.
 *
 * One visual world, deliberately: a furnace at night. The page commits to dark
 * rather than offering a light twin, so every colour is painted explicitly and
 * nothing borrows a host background.
 *
 * Three colours do all the work. Furnace black is the ground, bone is the ink,
 * and ember is the only accent - it marks burning and nothing else, so when
 * something on this site is orange it is because supply is being destroyed.
 */

:root {
  /* ground */
  --bg:        oklch(0.155 0.012 42);
  --bg-2:      oklch(0.195 0.014 42);
  --surface:   oklch(0.225 0.015 42);
  --line:      oklch(0.315 0.016 42);
  --line-soft: oklch(0.265 0.014 42);

  /* ink */
  --ink:       oklch(0.945 0.008 82);
  --ink-2:     oklch(0.795 0.010 70);
  --ink-3:     oklch(0.660 0.011 62);

  /* the only accent */
  --ember:     oklch(0.700 0.185 46);
  --ember-hi:  oklch(0.790 0.160 58);
  --ember-dim: oklch(0.430 0.105 44);
  --ember-wash: oklch(0.255 0.045 44);

  --ok:        oklch(0.760 0.130 155);

  --disp: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --body: Archivo, ui-sans-serif, system-ui, sans-serif;
  --mono: "Roboto Mono", ui-monospace, SFMono-Regular, monospace;

  --step--1: clamp(0.80rem, 0.77rem + 0.14vw, 0.875rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.125rem);
  --step-1:  clamp(1.27rem, 1.18rem + 0.42vw, 1.52rem);
  --step-2:  clamp(1.60rem, 1.43rem + 0.85vw, 2.05rem);
  --step-3:  clamp(2.03rem, 1.72rem + 1.55vw, 2.77rem);
  --step-4:  clamp(2.57rem, 2.03rem + 2.70vw, 3.74rem);
  --step-5:  clamp(3.25rem, 2.28rem + 4.85vw, 5.05rem);

  --gap:  clamp(1rem, 0.7rem + 1.4vw, 1.75rem);
  --band: clamp(4rem, 2.4rem + 7vw, 8.5rem);
  --edge: clamp(1.15rem, 0.6rem + 2.6vw, 3rem);

  --out: cubic-bezier(0.22, 1, 0.36, 1);

  /* dropdown 10, sticky 20, backdrop 30, modal 40, toast 50 */
  --z-sticky: 20;
  --z-toast: 50;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--disp); font-weight: 400; line-height: 1.02; letter-spacing: -0.028em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.018em; }
p { margin: 0; text-wrap: pretty; }

a { color: var(--ink); text-decoration-color: color-mix(in oklch, var(--ember) 60%, transparent); text-underline-offset: 0.22em; }
a:hover { color: var(--ember-hi); }

:focus-visible { outline: 2px solid var(--ember-hi); outline-offset: 3px; border-radius: 2px; }

.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus {
  position: fixed; inset: 0.6rem auto auto 0.6rem; z-index: var(--z-toast);
  background: var(--ember); color: oklch(0.16 0.01 42); padding: 0.6rem 1rem;
  font-weight: 600; border-radius: 3px;
}

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.dim { color: var(--ink-3); }

/* ── shell ────────────────────────────────────────────────────────── */

.wrap { width: min(74rem, 100% - var(--edge) * 2); margin-inline: auto; }
.wrap.narrow { width: min(46rem, 100% - var(--edge) * 2); }

.band { padding-block: var(--band); }
.band-flush { padding-bottom: calc(var(--band) * 0.6); }
.band + .band { border-top: 1px solid var(--line-soft); }
.band-ember { background: var(--bg-2); border-top: 1px solid var(--line); }

.std { color: var(--ink-2); max-width: 68ch; margin-top: 1.1rem; }
.big { font-size: var(--step-2); font-family: var(--disp); line-height: 1.14; letter-spacing: -0.022em; margin-top: 1.4rem; max-width: 20ch; }
.foot { color: var(--ink-3); font-size: var(--step--1); margin-top: 1.6rem; }
.aside {
  margin-top: 2.4rem; padding: 1.1rem 1.3rem;
  border: 1px solid var(--line); border-radius: 4px;
  color: var(--ink-2); font-size: var(--step--1); max-width: 62ch;
  background: color-mix(in oklch, var(--surface) 55%, transparent);
}

/* ── nav ──────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: var(--gap);
  padding: 0.85rem var(--edge);
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.mark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--disp); font-size: 1.06rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  text-decoration: none; color: var(--ink); flex: 0 0 auto;
}
.mark svg { color: var(--ember); }
.nav nav { display: flex; gap: clamp(0.7rem, 1.6vw, 1.5rem); margin-inline-start: auto; flex-wrap: wrap; }
.nav nav a {
  font-size: var(--step--1); color: var(--ink-2); text-decoration: none;
  padding-block: 0.25rem; border-bottom: 1px solid transparent;
  transition: color 0.18s var(--out), border-color 0.18s var(--out);
}
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ember); }
@media (max-width: 60rem) {
  .nav { flex-wrap: wrap; }
  .nav nav { order: 3; width: 100%; margin-inline-start: 0; justify-content: flex-start; overflow-x: auto; }
  .nav .btn-sm { margin-inline-start: auto; }
}

/* ── buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--body); font-weight: 600; font-size: var(--step-0);
  padding: 0.8rem 1.5rem; border-radius: 3px; border: 1px solid var(--ember);
  background: var(--ember); color: oklch(0.16 0.012 42);
  text-decoration: none; cursor: pointer;
  transition: background 0.18s var(--out), color 0.18s var(--out), transform 0.18s var(--out);
}
.btn:hover { background: var(--ember-hi); border-color: var(--ember-hi); color: oklch(0.16 0.012 42); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-3); color: var(--ink); }
.btn-sm { padding: 0.5rem 0.95rem; font-size: var(--step--1); }
.btn-lg { padding: 1rem 2.1rem; font-size: var(--step-1); }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--surface); border-color: var(--line); color: var(--ink-3);
  cursor: not-allowed; transform: none;
}

/* ── hero ─────────────────────────────────────────────────────────── */

.hero { position: relative; padding: clamp(3.5rem, 2rem + 8vw, 8rem) var(--edge) clamp(3rem, 2rem + 4vw, 5rem); overflow: hidden; }
#embers { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 50% 118%, var(--ember-wash) 0%, transparent 62%);
}
.hero-in { position: relative; z-index: 1; width: min(74rem, 100%); margin-inline: auto; }
.hero h1 { font-size: var(--step-5); letter-spacing: -0.045em; }
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 38ch; margin-top: 1.3rem; line-height: 1.45; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.2rem; }

.meters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1px; margin: 3.4rem 0 0; background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: 4px; overflow: hidden;
}
.meters > div { background: var(--bg); padding: 1rem 1.15rem; }
.meters dt { font-size: var(--step--1); color: var(--ink-3); }
.meters dd { margin: 0.35rem 0 0; font-size: var(--step-2); font-family: var(--mono); letter-spacing: -0.04em; }
.meters dd span { font-size: var(--step--1); color: var(--ink-3); letter-spacing: 0; }

.scroll-hint {
  position: relative; z-index: 1; margin: 3rem auto 0; width: min(74rem, 100%);
  font-size: var(--step--1); color: var(--ink-3); letter-spacing: 0.04em;
}

/* ── the loop ─────────────────────────────────────────────────────── */

/* Numbered because it genuinely is a cycle and the order carries the argument:
   fees have to arrive before anything can be bought with them. */
.loop { list-style: none; counter-reset: step; padding: 0; margin: 3rem 0 0; display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 4px; overflow: hidden; }
@media (min-width: 56rem) { .loop { grid-template-columns: repeat(4, 1fr); } }
.loop li { counter-increment: step; background: var(--bg); padding: 1.6rem 1.4rem 1.75rem; position: relative; }
.loop li::before {
  content: counter(step); font-family: var(--mono); font-size: var(--step--1);
  color: var(--ember); display: block; margin-bottom: 0.9rem;
}
.loop li:last-child::after {
  content: "loops"; position: absolute; right: 1.4rem; top: 1.55rem;
  font-family: var(--mono); font-size: 0.7rem; color: var(--ember-dim); letter-spacing: 0.06em;
}
.loop p { color: var(--ink-2); font-size: var(--step--1); margin-top: 0.5rem; }

/* ── tables ───────────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; margin-top: 2.4rem; border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 34rem; }
thead th {
  text-align: left; font-family: var(--body); font-weight: 600; color: var(--ink-3);
  padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody th, tbody td { padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line-soft); }
tbody th { text-align: left; font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr.top { background: color-mix(in oklch, var(--ember-wash) 55%, transparent); }
tbody tr.top td:nth-child(3) { color: var(--ember-hi); }
td.num, th.num { text-align: right; }

/* ── two column ───────────────────────────────────────────────────── */

.two { display: grid; gap: var(--gap); margin-top: 3rem; }
@media (min-width: 52rem) { .two { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); } }
.two h3 { margin-bottom: 0.7rem; }
.two p { color: var(--ink-2); }
.two p + p { margin-top: 0.9rem; }
.two-wide { margin-top: 2.4rem; }

/* ── art rail ─────────────────────────────────────────────────────── */

.strip { margin-top: 2.8rem; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.rail { display: flex; gap: 0.75rem; list-style: none; padding: 0; margin: 0; width: max-content; animation: slide 64s linear infinite; }
.rail img { width: clamp(8rem, 15vw, 12rem); height: auto; display: block; border-radius: 3px; image-rendering: pixelated; border: 1px solid var(--line); background: #000; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .rail { animation: none; width: 100%; overflow-x: auto; }
  .strip { mask-image: none; -webkit-mask-image: none; }
}

/* ── the fifteen ──────────────────────────────────────────────────── */

.ones { list-style: none; padding: 0; margin: 2.8rem 0 0; display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.ones li { position: relative; }
/* Browsers give <figure> a default margin of 1em 40px. Left alone it ate half
   of every cell and rendered the fifteen at about a third of their size. */
.ones figure { margin: 0; }
.ones img { width: 100%; height: auto; display: block; border-radius: 3px; image-rendering: pixelated; border: 1px solid var(--line); background: #000; transition: border-color 0.2s var(--out); }
.ones li:hover img { border-color: var(--ember); }
.ones figcaption, .ones .cap { display: block; margin-top: 0.5rem; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }

/* ── mint ─────────────────────────────────────────────────────────── */

.mint { text-align: left; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 1px; margin: 2.4rem 0; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 4px; overflow: hidden; }
.facts > div { background: var(--bg); padding: 1rem 1.1rem; }
.facts dt { font-size: var(--step--1); color: var(--ink-3); }
.facts dd { margin: 0.3rem 0 0; font-size: var(--step-1); font-family: var(--mono); letter-spacing: -0.03em; }

/* ── footer ───────────────────────────────────────────────────────── */

.foot-bar {
  border-top: 1px solid var(--line-soft); padding: 2.5rem var(--edge);
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; align-items: baseline;
  font-size: var(--step--1);
}
.foot-bar p:first-child { font-family: var(--disp); letter-spacing: -0.02em; }

/* ── page load ────────────────────────────────────────────────────── */

/* Content is visible by default and the reveal only sharpens it, so a headless
   render or a background tab never ships a blank section. */
/* Starts at 0.45 opacity, never at 0. A reveal that begins fully transparent
   ships a blank section to anything that does not run the animation to
   completion: a background tab, a headless screenshot, a link preview bot. */
.rise { animation: rise 0.7s var(--out); }
@keyframes rise { from { opacity: 0.45; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }
