/* =========================================================
   Mandy's Emerge Journey — shared stylesheet
   Vibe: warm, elegant BLACK + aged GOLD, with an earthy TEAL accent.
   Fonts: Playfair Display (display) + Jost (text).
   All text/background pairs verified WCAG AA (see README).
   ========================================================= */

:root {
  /* surfaces */
  --oat:        #faf6ec;  /* page background — warm oat */
  --sand:       #f0e8d6;  /* secondary surface / bands */
  --paper:      #fcf9f1;  /* cards */
  --noir:       #1f1813;  /* warm espresso-black — hero, nav, footer */
  --espresso:   #2a2018;  /* slightly lifted dark */

  /* text */
  --ink:        #211c14;  /* headings + strong (15.7:1 on oat) */
  --ink-soft:   #4c463a;  /* body copy (8.7:1) */
  --muted:      #655d4e;  /* fine print / labels (6:1) */

  /* gold (aged brass) */
  --gold:       #b5904e;  /* accents, rules, large gold, gold on dark */
  --gold-soft:  #dcc081;  /* gold text on dark surfaces */
  --gold-deep:  #7e6322;  /* gold text on light (eyebrows, numerals) */
  --gold-line:  #d8c28e;  /* hairline gold rules */

  /* teal (earthy accent) */
  --teal:       #0e6f66;  /* links on light */
  --teal-2:     #167f76;  /* link hover / larger teal */
  --teal-bright:#45b9aa;  /* accent on dark (brand dot) */

  --line:       #e6ddc8;  /* warm hairline borders */

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:  "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 740px;
  --maxw-wide: 1080px;
  --radius: 4px;
  --shadow: 0 16px 50px rgba(31, 24, 19, 0.12);
  --shadow-sm: 0 6px 22px rgba(31, 24, 19, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--ink-soft);
  background: var(--oat);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-2); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.16;
  font-weight: 600;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.4rem); letter-spacing: -0.01em; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.2rem); margin-top: 1.7em; }
h3 { font-size: 1.32rem; margin-top: 1.4em; }

p { margin: 0 0 1.1em; }

/* eyebrow / small label */
.eyebrow {
  display: inline-block; font-family: var(--font-sans); font-size: 0.74rem;
  font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-deep); margin-bottom: 18px;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.wrap-wide { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 22px; }
.section { padding: 60px 0; }
.section-tint { background: var(--sand); }
.center { text-align: center; }

/* elegant gold divider */
.rule { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 36px 0; }
.rule::before, .rule::after { content: ""; height: 1px; width: 90px; background: var(--gold-line); }
.rule span { color: var(--gold); font-size: 0.8rem; letter-spacing: .2em; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--noir);
  border-bottom: 1px solid rgba(181, 144, 78, 0.4);
}
.nav-inner {
  max-width: var(--maxw-wide); margin: 0 auto; padding: 13px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand {
  font-family: var(--font-serif); font-weight: 600; font-size: 1.18rem;
  color: var(--oat); text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 10px; letter-spacing: .01em;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--teal-bright); display: inline-block; flex: none;
  box-shadow: 0 0 0 3px rgba(69, 185, 170, 0.18);
}
.nav-links { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.nav-links a {
  font-family: var(--font-sans); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: rgba(250, 246, 236, 0.78); text-decoration: none;
  padding: 8px 12px; border-radius: var(--radius); white-space: nowrap;
}
.nav-links a:hover { color: var(--gold-soft); }
.nav-links a.cta {
  color: var(--gold-soft); border: 1px solid var(--gold);
}
.nav-links a.cta:hover { background: var(--gold); color: var(--noir); }
.nav-toggle { display: none; }

/* ---------- Hero (dramatic black) ---------- */
.hero {
  background: var(--noir); color: var(--oat);
  padding: 78px 0 64px; text-align: center;
  border-bottom: 1px solid rgba(181, 144, 78, 0.35);
}
.hero .eyebrow { color: var(--gold-soft); }
.hero h1 { color: var(--oat); margin: 0 auto 0.4em; max-width: 14ch; }
.hero .gold-line { width: 64px; height: 2px; background: var(--gold); margin: 26px auto; border: 0; }
.hero .lead {
  font-size: 1.22rem; color: rgba(250, 246, 236, 0.82);
  max-width: 600px; margin: 0 auto 1.7em;
}
.hero .btn-row { justify-content: center; }

/* inline stat row (gold numerals, gold dividers) */
.stats {
  display: flex; gap: 0; justify-content: center; flex-wrap: wrap;
  margin: 44px auto 0; max-width: 660px;
}
.stat { padding: 6px 30px; position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 14%; height: 72%; width: 1px;
  background: rgba(181, 144, 78, 0.5);
}
.stat b {
  display: block; font-family: var(--font-serif); font-size: 2.1rem;
  font-weight: 700; color: var(--gold-soft); line-height: 1.1;
}
.stat span {
  font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(250, 246, 236, 0.62);
}

/* gold-framed portrait */
.portrait {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--sand) 0%, var(--oat) 100%);
  box-shadow: var(--shadow); position: relative;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--ink-soft); border: 1px solid var(--gold); outline: 4px solid var(--oat); outline-offset: -10px;
}
.portrait .ph { padding: 22px; font-size: 0.92rem; }
.portrait .ph strong { display: block; font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: 6px; color: var(--gold-deep); }
.portrait .ph code { background: rgba(126, 99, 34, 0.10); padding: 1px 5px; border-radius: 3px; }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* framed photos + gallery */
.photo-frame { border: 1px solid var(--gold); padding: 7px; background: var(--paper); border-radius: var(--radius); margin: 32px 0; }
.photo-frame img { display: block; width: 100%; height: auto; border-radius: 2px; }
.photo-frame figcaption { font-family: var(--font-sans); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--muted); text-align: center; padding: 11px 6px 3px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 28px 0; }
.gallery .photo-frame { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.84rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; padding: 15px 30px; border-radius: var(--radius);
  transition: background .14s ease, color .14s ease, border-color .14s ease;
  cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--gold); color: var(--noir); }
