/* Dream Doctor — marketing site. Tokens mirror the app (kit/design-handoff/tokens). */
:root {
  --bg: #F5F2FC;
  --card: #FFFFFF;
  --border: #E4DCF5;
  --soft: #EEE7FC;
  --text: #251B45;
  --muted: #5F5680;
  --label: #6E5F9E;
  --accent: #5A2D91;
  --primary-bg: #5A2D91;
  --primary-text: #FFFFFF;
  --logo-dream: #5A2D91;
  --logo-doctor: #9C81BD;
  --warm: #EBA463;
  --crisis-bg: #FFF4F5;
  --crisis-text: #8A2E3B;
  --shadow: 0 18px 40px -22px rgba(37, 27, 69, 0.35);
  --radius: 22px;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #211A47;
    --card: #2B2257;
    --border: rgba(149, 131, 204, 0.45);
    --soft: #3A2F70;
    --text: #E4DCF3;
    --muted: #C2B9E2;
    --label: #C2B9E2;
    --accent: #C9B8F6;
    --primary-bg: #6E60A2;
    --primary-text: #FFFFFF;
    --logo-dream: #E4DCF3;
    --logo-doctor: #BBA6F4;
    --warm: #F1E4C6;
    --crisis-bg: #3E2A4E;
    --crisis-text: #F2A7B5;
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.wordmark { display: flex; flex-direction: column; line-height: 0.95; font-weight: 700; font-size: 18px; letter-spacing: -0.2px; }
.wordmark .d1 { color: var(--logo-dream); }
.wordmark .d2 { color: var(--logo-doctor); }
.nav { display: flex; gap: 22px; align-items: center; font-weight: 600; font-size: 15px; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav .hide-sm { display: inline; }
@media (max-width: 720px) { .nav { gap: 14px; font-size: 14px; } .nav .hide-sm { display: none; } }

.moon-night { display: none; }
@media (prefers-color-scheme: dark) { .moon-day { display: none; } .moon-night { display: block; } }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 10%, transparent) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 60%, var(--bg) 100%); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 56px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--label); margin: 0 0 12px; }
.hero h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.05; letter-spacing: -1px; margin: 0 0 18px; font-weight: 700; }
.hero p.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--text); margin: 0 0 12px; max-width: 34ch; }
.hero p.by { color: var(--muted); margin: 0 0 26px; font-weight: 500; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 18px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1.5px solid transparent; }
.btn-primary { background: var(--primary-bg); color: var(--primary-text); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--card); color: var(--accent); border-color: var(--border); }
.badge-soon { display: inline-flex; gap: 8px; align-items: center; margin-top: 22px; font-size: 14px; color: var(--muted); font-weight: 500; }
.badge-soon svg { width: 18px; height: 18px; fill: currentColor; }

.phone { width: 100%; max-width: 300px; margin: 0 auto; border-radius: 36px; padding: 8px; background: #17122F; box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.06) inset; }
.phone img { border-radius: 29px; width: 100%; height: auto; aspect-ratio: 540 / 1169; object-fit: cover; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; gap: 32px; }
  .hero .phone { max-width: 250px; }
}

/* Sections */
section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.section-head { max-width: 680px; margin: 0 0 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; letter-spacing: -0.5px; margin: 0 0 12px; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.step .phone { max-width: 220px; border-radius: 30px; padding: 6px; }
.step .phone img { border-radius: 25px; }
.step .num { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.step h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.quote { font-size: clamp(22px, 3vw, 28px); line-height: 1.35; font-weight: 600; margin: 0 0 18px; letter-spacing: -0.3px; }
.prose p { margin: 0 0 14px; }
.prose p.muted, .muted { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.icon { width: 42px; height: 42px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; color: var(--accent); }
.icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.band { background: var(--soft); }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 26px; padding: 32px; }
@media (max-width: 560px) { .panel { padding: 22px; } }
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check li { position: relative; padding-left: 30px; }
.check li::before { content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%237A5CD6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }

.crisis { background: var(--crisis-bg); color: var(--crisis-text); border-radius: 18px; padding: 16px 18px; font-weight: 600; font-size: 16px; }
.crisis a { color: inherit; }

.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid .card a { font-weight: 600; word-break: break-word; }
address { font-style: normal; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; font-size: 15px; color: var(--muted); }
.site-footer .row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; }
.site-footer nav a { color: var(--text); text-decoration: none; }
.site-footer p { margin: 6px 0; }
.site-footer .fine { font-size: 14px; margin-top: 20px; max-width: 760px; }

/* Legal / document pages */
.doc { max-width: 780px; margin: 0 auto; padding: 48px 20px 80px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.6px; margin: 0 0 8px; }
.doc .updated { color: var(--muted); margin: 0 0 28px; font-weight: 500; }
.doc h2 { font-size: 23px; margin: 40px 0 10px; letter-spacing: -0.2px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .summary { background: var(--soft); border-radius: 20px; padding: 20px 22px; margin: 0 0 8px; }
.doc .summary ul { margin: 8px 0 0; }
.toc { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 16px 22px; margin: 24px 0; }
.toc ol { margin: 6px 0 0; padding-left: 22px; columns: 2; column-gap: 32px; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.toc a { text-decoration: none; }
.table-wrap { overflow-x: auto; margin: 12px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 520px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.doc th { background: var(--soft); font-weight: 600; }
.caps { text-transform: uppercase; font-size: 15px; }
