/* Treehouse Child Psychiatry
   Layout: calm canopy-green header band, wide reading column, content in plain stacked sections;
   the treehouse drawing carries the personality so the rest can stay quiet. */
:root {
  --bg: #f5f7f2;          /* morning-leaf off-white */
  --surface: #ffffff;
  --ink: #1d2a22;         /* bark-dark green ink */
  --muted: #56645b;
  --line: #dbe2d6;
  --forest: #0b6a3b;      /* primary: logo canopy green */
  --forest-ink: #ffffff;
  --cedar: #8b5e3c;       /* logo wood brown, used sparingly */
  --sun: #f0c25a;         /* dappled light highlight */
  --tint: #e6eee2;        /* pale leaf panel */
  --focus: #e09a2b;

  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.2vw, 3.6rem);

  --wrap: 72rem;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131a16; --surface: #1a231e; --ink: #e7ede6; --muted: #a8b5ab; --line: #2b3830;
    --forest: #7fbf98; --forest-ink: #0f1a14; --cedar: #d99a6c; --sun: #f0c25a; --tint: #1f2c24; --focus: #f0c25a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131a16; --surface: #1a231e; --ink: #e7ede6; --muted: #a8b5ab; --line: #2b3830;
  --forest: #7fbf98; --forest-ink: #0f1a14; --cedar: #d99a6c; --sun: #f0c25a; --tint: #1f2c24; --focus: #f0c25a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; }
.prose > * + * { margin-top: 1em; }
.prose { max-width: 65ch; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.eyebrow { font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; color: var(--cedar); font-weight: 700; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--surface); padding: .5rem 1rem; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.brand img { width: 48px; height: auto; flex: none; }
.brand-name { display: inline-grid; gap: .15rem; }
.brand-word { font-family: var(--font-display); font-size: 1.65rem; line-height: 1; text-transform: uppercase; letter-spacing: .03em; justify-self: start; }
.brand-sub { display: block; font-family: var(--font-body); font-size: .74rem; font-weight: 700; line-height: 1; color: var(--ink); text-transform: uppercase; letter-spacing: .18em; white-space: nowrap; justify-self: start; }
@media (max-width: 420px) { .brand-word { font-size: 1.35rem; } .brand img { width: 40px; } }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { text-decoration: none; color: var(--ink); padding: .45rem .7rem; border-radius: 8px; font-weight: 700; font-size: .98rem; }
.nav a:hover { background: var(--tint); }
.nav a[aria-current="page"] { color: var(--forest); box-shadow: inset 0 -2px 0 var(--forest); border-radius: 0; }
.nav .nav-actions { display: flex; gap: .5rem; margin-left: .5rem; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: .5rem .75rem; font: inherit; font-weight: 700; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; text-decoration: none; font-weight: 700; border-radius: 999px; padding: .7rem 1.25rem; border: 2px solid var(--forest); line-height: 1.2; transition: transform .15s ease, background .15s ease; }
.btn-primary { background: var(--forest); color: var(--forest-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--forest); }
.btn-ghost:hover { background: var(--tint); }
.btn-sm { padding: .45rem .9rem; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

@media (max-width: 920px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem; }
  .nav[data-open="false"] { display: none; }
  .nav a { padding: .8rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .nav .nav-actions { margin: 1rem 0 0; flex-wrap: wrap; }
  .nav .nav-actions a { border-bottom: 2px solid var(--forest); border-radius: 999px; padding: .7rem 1.2rem; flex: 1 1 10rem; }
}

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero-copy { display: grid; gap: 1.25rem; min-width: 0; }
.hero-copy .lede { font-size: var(--step-1); color: var(--muted); max-width: 36ch; }
.status { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem; color: var(--forest); background: var(--tint); border-radius: 999px; padding: .35rem .85rem; justify-self: start; }
.status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 4px color-mix(in srgb, var(--forest) 25%, transparent); }
.hero-art { min-width: 0; }
.hero-art img { width: 100%; max-width: 400px; margin-inline: auto; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 220px; }
}

