/* =========================================================
   The Quiet Mind Method — Landing Page  ·  Rewire_Mind
   Design: "Calm digital essay" — editorial, text-first, for Threads
   Type:   Fraunces (display) + Newsreader (essay body)
   ========================================================= */

:root {
  /* Color — warm paper & ink, low saturation */
  --paper:       #FBFAF7;   /* warm off-white "paper" */
  --paper-tint:  #F3F0E9;   /* quiet section wash */
  --ink:         #211F1B;   /* warm near-black — primary text */
  --ink-soft:    #5C574E;   /* secondary text (AA on paper) */
  --ink-faint:   #8A857A;   /* captions, kickers */
  --rule:        #E5E0D5;   /* hairline borders */
  --rule-strong: #D6D0C3;
  --accent:      #5E6A57;   /* muted sage — used sparingly */
  --accent-deep: #444F3E;
  --on-ink:      #FBFAF7;
  --danger:      #9C4A3C;

  /* Shape & motion — restrained */
  --radius:    10px;
  --radius-sm: 8px;
  --ease:      cubic-bezier(.22, .61, .36, 1);
  --t:         200ms;

  --maxw:        1040px;
  --maxw-read:   640px;   /* essay measure */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-size: 19px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
svg { display: block; max-width: 100%; }
h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.005em;
  color: var(--ink);
}
p { margin: 0 0 1.1rem; }
strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.container--narrow { max-width: var(--maxw-read); }
.section { padding: clamp(60px, 10vw, 116px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section--tint { background: var(--paper-tint); }
.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--on-ink); padding: 10px 16px;
}
.skip-link:focus { left: 0; }

/* ---------- Shared text bits ---------- */
.eyebrow {
  display: inline-block;
  font-family: "Newsreader", serif;
  font-size: .8rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 18px;
}
.eyebrow--center { display: block; text-align: center; }
.accent-text { color: var(--accent-deep); font-style: italic; }

.section__title {
  font-size: clamp(1.6rem, 4.2vw, 2.3rem);
  font-weight: 500;
  margin: 0 0 1.3rem;
  max-width: 22ch;
}
.section__title--center { text-align: center; margin-inline: auto; }

.prose { color: var(--ink-soft); font-size: 1.08rem; }
.prose p { max-width: 62ch; }
.prose strong { color: var(--ink); }
.prose__emphasis { color: var(--ink); }
.prose__turn {
  font-family: "Fraunces", serif; font-style: italic; font-size: 1.6rem; font-weight: 400;
  color: var(--ink); margin-top: .4rem;
}

/* ---------- HERO — editorial, left-aligned ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(64px, 11vw, 120px) 0 clamp(52px, 8vw, 88px);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.hero__inner { position: relative; z-index: 2; max-width: 720px; }
.hero__title {
  font-size: clamp(2.1rem, 6.4vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -.015em; line-height: 1.12; margin: 0 0 1.3rem;
}
.hero__subtitle {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--ink-soft);
  max-width: 56ch; margin: 0 0 1.5rem;
}
.hero__subtitle strong { color: var(--ink); font-weight: 600; }
.hero__hook {
  color: var(--ink-soft); max-width: 56ch; margin: 0 0 2.2rem;
  font-size: 1.06rem;
  padding-left: 20px; border-left: 2px solid var(--rule-strong);
  font-style: italic;
}
.hero__glow { display: none; } /* flashy glow removed for editorial calm */

/* ---------- Sign-up forms — quiet, trust-first ---------- */
.signup { max-width: 540px; margin: 0; }
.signup--inverse { margin-inline: 0; }
.cta-band .signup, .final .signup { margin-inline: auto; }
.signup__label { display: block; font-size: .95rem; font-weight: 500; margin-bottom: 10px; color: var(--ink); }
.signup__row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup__input {
  flex: 1 1 230px; min-width: 0;
  font-family: "Newsreader", serif; font-size: 17px; /* prevents iOS zoom */
  padding: 14px 16px;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.signup__input::placeholder { color: var(--ink-faint); }
.signup__input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(94,106,87,.16);
}
.signup__input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(156,74,60,.14); }
.signup__help { font-size: .88rem; color: var(--ink-faint); margin: 12px 2px 0; }
.signup__status { font-size: .95rem; font-weight: 500; margin: 10px 2px 0; min-height: 1.2em; }
.signup__status.is-error { color: var(--danger); }
.signup__status.is-success { color: var(--accent-deep); }

/* ---------- MailerLite embedded form — blend with editorial look ---------- */
.signup-embed { max-width: 500px; margin: 0; scroll-margin-top: 80px; }
.signup-embed .signup__help { margin-top: 14px; }
/* Best-effort container blend; fine-tune fonts/colors inside MailerLite's form builder */
.ml-embedded { width: 100%; }
.ml-embedded .ml-form-embedWrapper,
.ml-embedded .ml-form-embedBody { background: transparent !important; border: 0 !important; }
.ml-embedded .ml-form-embedBody { padding: 0 !important; }
.ml-embedded .ml-form-embedContent { margin-bottom: 16px !important; }

