/*
  One stylesheet, no build step, no web font. A downloaded font is a request to
  someone else's server, and this page is committed to making none.

  Every variant renders through exactly these rules. If a variant needed its own
  styling, the test would have two variables instead of one.
*/

:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --ink: #211d1a;
  --ink-soft: #57504a;
  --line: #e6ded4;
  --accent: #9a4a1f;
  --accent-ink: #ffffff;
  --ok: #1f6b4a;
  --warn: #8a5a00;
  --err: #a02f26;
  --radius: 14px;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140f;
    --surface: #211d18;
    --ink: #f3ece3;
    --ink-soft: #b6aa9d;
    --line: #372f27;
    --accent: #e08a54;
    --accent-ink: #17140f;
    --ok: #6fc79b;
    --warn: #d6a545;
    --err: #e88a80;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

main,
.masthead,
footer {
  max-width: 44rem;
  margin: 0 auto;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
  padding: 2rem 0 0;
}

.wordmark {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.eyebrow {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero {
  padding: 2.5rem 0 1rem;
}

h1 {
  /*
    Fluid down to a size where the longest of the three headlines still holds
    together on a narrow phone. The budget in copy.js is what keeps that
    promise true; this only makes room for it.
  */
  font-size: clamp(2rem, 7.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.subhead {
  margin: 0 0 2rem;
  max-width: var(--measure);
  font-size: 1.1875rem;
  color: var(--ink-soft);
}

h2 {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.4rem;
}

p {
  max-width: var(--measure);
}

/* ---------- form ---------- */

.waitlist {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  max-width: var(--measure);
}

.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

input[type="email"]:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

input[aria-invalid="true"] {
  border-color: var(--err);
}

button {
  flex: 0 0 auto;
  padding: 0.8rem 1.4rem;
  font: inherit;
  font-weight: 650;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

.field-note,
.noscript-note {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin: 0.7rem 0 0;
}

.form-status {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  max-width: var(--measure);
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.form-status[data-tone="success"] {
  border-left-color: var(--ok);
}
.form-status[data-tone="error"] {
  border-left-color: var(--err);
}
.form-status[data-tone="dry-run"] {
  border-left-color: var(--warn);
}
.form-status[data-tone="pending"] {
  border-left-color: var(--ink-soft);
}

.status-heading {
  margin: 0;
  font-weight: 650;
}

.status-body {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

.status-payload {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  overflow-x: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
}

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

.explainer,
.limits,
.status-block {
  padding: 2.5rem 0 0;
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
}

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 46rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  .card p {
    font-size: 0.9875rem;
  }
}

.card {
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card p {
  margin: 0;
  color: var(--ink-soft);
}

.limits ul {
  max-width: var(--measure);
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.limits li + li {
  margin-top: 0.6rem;
}

.status-block p {
  color: var(--ink-soft);
}

.marker {
  display: block;
  height: 1px;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.colophon {
  margin-top: 0.75rem;
  opacity: 0.75;
}

@media (prefers-reduced-motion: no-preference) {
  button {
    transition: filter 120ms ease-out;
  }
}
