/* ==========================================================================
   theomelasprize.com — The Omelas Prize (2026-09-21, v3)
   Beige, editorial, sharp. A grotesk headline on the left, the pitch and two arrow
   buttons on the right, then a framed panel of dithered static — dark brown on cream —
   drawn by an inline SVG filter (turbulence + threshold), with the two facts in its corner.
   No JavaScript, no image files.
   Body/Display: Manrope · Essay copy: Source Serif 4 · Labels: DM Mono (Google Fonts).
   ========================================================================== */

:root {
  --background: oklch(93% 0.02 85);
  --surface: oklch(95.5% 0.016 85);
  --foreground: oklch(22% 0.025 60);
  --muted-foreground: oklch(48% 0.02 60);
  --border: oklch(78% 0.025 80);
  --border-strong: oklch(40% 0.03 60);
  --accent: oklch(58% 0.11 88);
  --accent-bright: oklch(77% 0.13 88);
  --panel-ink: oklch(24% 0.03 55);
  --panel-cream: oklch(92% 0.02 85);

  --font-sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 1.25rem;
  --wide: 84rem;
  --measure: 40rem;
}
@media (min-width: 640px) { :root { --gutter: 2.5rem; } }

* { 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(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:where(a, [tabindex]):focus-visible { outline: 2px solid var(--foreground); outline-offset: 3px; border-radius: 2px; }
.arrow { display: inline-block; margin-left: 0.35em; font-weight: 500; transition: transform 150ms ease; }
a:hover .arrow { transform: translate(2px, -2px); }

.skip-link {
  position: fixed; top: 12px; left: 16px; z-index: 100;
  padding: 10px 14px; border-radius: 999px; background: var(--foreground); color: var(--background);
  font-size: 13px; text-decoration: none; transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

/* ---------------------------------------------------------------- Top bar
   Wordmark left; the deadline and the one door to the form on the right. */
.topbar {
  max-width: var(--wide); margin: 0 auto; padding: 1.1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; text-decoration: none; }
.topbar-nav { display: flex; align-items: center; gap: 1.25rem; }
.topbar-deadline { font-size: 0.92rem; color: var(--muted-foreground); }
.topbar-deadline strong { font-weight: 600; color: var(--foreground); }
@media (max-width: 640px) { .topbar-deadline { display: none; } }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 1.1rem; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn--solid { background: var(--foreground); color: var(--background); }
.btn--solid:hover { background: oklch(30% 0.03 60); }
.btn--outline { background: var(--surface); color: var(--foreground); border: 1px solid var(--border-strong); }
.btn--outline:hover { background: var(--foreground); color: var(--background); border-color: var(--foreground); }
.btn--lg { min-height: 52px; padding: 0 1.5rem; font-size: 1.02rem; }
.textlink { font-weight: 600; font-size: 1.02rem; text-decoration: none; }
.textlink:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- Hero */
.hero { max-width: var(--wide); margin: 0 auto; padding: 4rem var(--gutter) 3rem; }
@media (min-width: 900px) { .hero { padding-top: 5.5rem; } }

.hero-grid { display: grid; gap: 2rem; align-items: end; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.8fr); gap: 4rem; align-items: center; } }
.hero-title {
  margin: 0; font-family: var(--font-sans); font-weight: 500;
  font-size: clamp(2.7rem, 7.6vw, 5.9rem); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance;
}
.hero-aside { max-width: 30rem; }
@media (min-width: 900px) { .hero-aside { justify-self: end; } }
.hero-lede { margin: 0; font-size: 1.15rem; line-height: 1.5; color: var(--muted-foreground); text-wrap: pretty; }
.hero-lede strong { font-weight: 600; color: var(--foreground); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 1.75rem; }

/* The dithered panel */
.field-wrap { position: relative; margin-top: 3.5rem; }
.field {
  position: relative; border: 1px solid var(--border-strong);
  aspect-ratio: 16 / 7; min-height: 320px; max-height: 720px; overflow: hidden;
  background: var(--panel-cream);
}
@media (max-width: 640px) { .field { aspect-ratio: 4 / 5; } }
.field-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.field-stats {
  position: absolute; right: 0; bottom: 0; margin: 0; padding: 0 2.25rem 2.25rem 0;
  display: grid; grid-template-columns: repeat(3, minmax(10rem, 13.5rem)); gap: 2rem;
  color: var(--panel-cream);
}
.stat { border-top: 1px solid color-mix(in oklab, var(--panel-cream) 55%, transparent); padding-top: 1.75rem; }
.stat dt { margin: 0; font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.15rem); letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.stat dd { margin: 1.1rem 0 0; font-size: 0.92rem; line-height: 1.45; color: color-mix(in oklab, var(--panel-cream) 85%, transparent); text-wrap: pretty; }
@media (max-width: 640px) {
  /* the panel is tall and the dark corner small at phone width: the facts sit under it instead */
  .field-stats { position: static; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1.25rem; padding: 1.5rem 0 0; color: var(--foreground); }
  .stat { border-top-color: var(--border-strong); padding-top: 1rem; }
  .stat dd { color: var(--muted-foreground); }
}

/* ---------------------------------------------------------------- Body sections
   Same width as the hero. Each section is a two-column editorial row: the mono label on the
   left, the copy on the right at a readable measure. */
.section {
  position: relative; max-width: var(--wide); margin: 0 auto; padding: 4rem var(--gutter);
  display: grid; gap: 1.5rem 4rem;
}
/* the rule sits inside the gutters, flush with the hero's panel */
.section::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--border); }
@media (min-width: 900px) { .section { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); padding-block: 5.5rem; } }
.section-body { max-width: var(--measure); }
.section-title {
  margin: 0; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-foreground); padding-top: 0.4rem;
}

