:root {
  --paper: oklch(0.985 0.006 70);
  --paper-sunk: oklch(0.968 0.008 70);
  --ink: oklch(0.205 0.025 258);
  --ink-soft: oklch(0.42 0.022 258);
  --muted: oklch(0.60 0.018 258);
  --line: oklch(0.87 0.018 70);
  --coral: oklch(0.71 0.205 35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
}

.sheet {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 clamp(1.25rem, 4.5vw, 4rem);
  max-width: 1680px;
  margin: 0 auto;
}

/* ── rails ─────────────────────────────────────────── */

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.1rem, 2.4vw, 1.7rem) 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
}

.foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.wordmark {
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
}

.contact {
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.contact:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.quiet {
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: -0.02em;
}

/* ── body ──────────────────────────────────────────── */

.body {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2.5rem, 7vh, 6rem) 0;
}

.say {
  max-width: 22ch;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5.9vw, 5.1rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.042em;
  text-wrap: balance;
}

.lede {
  margin: clamp(1.5rem, 3vh, 2.25rem) 0 0;
  max-width: 34ch;
  font-size: clamp(1rem, 1.15vw, 1.125rem);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.claim {
  margin: clamp(1.4rem, 2.8vh, 2rem) 0 0;
  font-size: clamp(1.0625rem, 1.3vw, 1.3125rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--ink);
}

.claim::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: 1px;
  margin-bottom: clamp(1.25rem, 2.4vh, 1.75rem);
  background: var(--coral);
}

/* ── instrument ────────────────────────────────────── */

.instrument {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
}

#scene {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 68vh;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
}

figcaption {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: "Martian Mono", ui-monospace, monospace;
  font-size: 0.625rem;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.key {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.dot.observed { background: var(--ink); }
.dot.estimated { background: var(--coral); }

.readout {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

/* ── entrance ──────────────────────────────────────── */

.line {
  opacity: 0;
  transform: translateY(0.75rem);
  animation: rise 1.1s var(--ease) forwards;
  animation-delay: calc(var(--i) * 130ms + 120ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── narrow ────────────────────────────────────────── */

@media (max-width: 900px) {
  .body {
    grid-template-columns: 1fr;
    align-items: start;
    gap: clamp(2.25rem, 6vh, 3.25rem);
    padding: clamp(2.25rem, 5vh, 3.5rem) 0;
  }

  .say { max-width: 18ch; }

  h1 { font-size: clamp(2.375rem, 10.5vw, 3.75rem); }

  .lede,
  .claim { max-width: 46ch; }

  #scene {
    aspect-ratio: 3 / 2;
    max-height: 44vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .line {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .contact { transition: none; }
}
