/* ==========================================================================
   The Four Steps quiz — Neuma editorial.
   Design language matches neumacreative.com (/Neuma Website/styles.css):
   Meno Banner headlines, Red Hat Display body, warm white ground with
   near-black ink moments (the cover and the closing CTA), copper as a
   signal color only. Mobile-first.
   ========================================================================== */

/* ---- The real headline font, self-hosted (same files as the site) ---- */
@font-face {
  font-family: 'Meno Banner';
  src: url('assets/fonts/meno-banner-light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Meno Banner';
  src: url('assets/fonts/meno-banner-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Meno Banner';
  src: url('assets/fonts/meno-banner-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Meno Banner';
  src: url('assets/fonts/meno-banner-semibold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --bg:        #FDFDFC;
  --ink:       #1A1917;
  --ink-2:     #262423;
  --ink-soft:  #3A3733;
  --muted:     #7A756F;
  --accent:    #B5673A;
  --accent-deep: #9C5530;
  --accent-tint: #F8F1EA;   /* warm copper-tinted panel ground */
  --cream:     #F7F6F3;
  --cream-70:  rgba(247, 246, 243, 0.7);
  --cream-55:  rgba(247, 246, 243, 0.55);
  --line:      rgba(26, 25, 23, 0.12);
  --line-soft: rgba(26, 25, 23, 0.07);
  --line-dark: rgba(247, 246, 243, 0.16);
  --card:      #FFFFFF;

  --font-serif: 'Meno Banner', Georgia, serif;
  --font-sans:  'Red Hat Display', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --maxw: 640px;
  --pad-x: clamp(22px, 6vw, 44px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quint */
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  transition: background 0.5s ease;
}
/* the cover runs dark; everything after runs on warm white */
body.dark { background: var(--ink); color: var(--cream); }

/* ---------- shell ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.spine {
  flex: 1;
  width: 100%;
  max-width: calc(var(--maxw) + var(--pad-x) * 2);
  margin: 0 auto;
  padding: clamp(26px, 5vh, 56px) var(--pad-x) clamp(48px, 8vh, 88px);
  display: flex; flex-direction: column;
}
#root { flex: 1; display: flex; flex-direction: column; }

/* ---------- header ---------- */
.topbar { margin-bottom: clamp(34px, 6vh, 60px); }
.topbar img { height: 22px; width: auto; display: block; }
.topbar .logo-light { display: none; }
body.dark .topbar .logo-dark { display: none; }
body.dark .topbar .logo-light { display: block; }

/* ---------- screens + motion ---------- */
.screen { max-width: var(--maxw); animation: screenIn 0.55s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes riseIn   { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 22px;
  display: flex; align-items: center; gap: 12px;
}
.kicker .dash { width: 34px; height: 2px; background: var(--accent); display: inline-block; flex: none; }
body.dark .kicker { color: var(--cream-55); }

/* ---------- typography ---------- */
h1, h2 { font-family: var(--font-serif); font-weight: 400; margin: 0 0 20px; }
h1 { font-size: clamp(36px, 7.4vw, 54px); line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: clamp(27px, 5vw, 36px); line-height: 1.22; letter-spacing: -0.005em; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
body.dark h1 em { color: var(--accent); }
/* questions are read, not glanced: looser leading, measured width */
h2.question { line-height: 1.3; max-width: 21em; margin-bottom: 8px; }

.lede { font-size: clamp(16.5px, 2.3vw, 18px); line-height: 1.62; color: var(--ink-soft); margin: 0 0 28px; max-width: 50ch; }
body.dark .lede { color: var(--cream-70); }
.setup { font-size: 16px; color: var(--muted); margin: 0 0 12px; max-width: 52ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
em { font-style: italic; }

/* ---------- buttons (site language: 1px line, 12px radius) ---------- */
.btn {
  font-family: var(--font-sans); font-size: 15.5px; font-weight: 600; letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 30px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: var(--cream);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s var(--ease);
  text-decoration: none;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--ink); border-color: var(--ink); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover:not([disabled]) .arrow { transform: translateX(4px); }
/* on the dark cover: the site's light outline button */
body.dark .btn.ghost {
  background: transparent; border-color: rgba(247, 246, 243, 0.4); color: var(--cream);
}
body.dark .btn.ghost:hover { background: var(--cream); border-color: var(--cream); color: var(--ink); }

.btn-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 30px; }
.btnmicro { font-size: 13px; color: var(--muted); margin-top: 12px; }

.textlink {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 500; color: var(--muted);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line);
  transition: color 0.2s ease;
}
.textlink:hover { color: var(--accent); text-decoration-color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, .option:focus-visible { outline-offset: 3px; }

/* ---------- the four steps, previewed on the cover ---------- */
.cover-steps {
  list-style: none; margin: 34px 0 38px; padding: 26px 0 0;
  border-top: 1px solid var(--line-dark);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 28px;
}
.cover-steps li { min-width: 0; }
.cover-steps .num {
  font-family: var(--font-serif); font-style: italic; font-size: 15px; color: var(--accent);
  display: block; margin-bottom: 2px;
}
.cover-steps .sname { font-size: 15px; font-weight: 600; color: var(--cream); display: block; }
.cover-steps .sgloss { font-size: 13.5px; color: var(--cream-55); display: block; margin-top: 1px; }
@media (min-width: 560px) { .cover-steps { grid-template-columns: repeat(4, 1fr); } }

/* ---------- option lists ---------- */
.options { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.option {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 52px 16px 20px; position: relative;
  font-family: var(--font-sans); font-size: 16px; line-height: 1.5; color: var(--ink);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  animation: riseIn 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.option:hover { border-color: var(--ink); }
.option.selected {
  border-color: var(--accent); background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.option .gut {
  display: block; margin-top: 6px;
  font-style: italic; font-size: 14px; line-height: 1.5;
  color: var(--muted);
}
.option.selected .gut { color: var(--ink-soft); }
.option .mark {
  position: absolute; right: 18px; top: 19px; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; transition: border-color 0.18s ease, background 0.18s ease;
}
.option.multi .mark { border-radius: 5px; }
.option.selected .mark { border-color: var(--accent); background: var(--accent); }
.option.selected .mark::after {
  content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ---------- fields ---------- */
.field { margin: 0 0 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 7px; }
.field input[type=text], .field input[type=email], .field textarea {
  width: 100%; font-family: var(--font-sans); font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 16px; transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(181, 103, 58, 0.12);
}
.field textarea { resize: vertical; min-height: 58px; line-height: 1.5; }
.field .opt { font-weight: 400; color: var(--muted); }
.err { color: var(--accent-deep); font-size: 14px; font-weight: 500; margin: 7px 0 0; min-height: 1px; }
/* the one-liner field on the dark cover */
body.dark .field label { color: var(--cream); }
body.dark .field textarea {
  background: rgba(247, 246, 243, 0.05); border-color: var(--line-dark); color: var(--cream);
}
body.dark .field textarea::placeholder { color: rgba(247, 246, 243, 0.4); }
body.dark .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(181, 103, 58, 0.25); }
body.dark .small.muted { color: var(--cream-55); }

.consent { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 6px; cursor: pointer; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.consent span { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
.consent-micro { font-size: 13px; color: var(--muted); margin: 6px 0 0 30px; }

/* ---------- the four-step strip ---------- */
.strip { margin: 0 0 34px; padding: 0; }
.strip ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.strip li { flex: 1; position: relative; min-width: 0; }
.strip .bar {
  height: 3px; border-radius: 2px; background: var(--line-soft); margin-bottom: 10px;
  overflow: hidden; position: relative;
}
.strip .bar::after {
  content: ""; position: absolute; inset: 0; border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.strip li.earned .bar::after { background: var(--ink); transition-delay: calc(var(--i, 0) * 120ms); }
.strip li.here   .bar::after { background: var(--accent); transition-delay: calc(var(--i, 0) * 120ms); }
.strip li.asking .bar::after { background: var(--ink); }
/* JS adds .on a frame after mount, so the fill plays as a moment */
.strip.on li.earned .bar::after,
.strip.on li.here .bar::after,
.strip.on li.asking .bar::after { transform: scaleX(1); }
.strip .snum { font-family: var(--font-serif); font-style: italic; font-size: 13px; color: var(--muted); display: block; }
.strip .sname { font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em; display: block; margin-top: 1px; }
.strip .sgloss { font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 2px; display: block; }
.strip li.later .sname { color: var(--muted); }
.strip li.here .sname, .strip li.here .snum { color: var(--accent); }
.strip li.asking .sname { color: var(--ink); }
.strip .pin {
  display: inline-block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-top: 7px;
}
.strip > .pin { margin-top: 2px; }
.strip.walk { margin-bottom: 30px; }
/* the glosses crowd small screens; names + bars carry it there */
@media (max-width: 480px) { .strip .sgloss { display: none; } }

.progress-cue {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px; line-height: 1.9;
}
.progress-cue::before {
  content: ""; display: inline-block; width: 34px; height: 2px;
  background: var(--accent); margin-right: 12px; vertical-align: 3px;
}
.progress-cue b { color: var(--ink); font-weight: 700; }
.reductiveness { font-size: 14px; color: var(--muted); font-style: italic; margin: 14px 0 0; max-width: 52ch; }

/* ---------- preview + read blocks ---------- */
.read-block { animation: riseIn 0.55s var(--ease) both; margin: 0 0 20px; }
.read-block p { margin: 0; }
.read-block.muted-line p { color: var(--muted); font-style: italic; font-size: 15px; }
.labelled .blabel {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 8px;
}
.labelled .blabel::before { content: ""; width: 20px; height: 2px; background: var(--accent); flex: none; }
.labelled { margin-top: 28px; }
.labelled .btext { margin: 0; }
.cost-block {
  background: var(--accent-tint); border-radius: 14px;
  padding: 24px 26px; margin: 32px 0;
}
.cost-block .blabel::before { width: 20px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 32px 0; }

.preview-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(24px, 5vw, 36px); margin: 0 0 30px;
  font-size: 17px; line-height: 1.65;
  box-shadow: 0 1px 2px rgba(26, 25, 23, 0.04), 0 12px 32px -18px rgba(26, 25, 23, 0.12);
}
.preview-card .pin-line {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.preview-card .pin-line::before { content: ""; width: 20px; height: 2px; background: var(--accent); flex: none; }
.preview-card > p:last-child { margin: 0; }

/* one anonymized line from a real read, above the gate form */
.sample-line {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 20px 0; margin: 26px 0 30px;
}
.sample-line .slabel {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 8px;
}
.sample-line q {
  font-family: var(--font-serif); font-style: italic; font-size: 19px; line-height: 1.45;
  color: var(--ink-2); quotes: "\201C" "\201D";
}

.gate-note { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 8px; }
.gate-note.from-cole { font-style: italic; margin-bottom: 0; }

/* ---------- the closing CTA: a dark moment, like the site's method block ---------- */
.cta-block {
  margin-top: 44px; background: var(--ink); border-radius: 16px;
  padding: clamp(28px, 5.5vw, 40px); color: var(--cream);
}
.cta-block .framing {
  margin: 0 0 24px; font-size: clamp(19px, 3vw, 22px); line-height: 1.5;
  font-family: var(--font-serif); color: var(--cream);
}
.cta-block .btn.accent { border-color: var(--accent); }
.cta-block .btnmicro { color: var(--cream-55); }

.actions-pdf { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 6px 0 30px; }

.footnote { margin-top: 48px; font-size: 12px; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--cream); padding: 12px 20px; border-radius: 12px;
  font-size: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22); z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease; max-width: 90vw;
}
.toast.show { opacity: 1; }

/* ---------- larger screens ---------- */
@media (min-width: 720px) {
  body { font-size: 17px; }
  .topbar img { height: 24px; }
  .options { gap: 12px; }
  .option { padding: 18px 56px 18px 24px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .screen, .option, .read-block { animation: none; }
  .strip .bar::after { transition: none; }
  .btn, .btn .arrow { transition: none; }
}