.questions { margin-top: 1.5rem; }
.thesis-copy { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.5; }
.thesis-copy p { margin: 0 0 1.4rem; text-wrap: pretty; }
.thesis-copy p:last-child { margin-bottom: 0; }
.thesis-copy mark {
  background: linear-gradient(transparent 62%, color-mix(in oklab, var(--accent-bright) 60%, transparent) 62%);
  color: inherit; padding: 0 0.05em;
}
@media (min-width: 640px) { .thesis-copy { font-size: 1.5rem; } }

.questions-lede { margin: 0 0 2.25rem; font-size: 1.2rem; line-height: 1.5; text-wrap: pretty; }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; }
.q { display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; padding: 1.35rem 0; border-top: 1px solid var(--border); }
.q:last-child { border-bottom: 1px solid var(--border); }
.q-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); padding-top: 0.55rem; }
.q-text { grid-column: 2; margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.25; text-wrap: balance; }
.q-sub { display: block; margin-top: 0.45rem; font-family: var(--font-sans); font-weight: 400; font-size: 0.95rem; line-height: 1.45; color: var(--muted-foreground); }
.questions-fine { margin: 2rem 0 1.75rem; color: var(--muted-foreground); text-wrap: pretty; }

.close { padding-bottom: 6rem; }
@media (min-width: 640px) { .close { padding-bottom: 8rem; } }
.close-title {
  margin: 0 0 2rem; font-family: var(--font-sans); font-weight: 500;
  font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance;
}
.close-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.close-note { font-size: 0.92rem; color: var(--muted-foreground); }

/* ---------------------------------------------------------------- Footer
   The one place the address lives. */
.footer { padding: 2rem var(--gutter) 2.5rem; border-top: 1px solid var(--border); text-align: center; }
.footer-line { margin: 0; font-size: 0.9rem; }
.footer-line a { text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.footer-line a:hover { border-bottom-color: var(--accent); }
.footer-line--quiet { margin-top: 0.6rem; font-size: 0.8rem; color: var(--muted-foreground); }
