/* OrthoalignX — shared styles
   Layout: charcoal brand bands (header, hero, call-to-action, visit) framing light content bands; heroes split copy + drawing on wide screens; fixed call bar on phones.
   Brand taken from the clinic's visiting card: charcoal ground, polished gold, italic serif wordmark, spaced capitals. */
:root {
  --bg: #f4f5f3;
  --surface: #ffffff;
  --ink: #1d2326;
  --muted: #545e62;
  --line: #dde1de;
  --char: #23292c;          /* card charcoal */
  --char-2: #2c3337;
  --on-char: #eef0ee;
  --on-char-muted: #b3bbbd;
  --gold: #8a6a12;          /* gold dark enough for text on light */
  --gold-bright: #d4ac3a;   /* gold for charcoal grounds and rules */
  --gold-soft: #f3ead2;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-caps: "Cinzel", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.3rem;
  --step-2: clamp(1.75rem, 3.4vw, 2.2rem);
  --step-3: clamp(2.3rem, 5.6vw, 3.6rem);
  --radius: 8px;
  --max: 1100px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15191b; --surface: #1d2225; --ink: #e9ecea; --muted: #a7b0b2; --line: #30383b;
    --char: #0f1214; --char-2: #181d20; --on-char: #eef0ee; --on-char-muted: #a9b1b3;
    --gold: #dcb64a; --gold-bright: #dcb64a; --gold-soft: #2c2716;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15191b; --surface: #1d2225; --ink: #e9ecea; --muted: #a7b0b2; --line: #30383b;
  --char: #0f1214; --char-2: #181d20; --on-char: #eef0ee; --on-char-muted: #a9b1b3;
  --gold: #dcb64a; --gold-bright: #dcb64a; --gold-soft: #2c2716;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.65;
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 760px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font-size: var(--step-3); letter-spacing: -0.005em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }
strong { font-weight: 600; }

