/* K.D. Vaughn Press — Phase 1 companion site
   Palette matches the book cover: navy / teal / off-white.
   Mobile-first; no frameworks, no build step. */

:root {
  --navy: #16243f;
  --navy-deep: #0e1830;
  --navy-soft: #24365c;
  --teal: #0f9d8f;        /* borders/accents on light backgrounds */
  --teal-bright: #35d0bf; /* accents on navy backgrounds */
  --teal-dark: #0b7d72;   /* teal text + button fills (AA-contrast-safe) */
  --teal-deep: #085f56;   /* hover state, darker than teal-dark */
  --off-white: #f7f4ee;
  --card: #ffffff;
  --ink: #1c2536;
  --ink-soft: #4a5568;
  --line: #dcd7cc;
  --wrong: #b3372f;
  --wrong-bg: #faeae8;
  --right-bg: #e6f5f2;
  --radius: 10px;
  --max-width: 44rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--off-white);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem; /* 17px — cert studiers read on phones */
  line-height: 1.6;
}

h1, h2, .display {
  font-family: "Archivo Black", "Inter", system-ui, sans-serif;
  font-weight: 400; /* Archivo Black is a single heavy weight */
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a { color: var(--teal-dark); }
a:hover { color: var(--teal-deep); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--navy);
  color: var(--off-white);
  padding: 0.9rem 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.05rem;
  color: var(--off-white);
  text-decoration: none;
  padding: 0.55rem 0; /* ≥44px tap target */
  display: inline-block;
}
.brand .brand-accent { color: var(--teal-bright); }

.site-nav a {
  color: var(--off-white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 1.1rem;
  padding: 0.75rem 0; /* ≥44px tap target */
  display: inline-block;
}
.site-nav a:hover { color: var(--teal-bright); }

/* ---------- Hero (landing) ---------- */

.hero {
  background: var(--navy);
  color: var(--off-white);
  padding: 3rem 0 3.5rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 6vw, 2.7rem);
  margin: 0 0 1rem;
}
.hero h1 .accent { color: var(--teal-bright); }

.hero p.lede {
  font-size: 1.15rem;
  color: #d9e0ee;
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.btn {
  display: inline-block;
  background: var(--teal-dark); /* 5:1 with white text — AA */
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  padding: 0.85rem 1.6rem; /* ≥44px tall */
  cursor: pointer;
}
.btn:hover { background: var(--teal-deep); color: #fff; }

.btn-ghost {
  background: transparent;
  border: 2px solid var(--teal-bright);
  color: var(--teal-bright);
}
.btn-ghost:hover { background: rgba(53, 208, 191, 0.12); color: var(--teal-bright); }

/* ---------- Sections ---------- */

.section { padding: 2.5rem 0; }
.section h1, .section h2 { font-size: 1.45rem; margin: 0 0 1rem; color: var(--navy); }
.section p { max-width: 38rem; }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.9rem;
}
.feature-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}
.feature-list li strong { color: var(--navy); }

.exam-facts {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  max-width: 38rem;
}
.exam-facts ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.exam-facts li { margin-bottom: 0.35rem; }

.book-note {
  background: var(--navy);
  color: #d9e0ee;
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem;
}
.book-note h2 { color: var(--off-white); }

/* ---------- Quiz ---------- */

.quiz-intro { padding: 2rem 0 0.5rem; }
.quiz-intro h1 { font-size: clamp(1.5rem, 5vw, 2.1rem); color: var(--navy); margin: 0 0 0.5rem; }
.quiz-intro p { color: var(--ink-soft); margin: 0; }

.quiz-controls {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--off-white);
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}
.quiz-controls .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.filter-group { display: flex; gap: 0.4rem; }

.filter-btn {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  min-height: 44px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.filter-btn[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.domain-select {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.6rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  max-width: 100%;
}

.progress-note {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-dark);
  white-space: nowrap;
}

/* Question card */

.q-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
}

.q-meta {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--teal-dark);
  margin-bottom: 0.6rem;
}
.q-meta .q-id { color: var(--ink-soft); font-weight: 400; letter-spacing: 0; text-transform: none; }

.q-stem {
  /* stems are h2 for outline order, but read as body copy, not display type */
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 1rem;
  line-height: 1.5;
  letter-spacing: 0;
}

.q-options { display: grid; gap: 0.6rem; }

.q-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  background: var(--off-white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem; /* ≥44px tap target */
  font: inherit;
  font-size: 1rem; /* ≥16px — this is core reading content */
  color: var(--ink);
  cursor: pointer;
}
.q-opt:hover:not(:disabled) { border-color: var(--teal); }
.q-opt:disabled { cursor: default; opacity: 1; }

.q-letter {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--teal-dark);
}

.q-opt.is-correct {
  background: var(--right-bg);
  border-color: var(--teal);
}
.q-opt.is-wrong {
  background: var(--wrong-bg);
  border-color: var(--wrong);
}
.q-opt.is-dim { opacity: 0.6; }

/* Explanation block */

.q-explain {
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.q-verdict {
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.q-verdict.right { color: var(--teal-dark); }
.q-verdict.wrong { color: var(--wrong); }

.q-why {
  margin: 0 0 0.7rem;
  font-size: 1rem; /* ≥16px — the explanations are the product */
  color: var(--ink-soft);
}
.q-why strong { color: var(--navy); }
.q-why.q-why-correct {
  background: var(--right-bg);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  color: var(--ink);
}

/* ---------- Email gate ---------- */

.gate-card {
  background: var(--navy);
  color: #d9e0ee;
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin: 2rem 0;
}
.gate-card h2 {
  color: var(--off-white);
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
}
.gate-card p { margin: 0 0 1rem; }
.gate-card .gate-fineprint {
  font-size: 0.85rem;
  color: #aab6cc;
  margin-top: 1rem;
}
.gate-card .gate-fineprint a { color: var(--teal-bright); }

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: 26rem;
}
.gate-form input[type="email"] {
  font: inherit;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--navy-soft);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.gate-form .btn { width: 100%; }

.gate-unlock-link {
  background: none;
  border: none;
  font: inherit;
  font-size: 0.85rem;
  color: var(--teal-bright);
  text-decoration: underline;
  cursor: pointer;
  padding: 0.8rem 0; /* ≥44px tap target */
  min-height: 44px;
}

.gate-success { font-weight: 600; color: var(--teal-bright); }

/* Shown outside the (hidden) gate card after a successful subscribe */
.gate-success-standalone {
  background: var(--right-bg);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin: 1.5rem 0;
  color: var(--teal-dark);
}

.unlock-banner {
  background: var(--right-bg);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: #97a3ba;
  font-size: 0.85rem;
  padding: 2rem 0;
  margin-top: 3rem;
}
.site-footer p { margin: 0 0 0.75rem; max-width: none; }
.site-footer a { color: var(--teal-bright); }

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  .gate-form { flex-direction: row; }
  .gate-form input[type="email"] { flex: 1; }
  .gate-form .btn { width: auto; }
}
