/* NeuroMia — warm-paper editorial design.
   One rule of thumb everywhere: paper, ink, hairlines — and purple is
   reserved for Mia herself (her words, her name, her moments). */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,340..640;1,9..144,340..640&display=swap');

/* One house, many hours. The variables are the whole difference:
   sunrise → daylight → sunset → dusk follow the visitor's local time
   (theme.js); hearth is the guest theme, by ?theme=hearth only.
   --sky is an optional page-wide gradient; flat themes point it at --bg. */
:root {
  --sky: var(--bg);
  --bg: #f6f1e7;          /* warm paper */
  --panel: #fdfbf6;       /* raised paper */
  --panel2: #efe8d9;      /* pressed paper */
  --text: #211c15;        /* warm ink */
  --body: #4c4638;        /* reading ink (long passages) */
  --dim: #6f6553;         /* faded ink */
  --mia: #6d4aae;         /* Mia's plum — hers alone, in every theme */
  --mia-soft: rgba(109, 74, 174, 0.1);
  --accent2: #47714f;     /* leaf green for small labels */
  --accent2-soft: rgba(71, 113, 79, 0.12);
  --line: #e0d7c3;        /* hairline */
  --ink-band: #221c2e;    /* the one dark moment */
  --header-bg: rgba(246, 241, 231, 0.88);
  --cta-hover: #000;
  --shadow: 0 30px 60px -24px rgba(60, 45, 20, 0.28);
}
:root[data-theme="dusk"] {
  --bg: #17141d;
  --panel: #201c29;
  --panel2: #282334;
  --text: #efe9dd;
  --body: #cfc8d8;
  --dim: #9c91ac;
  --mia: #b79ce8;
  --mia-soft: rgba(183, 156, 232, 0.16);
  --accent2: #8fc2a4;
  --accent2-soft: rgba(143, 194, 164, 0.14);
  --line: #322c40;
  --ink-band: #0f0c15;
  --header-bg: rgba(23, 20, 29, 0.88);
  --cta-hover: #fff;
  --shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.5);
}
:root[data-theme="sunrise"] {
  /* pre-dawn indigo, first pinks, then gold on the horizon */
  --sky: linear-gradient(180deg, #ebe7f5 0%, #f5e7ee 40%, #fbeedb 100%);
  --bg: #f3edf1;
  --panel: #fdf9f7;
  --panel2: #f1e5e6;
  --text: #241b26;
  --body: #4e4152;
  --dim: #776376;
  --mia: #6d4aae;
  --mia-soft: rgba(109, 74, 174, 0.1);
  --accent2: #c04f5f;     /* coral, the climax color */
  --accent2-soft: rgba(192, 79, 95, 0.12);
  --line: #e6dae2;
  --ink-band: #2a2140;    /* the night it just left behind */
  --header-bg: rgba(243, 237, 241, 0.85);
  --cta-hover: #000;
  --shadow: 0 30px 60px -24px rgba(80, 50, 60, 0.25);
}
:root[data-theme="sunset"] {
  /* amber first, tangerine at the horizon, lilac and dusty blue above */
  --sky: linear-gradient(180deg, #f9e8d2 0%, #f8ded2 38%, #ecdce9 72%, #dfdaec 100%);
  --bg: #f7e6d5;
  --panel: #fdf6ec;
  --panel2: #f2e0d0;
  --text: #2b1f28;
  --body: #54424b;
  --dim: #7d6572;
  --mia: #6d4aae;
  --mia-soft: rgba(109, 74, 174, 0.1);
  --accent2: #b3542c;     /* tangerine on the horizon */
  --accent2-soft: rgba(179, 84, 44, 0.12);
  --line: #ecd8c9;
  --ink-band: #33203c;    /* the twilight it's headed into */
  --header-bg: rgba(247, 230, 213, 0.85);
  --cta-hover: #000;
  --shadow: 0 30px 60px -24px rgba(90, 50, 30, 0.26);
}
:root[data-theme="hearth"] {
  --bg: #f7eae0;
  --panel: #fdf6ee;
  --panel2: #f0ded0;
  --text: #241b12;
  --body: #4e4131;
  --dim: #77614b;
  --mia: #6d4aae;
  --mia-soft: rgba(109, 74, 174, 0.1);
  --accent2: #b0562e;     /* clay */
  --accent2-soft: rgba(176, 86, 46, 0.12);
  --line: #ead8c4;
  --ink-band: #2b1c26;
  --header-bg: rgba(247, 234, 224, 0.88);
  --cta-hover: #000;
  --shadow: 0 30px 60px -24px rgba(70, 40, 15, 0.26);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3, blockquote, .logo {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 520;
  letter-spacing: -0.01em;
}
a { color: var(--mia); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 860px; }

header.site {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
}
header.site .wrap { display: flex; align-items: center; gap: 14px; }
.logo { font-size: 23px; font-weight: 600; color: var(--text); }
.logo a { color: inherit; display: block; }
.logo a:hover { text-decoration: none; }
.logo span { color: var(--mia); font-style: italic; }
.logo img { display: block; height: 30px; width: auto; }
.logo .mark-chalk { display: none; }
:root[data-theme="dusk"] .logo .mark-ink { display: none; }
:root[data-theme="dusk"] .logo .mark-chalk { display: block; }
nav { margin-left: auto; display: flex; gap: 20px; font-size: 14.5px; flex-wrap: wrap; }
nav a { color: var(--dim); }
nav a:hover { color: var(--text); text-decoration: none; }
nav a.active { color: var(--text); border-bottom: 1px solid var(--text); padding-bottom: 2px; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding: 84px 0 0; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 56px; align-items: center;
}
.hero h1 {
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.04; margin: 0 0 22px;
  font-weight: 480;
}
h1 em, h2 em { color: var(--mia); font-style: italic; font-weight: 500; }
.hero p.sub { font-size: 19px; color: var(--dim); max-width: 34em; margin: 0 0 30px; }
.cta {
  display: inline-block; background: var(--text); color: var(--bg);
  font-weight: 600; font-size: 16px; padding: 14px 30px; border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.cta:hover { text-decoration: none; background: var(--cta-hover); transform: translateY(-1px); }
/* The subscribe buttons are real <form> buttons (they POST into checkout) —
   dressed exactly like the anchor CTAs. */
button.cta { border: 0; cursor: pointer; font-family: inherit; }
.cta.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--text);
}
.cta.ghost:hover { background: var(--text); color: var(--bg); }
.cta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.center .cta-row { justify-content: center; }

/* ---- The live text demo (hero phone) -------------------------------------- */
.phone-demo {
  max-width: 400px; width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 18px 16px 20px;
  text-align: left;
  box-shadow: var(--shadow);
  justify-self: center;
}
.phone-demo .phone-top {
  display: flex; align-items: center; gap: 10px;
  padding: 0 4px 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.phone-demo .phone-top img { width: 36px; height: 36px; border-radius: 50%; }
.phone-demo .phone-top strong { font-size: 15px; }
.phone-demo .phone-top small { display: block; color: var(--dim); font-size: 12px; }
.thread { display: flex; flex-direction: column; gap: 8px; min-height: 224px; }
.bubble {
  max-width: 84%; padding: 9px 14px; border-radius: 18px;
  font-size: 14.5px; line-height: 1.45;
}
.bubble.you { align-self: flex-end; background: var(--text); color: var(--bg); border-bottom-right-radius: 5px; }
.bubble.mia { align-self: flex-start; background: var(--panel2); color: var(--text); border-bottom-left-radius: 5px; }
.bubble.mia.typing { color: var(--dim); letter-spacing: 2px; }
.thread .bubble { opacity: 0; transform: translateY(8px); }
.thread .bubble.show { opacity: 1; transform: none; transition: opacity 0.35s ease, transform 0.35s ease; }

/* ---- The facts strip (under the hero) -------------------------------------- */
.facts { border-top: 1px solid var(--line); margin-top: 72px; }
.facts .wrap {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.fact {
  padding: 22px 24px 24px 0; font-size: 14.5px; color: var(--dim);
  border-left: 1px solid var(--line); padding-left: 24px;
}
.fact:first-child { border-left: 0; padding-left: 0; }
.fact strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }

/* ---- Sections -------------------------------------------------------------- */
section.band { padding: 88px 0; }
section.band.alt { background: transparent; border-top: 1px solid var(--line); }
.kicker {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px;
  color: var(--accent2); font-weight: 700; margin: 0 0 14px;
}
section.band h2 {
  font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1;
  margin: 0 0 18px; font-weight: 480;
}
section.band p.lede { color: var(--dim); font-size: 18px; max-width: 44em; margin: 0 0 8px; }
.center { text-align: center; }
.center p.lede { margin-left: auto; margin-right: auto; }

/* ---- Pillars: a ruled ledger, not cards -------------------------------------- */
.pillars {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0 64px; counter-reset: pillar; padding: 8px 0 0;
}
.pillar {
  counter-increment: pillar;
  border-top: 1px solid var(--line);
  padding: 26px 0 30px; position: relative;
}
.pillar h3 { margin: 0 0 8px; font-size: 23px; font-weight: 540; }
.pillar h3 .dot { display: none; }
.pillar h3::before {
  content: "0" counter(pillar);
  font: 600 12px/1 system-ui, sans-serif; letter-spacing: 0.12em;
  color: var(--mia); display: block; margin-bottom: 12px;
}
.pillar p { margin: 0; color: var(--dim); font-size: 15.5px; }

/* ---- Scenario cards (Life with Mia) ----------------------------------------- */
.scenes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 48px; }
.scene {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 12px;
}
.scene .tag {
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent2); font-weight: 700;
}
.scene h3 { margin: 0; font-size: 25px; line-height: 1.18; font-weight: 520; }
.scene p { margin: 0; color: var(--dim); font-size: 15.5px; }
.scene .mini-thread { display: flex; flex-direction: column; gap: 7px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.scene .mini-thread .bubble { font-size: 13.5px; padding: 8px 12px; }
.scene .mini-thread .bubble.mia { background: var(--mia-soft); color: var(--text); }
.scene:last-child:nth-child(odd) { grid-column: 1 / -1; }
.scene:last-child:nth-child(odd) p { max-width: 62em; }

/* ---- Doors (four surfaces): ruled columns -------------------------------------- */
.doors {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; margin-top: 48px; text-align: left;
  border-top: 1px solid var(--line);
}
.door { padding: 28px 28px 8px 0; border-left: 1px solid var(--line); padding-left: 28px; }
.door:first-child { border-left: 0; padding-left: 0; }
.door .big { font-size: 26px; display: block; margin-bottom: 14px; }
.door .big svg { width: 30px; height: 30px; stroke: var(--text); }
.door h3 { margin: 0 0 8px; font-size: 21px; font-weight: 540; }
.door p { margin: 0; color: var(--dim); font-size: 14.5px; }

/* ---- Ownership band ----------------------------------------------------------- */
.own-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0 64px; margin-top: 40px; counter-reset: own;
}
.own {
  counter-increment: own;
  border-top: 1px solid var(--line); padding: 24px 0 30px;
}
.own::before {
  content: "0" counter(own);
  font: 600 12px/1 system-ui, sans-serif; letter-spacing: 0.12em;
  color: var(--mia); display: block; margin-bottom: 12px;
}
.own h3 { margin: 0 0 8px; font-size: 22px; font-weight: 540; }
.own p { margin: 0; color: var(--dim); font-size: 15.5px; }
.own p.price { margin: 2px 0 12px; color: var(--text); font-size: 15px; }
.own p.price strong { font-family: "Fraunces", Georgia, serif; font-size: 34px; font-weight: 540; color: var(--text); }
.own p.price span { color: var(--dim); margin-left: 4px; }

/* ---- Quote: the one dark moment -------------------------------------------------- */
.quote {
  text-align: center; padding: 96px 0;
  background: var(--ink-band); color: #efe9f8;
  margin-top: 40px;
}
.quote .face { width: min(150px, 40vw); height: auto; margin: 0 auto 28px; display: block; }
.quote blockquote {
  font-size: clamp(26px, 3.6vw, 40px); font-style: italic; font-weight: 440;
  line-height: 1.25; max-width: 24em; margin: 0 auto; color: #f3eefb;
}
.quote cite { display: block; margin-top: 18px; color: #9d92b8; font-size: 15px; font-style: normal; }
.quote .signature { display: block; width: min(230px, 55vw); height: auto; margin: 26px auto 0; }
.quote .cta { background: #f3eefb; color: var(--ink-band); }
.quote .cta:hover { background: #fff; }
.quote .cta-row { justify-content: center; }

/* ---- Deep-dive layout (inside/future pages) --------------------------------------- */
.deep { padding: 26px 0 10px; }
.deep h2 { font-size: 30px; margin: 56px 0 12px; font-weight: 500; }
.deep h3 { font-size: 21px; margin: 32px 0 8px; font-weight: 540; }
.deep p, .deep li { color: var(--body); }
.deep li { margin-bottom: 8px; }
.deep strong { color: var(--text); }
.deep .note {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent2);
  border-radius: 8px; padding: 18px 22px; color: var(--dim); font-size: 15.5px;
}
.deep .diagram {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 22px 24px; margin: 22px 0; overflow-x: auto;
}
.deep .diagram pre { margin: 0; color: var(--dim); font: 14px/1.7 ui-monospace, Consolas, monospace; }
.qa { margin: 22px 0; }
.qa details {
  background: transparent; border: 0; border-top: 1px solid var(--line);
  border-radius: 0; padding: 4px 2px; margin: 0;
}
.qa details:last-child { border-bottom: 1px solid var(--line); }
.qa summary {
  cursor: pointer; font-weight: 600; padding: 16px 0; color: var(--text);
  list-style: none; position: relative; padding-right: 34px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font: 400 22px/1 "Fraunces", Georgia, serif; color: var(--dim);
}
.qa details[open] summary::after { content: "–"; }
.qa details p { margin: 4px 0 18px; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 10px; border-radius: 999px; vertical-align: middle; margin-left: 8px;
}
.badge.live { background: var(--accent2-soft); color: var(--accent2); }
.badge.soon { background: var(--mia-soft); color: var(--mia); }

/* ---- Spec tables (specs.html) ------------------------------------------------------ */
.spec-table { width: 100%; border-collapse: collapse; margin: 14px 0 6px; font-size: 15px; }
.spec-table th {
  text-align: left; color: var(--accent2); font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 8px 12px; border-bottom: 1px solid var(--text);
}
.spec-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--body); vertical-align: top; }
.spec-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.spec-table code, .deep code {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 7px; font: 13.5px ui-monospace, Consolas, monospace; color: var(--mia);
}
.table-scroll { overflow-x: auto; }

/* ---- Roadmap timeline ------------------------------------------------------------- */
.timeline { margin: 34px 0 10px; padding-left: 26px; border-left: 1px solid var(--line); }
.tl-item { position: relative; padding: 0 0 38px 22px; }
.tl-item::before {
  content: ""; position: absolute; left: -32px; top: 7px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--mia); box-shadow: 0 0 0 4px var(--mia-soft);
}
.tl-item.done::before { background: var(--accent2); box-shadow: 0 0 0 4px var(--accent2-soft); }
.tl-item h3 { margin: 0 0 6px; font-size: 21px; font-weight: 540; }
.tl-item p { margin: 0; color: var(--dim); font-size: 15.5px; max-width: 46em; }

