/* LightHope Family — design system. No third-party fonts or requests. */

:root {
  --paper: #faf6ef;
  --surface: #ffffff;
  --sand: #f3ead9;
  --ink: #17313a;
  --muted: #53666c;
  --line: #e2d8c7;
  --accent: #b4552f;
  --accent-strong: #97431f;
  --on-accent: #ffffff;
  --sage: #3f7366;
  --sage-soft: #e2eee9;
  --urgent: #9b2c2c;
  --urgent-soft: #fbeae7;
  --focus: #1c6bb3;
  --teens: #b97a1c;
  --postpartum: #b0506a;
  --menopause: #765889;
  --sleep: #3c5c8c;
  --shadow: 0 1px 2px rgba(23, 49, 58, 0.06), 0 8px 24px rgba(23, 49, 58, 0.07);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1b1e;
    --surface: #17272b;
    --sand: #1c2d31;
    --ink: #ede6da;
    --muted: #a7b5b7;
    --line: #2c3f44;
    --accent: #e28b63;
    --accent-strong: #f0a27d;
    --on-accent: #1a1210;
    --sage: #8fc4b5;
    --sage-soft: #1c3530;
    --urgent: #f3a59d;
    --urgent-soft: #3a2020;
    --focus: #7db8ee;
    --teens: #e0a84e;
    --postpartum: #e08aa0;
    --menopause: #b79acb;
    --sleep: #8aaede;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0 0 0.5em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 650; letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.45em; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
small, .small { font-size: 0.875rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section.tint { background: var(--sand); }
.eyebrow { font: 650 0.78rem/1.3 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--sage); margin: 0 0 0.7rem; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 62ch; }
.center .lead { margin-inline: auto; }

/* ---------- header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.15rem/1 var(--serif); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span span { color: var(--accent-strong); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 11px; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--sand); }
.nav a.btn { color: var(--on-accent); background: var(--accent); }
.nav a.btn:hover { background: var(--accent-strong); }
.btn.nav-toggle { display: none; margin-left: auto; }
@media (max-width: 860px) {
  .btn.nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; flex-direction: column; align-items: stretch; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; font-size: 0.92rem; color: var(--muted); background: var(--sand); }
.site-footer .cols { display: grid; gap: 28px; grid-template-columns: 1.6fr 1fr 1fr; }
.site-footer h4 { color: var(--ink); margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer a { color: var(--muted); }
.site-footer .legal { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent); font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background 0.15s, transform 0.05s; }
.btn:hover { background: var(--accent-strong); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--sand); }
.btn.sage { background: var(--sage); color: var(--on-accent); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 0.9rem; }
.btn.big { min-height: 54px; padding: 14px 28px; font-size: 1.08rem; }
.btn.urgent { background: var(--urgent); color: var(--on-accent); }
.btn.urgent.ghost { background: var(--urgent-soft); color: var(--urgent); border-color: transparent; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.center .btn-row { justify-content: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent-strong); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- cards / grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.three { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid.two, .grid.four { grid-template-columns: 1fr; } }

.tile { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border-top: 5px solid var(--tone, var(--sage)); transition: transform 0.15s, box-shadow 0.15s; text-align: left; font: inherit; cursor: pointer; }
.tile:hover { transform: translateY(-2px); }
.tile .badge { align-self: flex-start; }
.tile h3 { margin: 0; }
.tile p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.tile .go { margin-top: auto; padding-top: 10px; font-weight: 600; color: var(--tone, var(--sage)); font-size: 0.95rem; }
.tone-teens { --tone: var(--teens); }
.tone-postpartum { --tone: var(--postpartum); }
.tone-menopause { --tone: var(--menopause); }
.tone-sleep { --tone: var(--sleep); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--sage-soft); color: var(--sage); font: 650 0.76rem/1.5 var(--sans); letter-spacing: 0.02em; }
.badge.plus { background: var(--accent); color: var(--on-accent); }
.badge.tone { background: color-mix(in srgb, var(--tone) 16%, transparent); color: var(--tone); }

.note { border-left: 4px solid var(--sage); background: var(--sage-soft); padding: 14px 16px; border-radius: 0 10px 10px 0; margin: 0 0 1.2em; }
.note.warn { border-color: var(--urgent); background: var(--urgent-soft); }
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--ink); }

/* ---------- landing ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 em { font-style: italic; color: var(--accent-strong); }
.hero .trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 1.4rem; padding: 0; list-style: none; color: var(--muted); font-size: 0.93rem; }
.hero .trust li { margin: 0; display: flex; align-items: center; gap: 7px; }
.hero .trust li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); flex: none; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

.demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 24px; position: relative; }
.demo-card .before, .demo-card .after { border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; }
.demo-card .before { background: var(--sand); color: var(--muted); }
.demo-card .after { background: var(--sage-soft); margin-bottom: 0; }
.demo-card .label { font: 650 0.74rem/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 4px; color: var(--muted); }
.demo-card .after .label { color: var(--sage); }
.demo-card q { quotes: "\201C" "\201D"; font-family: var(--serif); font-size: 1.08rem; line-height: 1.5; }
.demo-card .arrow { text-align: center; color: var(--muted); margin: -4px 0 8px; font-size: 1.1rem; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 650 0.95rem/1 var(--sans); margin-bottom: 12px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 16px; height: 9px; border-left: 3px solid var(--sage); border-bottom: 3px solid var(--sage); transform: rotate(-45deg); }
.checklist.no li::before { width: 14px; height: 0; border-left: 0; border-bottom: 3px solid var(--urgent); transform: none; top: 0.8em; }

.price { display: flex; flex-direction: column; gap: 6px; }
.price .amount { font: 600 2.4rem/1.1 var(--serif); }
.price .amount small { font: 400 1rem/1 var(--sans); color: var(--muted); }
.price.featured { border: 2px solid var(--accent); }
.price ul { margin-top: 10px; }

details.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
details.faq summary { cursor: pointer; padding: 16px 30px 16px 0; font: 600 1.08rem/1.4 var(--serif); list-style: none; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 1.5rem/1 var(--sans); color: var(--muted); }
details.faq[open] summary::after { content: "\2013"; }
details.faq > div { padding: 0 0 16px; color: var(--muted); max-width: 70ch; }

/* ---------- long-form pages ---------- */
.prose h2 { margin-top: 2.2em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.6em; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.4em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 650; }
.table-scroll { overflow-x: auto; }
.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 1rem; }

