/* =========================================================
   Worth Asking — global stylesheet
   Restrained, bookish, accessible.
   ========================================================= */

:root {
  --bg: #FAF7F2;
  --surface: #F2EDE4;
  --ink: #1F2230;
  --ink-muted: #57606A;
  --accent: #4F7A6A;
  --accent-hover: #3F6557;
  --gold: #C9A24B;
  --gold-ink: #806119; /* AA-accessible gold for small text on light backgrounds */
  --rule: #E4DCCB;
  --danger: #9B3B2E;

  --max-w: 1120px;
  --body-w: 720px;

  --header-h: 72px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-card: 0 1px 2px rgba(31,34,48,0.04), 0 8px 24px rgba(31,34,48,0.08);
  --shadow-cover: 0 12px 32px rgba(31,34,48,0.18), 0 2px 6px rgba(31,34,48,0.10);

  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: var(--body-w); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  font-variation-settings: "opsz" 48;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.08; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.375rem; line-height: 1.25; }
h4 { font-size: 1.125rem; line-height: 1.3; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-ink);
  margin: 0 0 14px;
}
/* Hero / dark-background eyebrow keeps the brighter gold for contrast */
.hero .eyebrow,
.modal .eyebrow { color: var(--gold-ink); }
.hero .eyebrow { color: var(--gold); }
.eyebrow--ink { color: var(--ink-muted); }

.muted { color: var(--ink-muted); }
.italic { font-style: italic; }
.serif { font-family: 'Fraunces', Georgia, serif; }

a.text-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms var(--ease), color 120ms var(--ease);
  font-weight: 500;
}
a.text-link:hover { border-color: var(--gold); color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background-color 120ms var(--ease), color 120ms var(--ease), border-color 120ms var(--ease), transform 120ms var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn--primary {
  background: var(--accent);
  color: #FAF7F2;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--bg); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}
.btn--ghost:hover { color: var(--accent); }
.btn--full { width: 100%; }
.btn--lg { padding: 14px 26px; font-size: 1rem; }

/* Focus rings — 2px gold ring with 2px offset */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), backdrop-filter 200ms var(--ease);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}
.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-header__logo img {
  height: 36px;
  width: auto;
}
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-header__nav a {
  color: #FAF7F2;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 120ms var(--ease);
}
.site-header__nav a:hover { color: var(--gold); }
.site-header__cta { margin-left: 8px; }

/* Solid state after scroll */
.site-header.is-solid {
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--rule);
}
.site-header.is-solid .site-header__nav a { color: var(--ink); }
.site-header.is-solid .site-header__nav a:hover { color: var(--accent); }

/* Pages that don't have a dark hero start in the solid state */
.site-header.is-static {
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--rule);
}
.site-header.is-static .site-header__nav a { color: var(--ink); }
.site-header.is-static .site-header__nav a:hover { color: var(--accent); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  color: #FAF7F2;
}
.site-header.is-solid .menu-toggle,
.site-header.is-static .menu-toggle { color: var(--ink); }

.menu-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 4px 0;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}

/* Mobile menu sheet */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 24px;
  transform: translateY(-100%);
  transition: transform 280ms var(--ease);
  visibility: hidden;
}
.mobile-menu.is-open {
  transform: translateY(0);
  visibility: visible;
}
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.mobile-menu__close {
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
  padding: 8px;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
}
.mobile-menu nav a {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.625rem;
  text-decoration: none;
  color: var(--ink);
  padding: 14px 4px;
  border-bottom: 1px solid var(--rule);
}
.mobile-menu .btn { margin-top: 24px; }

