/* ============================================================
   DiscPatch — shared styles
   Brand palette (user-approved): mustard gold, sage green,
   warm cream, rust red. Type: Zilla Slab (display, matches the
   DISCPATCH slab-serif wordmark) + Bitter (body).
   ============================================================ */

:root {
  /* primitives */
  --p-cream: oklch(0.905 0.035 93);
  --p-cream-2: #f9ecd4; /* matches the badge/emblem art background exactly */
  --p-sage: oklch(0.485 0.045 150);
  --p-sage-deep: oklch(0.38 0.04 150);
  --p-mustard: oklch(0.72 0.12 85);
  --p-mustard-deep: oklch(0.60 0.115 80);
  --p-rust: oklch(0.50 0.11 45);
  --p-ink: oklch(0.30 0.02 110);
  --p-ink-2: oklch(0.44 0.02 110);

  /* semantics */
  --surface: var(--p-cream);
  --surface-card: var(--p-cream-2);
  --text: var(--p-ink);
  --text-soft: var(--p-ink-2);
  --accent: var(--p-rust);
  --brand: var(--p-sage-deep);
  --gold: var(--p-mustard-deep);

  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Bitter", Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.30 0 0 0 0 0.18 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- layout ---------- */
.page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--surface-card);
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 6px var(--surface-card),
    0 0 0 8px var(--gold),
    0 18px 50px -18px oklch(0.35 0.05 110 / 0.45);
  padding: 48px 44px 36px;
  text-align: center;
  position: relative;
}
@media (max-width: 560px) { .card { padding: 36px 22px 28px; } }

/* ---------- brand header ---------- */
.mark {
  width: 168px;
  margin: 0 auto 18px;
  border-radius: 8px;
}
.mark--small { width: 96px; margin-bottom: 14px; }

.wordmark {
  font-family: "Zilla Slab", "Bitter", serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  letter-spacing: 0.06em;
  color: var(--brand);
  text-transform: uppercase;
  line-height: 1.05;
  text-shadow: 0 2px 0 oklch(0.85 0.03 95);
}

.tagline {
  font-family: "Zilla Slab", serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 10px;
}
.tagline::before, .tagline::after {
  content: "";
  display: inline-block;
  width: 34px; height: 2px;
  background: var(--gold);
  vertical-align: middle;
  margin: 0 12px 3px;
}

/* ---------- copy ---------- */
.blurb {
  margin: 26px auto 0;
  max-width: 56ch;
  color: var(--text);
}
.blurb strong { color: var(--brand); }

.note {
  margin: 18px auto 0;
  max-width: 56ch;
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* ---------- CTA ---------- */
.cta {
  display: inline-block;
  margin-top: 30px;
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--p-cream);
  background: var(--brand);
  border: 2px solid var(--brand);
  border-radius: 10px;
  padding: 14px 34px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--gold);
  transition: transform 160ms ease-out, box-shadow 160ms ease-out, background 160ms ease-out;
}
.cta:hover { background: var(--p-sage); transform: translateY(-2px); box-shadow: 0 6px 0 var(--gold); }
.cta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--gold); }

.microcopy {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* ---------- footer ---------- */
.foot {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px dashed var(--gold);
  font-size: 0.82rem;
  color: var(--text-soft);
}
.foot .creed { font-style: italic; }

/* ---------- entrance motion (never gates content) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 480ms ease-out both; }
  .rise-1 { animation-delay: 70ms; }
  .rise-2 { animation-delay: 140ms; }
  .rise-3 { animation-delay: 210ms; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: none; }
  }
}

/* ============================================================
   Backers page — the Five-Title Form
   ============================================================ */
.form-card { max-width: 700px; text-align: left; }
.form-head { text-align: center; }

.form-title {
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  color: var(--brand);
  line-height: 1.15;
}

.form-intro { margin-top: 14px; font-size: 1rem; }
.form-intro strong { color: var(--brand); }

.pledge-note {
  margin: 18px 0 26px;
  padding: 12px 16px;
  border-left: 4px solid var(--gold);
  background: oklch(0.93 0.04 90);
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.field { margin-top: 20px; }
.field label {
  display: block;
  font-family: "Zilla Slab", serif;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--brand);
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; font-size: 0.82rem; color: var(--text-soft); font-family: "Bitter", serif; }

.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--brand);
  border-radius: 8px;
  padding: 11px 14px;
  transition: border-color 140ms ease-out, box-shadow 140ms ease-out;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px oklch(0.72 0.12 85 / 0.35);
}
.field input[aria-invalid="true"] { border-color: var(--accent); }

.titles-grid {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
.title-row { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; }
.title-num {
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--p-cream);
  background: var(--gold);
  border-radius: 50%;
  width: 44px; height: 44px;
  display: grid; place-items: center;
}

.error-text {
  display: none;
  color: var(--accent);
  font-size: 0.88rem;
  margin-top: 6px;
}
.error-text.show { display: block; }

.submit-btn {
  width: 100%;
  margin-top: 28px;
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--p-cream);
  background: var(--brand);
  border: 2px solid var(--brand);
  border-radius: 10px;
  padding: 16px 24px;
  min-height: 56px;
  box-shadow: 0 4px 0 var(--gold);
  transition: transform 160ms ease-out, box-shadow 160ms ease-out, background 160ms ease-out;
}
.submit-btn:hover { background: var(--p-sage); transform: translateY(-2px); box-shadow: 0 6px 0 var(--gold); }
.submit-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--gold); }
.submit-btn:disabled { opacity: 0.6; transform: none; cursor: wait; }

.form-status {
  margin-top: 16px;
  font-size: 0.95rem;
  text-align: center;
  min-height: 1.4em;
}
.form-status.ok { color: var(--brand); font-weight: 600; }
.form-status.err { color: var(--accent); }

/* success panel replaces the form */
.success-panel { display: none; text-align: center; padding: 20px 0 8px; }
.success-panel.show { display: block; }
.success-panel h2 {
  font-family: "Zilla Slab", serif;
  color: var(--brand);
  font-size: 1.7rem;
  margin-bottom: 12px;
}
.success-panel p { max-width: 52ch; margin: 0 auto 10px; }
.reseed-btn {
  margin-top: 14px;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