.source-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.source-card h3 { margin-bottom: 0.8rem; }
.source-card dl, .evidence dl { margin: 0; display: grid; gap: 10px; }
.source-card dl > div, .evidence dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; }
.source-card dt, .evidence dt { font-weight: 650; color: var(--muted); font-size: 0.9rem; }
.source-card dd, .evidence dd { margin: 0; }
@media (max-width: 640px) { .source-card dl > div, .evidence dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- app shell ---------- */
.app-main { padding: 28px 0 80px; min-height: 70vh; }
.app-main:focus { outline: none; }
.crumbs { font-size: 0.92rem; margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.view-head { margin-bottom: 22px; }
.view-head h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.stack > * + * { margin-top: 16px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field legend { font-weight: 600; }
.field .hint { color: var(--muted); font-size: 0.9rem; }
input[type="text"], textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
textarea { min-height: 130px; resize: vertical; }
input[type="text"]:focus, textarea:focus, select:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.counter { text-align: right; font-size: 0.85rem; color: var(--muted); }
.counter.over { color: var(--urgent); font-weight: 600; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.choice input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }

.practice-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.practice-list li { margin: 0; }
.practice-card { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--tone, var(--sage)); border-radius: var(--radius); padding: 18px 20px; }
.practice-card:hover { box-shadow: var(--shadow); }
.practice-card h3 { margin: 0 0 4px; }
.practice-card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.practice-card .meta { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.practice-card.urgent { border-left-color: var(--urgent); background: var(--urgent-soft); }

.say { list-style: none; padding: 0; display: grid; gap: 10px; }
.say li { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; background: var(--sage-soft); border-radius: 12px; padding: 12px 14px; font-family: var(--serif); font-size: 1.05rem; line-height: 1.5; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.block h2 { font-size: 1.3rem; }
.block.example { background: var(--sand); border-style: dashed; }
.evidence summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.evidence .src { border-top: 1px solid var(--line); padding: 16px 0; }
.evidence .src:first-of-type { margin-top: 12px; }

.script-preview { background: var(--sage-soft); border-radius: var(--radius); padding: 20px; font-family: var(--serif); font-size: 1.15rem; line-height: 1.6; min-height: 120px; }
.script-preview.empty { color: var(--muted); font-family: var(--sans); font-size: 1rem; }
.result { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.result h3 { font: 650 0.8rem/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); margin: 1.2rem 0 0.4rem; }
.result h3:first-child { margin-top: 0; }
.result .big-quote { font-family: var(--serif); font-size: 1.2rem; line-height: 1.55; }
.reply { background: var(--sand); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.reply p { margin: 0 0 4px; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; vertical-align: -4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sound ---------- */
.player { display: grid; gap: 18px; justify-items: center; text-align: center; padding: 30px 22px; }
.dial { width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--sleep) var(--pct, 0%), var(--line) 0); position: relative; }
.dial::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.dial .time { position: relative; font: 600 2.1rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.dial.playing { animation: breathe 9s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
input[type="range"] { width: min(280px, 80vw); accent-color: var(--sleep); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.seg button { font: inherit; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg button[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- help ---------- */
.help-fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; box-shadow: var(--shadow); }
dialog.sheet { border: 0; border-radius: 18px; padding: 0; width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
dialog.sheet::backdrop { background: rgba(10, 20, 24, 0.55); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.sheet-head h2 { margin: 0; font-size: 1.4rem; }
.sheet-body { padding: 20px 22px 26px; }
.emergency { background: var(--urgent-soft); color: var(--urgent); border-radius: 12px; padding: 14px 16px; font-weight: 600; margin-bottom: 16px; }
.emergency strong { font-size: 1.25rem; }
.line { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.line h3 { font: 650 1.02rem/1.3 var(--sans); margin: 0 0 2px; }
.line .contact { font-weight: 650; color: var(--accent-strong); font-size: 1.08rem; margin: 0 0 2px; }
.line p { margin: 0; color: var(--muted); font-size: 0.93rem; }

.toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 0.95rem; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.gate { max-width: 640px; margin: 24px auto; }
.feedback { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.saved-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); }
.saved-item q { font-family: var(--serif); font-size: 1.05rem; quotes: none; display: block; margin: 6px 0 12px; }
.key { font: 600 1.05rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em; background: var(--sand); padding: 10px 14px; border-radius: 10px; display: inline-block; user-select: all; }

.mt-s { margin-top: 8px; }
.mt-m { margin-top: 16px; }
.mt-l { margin-top: 2rem; }
.notes-box { height: 160px; border: 1px solid #999; border-radius: 8px; }
.print-only { display: none; }
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .help-fab, .no-print, .toast, .crumbs { display: none !important; }
  .print-only { display: block; }
  .card, .block, .result, .script-preview { box-shadow: none; border-color: #999; background: #fff; }
  a { color: #000; }
}