@media (max-width: 820px) {
  .site-header__nav { display: none; }
  .site-header__cta { display: none; }
  .menu-toggle { display: inline-flex; flex-direction: column; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 600px;
  height: 85vh;
  display: flex;
  align-items: center;
  color: #FAF7F2;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0;
  background-image: url('../images/hero.png');
  background-size: cover;
  background-position: center;
  z-index: -2;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(31,34,48,0.78), rgba(31,34,48,0.45));
  z-index: -1;
}
.hero__inner {
  max-width: 720px;
  padding-top: var(--header-h);
}
.hero h1 {
  color: #FAF7F2;
  margin-bottom: 20px;
}
.hero__sub {
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgba(250, 247, 242, 0.92);
  margin: 0 0 32px;
  max-width: 620px;
}
.hero .eyebrow { color: var(--gold); }
.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(250, 247, 242, 0.7);
  font-size: 1.25rem;
  animation: hero-bounce 2.4s ease-in-out infinite;
}
@keyframes hero-bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50% { transform: translate(-50%, 6px); opacity: 1; }
}

/* Strong mobile overlay so left-aligned copy stays AA-contrasted */
@media (max-width: 720px) {
  .hero__overlay {
    background: linear-gradient(to bottom, rgba(31,34,48,0.78), rgba(31,34,48,0.65));
  }
  .hero { height: auto; min-height: 600px; padding: 120px 0 80px; }
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
}
.section--tight { padding: 72px 0; }
.section--surface { background: var(--surface); }
.section__head {
  max-width: 720px;
  margin: 0 0 48px;
}
.section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 32px; }
}

/* ---------- Product card ---------- */
.product-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.product-card__cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow-cover);
}
.product-card h3 {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  margin-bottom: 14px;
}
.product-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 120ms var(--ease), color 120ms var(--ease);
}
.product-card__cta:hover { border-bottom-color: var(--gold); color: var(--ink); }
.product-card__cta .arrow { transition: transform 160ms var(--ease); }
.product-card__cta:hover .arrow { transform: translateX(3px); }

.coming-soon {
  margin-top: 24px;
  color: var(--ink-muted);
  font-style: italic;
  text-align: center;
}

@media (max-width: 720px) {
  .product-card {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }
  .product-card__cover {
    max-width: 220px;
    margin: 0 auto;
  }
}

/* ---------- Why-Different grid ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 56px;
}
.why-item__num {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--gold-ink);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.why-item h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}
.why-item p {
  color: var(--ink-muted);
  margin: 0;
}
@media (max-width: 720px) {
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Note from the creator ---------- */
.creator-note {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}
.creator-note__flourish {
  position: relative;
  padding-top: 6px;
  border-top: 1px solid var(--rule);
}
.creator-note__flourish .label {
  display: block;
  margin-top: 14px;
}
.creator-note__body p {
  font-size: 1.0625rem;
  color: var(--ink);
  line-height: 1.7;
}
.creator-note__signoff {
  margin-top: 24px;
  font-style: italic;
  color: var(--ink-muted);
}
@media (max-width: 820px) {
  .creator-note { grid-template-columns: 1fr; gap: 20px; }
  .creator-note__flourish { border-top: none; padding-top: 0; }
  .creator-note__flourish .label { margin-top: 0; }
}

/* ---------- Signup strip ---------- */
.signup-strip {
  background: var(--surface);
  padding: 56px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.signup-strip__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.signup-strip__copy {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 20px;
}
.signup-strip form {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}
.signup-strip input[type="email"] {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
.signup-strip input[type="email"]:focus {
  border-color: var(--accent);
}
@media (max-width: 540px) {
  .signup-strip form { flex-direction: column; }
  .signup-strip .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  padding: 72px 0 24px;
  border-top: 1px solid var(--rule);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  margin: 0 0 16px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms var(--ease);
}
.footer-col a:hover { border-bottom-color: var(--gold); }
.footer-col p {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  max-width: 320px;
}
.footer-col img {
  height: 40px;
  margin-bottom: 16px;
}
.footer-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  text-align: center;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* =========================================================
   Book page
   ========================================================= */
.book-main {
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: 96px;
}
.book-layout {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 64px;
  align-items: start;
}
.book-left {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.book-cover-wrap {
  display: block;
  transform: rotate(-1.2deg);
  margin-bottom: 28px;
}
.book-cover-wrap img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow-cover);
}

.price-block {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
}
.price-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.price-now {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 2.5rem;
  color: var(--ink);
  line-height: 1;
}
.price-was {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  color: var(--danger);
  text-decoration: line-through;
}
.book-ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.book-fineprint {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.book-right > * + * { margin-top: 48px; }
.book-title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  margin: 0 0 18px;
  line-height: 1.1;
}
.book-tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--gold-ink);
  font-size: 1.125rem;
  margin: 0;
}

