/* ============================================================
   MyPremierMD — "The Five Towns" design system
   Locked theme: cool-neutral paper + confident navy + warm gold accent.
   No build step — plain CSS, loaded once, shared by every page.
   ============================================================ */

:root{
  --paper:      #F4F5F7;
  --paper-deep: #E8EAEE;
  --surface:    #FFFFFF;
  --ink:        #16233A;
  --ink-text:   #1B283D;
  --navy:       #1F3D63;
  --navy-dim:   #16294A;
  --gold:       #C08A28;
  --gold-dim:   #94681B;
  --muted:      #5B6472;
  --line:       rgba(22,35,58,0.14);

  --font-display: 'Bitter', Georgia, serif;
  --font-body: 'Karla', -apple-system, sans-serif;

  --radius-pill: 999px;
  --radius-card: 14px;
  --radius: var(--radius-card);

  --shadow-soft: 0 1px 2px rgba(22,35,58,0.05), 0 8px 24px rgba(22,35,58,0.07);
  --shadow-lift: 0 4px 8px rgba(22,35,58,0.09), 0 20px 40px rgba(22,35,58,0.15);

  --header-h: 76px;
  --bottom-nav-h: 64px;
}

/* Automatic dark mode — respects OS preference, not a manual toggle */
@media (prefers-color-scheme: dark){
  :root{
    --paper:      #12181F;
    --paper-deep: #0d1217;
    --surface:    #182029;
    --ink:        #F4F5F7;
    --ink-text:   #E7EAEE;
    --navy:       #5F8FC7;
    --navy-dim:   #3E6693;
    --gold:       #D9A84A;
    --gold-dim:   #C79539;
    --muted:      #93A0AF;
    --line:       rgba(244,245,247,0.14);
    --shadow-soft: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
    --shadow-lift: 0 4px 8px rgba(0,0,0,0.35), 0 24px 48px rgba(0,0,0,0.5);
  }
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

html{ overflow-x:hidden; }
body{
  margin:0;
  background:var(--paper);
  color:var(--ink-text);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  padding-bottom:0;
  overflow-x:hidden;
  /* .magnet's enlarged invisible tap-target padding (padding:14px;margin:-14px)
     can bleed a few px past the viewport edge when a hero button sits right at
     the container boundary on narrow phones -- found via cross-browser/mobile
     pass, 2026-07-08 (about.html, contact.html, medical-MJ.html, spravato.html,
     and others). Nothing visible is being clipped by this rule; it just removes
     the resulting phantom horizontal scroll capability. */
}
body.has-bottom-nav{ padding-bottom: calc(var(--bottom-nav-h) + 12px); }

img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; }

main{ position:relative; z-index:1; display:block; }

/* ===== Typography ===== */
h1,h2,h3,.display{ font-family:var(--font-display); color:var(--ink); margin:0 0 .4em; font-weight:700; letter-spacing:-.01em; }
h1{ font-size:clamp(2.2rem, 4vw + 1rem, 3.6rem); line-height:1.1; }
h2{ font-size:clamp(1.7rem, 2.2vw + 1rem, 2.4rem); line-height:1.16; }
h3{ font-size:clamp(1.1rem, 1vw + .85rem, 1.3rem); font-weight:600; }
h4{ font-family:var(--font-display); font-weight:700; font-size:1.05rem; color:var(--ink); margin:0 0 .4em; }
p{ color:var(--muted); margin:0 0 1em; max-width:42em; }
p.lead{ font-size:1.1rem; }
.eyebrow{ font-weight:700; font-size:.78rem; letter-spacing:.09em; text-transform:uppercase; color:var(--gold-dim); display:inline-flex; align-items:center; gap:.5em; margin-bottom:1em; }
.text-gold{ color:var(--gold-dim); }
a.inline-link{ color:var(--gold-dim); text-decoration:underline; text-decoration-color:color-mix(in srgb, var(--gold) 50%, transparent); text-underline-offset:2px; }
a.inline-link:hover{ color:var(--gold); }

