/* ==========================================================================
   Absolute Health
   Plain CSS, no framework, no build step.
   Every text/background pair in here clears WCAG 2.2 AA (4.5:1); control
   borders clear the 3:1 non-text threshold. Verify before changing a value.
   ========================================================================== */

:root {
  /* Surfaces */
  --background-primary:   #faf8f3;   /* warm bone */
  --background-secondary: #f1eee6;

  /* Text — two tiers only, both AA on both surfaces */
  --text-primary:   #23231f;         /* 14.9:1 / 13.6:1 */
  --text-secondary: #55534b;         /*  7.3:1 /  6.7:1 */

  /* Lines */
  --border-subtle:  #ddd8cc;         /* decorative rules */
  --border-control: #8d8779;         /* form inputs — 3.4:1 / 3.1:1 */

  /* The single institutional accent */
  --accent:      #1d3a5c;            /* 10.9:1 / 10.0:1 */
  --accent-deep: #16324f;

  --font-display: "Source Serif 4", "Iowan Old Style", Charter, Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --content-max: 80rem;              /* 1280px */
  --reading-max: 36rem;              /* ~66 characters at 18px */
  --radius-small: 3px;

  --space-section: 3.75rem;          /* 60px mobile */
  --space-block:   2rem;
  --gutter:        1.5rem;
  --tap:           48px;             /* minimum interactive target */
}

@media (min-width: 60rem) {
  :root { --space-section: 6.5rem; --space-block: 2.5rem; --gutter: 3rem; }
}

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

body {
  margin: 0;
  background: var(--background-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;              /* 17px mobile */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; line-height: 1.58; } }  /* 18px */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0 0 0.6em;
  text-wrap: pretty;
}
h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.15; }
h2 { font-size: clamp(1.45rem, 2.7vw, 1.95rem); }
h3 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }

p { margin: 0 0 1.15em; max-width: var(--reading-max); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lede {
  font-family: var(--font-display);
  font-size: clamp(1.1875rem, 2.1vw, 1.45rem);
  line-height: 1.45;
  color: var(--text-secondary);
  max-width: 34ch;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

.small { font-size: 0.9375rem; line-height: 1.6; color: var(--text-secondary); }
.rule { border: 0; border-top: 1px solid var(--border-subtle); margin: 0; }

/* ---------- Layout ---------- */

.shell { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
@media (max-width: 40rem) { .shell { width: calc(100% - 40px); } }

.prose { max-width: 68ch; }

/* The workhorse: content left, a different companion right in every section. */
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  gap: clamp(64px, 7vw, 112px);
  align-items: start;
}
@media (max-width: 65rem) {
  .section-grid { grid-template-columns: 1fr; gap: 2.75rem; }
}
.narrow { max-width: var(--reading-max); }

section { padding-block: var(--space-section); }
.band { background: var(--background-secondary); }
.page-head { padding-block: calc(var(--space-section) * 0.45) var(--space-block); }

.block + .block {
  margin-top: var(--space-block);
  padding-top: var(--space-block);
  border-top: 1px solid var(--border-subtle);
}

.split { display: grid; gap: var(--space-block); }
@media (min-width: 52rem) {
  .split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 3.25rem; align-items: start; }
  /* Heading-left sections: a narrow label column reads as an editorial sidenote
     instead of leaving half the page empty beside two paragraphs. */
  .split--label { grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; }
  .split--aside { grid-template-columns: 19rem 1fr; gap: 3.5rem; }
}

/* ---------- Header ---------- */

.site-header {
  background: var(--background-primary);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; z-index: 50;
}
section[id] { scroll-margin-top: 6.5rem; }
.site-header .shell {
  display: flex; align-items: center; gap: 1rem;
  min-height: 5.25rem; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; text-decoration: none; margin-right: auto; padding: 0.35rem 0; }
.brand img { height: 44px; width: auto; display: block; mix-blend-mode: multiply; }
@media (min-width: 48rem) { .brand img { height: 52px; } }

/* Desktop navigation */
.nav-desktop { display: none; }
.nav-desktop a {
  display: inline-flex; align-items: center;
  min-height: var(--tap); padding: 0 0.8rem;
  font-size: 1.0625rem; color: var(--text-secondary);
  text-decoration: none; border-bottom: 2px solid transparent;
}
.nav-desktop a:hover { color: var(--text-primary); }
.nav-desktop a.is-active { color: var(--text-primary); border-bottom-color: var(--accent); }

@media (min-width: 76rem) {
  .nav-desktop { display: flex; gap: 0.1rem; }
  .nav-mobile { display: none; }
}

/* Mobile disclosure — no JavaScript */
.nav-mobile { width: 100%; }
.nav-mobile > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--tap); padding: 0.5rem 0;
  font-size: 0.9375rem; font-weight: 500;
  border-top: 1px solid var(--border-subtle);
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile > summary::after { content: "+"; font-size: 1.35rem; line-height: 1; }
.nav-mobile[open] > summary::after { content: "\2212"; }
.nav-mobile ul { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.nav-mobile a {
  display: flex; align-items: center; min-height: var(--tap);
  padding: 0.25rem 0; font-size: 1.0625rem;
  color: var(--text-primary); text-decoration: none;
  border-top: 1px solid var(--border-subtle);
}
.nav-mobile a.is-active { font-weight: 600; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0.7rem 1.4rem;
  font-family: var(--font-body); font-size: 0.9375rem; font-weight: 500;
  background: var(--accent); color: var(--background-primary);
  border: 1px solid var(--accent); border-radius: var(--radius-small);
  text-decoration: none; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--background-primary); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: var(--background-primary); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 1.85rem; }