.book-section h2 {
  margin-bottom: 18px;
}
.book-section p { color: var(--ink); }

ul.gold-square {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}
ul.gold-square li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  color: var(--ink);
}
ul.gold-square li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: var(--gold);
}

.question-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.question-list li {
  position: relative;
  padding: 18px 0 18px 36px;
  border-bottom: 1px solid var(--rule);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--ink);
}
.question-list li::before {
  content: "?";
  position: absolute;
  left: 0;
  top: 18px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--gold-ink);
  font-style: normal;
}

ul.plain {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.plain li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--ink);
}
ul.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.closing-strip {
  background: var(--surface);
  padding: 72px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-top: 64px;
}
.closing-strip h2 { margin-bottom: 12px; }
.closing-strip p { color: var(--ink-muted); max-width: 520px; margin: 0 auto 24px; }

@media (max-width: 880px) {
  .book-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .book-left {
    position: static;
    max-width: 360px;
    margin: 0 auto;
  }
  .book-cover-wrap { transform: none; }
}

/* =========================================================
   Modal
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  background: rgba(31, 34, 48, 0.55);
  overflow-y: auto;
}
.modal.is-open {
  display: flex;
}
.modal__card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  padding: 36px;
  position: relative;
  box-shadow: 0 24px 60px rgba(31,34,48,0.30);
  margin: auto 0;
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms var(--ease), color 120ms var(--ease);
}
.modal__close:hover {
  background: var(--surface);
  color: var(--ink);
}
.modal h3 {
  margin: 4px 0 8px;
  font-size: 1.625rem;
}
.modal__sub {
  color: var(--ink-muted);
  margin: 0 0 20px;
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 90px; }
.field--check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 20px;
}
.field--check input { width: auto; margin-top: 4px; }
.field--check label { margin: 0; font-weight: 400; color: var(--ink-muted); }

.form-micro {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin: 12px 0 0;
}
.form-error {
  display: none;
  margin-top: 12px;
  color: var(--danger);
  font-size: 0.875rem;
}
.form-error.is-visible { display: block; }

.modal__success {
  display: none;
  text-align: left;
}
.modal__success.is-visible { display: block; }
.modal__success p {
  font-size: 1.0625rem;
  color: var(--ink);
  margin-bottom: 24px;
  line-height: 1.6;
}

@media (max-width: 540px) {
  .modal { padding: 16px; }
  .modal__card { padding: 24px 20px; border-radius: var(--radius-md); }
  .modal h3 { font-size: 1.375rem; }
}

/* =========================================================
   Placeholder pages (privacy / terms)
   ========================================================= */
.text-page {
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: 96px;
}
.text-page h1 { margin-bottom: 24px; }
.text-page p { color: var(--ink); max-width: 640px; }

/* =========================================================
   Motion utilities — fade-up-on-scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Prevent horizontal scroll on small viewports */
html, body { overflow-x: hidden; }

/* =========================================================
   V2 — Theme toggle button
   ========================================================= */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  margin-left: 8px;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--surface);
  border-color: var(--ink-muted);
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

/* Header transparent-state toggle (over hero) keeps white border */
.site-header:not(.is-solid):not(.is-static) .theme-toggle {
  color: #FAF7F2;
  border-color: rgba(250, 247, 242, 0.4);
}
.site-header:not(.is-solid):not(.is-static) .theme-toggle:hover {
  background: rgba(250, 247, 242, 0.12);
  border-color: rgba(250, 247, 242, 0.7);
}

@media (max-width: 820px) {
  /* Keep the theme toggle visible on mobile even when other CTAs hide */
  .theme-toggle { margin-left: 0; margin-right: 4px; }
}

/* =========================================================
   V2 — Sample teaser card on book page
   ========================================================= */