/* ===== Layout shell ===== */
.container{ max-width:1240px; margin:0 auto; padding:0 clamp(28px,5vw,48px); }
.container-narrow{ max-width:760px; margin:0 auto; padding:0 clamp(28px,5vw,48px); }
section{ padding: clamp(56px,7vw,116px) 0; position:relative; }
section.tight{ padding: clamp(40px,5vw,72px) 0; }
section.section-tint{ background:var(--paper-deep); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.band-ink{ background:var(--ink); position:relative; overflow:hidden; }
.band-ink > .container{ position:relative; z-index:2; }
.band-ink h1,.band-ink h2,.band-ink h3,.band-ink h4{ color:var(--paper); }
.band-ink p{ color:rgba(244,245,247,.72); }
.band-ink .eyebrow{ color:#E3BE7A; }
.band-ink .btn-ghost{ border-color:rgba(244,245,247,.50); color:var(--paper); }
.band-ink .btn-ghost:hover{ border-color:var(--paper); background:rgba(244,245,247,.08); }
.band-ink a.inline-link{ color:#E3BE7A; }
.band-ink a.inline-link:hover{ color:var(--paper); }
@media (prefers-color-scheme: dark){
  .band-ink{ background:var(--navy-dim); }
  /* navy-dim is much lighter in dark mode than the light-mode ink background,
     so the semi-transparent paragraph tint and hardcoded gold accent (tuned
     against light-mode's near-black --ink) both drop below 4.5:1 there --
     bump opacity/lighten just for this context rather than reworking the
     shared tokens used elsewhere. */
  .band-ink p{ color:rgba(244,245,247,.86); }
  .band-ink .eyebrow{ color:#F1DEBB; }
  .band-ink a.inline-link{ color:#F1DEBB; }
}

/* ===== Buttons ===== */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:.5em; padding:14px 26px; border-radius:8px; font-weight:600; font-size:.95rem; text-decoration:none; border:1.5px solid transparent; cursor:pointer; transition:background .18s, border-color .18s, transform .18s; }
.btn-sm{ padding:10px 18px; font-size:.85rem; }
.btn-primary{ background:var(--navy); color:#fff; }
.btn-primary:hover{ background:var(--navy-dim); transform:translateY(-1px); }
@media (prefers-color-scheme: dark){
  /* --navy itself reads fine as text/icon color in dark mode (5.3:1+), but
     dark mode's lighter navy value drops white button text below 4.5:1 --
     use a darker shade just for the button background, not the shared token. */
  .btn-primary{ background:#3E6693; }
  .btn-primary:hover{ background:#2E4E72; }
}
.btn-ghost{ border-color:var(--line); color:var(--ink-text); }
.btn-ghost:hover{ border-color:var(--navy); background:color-mix(in srgb, var(--navy) 6%, transparent); }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }

/* ===== Header / nav ===== */
.site-header{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px clamp(28px,5vw,48px);
  background:color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  min-height:var(--header-h);
}
.site-header .brand{ display:flex; align-items:center; gap:12px; text-decoration:none; }
.site-header .brand-text{ display:flex; flex-direction:column; line-height:1.15; }
.site-header .brand-text .name{ font-family:var(--font-display); font-weight:700; font-size:1.4rem; color:var(--ink); }
.site-header .brand-text .name span{ color:var(--navy); }
.site-header .brand-text .by{ font-size:.7rem; color:var(--muted); letter-spacing:.04em; }
.nav-right{ display:flex; align-items:center; gap:14px; }

.menu-pill{ display:flex; align-items:center; gap:8px; background:var(--surface); border:1.5px solid var(--line); border-radius:var(--radius-pill); padding:10px 18px; font-weight:600; font-size:.9rem; color:var(--ink-text); cursor:pointer; }
.nav-panel{ display:none; position:absolute; top:calc(var(--header-h) - 4px); right:clamp(28px,5vw,48px); background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-card); box-shadow:var(--shadow-lift); padding:20px; gap:28px; grid-template-columns:repeat(4,170px); z-index:60; }
.nav-panel.open{ display:grid; }
@media (max-width:900px){ .nav-panel{ grid-template-columns:repeat(2,170px); } }
.nav-panel h5{ font-family:var(--font-display); font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; color:var(--gold-dim); margin:0 0 10px; }
.nav-panel a{ display:block; font-size:.9rem; color:var(--ink-text); text-decoration:none; padding:6px 0; }
.nav-panel a:hover{ color:var(--navy); }

/* Mobile bottom nav — thumb zone, not a top dropdown */
.bottom-nav{
  display:none; position:fixed; bottom:0; left:0; right:0; z-index:50;
  background:color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter:blur(10px);
  border-top:1px solid var(--line);
  height:var(--bottom-nav-h);
  grid-template-columns:repeat(5,1fr);
  align-items:center;
}
.bottom-nav a, .bottom-nav button{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  font-size:.66rem; font-weight:600; color:var(--muted); text-decoration:none;
  background:none; border:none; font-family:var(--font-body); height:100%;
}
.bottom-nav svg{ width:22px; height:22px; }
.bottom-nav a[aria-current="page"], .bottom-nav a.active{ color:var(--navy); }

@media (max-width:900px){
  /* Was previously display:none on just the inner <span> -- that hid the
     visible text but left the <a> itself focusable with no accessible name
     (an unlabeled, blank tappable pill). The bottom-nav's own "Call" tab
     already provides a labeled equivalent on mobile, so hide the whole
     control here rather than patch a redundant, broken one. */
  .nav-right .btn-primary.btn-sm{ display:none; }
  .bottom-nav{ display:grid; }
  body{ padding-bottom: calc(var(--bottom-nav-h) + 12px); }
}

/* Mobile "More" bottom sheet */
.sheet-backdrop{ display:none; position:fixed; inset:0; background:rgba(22,35,58,.45); z-index:59; }
.sheet-backdrop.open{ display:block; }
.sheet{
  position:fixed; left:0; right:0; bottom:0; z-index:60;
  background:var(--surface); border-radius:20px 20px 0 0; box-shadow:var(--shadow-lift);
  padding:12px 24px 28px; max-height:76vh; overflow-y:auto;
  transform:translateY(100%); transition:transform .25s ease;
}
.sheet.open{ transform:translateY(0); }
.sheet-handle{ width:40px; height:4px; border-radius:var(--radius-pill); background:var(--line); margin:0 auto 16px; }
.sheet h5{ font-family:var(--font-display); font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; color:var(--gold-dim); margin:18px 0 8px; }
.sheet h5:first-of-type{ margin-top:4px; }
.sheet a{ display:block; font-size:.95rem; color:var(--ink-text); text-decoration:none; padding:8px 0; border-bottom:1px solid var(--line); }

/* ===== Footer ===== */
.site-footer{ background:var(--navy-dim); color:rgba(244,245,247,.7); border-top:1px solid rgba(192,138,40,.2); }
@media (prefers-color-scheme: dark){ .site-footer{ background:var(--paper-deep); } }
.site-footer .brand{ display:flex; align-items:center; gap:12px; }
.site-footer .brand-text{ display:flex; flex-direction:column; line-height:1.3; }
.site-footer .brand-text .name{ color:var(--paper); }
.site-footer .brand-text .by{ color:rgba(244,245,247,.55); }
.site-footer h4{ color:var(--paper); font-size:.9rem; text-transform:uppercase; letter-spacing:.05em; margin-bottom:1em; }
.site-footer p{ color:inherit; max-width:none; }
.site-footer a{ color:rgba(244,245,247,.75); text-decoration:none; }
.site-footer a:hover{ color:var(--gold); }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; padding-bottom:40px; border-bottom:1px solid rgba(244,245,247,.14); }
.footer-grid ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; font-size:.9rem; }
.footer-bottom{ padding-top:28px; font-size:.82rem; }
.footer-bottom p{ margin-bottom:.6em; }
@media (max-width:820px){ .footer-grid{ grid-template-columns:1fr 1fr; } }

/* ===== Route motif — signature element (five towns, one practice) ===== */
.route{ padding:40px clamp(28px,5vw,64px) 56px; background:var(--surface); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.route-label{ font-size:.8rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); font-weight:700; margin-bottom:24px; text-align:center; }
.route-line{ display:flex; align-items:flex-start; max-width:1080px; margin:0 auto; position:relative; flex-wrap:wrap; gap:16px 0; }
.route-line .stop{ flex:1 1 120px; position:relative; padding-top:22px; text-align:center; }
.route-line .stop::before{ content:''; position:absolute; top:6px; left:0; right:0; height:2px; background:var(--line); }
.route-line .stop:first-child::before{ left:50%; }
.route-line .stop:last-child::before{ right:50%; }
.route-line .pin{ position:absolute; top:0; left:50%; transform:translateX(-50%); width:13px; height:13px; border-radius:50%; background:var(--gold); border:3px solid var(--surface); box-shadow:0 0 0 2px var(--gold); }
.route-line .stop b{ display:block; font-family:var(--font-display); font-size:.95rem; color:var(--ink-text); margin-bottom:2px; }
.route-line .stop span{ font-size:.78rem; color:var(--muted); }

/* Telemedicine endpoint — statewide reach, not a physical stop, so it's
   marked distinctly (dashed lead-in, navy square instead of a gold pin)
   rather than implying a 5th office alongside real street addresses. */
.route-line .stop-virtual::before{
  background-image:repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 12px);
  background-color:transparent;
}
.route-line .stop-virtual .pin{
  border-radius:4px; background:var(--navy); box-shadow:0 0 0 2px var(--navy);
}

/* ===== Cards / grids ===== */
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:clamp(24px,4vw,56px); align-items:center; }
.grid-2.reverse{ direction:rtl; } .grid-2.reverse > *{ direction:ltr; }
.grid-2-asym{ display:grid; grid-template-columns:3fr 2fr; gap:clamp(24px,4vw,56px); align-items:start; }
.grid-2-asym.flip{ grid-template-columns:2fr 3fr; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; align-items:start; }
.grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; align-items:start; }
.grid-4-asym{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.grid-4-asym .card:nth-child(1){ grid-column:span 2; }
.grid-4-asym .card:nth-child(4){ grid-column:span 2; }
/* Each card is a self-contained bordered box (not a mosaic tile carved
   out of a shared background) — this is deliberate: rows with uneven
   card heights, or a trailing row that doesn't fill every column
   (e.g. 5 services in a 3-up grid), used to leave the grid container's
   own background showing through as an ugly grey block. A bordered
   box can never do that, regardless of how many cards there are. */
.card{ background:var(--surface); padding:32px 26px; border:1px solid var(--line); border-radius:var(--radius-card); box-shadow:var(--shadow-soft); }
.card h3{ margin:0 0 8px; }
.card p{ font-size:.92rem; margin:0; }
@media (max-width:900px){
  .grid-2{ grid-template-columns:1fr; }
  .grid-2-asym,.grid-2-asym.flip{ grid-template-columns:1fr; }
  .grid-3,.grid-4{ grid-template-columns:1fr 1fr; }
  .grid-4-asym{ grid-template-columns:1fr 1fr; }
  .grid-4-asym .card:nth-child(1),.grid-4-asym .card:nth-child(4){ grid-column:span 2; }
}
@media (max-width:600px){
  .grid-3,.grid-4{ grid-template-columns:1fr; }
  .grid-4-asym{ grid-template-columns:1fr; }
  .grid-4-asym .card:nth-child(1),.grid-4-asym .card:nth-child(4){ grid-column:span 1; }
}

/* ===== Google Maps embed (location pages) ===== */
.map-embed{ border-radius:var(--radius-card); overflow:hidden; box-shadow:var(--shadow-soft); border:1px solid var(--line); }
.map-embed iframe{ width:100%; height:360px; border:0; display:block; }

/* ===== Trust banner — real, sourced numbers only (e.g. Google rating/review count) ===== */
.trust-banner{ display:flex; align-items:center; justify-content:center; gap:clamp(24px,5vw,64px); flex-wrap:wrap; text-align:center; }
.trust-banner .stat{ border-left:none; padding-left:0; }

/* ===== FAQ accordion (native details/summary; main.js adds the glide) ===== */
.faq-list{ border-top:1px solid var(--line); }
.faq-item{ border-bottom:1px solid var(--line); }
.faq-item summary{
  cursor:pointer; padding:1.15em 0; font-family:var(--font-display); font-weight:700;
  font-size:1.05rem; color:var(--ink); list-style:none; display:flex; justify-content:space-between;
  align-items:center; gap:1em;
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{
  content:"+"; color:var(--gold-dim); font-size:1.4rem; line-height:1;
  flex-shrink:0; transition:transform .25s ease;
}
.faq-item[open] summary::after{ transform:rotate(45deg); }
.faq-item p{ padding-bottom:1.15em; margin:0; max-width:none; }

/* ===== Forms — lead/registration forms ===== */
.form-alert{ padding:14px 18px; border-radius:12px; margin:16px 0; font-size:.95rem; display:none; }
.form-alert.success{ background:#e3f1ea; color:#1f5c3c; border:1px solid #bfe0cf; }
.form-alert.error{ background:#fbe6e1; color:#8c2f17; border:1px solid #f3c2b3; }
.form-alert.loading{ background:var(--paper-deep); color:var(--ink-text); border:1px solid var(--line); }
form input[type="text"], form input[type="email"], form input[type="tel"], form input[type="date"], form input[type="number"], form select, form textarea{
  width:100%; font-family:var(--font-body); font-size:1rem; padding:.9em .9em; border:1.5px solid var(--line);
  border-radius:10px; background:var(--surface); color:var(--ink-text); transition:border-color .25s;
}
form input:focus, form select:focus, form textarea:focus{ outline:none; border-color:var(--navy); }
form textarea{ resize:vertical; }
form label:has(input[type="checkbox"]){
  display:flex; align-items:center; gap:.6em; padding:12px 14px; border-radius:10px;
  background:var(--paper-deep); border:1.5px solid var(--line); cursor:pointer; font-size:.9rem; color:var(--ink-text);
}
form input[type="checkbox"]{ width:18px; height:18px; accent-color:var(--navy); flex-shrink:0; }

/* ===== Multi-section intake form (patient registration) ===== */
.form-card{ background:var(--surface); border:1px solid var(--line); border-radius:24px; padding:clamp(26px,4vw,44px); box-shadow:var(--shadow-soft); }
.field{ position:relative; margin-bottom:20px; }
.field input, .field textarea, .field select{
  width:100%; font-family:var(--font-body); font-size:1rem; padding:1.15em .9em .5em; border:1.5px solid var(--line);
  border-radius:10px; background:transparent; color:var(--ink-text); transition:border-color .25s;
}
.field textarea{ min-height:90px; resize:vertical; }
.field input:focus, .field textarea:focus, .field select:focus{ outline:none; border-color:var(--navy); }
.field label{
  position:absolute; left:.9em; right:.9em; top:1.1em; font-size:.95rem; color:var(--muted); pointer-events:none;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  transition:transform .2s ease, font-size .2s ease, color .2s ease; transform-origin:left top;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select + label{
  transform:translateY(-0.7em) scale(.78); color:var(--gold-dim);
}
.field-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.field-row.two{ grid-template-columns:1fr 1fr; }
@media (max-width:700px){ .field-row, .field-row.two{ grid-template-columns:1fr; } }
.check{
  display:flex; align-items:flex-start; gap:.7em; padding:14px 16px; border-radius:12px;
  background:var(--paper-deep); border:1.5px solid var(--line); cursor:pointer;
}
.check input{ width:20px; height:20px; margin-top:2px; accent-color:var(--navy); flex-shrink:0; }
.check-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px 20px; }
.radio-row .check, .check-grid .check{ align-items:center; }
.radio-row .check input, .check-grid .check input{ margin-top:0; }
@media (max-width:600px){ .check-grid{ grid-template-columns:1fr; } }

.field-static label{ position:static; display:block; font-size:.85rem; color:var(--muted); margin-bottom:.5em; transform:none; white-space:normal; }
.field-static select{ padding:.8em .9em; }
.field-hint{ display:block; font-size:.8rem; color:var(--muted); margin-top:.3em; font-weight:400; }
.intake-section{ margin-bottom:34px; padding-bottom:30px; border-bottom:1px solid var(--line); }
.intake-section:last-of-type{ border-bottom:none; margin-bottom:0; padding-bottom:0; }
.intake-section-title{ display:flex; align-items:center; gap:12px; font-size:1.2rem; margin-bottom:1.1em; }
.intake-section-title .sec-num{
  background:var(--ink); color:var(--paper); width:28px; height:28px; border-radius:50%; flex-shrink:0;
  display:inline-flex; align-items:center; justify-content:center; font-family:var(--font-body); font-weight:700; font-size:.8rem;
}
.intake-section-hint{ color:var(--muted); font-size:.9rem; margin:-.6em 0 1.2em; }
.radio-row{ display:flex; flex-wrap:wrap; gap:10px; margin-top:.4em; }
.radio-row .check{ flex:1 1 auto; }
[data-conditional]{ display:none; }
[data-conditional].is-visible{ display:block; }

/* ===== Numbered step list (first-visit / process pages) ===== */
.step-list{ list-style:none; margin:0; padding:0; counter-reset:step; }
.step-list li{
  position:relative; padding:0 0 1.4em 2.6em; counter-increment:step; color:var(--muted);
}
.step-list li::before{
  content:counter(step); position:absolute; left:0; top:0; width:1.8em; height:1.8em;
  border-radius:50%; background:var(--gold); color:var(--ink);
  font-family:var(--font-body); font-size:.82rem; font-weight:700; display:flex; align-items:center; justify-content:center;
}

/* ===== Hero ===== */
.hero{ padding-block:clamp(48px,8vw,96px); max-width:1080px; margin:0 auto; }
.hero h1{ max-width:16ch; }
.hero .sub{ font-size:1.1rem; line-height:1.6; color:var(--muted); max-width:56ch; margin:0 0 32px; }

/* ============================================================
   Motion effects — sitewide, adapted from quietmindhealth.com's
   index2 design-lab (owner-approved subset for MyPremierMD, decided
   2026-07-07: rise reveals, drawn underline, fade-in photo reveal
   (not a curtain wipe — swapped after owner feedback that the wipe
   read as cheesy), aurora CTA bands, magnetic buttons, FAQ glide,
   view-transition nav, count-up stats, plus the route-pulse bespoke
   to this site's own route motif). JS counterparts live in main.js.
   Every effect honors prefers-reduced-motion via the fallback block
   at the end of this section plus JS gates.
   ============================================================ */

/* Staggered rise reveal — main.js auto-applies to .card children of
   .grid-3/.grid-4/.grid-4-asym rows that start below the fold */
.rise{
  opacity:0; transform:translateY(26px);
  transition:opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
  transition-delay:var(--rise-delay, 0s);
}
.rise.in{ opacity:1; transform:none; }

/* Hand-drawn gold underline that draws itself on scroll — at most one
   per page, wrapping a short key phrase inside a heading */
.draw-line{ position:relative; white-space:nowrap; }
.draw-line svg{
  position:absolute; left:-2%; bottom:-.14em; width:104%; height:.34em;
  overflow:visible; pointer-events:none;
}
.draw-line path{
  fill:none; stroke:var(--gold); stroke-width:4; stroke-linecap:round;
  stroke-dasharray:100; stroke-dashoffset:100;
}
.draw-line.in path{ transition:stroke-dashoffset .9s ease .25s; stroke-dashoffset:0; }
@media (max-width:520px){
  /* The absolutely-positioned SVG underline assumes a single line of text;
     h1's font-size floor (clamp min 2.2rem) doesn't shrink enough on narrow
     phones for some of the longer highlighted phrases to fit on one line,
     which forced real horizontal-scroll overflow on several pages (found via
     cross-browser/mobile pass, 2026-07-08: acupuncture.html, insurance-billing.html,
     menopause.html, medicare-wellness.html, mental-health.html, pediatric-care.html,
     acupuncture-womens-health.html, providers.html). Let it wrap here and fall back
     to a plain CSS underline (which wraps correctly under multiple lines natively)
     instead of the animated hand-drawn stroke, which can't reliably track wrapped text. */
  .draw-line{ white-space:normal; text-decoration:underline; text-decoration-color:var(--gold); text-decoration-thickness:3px; text-underline-offset:5px; }
  .draw-line svg{ display:none; }
}

/* Fade-in photo reveal — a one-shot fade + gentle settle (not a
   clip-path curtain wipe), triggered once by IntersectionObserver */
.photo-reveal{
  opacity:0; transform:translateY(18px) scale(1.015);
  transition:opacity 1s ease, transform 1s cubic-bezier(.22,1,.36,1);
  border-radius:18px; overflow:hidden; box-shadow:var(--shadow-soft);
}
.photo-reveal.in{ opacity:1; transform:none; }

/* Aurora drift on dark CTA bands — two soft light pools (gold + navy)
   on slow cycles. Softness comes from gradient falloff, NOT
   filter:blur() (can silently fail on some GPU/driver combos). */
.band-ink::before, .band-ink::after{
  content:""; position:absolute; z-index:1; border-radius:50%;
  width:50vw; height:50vw; min-width:440px; min-height:440px;
  pointer-events:none;
}
.band-ink::before{
  background:radial-gradient(circle, rgba(192,138,40,.34) 0%, rgba(192,138,40,.18) 30%, rgba(192,138,40,.06) 55%, transparent 72%);
  top:-30%; left:-8%;
  animation:band-glow-a 24s ease-in-out infinite alternate;
}
.band-ink::after{
  background:radial-gradient(circle, rgba(95,143,199,.3) 0%, rgba(95,143,199,.16) 30%, rgba(95,143,199,.05) 55%, transparent 72%);
  bottom:-36%; right:-10%;
  animation:band-glow-b 32s ease-in-out infinite alternate;
}
@keyframes band-glow-a{ to{ transform:translate(24vw, 10vh) scale(1.18); } }
@keyframes band-glow-b{ to{ transform:translate(-20vw, -8vh) scale(1.12); } }

/* Magnetic buttons — wrap any .btn in <span class="magnet">…</span> */
.magnet{ display:inline-block; padding:14px; margin:-14px; }
.magnet .btn{ transition:transform .35s cubic-bezier(.22,1,.36,1), box-shadow .25s ease, background .25s ease; }

/* FAQ glide — main.js wraps each .faq-item's answer in .faq-body and
   animates it open/closed via the Web Animations API */
.faq-item .faq-body{ overflow:hidden; }

/* View-transition cross-fade between page navigations — free
   progressive enhancement, no JS required; unsupported browsers just
   navigate normally */
@view-transition{ navigation:auto; }
::view-transition-group(*){ animation-duration:.5s; animation-timing-function:cubic-bezier(.22,1,.36,1); }

/* Count-up stats — use only real, verified numbers per section */
.stat-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-top:2em; }
.stat{ border-left:2px solid var(--gold); padding-left:18px; }
.stat .stat-num{
  font-family:var(--font-display); font-weight:700;
  font-size:clamp(2.2rem,3vw + 1rem,3.2rem); color:var(--gold-dim); line-height:1;
  font-variant-numeric:tabular-nums;
}
.stat .stat-suffix{ font-size:.8rem; color:var(--muted); margin-left:.35em; }
.stat p{ font-size:.88rem; margin:.5em 0 0; }
@media (max-width:900px){ .stat-row{ grid-template-columns:1fr 1fr; } }
@media (max-width:480px){ .stat-row{ grid-template-columns:1fr; } }

/* Route pulse — bespoke signature piece (not ported from QMH): a
   small light travels along the route-line connector on a repeating
   cycle once the route section has scrolled into view, echoing "one
   practice, many towns, connected." Markup:
   <span class="route-pulse" data-route-pulse></span> as a direct
   child of .route-line. */
.route-pulse{
  position:absolute; top:6px; left:0; width:11px; height:11px; border-radius:50%;
  background:var(--gold); box-shadow:0 0 0 4px color-mix(in srgb, var(--gold) 35%, transparent), 0 0 12px 2px var(--gold);
  opacity:0; pointer-events:none; z-index:2;
}
.route-pulse.run{ animation:route-travel 4.5s cubic-bezier(.45,0,.4,1) .3s infinite; }
@keyframes route-travel{
  0%{ opacity:0; left:0; }
  4%{ opacity:1; }
  36%{ opacity:1; left:100%; }
  40%{ opacity:0; left:100%; }
  41%{ left:0; }
  100%{ opacity:0; left:0; }
}

/* "You are here" — a location page marks its own stop distinctly on
   the route recap (add class="stop here" to that page's own <a>).
   Never applied to .stop-virtual (telemedicine isn't a "here"). */
.route-line .stop.here .pin{
  box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--gold);
  animation:here-pulse 2.4s ease-in-out infinite;
}
.route-line .stop.here b{ color:var(--gold-dim); }
@keyframes here-pulse{
  0%, 100%{ box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--gold); }
  50%{ box-shadow:0 0 0 2px var(--surface), 0 0 0 7px color-mix(in srgb, var(--gold) 55%, transparent); }
}

/* Mobile route layout: below ~700px the 5 stops (flex:1 1 120px each,
   1080px max-width row) don't fit on one line and .route-line's own
   flex-wrap:wrap breaks them into 2-3 rows. The horizontal .route-pulse
   travel animation only understands one row (fixed top:6px, left runs
   0%->100%), so on a wrapped layout the light only ever crosses the
   top row and never reaches the stops on the rows below it. Fix:
   switch to a stacked vertical timeline on mobile (one column, pins on
   the left, a vertical connector) with its own vertical pulse path,
   rather than trying to make a horizontal light understand wrapped rows. */
@media (max-width:700px){
  .route-line{ flex-direction:column; flex-wrap:nowrap; gap:22px 0; }
  .route-line .stop{
    flex:0 0 auto; text-align:left; padding-top:0; padding-left:30px;
  }
  .route-line .stop::before{
    top:0; bottom:0; left:6px; right:auto; width:2px; height:auto;
  }
  .route-line .stop:first-child::before{ top:9px; left:6px; }
  .route-line .stop:last-child::before{ top:0; bottom:auto; height:9px; left:6px; }
  .route-line .pin{ top:3px; left:0; transform:none; }
  .route-line .stop-virtual::before{
    background-image:repeating-linear-gradient(to bottom, var(--line) 0 6px, transparent 6px 12px);
  }
  .route-pulse{ top:0; left:1px; }
  .route-pulse.run{ animation-name:route-travel-vertical; }
}
@keyframes route-travel-vertical{
  0%{ opacity:0; top:0; }
  4%{ opacity:1; }
  36%{ opacity:1; top:100%; }
  40%{ opacity:0; top:100%; }
  41%{ top:0; }
  100%{ opacity:0; top:0; }
}

/* Reduced-motion fallbacks for all of the above: content simply
   present, no fabricated motion */
@media (prefers-reduced-motion: reduce){
  .rise{ opacity:1; transform:none; transition:none; }
  .draw-line path{ stroke-dashoffset:0; }
  .photo-reveal{ opacity:1; transform:none; }
  .band-ink::before, .band-ink::after{ animation:none; }
  .route-pulse{ display:none; }
  .route-line .stop.here .pin{ animation:none; }
}

/* ===== Provider cards (providers.html) ===== */
.provider-card{ text-align:center; }
.provider-card .provider-photo{
  width:132px; height:132px; border-radius:50%; object-fit:cover; object-position:top center;
  margin:0 auto 14px; border:3px solid var(--surface); box-shadow:var(--shadow-lift);
  display:block;
}
.provider-card h3{ margin-bottom:.15em; }
.provider-card .role{ color:var(--gold-dim); font-size:.85rem; font-weight:600; margin-bottom:.2em; }
.provider-card .loc{ color:var(--muted); font-size:.82rem; margin-bottom:.7em; }

/* Founder / medical-director feature bio */
.founder-bio{ display:grid; grid-template-columns:280px 1fr; gap:clamp(24px,4vw,48px); align-items:start; }
.founder-bio img{ width:100%; border-radius:var(--radius-card); box-shadow:var(--shadow-lift); }
.founder-bio .credentials{ list-style:none; padding:0; margin:1em 0; display:flex; flex-direction:column; gap:.4em; }
.founder-bio .credentials li{ display:flex; gap:.6em; align-items:baseline; font-size:.92rem; }
.founder-bio .credentials li b{ color:var(--navy); }
@media (max-width:760px){ .founder-bio{ grid-template-columns:1fr; } .founder-bio img{ max-width:220px; margin:0 auto; } }

/* ===== Testimonials (testimonials.html) ===== */
.review-card{ display:flex; flex-direction:column; gap:.6em; }
.review-card .stars{ color:var(--gold); letter-spacing:.1em; font-size:.95rem; }
.review-card p.quote{ font-style:italic; color:var(--ink-text); flex:1; }
.review-card .attrib{ font-size:.85rem; color:var(--muted); border-top:1px solid var(--line); padding-top:.6em; margin-top:auto; }
.review-card .attrib b{ color:var(--ink-text); display:block; }
.trust-badge-row{ display:flex; align-items:center; justify-content:center; gap:.6em; flex-wrap:wrap; margin:.6em 0 0; }
.trust-badge-row .stars{ color:var(--gold); letter-spacing:.1em; }

/* ===== Registration-form section indicator (patient-forms/book-appointment/new-patient) ===== */
.section-indicator{
  position:fixed; right:20px; top:50%; transform:translateY(-50%);
  display:flex; flex-direction:column; gap:6px; z-index:200;
  opacity:0; pointer-events:none; transition:opacity .25s ease;
}
.section-indicator.is-active{ opacity:1; pointer-events:auto; }
.sec-dot{
  display:flex; align-items:center; gap:8px; background:none; border:none; padding:3px 0;
  cursor:pointer; text-align:left; opacity:.35; transition:opacity .2s;
}
.sec-dot:hover{ opacity:.7; }
.sec-dot.active{ opacity:1; }
.sec-dot.done{ opacity:.55; }
.sec-dot .sec-pip{
  width:8px; height:8px; border-radius:50%; background:var(--navy); flex-shrink:0;
  transition:width .15s, height .15s;
}
.sec-dot.active .sec-pip{ width:11px; height:11px; background:var(--gold); }
.sec-dot .sec-jump-label{
  font-size:.7rem; font-weight:700; color:var(--navy); text-transform:uppercase; letter-spacing:.04em;
  white-space:nowrap; opacity:0; transform:translateX(4px); transition:opacity .15s, transform .15s;
  pointer-events:none;
}
.sec-dot:hover .sec-jump-label, .sec-dot.active .sec-jump-label{ opacity:1; transform:translateX(0); }
@media (max-width:900px){ .section-indicator{ display:none; } }