.actions a:not(.btn) { font-size: 0.9375rem; }

/* ---------- Hero ---------- */

.hero { padding-block: calc(var(--space-section) * 0.5) var(--space-section); }
.hero h1 { max-width: 17ch; margin-bottom: 1.2rem; }

/* ---------- Hero portrait ---------- */

.hero-portrait img { width: 100%; height: auto; display: block; border-radius: var(--radius-small); }
@media (max-width: 65rem) { .hero-portrait { max-width: 22rem; } }

/* ---------- Physician endorsements band ---------- */

.endorse-head { max-width: 22ch; margin-bottom: 2.5rem; }
.endorse-cards { display: grid; gap: 2.5rem; }
@media (min-width: 46rem) { .endorse-cards { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.endorse-cards > div { padding-top: 1.15rem; border-top: 2px solid var(--accent); }
.endorse-quote {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.9vw, 1.3rem);
  line-height: 1.45;
  max-width: none;
  margin-bottom: 1.1rem;
}
.endorse-name { font-size: 0.9375rem; color: var(--text-secondary); max-width: none; margin-bottom: 0.6rem; }
.endorse-name b { display: block; color: var(--text-primary); font-weight: 600; }

/* ---------- About metadata ---------- */

.metadata { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; line-height: 1.5; }
.metadata li { padding: 0.7rem 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.metadata li:first-child { border-top: 1px solid var(--border-subtle); }

/* ---------- Credential strip ---------- */

.credential-strip { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem 2.5rem; }
@media (min-width: 40rem) { .credential-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .credential-strip { grid-template-columns: repeat(4, 1fr); } }
.credential-strip li { font-size: 0.9375rem; line-height: 1.5; color: var(--text-secondary); padding-top: 0.9rem; border-top: 1px solid var(--border-subtle); }
.credential-strip b { display: block; font-family: var(--font-display); font-size: 1.1875rem; font-weight: 400; color: var(--text-primary); margin-bottom: 0.15rem; }

/* ---------- Process ---------- */

.process { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .process { grid-template-columns: repeat(2, 1fr); gap: 3rem 4rem; } }
.process li { counter-increment: step; }
.process li::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--accent);
  margin-bottom: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-subtle);
}
.process--journey { counter-reset: step; }
.process--journey li::before { color: var(--accent); }
.process h3 { margin-bottom: 0.35rem; }
.process p { color: var(--text-secondary); font-size: 1rem; max-width: none; }

/* ---------- Clinical domains ---------- */

.domains { list-style: none; margin: 0; padding: 0; }
.domains li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 46ch;
}
.domains li:first-child { border-top: 1px solid var(--border-subtle); }
.domains b { display: block; color: var(--text-primary); font-weight: 600; margin-bottom: 0.2rem; }

/* ---------- Testing may include ---------- */

.testing-panel {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-small);
  padding: 1.75rem;
  background: var(--background-primary);
}
.testing-panel h3 { margin-bottom: 1rem; }
.testing-panel ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.testing-panel ul li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9375rem;
}
.testing-panel > p.small { margin-bottom: 1rem; }
.full-panel summary {
  cursor: pointer;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
}
.full-panel[open] summary { margin-bottom: 0.5rem; }

/* ---------- Membership price panel ---------- */

.price-panel {
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-small);
  padding: 1.75rem;
  background: var(--background-primary);
}
.price-panel .price { margin-bottom: 1.25rem; }
.price-panel ul { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.price-panel ul li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9375rem;
}
.price-panel .btn { width: 100%; margin-bottom: 1rem; text-align: center; }

/* ---------- Quotes ---------- */