.btn-primary:hover { background: #c8a560; color: var(--noir); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--gold); }
.btn-ghost:hover { background: rgba(181, 144, 78, 0.12); color: var(--ink); }
.hero .btn-ghost, .cta-band .btn-ghost { color: var(--oat); border-color: var(--gold); }
.hero .btn-ghost:hover, .cta-band .btn-ghost:hover { background: rgba(181, 144, 78, 0.18); color: var(--oat); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* code chip */
.code-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; letter-spacing: 0.12em;
  font-size: 0.84rem; text-transform: uppercase;
  background: transparent; color: var(--gold-soft); padding: 7px 16px;
  border-radius: var(--radius); border: 1px solid var(--gold);
}

/* ---------- Article body ---------- */
.article { padding: 56px 0 20px; }
.article .lead { font-size: 1.24rem; color: var(--ink); }
.meta {
  font-family: var(--font-sans); font-size: 0.82rem; letter-spacing: 0.04em;
  color: var(--muted); margin-bottom: 28px; padding-bottom: 20px;
  border-bottom: 1px solid var(--gold-line);
}
.article h2 { scroll-margin-top: 90px; }
.article h2::after {
  content: ""; display: block; width: 48px; height: 2px;
  background: var(--gold); margin-top: 14px;
}
.article ul, .article ol { margin: 0 0 1.2em; padding-left: 1.25em; }
.article li { margin-bottom: 0.5em; }
.article li::marker { color: var(--gold-deep); }

/* drop cap */
.dropcap::first-letter {
  font-family: var(--font-serif); font-weight: 700; font-size: 3.7em;
  float: left; line-height: 0.78; padding: 8px 12px 0 0; color: var(--gold-deep);
}

/* pull quote */
.pull {
  font-family: var(--font-serif); font-style: italic; font-size: 1.55rem;
  line-height: 1.4; color: var(--ink); border-left: 2px solid var(--gold);
  padding: 8px 0 8px 26px; margin: 36px 0; font-weight: 500;
}

/* callout / note */
.callout {
  background: var(--paper); border: 1px solid var(--gold-line);
  border-radius: var(--radius); padding: 24px 26px; margin: 32px 0;
}
.callout h3 { margin-top: 0; color: var(--gold-deep); }
.callout h3::after { content: none; }
.callout p:last-child { margin-bottom: 0; }

.note {
  background: var(--sand); border-left: 2px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 15px 20px;
  font-size: 0.93rem; color: var(--ink-soft); margin: 28px 0;
}

/* steps — gold ringed numerals */
.steps { list-style: none; padding: 0; margin: 30px 0; counter-reset: step; }
.steps li {
  position: relative; padding: 2px 0 24px 60px; margin: 0;
  border-left: 1px solid var(--gold-line); margin-left: 20px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: -20px; top: -4px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--oat); color: var(--gold-deep); border: 1px solid var(--gold);
  font-family: var(--font-serif); font-weight: 600; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.steps li strong { display: block; font-family: var(--font-serif); color: var(--ink); font-size: 1.12rem; font-weight: 600; margin-bottom: 3px; }

/* table */
.table-wrap { overflow-x: auto; margin: 30px 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.96rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--noir); color: var(--gold-soft); font-family: var(--font-sans); font-weight: 500; letter-spacing: 0.06em; font-size: 0.8rem; text-transform: uppercase; }
tr:nth-child(even) td { background: var(--paper); }

