/* WDBFT shared editorial system — black, warm cream, burnt orange. */
:root {
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
  --radius-full: 999px;
  --header-h: 64px;
  --ease: cubic-bezier(.2,.7,.2,1);

  /* Light (warm cream) */
  --bg: #f4ede1;
  --surface: #faf5ec;
  --surface-2: #ece3d3;
  --line: rgba(40,26,12,.14);
  --text: #1b1612;
  --muted: #5b5047;
  --accent: #a9461a;        /* 5.6:1 on cream */
  --accent-strong: #8c3912;
  --on-accent: #fffaf2;
  --accent-soft: rgba(169,70,26,.10);
  --focus: #1b1612;
  --error: #9e2a1c;
  --ok: #2f6b45;
}
[data-theme="dark"] {
  --bg: #100e0c;
  --surface: #181513;
  --surface-2: #221e1a;
  --line: rgba(244,237,225,.12);
  --text: #f1e9dc;
  --muted: #b5aa9b;
  --accent: #e8834f;        /* 6.9:1 on near-black */
  --accent-strong: #f29a6a;
  --on-accent: #1b0f08;
  --accent-soft: rgba(232,131,79,.12);
  --focus: #f6d2b6;
  --error: #ff9b8a;
  --ok: #8fd0a6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; font-weight: 700; letter-spacing: -.01em; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.on-black :focus-visible, .hero :focus-visible { outline-color: #f6d2b6; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
.wrap-narrow { max-width: 760px; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: var(--header-h); }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px;
  text-decoration: none; color: var(--text);
}
.brand-mark {
  width: 32px; height: 32px; flex-shrink: 0; color: var(--text);
}
.brand-mark i { color: #e8834f; font-style: italic; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-family: var(--font-display); font-weight: 900; font-size: 1rem; }
.brand-sub { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
@media (max-width: 479px) { .brand-sub { display: none; } }
.header-actions { display: flex; align-items: center; gap: 4px; }
.header-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-weight: 600; font-size: .9375rem; color: var(--text); text-decoration: none; border-radius: 10px;
}
.header-link:hover { background: var(--accent-soft); }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 1px solid transparent; border-radius: 50%; color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--line); }
.header-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; margin-left: 4px;
  background: var(--accent); color: var(--on-accent); border-radius: var(--radius-full);
  font-weight: 700; font-size: .9375rem; text-decoration: none; white-space: nowrap;
}
.header-cta:hover { background: var(--accent-strong); }
@media (max-width: 379px) {
  .brand-text { display: none; }
  .back svg { display: none; }
  .header-link { padding: 0 8px; }
  .header-cta { padding: 0 12px; font-size: .875rem; }
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-full);
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-line { background: transparent; color: var(--text); border-color: var(--line); }
.btn-line:hover { border-color: var(--muted); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ── Type helpers ───────────────────────────────────── */
.eyebrow { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 14px; }
.lede { font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); color: var(--muted); max-width: 56ch; }
.section { padding-block: clamp(64px, 10vw, 112px); }
.section h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); margin-bottom: 18px; max-width: 20ch; }
.section h2 em { color: var(--accent); }
.rule { border: 0; border-top: 1px solid var(--line); }

/* ── Signup form (shared) ───────────────────────────── */
.signup-form { width: 100%; max-width: 520px; }
.field-label { display: block; font-weight: 700; font-size: .9375rem; margin-bottom: 8px; }
.field-row { display: flex; gap: 10px; }
.field-input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 18px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 1rem;
}
.field-input::placeholder { color: var(--muted); opacity: .8; }
.field-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--accent); }
.field-input[aria-invalid="true"] { border-color: var(--error); }
.field-hint { font-size: .875rem; color: var(--muted); margin-top: 10px; }
.field-error { font-size: .9375rem; font-weight: 600; color: var(--error); margin-top: 10px; }
.field-error:empty { display: none; }
.signup-done {
  border: 1.5px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface);
  border-radius: 12px; padding: 18px 20px; max-width: 520px;
}
.signup-done:focus { outline: none; }
.signup-done:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.signup-done strong { display: block; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25; margin-bottom: 6px; }
.signup-done p { color: var(--muted); font-size: .9375rem; }
.signup-done a { color: var(--accent); font-weight: 700; }
@media (max-width: 520px) { .field-row { flex-direction: column; } .field-row .btn { width: 100%; } }

/* dark ground variant (hero / black panels) */
.on-black { --surface: #1b1714; --line: rgba(244,237,225,.22); --text: #f4ede1; --muted: #c4b8a8;
  --accent: #e8834f; --accent-strong: #f29a6a; --on-accent: #1b0f08; --error: #ffab9b; --focus: #f6d2b6; color: var(--text); }

/* ── Footer ─────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px; font-size: .9375rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; }
.footer-brand { font-family: var(--font-display); font-weight: 900; font-size: 1.125rem; }
.footer-brand em { font-style: normal; color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 4px; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.footer-note { color: var(--muted); max-width: 60ch; font-size: .875rem; margin-top: 18px; }
.footer-note a { color: var(--text); }

/* ── Episode preparation view ────────────────────────── */
.ep-prep-link { text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ep-prep-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.prep-main { min-height: calc(100dvh - var(--header-h)); display: flex; flex-direction: column; }
.prep-content { width: 100%; margin-block: auto; padding-block: clamp(72px, 12vw, 148px); }
.prep-content h1 { max-width: 17ch; font-size: clamp(2.25rem, 1.4rem + 4.1vw, 4.75rem); }
.prep-status { display: inline-flex; align-items: center; min-height: 32px; padding: 3px 12px; margin-block: 28px 18px; border: 1px solid var(--line); border-radius: var(--radius-full); color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.prep-note { max-width: 54ch; color: var(--muted); font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); }
.prep-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.prep-actions a { min-height: 48px; }