.sample-teaser {
  border-top: 1px solid var(--rule);
  padding-top: 48px;
}
.sample-teaser__intro {
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 24px;
  max-width: 640px;
}
.teaser-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
}
.teaser-card .eyebrow {
  margin-bottom: 12px;
}
.teaser-card__q {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.teaser-callout {
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  background: var(--bg);
  margin-bottom: 28px;
}
.teaser-callout__label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
  margin: 0 0 10px;
}
.teaser-callout p {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}
.teaser-arg__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.teaser-arg__title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
  flex: 1 1 280px;
}
.score-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #FAF7F2;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.score-chip__val { font-weight: 600; }
.score-chip__sep { opacity: 0.7; }
.score-chip__label {
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-left: 6px;
  border-left: 1px solid rgba(250,247,242,0.4);
  margin-left: 2px;
}
.score-legend {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-style: italic;
  margin: 4px 0 18px;
}
.teaser-arg__lede {
  color: var(--ink);
  margin: 0 0 14px;
}
.teaser-quotes {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.teaser-quotes li {
  position: relative;
  padding: 10px 0 10px 30px;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--ink);
  line-height: 1.5;
}
.teaser-quotes li::before {
  content: "?";
  position: absolute;
  left: 0;
  top: 9px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--gold-ink);
  font-style: normal;
}
.teaser-card__fade {
  position: relative;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.teaser-card__fade::before {
  content: "";
  position: absolute;
  top: -56px;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(to bottom, rgba(242,237,228,0), var(--surface));
  pointer-events: none;
}
.teaser-card__fade p {
  font-style: italic;
  color: var(--ink-muted);
  margin: 0;
  font-size: 0.9375rem;
}
.teaser-card__cta {
  margin-top: 22px;
}

@media (max-width: 600px) {
  .teaser-card { padding: 22px; }
  .teaser-arg__head { gap: 10px; }
  .score-chip__label { display: none; }
}

/* =========================================================
   V2 — Thank-you page
   ========================================================= */
.thanks-page {
  padding-top: calc(var(--header-h) + 80px);
  padding-bottom: 96px;
}
.thanks-page__inner {
  max-width: 640px;
  margin: 0 auto;
}
.thanks-page h1 { margin-bottom: 18px; }
.thanks-page p { font-size: 1.0625rem; line-height: 1.65; color: var(--ink); }
.thanks-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 36px 0 24px;
}
.thanks-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 22px;
}
.thanks-card h3 {
  font-size: 1.0625rem;
  margin: 0 0 8px;
}
.thanks-card p {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0 0 14px;
}
.thanks-card .btn { font-size: 0.875rem; padding: 9px 16px; }
.thanks-fineprint {
  font-style: italic;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  margin-top: 16px;
}
@media (max-width: 720px) {
  .thanks-cards { grid-template-columns: 1fr; }
  .thanks-page { padding-top: calc(var(--header-h) + 48px); }
}

/* =========================================================
   V2 — Exit-intent toast (book page)
   ========================================================= */
.exit-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: calc(100% - 48px);
  max-width: 360px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 20px 22px 18px;
  box-shadow: var(--shadow-card);
  z-index: 80;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 300ms var(--ease), opacity 300ms var(--ease);
}
.exit-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.exit-toast__eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-ink);
  margin: 0 0 8px;
}
.exit-toast__body {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 14px;
}
.exit-toast__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.exit-toast__actions .btn { padding: 9px 16px; font-size: 0.875rem; }
.exit-toast__no {
  background: transparent;
  border: 0;
  color: var(--ink-muted);
  font-size: 0.875rem;
  padding: 4px 6px;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.exit-toast__no:hover { color: var(--ink); }
.exit-toast__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.125rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.exit-toast__close:hover { background: var(--surface); color: var(--ink); }
@media (max-width: 600px) {
  .exit-toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
    width: auto;
    max-width: none;
  }
}

/* =========================================================
   V2 — Consent line in modal
   ========================================================= */
.form-consent {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--ink-muted);
  margin: 4px 0 14px;
  line-height: 1.5;
}

/* =========================================================
   V2 — Long-form text page typography
   ========================================================= */