/* ---------- Buttons — flat ink, no gloss ---------- */
.btn {
  flex: 0 0 auto;
  display: inline-block; text-decoration: none; text-align: center;
  font-family: "Newsreader", serif; font-weight: 600; font-size: 1.02rem;
  padding: 14px 30px;
  border: 1px solid var(--ink); border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--ink); color: var(--on-ink);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.btn--primary, .btn--accent { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn:active { background: var(--ink); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }

/* ---------- The overthinking loop — quiet numbered list ---------- */
.loop { list-style: none; padding: 0; margin: 2.2rem 0; max-width: 460px; display: grid; gap: 0; }
.loop__step {
  display: flex; align-items: baseline; gap: 16px;
  padding: 14px 2px; border-bottom: 1px solid var(--rule);
  color: var(--ink); font-size: 1.04rem;
}
.loop__step span {
  flex: 0 0 auto; width: 1.6em;
  font-family: "Fraunces", serif; font-weight: 500; font-size: .95rem;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.loop__step--repeat { color: var(--ink-soft); font-style: italic; }
.loop__step--repeat span { color: var(--accent-deep); }

/* ---------- Callout — hairline note ---------- */
.callout {
  border-left: 2px solid var(--accent);
  padding: 6px 0 6px 22px;
  margin-top: 1.8rem;
}
.callout p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Benefits — clean divided list ---------- */
.benefits {
  list-style: none; padding: 0; margin: 2.4rem auto 0; max-width: 700px;
  display: grid; gap: 0; grid-template-columns: 1fr;
}
.benefit {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 0; border-top: 1px solid var(--rule);
}
.benefit:last-child { border-bottom: 1px solid var(--rule); }
.benefit p { margin: 0; color: var(--ink); font-size: 1.06rem; }
.benefit__icon {
  flex: 0 0 auto; width: 26px; height: 26px; margin-top: 2px;
  display: grid; place-items: center;
  color: var(--accent); background: none;
}
.benefit__icon svg { width: 22px; height: 22px; }

/* ---------- CTA band (mid) — quiet, not a dark slab ---------- */
.cta-band {
  background: var(--paper-tint);
  color: var(--ink);
  padding: clamp(56px, 8vw, 92px) 0;
  border-block: 1px solid var(--rule);
  text-align: center;
}
.cta-band__inner { text-align: center; }
.cta-band__title { color: var(--ink); font-size: clamp(1.5rem, 4vw, 2.05rem); font-weight: 500; margin: 0 auto .7rem; max-width: 20ch; }
.cta-band__text { color: var(--ink-soft); margin: 0 auto 1.9rem; max-width: 44ch; font-size: 1.08rem; }
/* inverse modifier no longer needs light-on-dark treatment */
.signup--inverse .signup__label { color: var(--ink); }
.signup--inverse .signup__input { background: var(--paper); border-color: var(--rule-strong); }
.signup--inverse .signup__help { color: var(--ink-faint); }
.signup--inverse .signup__status.is-success { color: var(--accent-deep); }
.signup--inverse .signup__status.is-error { color: var(--danger); }

/* ---------- What's inside — a "table of contents" ---------- */
.cards {
  display: grid; gap: 0; margin: 2.6rem auto 2.4rem; max-width: 820px;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule);
}
.card {
  background: none; border: none; box-shadow: none;
  border-bottom: 1px solid var(--rule);
  padding: 20px 4px;
  transition: none;
}
.card:hover { transform: none; box-shadow: none; }
.card__title {
  font-family: "Fraunces", serif; font-size: 1.18rem; font-weight: 500;
  margin: 0 0 .35rem; color: var(--ink);
}
.card p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }

.extras {
  max-width: 700px; margin: 0 auto; padding: 0;
  list-style: none;
  display: grid; gap: 14px; grid-template-columns: 1fr;
}
.extras li {
  position: relative; padding-left: 26px; color: var(--ink); font-size: 1.04rem;
}
.extras li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 9px; height: 9px; border-radius: 50%;
  background: none; border: 1.5px solid var(--accent);
}

/* ---------- FAQ — hairline accordion ---------- */
.faq { margin-top: 2.4rem; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.faq__item { background: none; border: none; border-bottom: 1px solid var(--rule); border-radius: 0; }
.faq__item summary {
  cursor: pointer; list-style: none;
  padding: 20px 44px 20px 2px; position: relative;
  font-family: "Fraunces", serif; font-weight: 500; color: var(--ink); font-size: 1.12rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%); transition: transform var(--t) var(--ease);
  font-family: "Newsreader", serif; font-size: 1.4rem; color: var(--ink-faint); line-height: 1;
}
.faq__item[open] summary::after { content: "\2013"; } /* en-dash when open */
.faq__item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq__body { padding: 0 2px 22px; color: var(--ink-soft); }
.faq__body p { margin: 0; max-width: 60ch; font-size: 1.04rem; }

/* ---------- Final CTA — calm closing, not a billboard ---------- */
.final {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(64px, 10vw, 116px) 0;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.final__inner { text-align: center; }
.final__title { color: var(--ink); font-size: clamp(1.7rem, 4.6vw, 2.4rem); font-weight: 500; margin: 0 auto 1.1rem; max-width: 18ch; }
.final__text { color: var(--ink-soft); max-width: 54ch; margin: 0 auto 2.1rem; font-size: 1.08rem; }

/* ---------- Footer ---------- */
.footer { background: var(--paper); padding: 44px 0; border-top: 1px solid var(--rule); }
.footer__inner { text-align: center; }
.footer__brand { font-family: "Fraunces", serif; font-weight: 500; color: var(--ink); margin-bottom: .5rem; }
.footer__note { font-size: .9rem; color: var(--ink-faint); max-width: 58ch; margin-inline: auto; }

/* ---------- Reveal — gentle, minimal ---------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .card { padding-inline: 0; }
  .extras { grid-template-columns: 1fr 1fr; column-gap: 40px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
