:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #565a63;
  --line: #e2dfd9;
  --accent: #b2401f;
  --accent-hover: #8f3217;
  --on-accent: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114;
    --surface: #171a1f;
    --text: #ece9e4;
    --muted: #a5a9b2;
    --line: #2b2f36;
    --accent: #f0896a;
    --accent-hover: #f6a58b;
    --on-accent: #1a0e08;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

.wrap { width: 100%; max-width: 70rem; margin-inline: auto; padding-inline: 1.25rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--text); color: var(--bg); padding: .6rem 1rem;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand { display: inline-flex; align-items: center; min-height: 2.75rem; }
.brand img { display: block; height: 2.25rem; width: auto; }
.lang { display: flex; align-items: center; gap: .25rem; color: var(--muted); font-size: .9rem; }
.lang button {
  font: inherit; letter-spacing: .06em; color: var(--muted); background: none; border: 0;
  padding: .5rem .5rem; min-width: 2.75rem; min-height: 2.75rem; cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--text); font-weight: 700; }
.lang button:hover { color: var(--text); }

/* Hero */
.hero { display: grid; gap: 3.5rem; padding-block: clamp(3rem, 9vw, 7rem); }
.eyebrow {
  color: var(--accent); font-size: .85rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.25rem;
}
h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.5rem, 1.2rem + 6vw, 4.75rem);
  line-height: 1.04; letter-spacing: -.025em; text-wrap: balance;
}
.lede { margin-top: 1.5rem; max-width: 34rem; font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); line-height: 1.45; }
.note { margin-top: 1rem; color: var(--muted); font-size: .95rem; }

/* Form */
.waitlist { margin-top: 2.25rem; max-width: 34rem; }
.field { display: flex; flex-wrap: wrap; gap: .75rem; }
.field input[type="email"] {
  flex: 1 1 14rem; min-width: 0; min-height: 3.25rem; padding: .75rem 1rem;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--muted); border-radius: 4px;
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input[aria-invalid="true"] { border-color: var(--accent); border-width: 2px; }
.field input:disabled { opacity: .6; }
.field button {
  flex: 1 1 auto; min-height: 3.25rem; padding: .75rem 1.5rem;
  font: inherit; font-weight: 700; letter-spacing: .01em;
  color: var(--on-accent); background: var(--accent);
  border: 0; border-radius: 4px; cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.field button:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
.field button:active:not(:disabled) { transform: none; }
.field button:disabled { opacity: .65; cursor: progress; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.6rem; margin-top: .75rem; font-weight: 600; }
.status[data-kind="error"] { color: var(--accent); }
.status[data-kind="ok"] { color: var(--text); }
.status[data-kind="ok"]::before { content: "✓ "; color: var(--accent); }

/* Illustration */
.art { margin: 0; max-width: 28rem; width: 100%; justify-self: center; }
.art svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.svg-label { fill: var(--muted); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.card { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.card.hot { stroke: var(--accent); }
.ink-soft { fill: var(--line); }
.bar { fill: var(--muted); }
.link { stroke: var(--line); stroke-width: 2; fill: none; }
.hot-link { stroke: var(--accent); stroke-dasharray: 4 5; }
.gap { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 4; }
.tag { fill: var(--accent); }
.tag-text { fill: var(--on-accent); font-size: 15px; font-weight: 700; }
.pulse { fill: var(--on-accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* Sections */
.block { border-top: 1px solid var(--line); padding-block: clamp(4rem, 10vw, 8rem); }
h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.25rem);
  line-height: 1.1; letter-spacing: -.02em; text-wrap: balance;
}
.split { display: grid; gap: 2rem; }
.prose { display: grid; gap: 1.25rem; max-width: 36rem; font-size: 1.2rem; line-height: 1.5; }
.prose .stress { font-family: var(--serif); font-size: 1.6rem; line-height: 1.3; font-weight: 600; }

.points { list-style: none; counter-reset: pt; margin: 3rem 0 0; padding: 0; display: grid; gap: 2.5rem; }
.points li { counter-increment: pt; border-top: 2px solid var(--text); padding-top: 1.25rem; }
.points li::before {
  content: "0" counter(pt); display: block; margin-bottom: 1rem;
  color: var(--accent); font-weight: 700; font-size: .9rem; letter-spacing: .12em;
}
h3 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; margin-bottom: .6rem; }
.points p { color: var(--muted); }

.closing { background: var(--surface); }
.closing .lede { margin-top: 1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--muted); font-size: .95rem; }
.foot { display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
.site-footer a { text-underline-offset: 3px; }
.site-footer a:hover { color: var(--text); }

@media (min-width: 48rem) {
  .wrap { padding-inline: 2rem; }
  .field button { flex: 0 0 auto; }
  .points { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
}
@media (min-width: 62rem) {
  .hero { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 5rem; }
}

/* Motion */
.motion .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.motion .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion .reveal { opacity: 1; transform: none; transition: none; }
  .pulse { animation: none; }
  .field button { transition: none; }
  .field button:hover:not(:disabled) { transform: none; }
}

/* Copy is filled in by app.js; keep it hidden until then so layout does not shift. */
html:not(.ready) main { visibility: hidden; }