.text-page h2 {
  margin: 36px 0 12px;
  font-size: 1.375rem;
}
.text-page ul { padding-left: 22px; color: var(--ink); margin: 0 0 1em; }
.text-page ul li { margin-bottom: 8px; }
.text-page .last-updated {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  margin-bottom: 28px;
}
.text-page .signoff {
  margin-top: 36px;
  font-style: italic;
  color: var(--ink-muted);
}

/* =========================================================
   V2 — Dark mode overrides
   ========================================================= */
html.dark {
  --bg: #14171F;
  --surface: #1B1F2A;
  --ink: #ECE8DF;
  --ink-muted: #9CA3B0;
  --accent: #6FA08F;
  --accent-hover: #84B3A2;
  --gold: #D4B26B;
  --gold-ink: #D4B26B;
  --rule: #2B313F;
  --danger: #C46656;
}
html.dark body { background: var(--bg); color: var(--ink); }
html.dark h1, html.dark h2, html.dark h3, html.dark h4 { color: var(--ink); }
html.dark .btn--primary { color: #14171F; }
html.dark .btn--outline { color: var(--ink); border-color: var(--ink); }
html.dark .btn--outline:hover { background: var(--ink); color: var(--bg); }

/* Header */
html.dark .site-header.is-solid,
html.dark .site-header.is-static {
  background: rgba(20, 23, 31, 0.92);
  border-bottom-color: var(--rule);
}
html.dark .site-header.is-solid .site-header__nav a,
html.dark .site-header.is-static .site-header__nav a { color: var(--ink); }
html.dark .site-header.is-solid .site-header__nav a:hover,
html.dark .site-header.is-static .site-header__nav a:hover { color: var(--gold); }
html.dark .site-header.is-solid .menu-toggle,
html.dark .site-header.is-static .menu-toggle { color: var(--ink); }
html.dark .mobile-menu { background: var(--bg); }
html.dark .mobile-menu nav a { color: var(--ink); border-bottom-color: var(--rule); }

/* Modal */
html.dark .modal { background: rgba(0, 0, 0, 0.65); }
html.dark .modal__card { background: var(--surface); }
html.dark .field input,
html.dark .field select,
html.dark .field textarea {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--rule);
}
html.dark .signup-strip { background: var(--surface); border-top-color: var(--rule); border-bottom-color: var(--rule); }
html.dark .signup-strip input[type="email"] {
  background: var(--bg); color: var(--ink); border-color: var(--rule);
}

/* Sections */
html.dark .section--surface { background: var(--surface); }
html.dark .product-card { background: var(--surface); border-color: var(--rule); }
html.dark .closing-strip { background: var(--surface); }
html.dark .site-footer { background: var(--bg); border-top-color: var(--rule); }

/* Teaser card uses surface; callout uses bg */
html.dark .teaser-card { background: var(--surface); border-color: var(--rule); }
html.dark .teaser-callout { background: var(--bg); border-color: var(--rule); }
html.dark .teaser-card__fade::before {
  background: linear-gradient(to bottom, rgba(27, 31, 42, 0), var(--surface));
}

/* Exit toast */
html.dark .exit-toast { background: var(--surface); border-color: var(--rule); }

/* Thanks cards */
html.dark .thanks-card { background: var(--surface); border-color: var(--rule); }

/* Theme toggle in dark mode (over solid header) */
html.dark .theme-toggle { color: var(--ink); border-color: var(--rule); }
html.dark .theme-toggle:hover { background: var(--surface); }

/* Score chip in dark mode keeps green text-on-green is hard — invert */
html.dark .score-chip { background: var(--accent); color: #14171F; }
html.dark .score-chip__label { border-left-color: rgba(20, 23, 31, 0.4); }

/* Dark mode: invert the logo wordmark (navy on light works; we need ink-on-dark).
   The SVG file uses a hard-coded navy fill, so we shift hue with a filter. */
html.dark .site-header__logo img,
html.dark .mobile-menu__head .site-header__logo img,
html.dark .site-footer .footer-col img {
  filter: brightness(0) invert(1) sepia(0) saturate(0) opacity(0.92);
}