.wrap {
  max-width: var(--max); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band { padding-block: 64px; }
.band + .band:not(.dark) { border-top: 1px solid var(--line); }
.eyebrow { font-family: var(--font-caps); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.lede { color: var(--muted); max-width: 64ch; font-size: 1.05rem; }
.stack { display: grid; gap: 16px; }
.section-head { display: grid; gap: 10px; max-width: 66ch; }
.rule { width: 56px; height: 2px; background: linear-gradient(90deg, var(--gold-bright), transparent); border: 0; margin: 4px 0 0; }

/* Dark brand bands */
.dark { background: var(--char); color: var(--on-char); }
.dark h1, .dark h2, .dark h3 { color: var(--on-char); }
.dark .lede, .dark p { color: var(--on-char-muted); }
.dark .eyebrow { color: var(--gold-bright); }
.dark a { color: var(--on-char); text-decoration-color: var(--gold-bright); text-underline-offset: 4px; }

/* Header */
.site-header { background: var(--char); color: var(--on-char); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; border-bottom: 1px solid rgba(212,172,58,0.35); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--char); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-char); }
.brand img { width: 34px; height: auto; }
.brand-word { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.6rem; color: var(--gold-bright); letter-spacing: 0.01em; line-height: 1; }
.nav-links { display: none; gap: 20px; list-style: none; margin: 0; padding: 0; font-size: 0.92rem; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--on-char-muted); white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--on-char); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold-bright); text-underline-offset: 8px; text-decoration-thickness: 2px; }
.nav-call { display: none; color: var(--gold-bright); font-weight: 600; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 1060px) { .nav-links { display: flex; } .nav-call { display: inline; } }
.menu-btn { background: none; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; padding: 8px 12px; font: inherit; color: var(--on-char); cursor: pointer; }
@media (min-width: 1060px) { .menu-btn { display: none; } }
.mobile-menu { border-top: 1px solid rgba(255,255,255,0.12); }
.mobile-menu ul { list-style: none; margin: 0; padding: 8px 0 16px; display: grid; }
.mobile-menu a { display: block; padding: 10px 0; text-decoration: none; font-weight: 500; color: var(--on-char); }
.mobile-menu a[aria-current="page"] { color: var(--gold-bright); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: var(--radius); font: inherit; font-weight: 600; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; }
.btn-gold { background: linear-gradient(180deg, #e2bd4f, #c79a24); color: #1b1a12; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-line { border-color: var(--gold-bright); color: var(--on-char); background: transparent; }
.btn-ink { background: var(--char); color: var(--on-char); }
.btn-outline { border-color: var(--char); color: var(--ink); background: transparent; }
:root[data-theme="dark"] .btn-outline { border-color: var(--gold-bright); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-outline { border-color: var(--gold-bright); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.dark .btn-row a.btn-line { color: var(--on-char); }
.dark a.btn-gold { color: #1b1a12; }

/* Home hero */
.hero { padding-block: 56px 64px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.2fr 1fr; } }
.hero-copy { display: grid; gap: 20px; min-width: 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--step--1); }
.hero-meta span { color: var(--on-char-muted); }
.hero-meta strong { color: var(--on-char); }
.hero-mark { display: grid; justify-items: center; gap: 14px; text-align: center; }
.hero-mark img { width: min(240px, 60vw); filter: drop-shadow(0 18px 30px rgba(0,0,0,0.45)); }
.hero-mark .word { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: clamp(2.4rem, 6vw, 3.4rem); color: var(--gold-bright); line-height: 1; }
.hero-mark .tag { font-family: var(--font-caps); font-size: 0.78rem; letter-spacing: 0.2em; color: var(--on-char); }

/* Treatment page hero */
.page-hero { padding-block: 44px 52px; }
.page-hero .hero-copy { max-width: 720px; }
.crumbs { font-size: var(--step--1); color: var(--on-char-muted); }
.crumbs a { text-decoration: none; color: var(--on-char-muted); }
.crumbs a:hover { text-decoration: underline; }
.art { width: 100%; max-width: 420px; justify-self: center; }
.art .t-fill { fill: #f4f2ea; }
.art .t-line { stroke: #8f9699; stroke-width: 1.2; fill: #f4f2ea; }
.art .gum { fill: none; stroke: #3a4246; stroke-width: 34; stroke-linecap: round; }
.art .gold { fill: none; stroke: var(--gold-bright); stroke-width: 2.4; }
.art .gold-fill { fill: var(--gold-bright); }
.art .tray { fill: none; stroke: var(--gold-bright); stroke-width: 3; stroke-dasharray: 2 5; stroke-linecap: round; }
.art .bone { fill: #353d41; }
.art .label { fill: var(--on-char-muted); font: 600 11px var(--font-body); letter-spacing: 0.1em; }
.art .ink { fill: #c9cfd1; }

/* Cards */
.card-grid { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 760px) { .card-grid.three { grid-template-columns: repeat(3, 1fr); } .card-grid.two { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 560px) and (max-width: 759px) { .card-grid.two, .card-grid.three { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.card.feature { border-top: 3px solid var(--gold-bright); }
.card .tag { font-family: var(--font-caps); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); }
.card p { color: var(--muted); }
.card a.more { font-weight: 600; text-decoration-color: var(--gold-bright); text-underline-offset: 4px; margin-top: 4px; }
.pros-cons { display: grid; gap: 2px; font-size: 0.95rem; margin: 0; }
.pros-cons dt { font-weight: 600; color: var(--ink); }
.pros-cons dd { margin: 0 0 8px; color: var(--muted); }

/* Two-column prose with aside */
.split { display: grid; gap: 32px; margin-top: 28px; }
@media (min-width: 820px) { .split { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.split > * { min-width: 0; }
.prose { display: grid; gap: 14px; color: var(--muted); max-width: 64ch; }
.prose strong { color: var(--ink); }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.aside { background: var(--gold-soft); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; }
.aside h3 { font-size: 1.15rem; }
.aside ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* Checklist grid */
.checks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .checks { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .checks { grid-template-columns: repeat(3, 1fr); } }
.checks li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold-bright); border-radius: var(--radius); padding: 14px 18px; display: grid; gap: 2px; }
.checks strong { font-weight: 600; }
.checks span { color: var(--muted); font-size: 0.95rem; }

/* Table */
.table-wrap { overflow-x: auto; margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 540px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; background: var(--gold-soft); }
tbody th { font-weight: 600; color: var(--muted); width: 26%; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.note { margin-top: 14px; font-size: var(--step--1); color: var(--muted); }

/* Doctors */
.doc-list { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 860px) { .doc-list.pair { grid-template-columns: 1fr 1fr; } }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 18px; grid-template-columns: 96px 1fr; align-items: start; }
@media (max-width: 480px) { .doc { grid-template-columns: 1fr; } }
.doc > div { min-width: 0; display: grid; gap: 10px; }
.mono { width: 96px; aspect-ratio: 1; max-width: 100%; border-radius: 50%; background: var(--char); color: var(--gold-bright); display: grid; place-items: center; font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 2rem; border: 2px solid var(--gold-bright); }
.doc .role { font-family: var(--font-caps); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--gold); text-transform: uppercase; font-weight: 600; }
.creds { display: flex; flex-wrap: wrap; gap: 6px; }
.cred { background: var(--gold-soft); border-radius: 999px; padding: 3px 12px; font-size: var(--step--1); font-weight: 600; }
.cred.medal { background: linear-gradient(180deg, #e2bd4f, #c79a24); color: #1b1a12; }
.reg { font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }

/* Steps (real sequences) */
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } .steps.five { grid-template-columns: repeat(5, 1fr); } }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 2px solid var(--gold-bright); }
.steps li::before { content: "Step " counter(step); font-family: var(--font-caps); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.steps p { color: var(--muted); font-size: 0.95rem; }

/* FAQ */
.faq { margin-top: 28px; display: grid; gap: 10px; max-width: 800px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 18px; color: var(--muted); }

/* CTA band */
.cta .wrap { display: grid; gap: 20px; }
@media (min-width: 820px) { .cta .wrap { grid-template-columns: 1fr auto; align-items: center; } }
.cta p { max-width: 58ch; }

/* Visit */
.visit-grid { display: grid; gap: 32px; margin-top: 28px; }
@media (min-width: 760px) { .visit-grid { grid-template-columns: repeat(3, 1fr); } }
.visit-grid > div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.hours { border-collapse: collapse; min-width: 0; width: auto; }
.hours td { border: 0; padding: 2px 16px 2px 0; font-variant-numeric: tabular-nums; color: var(--on-char-muted); }
.hours td:first-child { color: var(--on-char); }

/* Contact form */
.form { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.form input, .form select, .form textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; width: 100%; }
.form textarea { min-height: 96px; resize: vertical; }
.form .hint { font-size: var(--step--1); color: var(--muted); font-weight: 400; }
.form .row { display: grid; gap: 14px; }
@media (min-width: 560px) { .form .row { grid-template-columns: 1fr 1fr; } }

/* Footer */
footer { background: var(--char); color: var(--on-char-muted); padding-block: 36px; font-size: var(--step--1); }
.foot { display: grid; gap: 24px; }
@media (min-width: 760px) { .foot { grid-template-columns: 1.3fr 1fr 1fr; } }
.foot nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot a { text-decoration: none; color: var(--on-char-muted); }
.foot a:hover { text-decoration: underline; color: var(--on-char); }
.foot strong { color: var(--on-char); display: block; margin-bottom: 6px; font-weight: 600; }
.foot .brand-word { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.fine { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 16px; }

/* Mobile call bar */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  background: var(--char); border-top: 1px solid rgba(212,172,58,0.4);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
@media (min-width: 760px) { .callbar { display: none; } }

/* Home: treatment tabs under the hero, always visible */
.svc-strip { background: var(--char-2); border-top: 1px solid rgba(212,172,58,0.35); border-bottom: 1px solid rgba(212,172,58,0.35); }
.svc-strip ul { list-style: none; margin: 0; padding: 14px 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .svc-strip ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .svc-strip ul { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.svc-strip li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 640px) { .svc-strip li:last-child:nth-child(odd) { grid-column: auto; } }
.svc-strip a { display: grid; gap: 2px; align-content: start; height: 100%; padding: 12px 14px; border: 1px solid rgba(212,172,58,0.45); border-radius: var(--radius); text-decoration: none; color: var(--on-char); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.svc-strip a:hover { background: rgba(212,172,58,0.12); border-color: var(--gold-bright); }
.svc-strip .svc-k { font-family: var(--font-caps); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-bright); }

/* Treatment page hero photo */
.hero-photo { margin: 0; justify-self: center; width: 100%; max-width: 460px; }
.hero-photo img { display: block; width: 100%; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid rgba(212,172,58,0.55); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
@media (min-width: 880px) { .hero-photo img { aspect-ratio: 5 / 6; } }

/* Diagram panel inside light sections */
.diagram { margin-top: 28px; background: var(--char); border-radius: var(--radius); padding: 24px 16px; display: grid; justify-items: center; }

/* Home: treatment slider above the hero.
   Auto-scrolls slowly; pauses on hover, focus or touch so it can be moved by hand, arrows or drag. */
.slider { position: relative; background: var(--char); border-bottom: 1px solid rgba(212,172,58,0.35); }
.slider-track { list-style: none; margin: 0; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); cursor: grab; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.slide { position: relative; flex: 0 0 auto; width: min(340px, 80vw); height: 300px; border-radius: var(--radius); overflow: hidden; scroll-snap-align: start; background: var(--char-2); }
.slide img { width: 100%; height: 100%; max-width: 100%; object-fit: cover; display: block; pointer-events: none; user-select: none; }
.slide-text { position: absolute; inset: auto 0 0 0; padding: 48px 16px 16px; display: grid; gap: 6px; justify-items: start;
  background: linear-gradient(180deg, rgba(20,24,26,0) 0%, rgba(20,24,26,0.82) 38%, rgba(20,24,26,0.95) 100%); }
.slide-k { font-family: var(--font-caps); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-bright); }
.slide-t { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; color: #f3f4f2; margin: 0; }
.slide-text p { color: #c9d0d2; font-size: 0.88rem; line-height: 1.45; margin: 0; }
.slide-btn { margin-top: 4px; display: inline-block; padding: 7px 14px; border-radius: 6px; font-weight: 600; font-size: 0.88rem; text-decoration: none;
  background: linear-gradient(180deg, #e2bd4f, #c79a24); color: #1b1a12; }
.slide-btn:hover { filter: brightness(1.07); }
.slider-arrow { position: absolute; top: 30%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--gold-bright); background: rgba(20,24,26,0.85); color: var(--gold-bright); font-size: 1.6rem; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .2s; display: grid; place-items: center; padding: 0 0 3px; }
.slider-arrow.prev { left: max(10px, env(safe-area-inset-left, 0px)); }
.slider-arrow.next { right: max(10px, env(safe-area-inset-right, 0px)); }
.slider:hover .slider-arrow, .slider:focus-within .slider-arrow { opacity: 1; }
@media (hover: none) { .slider-arrow { display: none; } }
@media (max-width: 600px) { .slide { height: 270px; } }