/* ---------- Index list (replaces card grid on home) ---------- */
.index { margin: 16px 0 0; border-top: 1px solid var(--gold-line); }
.index-item {
  display: flex; gap: 22px; align-items: flex-start; padding: 24px 8px;
  border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: background .15s ease, padding .15s ease;
}
.index-item:hover { background: var(--sand); padding-left: 16px; }
.index-num {
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600;
  color: var(--gold-deep); min-width: 48px; line-height: 1; padding-top: 4px;
}
.index-body { flex: 1; }
.index-body h3 { margin: 0 0 5px; font-size: 1.34rem; }
.index-body h3::after { content: none; }
.index-kicker { font-family: var(--font-sans); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); font-weight: 600; display: block; margin-bottom: 5px; }
.index-body p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.index-arrow { margin-left: auto; align-self: center; color: var(--gold-deep); font-size: 1.2rem; }
.index-item:hover .index-arrow { color: var(--teal); }

/* ---------- Cards (used on 404) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 30px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; text-decoration: none; color: var(--ink);
  transition: border-color .14s ease, transform .14s ease;
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.card .kicker { font-family: var(--font-sans); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); font-weight: 600; }
.card h3 { margin: 10px 0 6px; font-size: 1.24rem; }
.card h3::after { content: none; }
.card p { font-size: 0.96rem; color: var(--muted); margin: 0 0 14px; }
.card .go { margin-top: auto; color: var(--gold-deep); font-weight: 600; font-size: 0.82rem; font-family: var(--font-sans); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- FAQ ---------- */
.faq { margin: 32px 0; }
.faq details {
  border-bottom: 1px solid var(--line); background: transparent; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 20px 4px; font-family: var(--font-serif);
  font-size: 1.18rem; color: var(--ink); font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.5rem; line-height: 1; flex: none; font-family: var(--font-sans); }
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 4px 20px; color: var(--ink-soft); }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- CTA band (black + gold) ---------- */
.cta-band {
  background: var(--noir); color: var(--oat);
  border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 50px 40px; margin: 48px 0; text-align: center;
}
.cta-band h2 { color: var(--oat); margin-top: 0; }
.cta-band h2::after { display: none; }
.cta-band p { color: rgba(250, 246, 236, 0.82); max-width: 540px; margin: 0 auto 22px; }
.cta-band a { color: var(--gold-soft); }
.cta-band .code-chip { color: var(--gold-soft); border-color: var(--gold); }
.cta-band .btn-primary { background: var(--gold); color: var(--noir); }
.cta-band .btn-primary:hover { background: #c8a560; }

/* ---------- Disclaimer ---------- */
.disclaimer {
  font-size: 0.84rem; color: var(--muted); background: var(--sand);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 38px 0 0;
}
.disclaimer strong { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer {
  background: var(--noir); color: rgba(250, 246, 236, 0.72);
  padding: 54px 0 32px; margin-top: 64px; font-size: 0.92rem;
  border-top: 1px solid rgba(181, 144, 78, 0.4);
}
.footer a { color: var(--gold-soft); }
.footer a:hover { color: var(--oat); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 34px; }
.footer h4 { font-family: var(--font-serif); color: var(--oat); font-size: 1.1rem; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; font-family: var(--font-sans); }
.footer .fine { margin-top: 32px; padding-top: 22px; border-top: 1px solid rgba(181, 144, 78, 0.25); font-size: 0.8rem; color: rgba(250, 246, 236, 0.5); }

/* ---------- Misc ---------- */
.toc {
  background: var(--paper); border: 1px solid var(--line); border-left: 2px solid var(--gold);
  border-radius: var(--radius); padding: 20px 24px; margin: 0 0 36px;
}
.toc strong { display: block; font-family: var(--font-serif); margin-bottom: 10px; color: var(--ink); font-size: 1.05rem; }
.toc ul { margin: 0; padding-left: 1.1em; columns: 2; }
.toc a { color: var(--teal); }

::selection { background: var(--gold); color: var(--noir); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .toc ul { columns: 1; }
}
@media (max-width: 680px) {
  body { font-size: 17px; }
  .stat { padding: 6px 20px; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; background: var(--noir);
    border-bottom: 1px solid rgba(181,144,78,0.4); padding: 8px 16px 14px; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border-bottom: 1px solid rgba(181,144,78,0.14); }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--gold); color: var(--gold-soft);
    width: 42px; height: 42px; border-radius: var(--radius); font-size: 1.3rem; cursor: pointer;
  }
  .cta-band { padding: 38px 24px; }
  .section { padding: 44px 0; }
}