/* Facts strip */
.facts { border-block: 1px solid var(--line); background: var(--surface); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 1.25rem 1rem; display: grid; gap: .15rem; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts b { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); color: var(--forest); font-variant-numeric: tabular-nums; }
.facts span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) {
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .facts li:nth-child(-n+2) { border-top: 0; }
}

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { display: grid; gap: .6rem; margin-bottom: 2rem; max-width: 46rem; }
.section-tint { background: var(--tint); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
.grid-3 > *, .grid-2 > * { min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .6rem; align-content: start; }
.card .icon { width: 44px; height: 44px; color: var(--forest); }

/* Steps: a real sequence */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: .5rem; align-content: start; padding-top: 1rem; border-top: 3px solid var(--forest); min-width: 0; }
.steps li::before { content: "Step " counter(step); font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--cedar); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Fee table */
.fees { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fees th, .fees td { text-align: left; padding: .9rem .25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.fees td.amt { text-align: right; font-family: var(--font-display); font-size: var(--step-1); white-space: nowrap; color: var(--forest); }
.fees th { font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fees td small { display: block; color: var(--muted); font-size: .92rem; }
.table-scroll { overflow-x: auto; }

/* Doctor */
.portrait { border-radius: var(--radius); overflow: hidden; background: var(--tint); aspect-ratio: 4 / 5; max-width: 100%; display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .ph { color: var(--muted); text-align: center; padding: 1rem; font-size: .95rem; }
.creds { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.creds li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.creds .yr { font-variant-numeric: tabular-nums; color: var(--cedar); font-weight: 700; }

/* FAQ */
.faq { display: grid; gap: .75rem; max-width: 50rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.25rem; }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; font-weight: 700; font-size: var(--step-1); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: .9rem; font-size: 1.5rem; color: var(--forest); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 1.25rem; }

/* Callout */
.callout { border-radius: var(--radius); background: var(--forest); color: var(--forest-ink); padding: clamp(1.5rem, 4vw, 2.75rem); display: grid; gap: 1rem; }
.callout a.btn { background: var(--forest-ink); color: var(--forest); border-color: var(--forest-ink); }
.callout a.btn-ghost { background: transparent; color: var(--forest-ink); }
.callout p { max-width: 55ch; }

.notice { border-left: 4px solid var(--cedar); background: var(--surface); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.contact-list li { display: grid; gap: .1rem; }
.contact-list .label { font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.contact-list .val { font-size: var(--step-1); overflow-wrap: anywhere; }

.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) 1rem; }
.page-head .wrap { display: grid; gap: .75rem; }
.page-head p { font-size: var(--step-1); color: var(--muted); max-width: 50ch; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 3rem 2rem; margin-top: 2rem; font-size: .98rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.site-footer .cols > * { min-width: 0; }
.site-footer h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.site-footer .legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; color: var(--muted); font-size: .9rem; }
.crisis { background: var(--tint); border-radius: var(--radius); padding: 1rem 1.25rem; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }
.nav a.btn-primary { color: var(--forest-ink); }
.nav a.btn-primary:hover { background: var(--forest); }
.nav a.btn-ghost { color: var(--forest); }
.b-tree { color: var(--forest); } .b-house { color: var(--cedar); }
.portrait { max-width: 440px; width: 100%; } .portrait img { object-position: 50% 20%; }
.h1-place { display: block; margin-top: .35em; font-size: .55em; color: var(--cedar); letter-spacing: .01em; }
/* Intake form */
.form-layout { grid-template-columns: 1.5fr 1fr; }
@media (max-width: 860px) { .form-layout { grid-template-columns: 1fr; } }
.intake { display: grid; gap: 1.75rem; min-width: 0; }
.intake fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.25rem; margin: 0; display: grid; gap: 1rem; min-width: 0; }
.intake legend { font-family: var(--font-display); font-size: var(--step-1); padding: 0 .4rem; }
.field { display: grid; gap: .35rem; min-width: 0; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: .7rem .8rem; width: 100%; min-width: 0; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); border-color: var(--forest); }
.field [aria-invalid="true"] { border-color: #c0392b; }
.hint { font-size: .9rem; color: var(--muted); }
.err { font-size: .92rem; color: #c0392b; font-weight: 700; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 1rem; }
@media (max-width: 520px) { .row-3 { grid-template-columns: 1fr 1fr; } .row-3 .field:first-child { grid-column: 1 / -1; } }
.field.check { grid-template-columns: auto 1fr; align-items: start; gap: .75rem; }
.field.check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--forest); }
.field.check label { font-weight: 400; }
.form-error { color: #c0392b; font-weight: 700; }
.form-done { background: var(--tint); border-radius: var(--radius); padding: 1rem 1.25rem; }
.intake .btn { justify-self: start; cursor: pointer; font-size: 1.05rem; }
.terms p { max-width: none; }
.notice.emergency { border-left-color: #c0392b; }
.legal-links a { color: inherit; }
.legal-doc h2 { font-size: var(--step-2); margin-top: 2rem; }
.legal-doc h2:first-child { margin-top: 0; }
.checklist { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.intake .card .btn { justify-self: start; }
/* Request form steps */
.progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; counter-reset: pstep; }
.progress li { counter-increment: pstep; display: grid; gap: .45rem; font-size: .88rem; font-weight: 700; color: var(--muted); min-width: 0; }
.progress li::before { content: ""; height: 6px; border-radius: 999px; background: var(--line); transition: background .25s ease; }
.progress li span::before { content: counter(pstep) ". "; }
.progress li.is-done::before, .progress li.is-current::before { background: var(--forest); }
.progress li.is-current { color: var(--ink); }
@media (max-width: 520px) { .progress li span { display: none; } .progress li.is-current span { display: inline; white-space: nowrap; } .progress li.is-current { grid-column: span 1; } }
.wizard .step { animation: step-in .25s ease; }
@keyframes step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wizard .step { animation: none; } .progress li::before { transition: none; } }
.wizard-nav { display: flex; flex-wrap: wrap; gap: .75rem; }
.wizard-nav .btn { cursor: pointer; font-size: 1.05rem; min-width: 8rem; }
.wizard-nav .btn:disabled { opacity: .6; cursor: progress; }
.review { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; }
.review dt { font-weight: 700; color: var(--muted); font-size: .95rem; }
.review dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 520px) { .review { grid-template-columns: 1fr; } .review dd { margin-bottom: .5rem; } }
.hint.warn { color: var(--cedar); font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-done h3 { margin-bottom: .5rem; }
.form-done p { margin: .4rem 0 0; }
[hidden] { display: none !important; }
/* Schedule page: Acuity's backgrounds are set to the page color (#F5F7F2) in its Styles settings, so the
   scheduler blends into the page. The fixed light fill keeps it readable as a light panel in dark mode. */
.scheduler { position: relative; background: #f5f7f2; border-radius: var(--radius); overflow: hidden; }
.scheduler iframe { position: relative; display: block; width: 100%; min-height: 640px; border: 0; background: transparent; }
.scheduler-loading { position: absolute; inset: 3rem 0 auto; text-align: center; color: #56645b; }
.scheduler-help { margin-top: 1rem; font-size: var(--step--1); }
/* Home page photo pair */
.photo-band { padding-bottom: clamp(3rem, 7vw, 5.5rem); margin-top: calc(-1 * clamp(1.5rem, 4vw, 3rem)); }
.photo-band .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.photo-band img { width: 100%; height: clamp(220px, 30vw, 380px); object-fit: cover; border-radius: var(--radius); }
.photo-band img:first-child { object-position: 60% 40%; }
.photo-band img:nth-child(2) { object-position: 40% 50%; }
.photo-band img:last-child { object-position: 35% 50%; }
@media (max-width: 640px) { .photo-band .wrap { grid-template-columns: 1fr; } }
.banner { width: 100%; max-width: 50rem; height: auto; border-radius: var(--radius); margin-bottom: 2rem; aspect-ratio: 1180 / 435; object-fit: cover; }
@media (max-width: 640px) { .banner { aspect-ratio: 16 / 9; object-position: 60% 50%; } }