/* ---- Legal / doc pages -------------------------------------------------------------- */
main.doc { padding: 56px 0 80px; }
main.doc h1 { font-size: 38px; margin-bottom: 4px; font-weight: 500; }
main.doc .updated { color: var(--dim); font-size: 14px; margin-bottom: 36px; }
main.doc h2 { font-size: 23px; margin-top: 40px; font-weight: 540; }
main.doc p, main.doc li { color: var(--body); }
main.doc strong { color: var(--text); }

/* ---- Footer --------------------------------------------------------------------------- */
footer.site {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px; color: var(--dim); font-size: 14px;
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer.site a { color: var(--dim); }
footer.site a:hover { color: var(--text); }

/* ---- Scroll reveal ---------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---- Responsive ---------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .facts .wrap { grid-template-columns: 1fr 1fr; }
  .fact { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .fact:nth-child(-n+2) { border-top: 0; }
  .doors { grid-template-columns: 1fr 1fr; }
  .door { border-left: 0; padding-left: 0; }
  .scenes { grid-template-columns: 1fr; }
  .pillars, .own-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 560px) {
  .facts .wrap, .doors { grid-template-columns: 1fr; }
  .fact:nth-child(2) { border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .thread .bubble { opacity: 1 !important; transform: none !important; transition: none !important; }
  .cta, .cta:hover { transform: none; }
}
