/* Reel Digest waitlist — "Quiet Ledger" design system.
   Sibling of the app's library/detail screens: calm, editorial, low-chrome,
   light mode only. Mobile-first; design target is a ~390px in-app webview
   (TikTok / Instagram browsers). No framework; Newsreader is the one external
   asset (Google Fonts, loaded in index.html with font-display: swap). */

:root {
  /* Colors */
  --bg: #F7F5F1;                 /* warm paper */
  --surface: #FFFFFF;
  --ink: #201D18;                /* primary text */
  --secondary: #5C564B;
  --muted: #8A8578;
  --faint: #B5AFA3;
  --hairline: rgba(32, 29, 24, 0.10);
  --hairline-strong: rgba(32, 29, 24, 0.14);
  --accent: #2F7A57;             /* the only accent */
  --accent-tint: #E9F1EB;
  --accent-ink: #25543E;         /* dark green text on tint */
  --red: #B3261E;                /* RESERVED: red-flag ⚠ only, nowhere else */

  /* Shape */
  --radius-card: 16px;
  --radius-field: 12px;
  --radius-thumb: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 14px 34px rgba(32, 29, 24, 0.10);
  --gutter: 22px;
  --maxw: 460px;

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) calc(40px + env(safe-area-inset-bottom));
}

section { padding: 30px 0; }

h1, h2 { font-family: var(--serif); font-optical-sizing: auto; margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Honeypot: in the DOM for bots, invisible + unfocusable for humans. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Shared section label — 12px/600 uppercase, tracking .06em. */
.section-label {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Green-tint chip/pill. */
.chip {
  display: inline-block;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-tint);
  border-radius: var(--radius-pill);
}

/* ---------- Hero ---------- */
.hero { padding-top: calc(34px + env(safe-area-inset-top)); }

.wordmark {
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0 0 14px;
  font-size: 32px;
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.subhead {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--secondary);
}
.subhead-aside { color: var(--muted); }

/* ---------- Signup form ---------- */
.signup { display: flex; flex-direction: column; gap: 12px; }

.signup input[type="email"] {
  width: 100%;
  padding: 15px 16px;
  font-size: 16px;                 /* >=16px stops iOS zoom-on-focus */
  font-family: var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-field);
  appearance: none;
}
.signup input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.signup input[type="email"]::placeholder { color: var(--faint); }

.cf-turnstile { min-height: 0; }

#submit-btn {
  width: 100%;
  padding: 15px 16px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--sans);
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
#submit-btn:disabled { opacity: 0.55; cursor: default; }

.microcopy {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.status {
  margin: 4px 0 0;
  font-size: 14px;
  min-height: 1.2em;
}
.status.ok  { color: var(--accent-ink); font-weight: 500; }
/* Errors must read as a system message, not page copy — but never red
   (red is red-flags only). Gray-tint box, same family as the Skippable badge. */
.status.err {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  background: #EDEAE3;
  border: 1px solid var(--hairline);
  color: #6E6659;
  font-weight: 500;
}

/* ---------- Proof: digest card ---------- */
.proof-caption {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}

.digest-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px 20px;
}

.digest-title {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--ink);
  margin: 14px 0 8px;
}

.digest-takeaway {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.4;
  color: #3D3830;
  margin: 0 0 20px;
}

.digest-actions {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.digest-actions li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--ink);
}
.digest-actions li.done span:last-child {
  color: var(--muted);
  text-decoration: line-through;
}

/* 23px circle checkbox — unchecked 2px hairline; done = solid green + white check. */
.check {
  flex: 0 0 auto;
  width: 23px; height: 23px;
  border-radius: 50%;
  border: 2px solid rgba(32, 29, 24, 0.20);
  margin-top: 1px;
}
.done .check {
  border-color: var(--accent);
  background: var(--accent);
  position: relative;
}
.done .check::after {
  content: "";
  position: absolute;
  left: 7px; top: 3px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Red-flag line — the ONLY red on the page (⚠ mark only). */
.digest-flag {
  margin: 0;
  padding-top: 15px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  line-height: 1.45;
  color: var(--secondary);
}
.flag-mark { color: var(--red); font-weight: 700; }

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.step-n {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-tint);
  border-radius: 50%;
}

/* ---------- Footer ---------- */
footer {
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.back-to-top {
  display: inline-block;
  margin-bottom: 18px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  border-radius: var(--radius-pill);
}
.footer-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 12px; }
.footer-links a { color: var(--secondary); font-size: 14px; text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-note { margin: 0; font-size: 13px; color: var(--faint); }

/* ---------- Privacy page reuses the type scale ---------- */
.prose p { font-size: 16px; line-height: 1.55; color: var(--secondary); margin: 0 0 16px; }
.prose a { color: var(--accent-ink); }

/* ---------- Wider screens (mobile-first; this just eases the type up a touch) ---------- */
@media (min-width: 640px) {
  h1 { font-size: 38px; }
}