.quote { max-width: 40rem; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.42;
  max-width: none;
}
.quote cite { display: block; font-style: normal; font-size: 0.9375rem; color: var(--text-secondary); margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.quote cite b { display: block; color: var(--text-primary); font-weight: 600; }

.pullquotes { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .pullquotes { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.pullquotes blockquote { margin: 0; padding-left: 1.5rem; border-left: 2px solid var(--accent); }
.pullquotes blockquote p { font-family: var(--font-display); font-size: 1.125rem; line-height: 1.5; max-width: none; }
.pullquotes cite { font-style: normal; font-size: 0.9375rem; color: var(--text-secondary); }
.pullquotes cite b { color: var(--text-primary); font-weight: 600; }

/* ---------- Portrait ---------- */

.portrait { width: 100%; max-width: 20rem; height: auto; display: block; border-radius: var(--radius-small); }

.credentials-list { list-style: none; margin: 0; padding: 0; }
.credentials-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--border-subtle); font-size: 1rem; color: var(--text-secondary); }
.credentials-list li:first-child { border-top: 1px solid var(--border-subtle); }

/* ---------- Letters ---------- */

.letter { max-width: var(--reading-max); }
.letter + .letter { margin-top: 3.5rem; padding-top: 3.5rem; border-top: 1px solid var(--border-subtle); }
.letter p { font-family: var(--font-display); font-size: 1.0625rem; line-height: 1.62; }
.byline { font-family: var(--font-body); font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 1.75rem; }
.byline b { display: block; color: var(--text-primary); font-weight: 600; }

/* ---------- Membership ---------- */

.price { font-family: var(--font-display); font-size: clamp(2.25rem, 5vw, 3rem); line-height: 1; margin: 0 0 0.35rem; }
.price span { font-family: var(--font-body); font-size: 1rem; color: var(--text-secondary); }
.includes { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 0.8rem; max-width: var(--reading-max); font-size: 1rem; }
.includes li { padding-left: 1.35rem; position: relative; }
.includes li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--border-subtle); max-width: var(--reading-max); }
.faq details { border-bottom: 1px solid var(--border-subtle); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: var(--tap); padding: 0.85rem 0;
  font-weight: 600; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.35rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 1.25rem; color: var(--text-secondary); font-size: 1rem; }

/* ---------- Forms ---------- */

.contact-form { display: grid; gap: 1.35rem; max-width: 30rem; }
.contact-form label { display: grid; gap: 0.4rem; font-size: 0.9375rem; font-weight: 600; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body); font-size: 1.0625rem; font-weight: 400;
  min-height: var(--tap); padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-control); border-radius: var(--radius-small);
  background: var(--background-primary); color: var(--text-primary); width: 100%;
}
.contact-form textarea { min-height: 6.5rem; resize: vertical; line-height: 1.5; }
.contact-form button { justify-self: start; }
.field-note { font-weight: 400; font-size: 0.875rem; color: var(--text-secondary); }

.fallback { border: 1px solid var(--border-subtle); background: var(--background-primary); padding: 1.5rem 1.75rem; max-width: var(--reading-max); border-radius: var(--radius-small); }
.calendly-inline-widget { min-width: 320px; height: 660px; }

/* ---------- Insights ---------- */

.insight-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-subtle); max-width: var(--reading-max); }
.insight-list li { padding: 1.5rem 0; border-bottom: 1px solid var(--border-subtle); }
.insight-list h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; margin-bottom: 0.35rem; }
.insight-meta { font-size: 0.875rem; color: var(--text-secondary); }

/* ---------- Three contact paths, equal weight ---------- */

.paths { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
@media (min-width: 52rem) { .paths { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; align-items: start; } }
.paths li { padding-top: 1.1rem; border-top: 2px solid var(--accent); }
.paths h3 { margin-bottom: 0.3rem; }
.paths p { max-width: none; margin-bottom: 0.7rem; }
.paths p:last-child { margin-bottom: 0; }
.paths .fallback { padding: 1rem 1.15rem; }
.paths .calendly-inline-widget { height: 520px; }

/* ---------- Current Patients ---------- */

.access-blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .access-blocks { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.access-blocks li {
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-small);
  padding: 1.75rem;
}
.access-blocks h2 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.35rem; }
.access-blocks .btn { width: 100%; text-align: center; margin-bottom: 0.5rem; }

.already { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border-subtle); }


.patient-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-subtle); max-width: var(--reading-max); }
.patient-links li { padding: 1.75rem 0; border-bottom: 1px solid var(--border-subtle); }
.patient-links h2 { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.3rem; }
.patient-links p { margin-bottom: 0.75rem; }
.patient-links p:last-child { margin-bottom: 0; }
.patient-links .btn { margin-right: 0.5rem; margin-top: 0.25rem; }

a.tel { white-space: nowrap; font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border-subtle); padding-block: 3.5rem; font-size: 0.9375rem; color: var(--text-secondary); }
.site-footer a { color: var(--accent); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .footer-grid { grid-template-columns: 1.4fr 1fr; gap: 4rem; } }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li a { display: inline-flex; align-items: center; min-height: 2.5rem; }
.disclaimer { font-size: 0.875rem; line-height: 1.6; padding-top: 1.5rem; border-top: 1px solid var(--border-subtle); margin-top: 2.5rem; max-width: var(--reading-max); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--accent); color: var(--background-primary); padding: 0.75rem 1.25rem; border-radius: var(--radius-small); }
