/* Layout: navy top bar, white header with a one-line serif wordmark, navy hero band, centered section
   titles with a small blue label above them, white cards with a fine border, light grey bands for
   alternating sections, navy call band, white footer over a near-black legal bar.
   Colors follow the Texas Bone and Joint site (navy, bright blue, cool grey). Newsreader for headings
   and the wordmark, Open Sans for everything else. Light theme only. */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --band: #F5F7F9;
  --ink: #333333;
  --heading: #0B223E;
  --muted: #54575A;
  --line: #D8DDE6;
  --navy: #0B223E;
  --navy-2: #12315A;
  --blue: #1E71CD;
  --blue-soft: #E9F1FB;
  --on-navy: #FFFFFF;
  --on-navy-dim: #B8C6D6;
  --legal: #141A1D;
  --legal-ink: #C3CBD0;
  --shadow: rgba(11, 34, 62, 0.08);
  --critical: #BB0000;
  --critical-soft: #FBEAEA;
  --todo-bg: #FFF1BF;
  --todo-ink: #5C4300;

  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.55rem;
  --step-3: clamp(1.9rem, 4vw, 2.6rem);
  --step-4: clamp(2.3rem, 6vw, 3.5rem);

  --wrap: 78rem;
  --measure: 42rem;
  --radius-card: 8px;
  --radius-btn: 4px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
p { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.18;
  color: var(--heading);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus {
  left: max(16px, env(safe-area-inset-left, 0px));
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  z-index: 20;
  background: var(--surface);
  padding: 8px 12px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}
.lead { font-size: var(--step-1); line-height: 1.55; color: var(--muted); max-width: var(--measure); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--navy); color: var(--on-navy); font-size: 0.875rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; padding-block: 9px; }
.topbar a { color: var(--on-navy); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.topbar a:hover { text-decoration: underline; }
.topbar-places { color: var(--on-navy-dim); }
.topbar-right { display: flex; flex-wrap: wrap; gap: 4px 20px; }
@media (max-width: 600px) { .topbar-places { display: none; } }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-block: 16px 0;
}
.brand {
  margin-right: auto;
  text-decoration: none;
  color: var(--heading);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.65rem;
  line-height: 1.1;
}
.header-call { order: 2; }
.nav { order: 3; width: 100%; border-top: 1px solid var(--line); margin-top: 4px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 22px; }
.nav a {
  display: inline-block;
  padding: 11px 0 9px;
  color: var(--blue);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { color: var(--heading); font-weight: 600; border-bottom-color: var(--heading); }
@media (max-width: 600px) {
  .site-header .wrap { gap: 10px 12px; padding-top: 12px; }
  .brand { font-size: 1.35rem; }
  .nav ul { gap: 0 16px; }
  .nav a { font-size: 0.93rem; padding: 8px 0 6px; }
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.btn-primary { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); }
.btn-small { padding: 8px 16px; font-size: 0.92rem; }
.btn-outline, .btn-ghost { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn-outline:hover, .btn-ghost:hover { background: var(--blue-soft); }
.btn-light { background: #FFFFFF; border-color: #FFFFFF; color: var(--navy); }
.btn-light:hover { background: var(--blue-soft); border-color: var(--blue-soft); }
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, 0.85); color: #FFFFFF; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }

.more { font-weight: 600; text-decoration: none; color: var(--blue); }
.more::after { content: " \2192"; }
.more:hover { text-decoration: underline; }

/* ---------- Home hero ---------- */
.hero {
  background:
    radial-gradient(90% 120% at 95% 10%, rgba(30, 113, 205, 0.35) 0%, rgba(30, 113, 205, 0) 60%),
    var(--navy);
  color: var(--on-navy);
}
.hero .wrap { padding-block: 84px 92px; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; max-width: 44rem; }
.hero h1 { color: #FFFFFF; font-size: clamp(2.4rem, 6.5vw, 3.8rem); }
.hero .lead { color: var(--on-navy-dim); }
.kicker { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-navy-dim); }
@media (max-width: 600px) { .hero .wrap { padding-block: 56px 64px; } }

/* Welcome */
.welcome { text-align: center; }
.welcome .wrap { padding-block: 64px 8px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.welcome h2 { font-size: clamp(2rem, 4.6vw, 2.8rem); max-width: 22ch; }
.welcome .subtitle { font-size: var(--step-1); color: var(--muted); max-width: 36rem; }

/* Meet card: photo left, copy right */
.meet-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr);
  background: var(--navy);
  color: var(--on-navy);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.meet-copy { padding: 48px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.meet-copy .eyebrow { color: var(--on-navy-dim); }
.meet-copy h2 { color: #FFFFFF; }
.meet-copy p { color: var(--on-navy-dim); }
.meet-photo { margin: 0; background: #505050; }
.meet-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
@media (max-width: 860px) {
  .meet-card { grid-template-columns: 1fr; }
  .meet-photo { max-height: 26rem; }
  .meet-copy { padding: 32px 24px; }
}

/* ---------- Sections ---------- */
.section { padding-block: 72px; }
.section-tight { padding-block: 40px 72px; }
.band { background: var(--band); }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: var(--measure); margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; align-items: center; }
.prose { display: flex; flex-direction: column; gap: 1em; max-width: var(--measure); min-width: 0; }
.prose ul, .prose ol { margin: 0; padding-left: 1.25em; display: flex; flex-direction: column; gap: 0.5em; }
.prose > h2:not(:first-child) { margin-top: 0.75em; }
.prose > h3:not(:first-child) { margin-top: 0.5em; }
.prose > .eyebrow + h2 { margin-top: -0.25em; }
.center-cta { display: flex; justify-content: center; margin-top: 44px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: start;
}
.split > * { min-width: 0; }
.sticky { position: sticky; top: 24px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .sticky { position: static; }
}

/* Cards: white, fine border, soft shadow */
.choice, .place, .feature, .note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 6px 18px var(--shadow);
}
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr)); gap: 20px; }
.choice { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.choice h3 { font-size: 1.4rem; }
.service-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.service-list li { position: relative; padding-left: 20px; }
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--blue);
}
.choice .more { margin-top: auto; padding-top: 10px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 24px; }
.feature { padding: 34px; display: flex; flex-direction: column; gap: 14px; }
.feature .more { margin-top: auto; }

/* Option grid */
.options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 40px;
}
.options li { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 3px solid var(--blue); }
.options h3 { font-size: 1.35rem; }
.options p { color: var(--muted); }
@media (max-width: 900px) { .options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .options { grid-template-columns: 1fr; gap: 28px; } }

/* Recovery timeline (a real sequence) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.timeline li {
  position: relative;
  padding: 30px 20px 0 0;
  border-top: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeline li::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--bg);
}
.band .timeline li::before { box-shadow: 0 0 0 4px var(--band); }
.t-when { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.timeline h3 { font-size: 1.25rem; }
.timeline p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline li { border-top: 0; border-left: 2px solid var(--line); padding: 0 0 28px 28px; }
  .timeline li:last-child { padding-bottom: 0; }
  .timeline li::before { top: 4px; left: -9px; }
}

/* Numbered steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.3rem minmax(0, 1fr); gap: 14px; align-items: start; }
.steps li::before {
  content: counter(step);
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--on-navy);
  font-weight: 700;
  font-size: 0.95rem;
}

/* Callouts */
.note { background: var(--blue-soft); border-color: transparent; box-shadow: none; padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; }
.note h3 { font-size: 1.4rem; }
.alert {
  background: var(--critical-soft);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.alert h3 { color: var(--critical); font-size: 1.35rem; }
.alert ul { margin: 0; padding-left: 1.25em; display: flex; flex-direction: column; gap: 0.4em; }

/* FAQ */
.faq { max-width: var(--measure); border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-block: 18px;
  font-weight: 600;
  color: var(--heading);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.4rem; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding-bottom: 20px; display: flex; flex-direction: column; gap: 0.75em; color: var(--muted); }

/* Facts list (training) */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 14px 28px; margin: 0; }
.facts dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); padding-top: 0.3em; }
.facts dd { margin: 0; }
@media (max-width: 600px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 14px; }
}

/* Photos */
.portrait-photo { margin: 0; min-width: 0; }
.portrait-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-card);
  background: #505050;
}
.meet { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 760px) {
  .meet { grid-template-columns: 1fr; gap: 28px; }
  .meet .portrait-photo { max-width: 16rem; }
}

/* Places */
.places { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 24px; }
.place { padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.place h3 { font-size: 1.45rem; }
.place address { font-style: normal; }
.place .meta { color: var(--muted); font-size: 1rem; }
.place .more { margin-top: auto; padding-top: 6px; }
.place-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.hospitals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.hospitals li { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 3px solid var(--blue); }
.hospitals h3 { font-size: 1.35rem; }
.hospitals address { font-style: normal; color: var(--muted); }
@media (max-width: 760px) { .hospitals { grid-template-columns: 1fr; } }

/* Call band */
.cta-band { background: var(--navy); color: var(--on-navy); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; padding-block: 60px; }
.cta-band .cta-copy { display: flex; flex-direction: column; gap: 8px; max-width: 36rem; }
.cta-band h2 { color: #FFFFFF; }
.cta-band p { color: var(--on-navy-dim); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.phone-big {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  color: #FFFFFF;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.phone-big:hover { text-decoration: underline; }

/* Inner page hero */
.page-hero {
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(30, 113, 205, 0.3) 0%, rgba(30, 113, 205, 0) 60%),
    var(--navy);
  color: var(--on-navy);
}
.page-hero .wrap { padding-block: 60px 52px; display: flex; flex-direction: column; gap: 16px; }
.page-hero h1 { color: #FFFFFF; max-width: 22ch; }
.page-hero .eyebrow { color: var(--on-navy-dim); }
.page-hero .lead { color: var(--on-navy-dim); }
.page-hero .lead strong { color: #FFFFFF; }
.page-hero .btn-primary { background: #FFFFFF; border-color: #FFFFFF; color: var(--navy); }
.page-hero .btn-primary:hover { background: var(--blue-soft); border-color: var(--blue-soft); }
.page-hero .btn-ghost { border-color: rgba(255, 255, 255, 0.85); color: #FFFFFF; }
.page-hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* Footer: white, like the practice site, over a dark legal bar */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); font-size: 0.98rem; }
.site-footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding-block: 52px 40px;
}
.site-footer .wrap > div, .site-footer nav { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.site-footer .brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; color: var(--heading); line-height: 1.2; }
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: var(--blue); }
.legal { background: var(--legal); color: var(--legal-ink); font-size: 0.875rem; }
.legal .wrap { display: flex; flex-direction: column; gap: 6px; padding-block: 22px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Rotating Google reviews */
.reviews { --star: #F5B301; }
.review-carousel { max-width: 46rem; margin-inline: auto; display: flex; flex-direction: column; gap: 20px; }
.review-stage { display: grid; }
.review {
  grid-area: 1 / 1;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 6px 18px var(--shadow);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.review.is-active { opacity: 1; visibility: visible; }
.review-stars { display: flex; gap: 4px; }
.review-stars svg { width: 22px; height: 22px; fill: var(--star); }
.review-stars svg.off { fill: var(--line); }
.review blockquote { margin: 0; }
.review blockquote p { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.45; color: var(--heading); }
.review figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 0.95rem; }
.review-author { font-weight: 600; color: var(--ink); }
.review-author a { color: inherit; }
.review-when { color: var(--muted); font-size: 0.875rem; }
.review-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 3px 10px;
}
.review-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.review-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  background: var(--surface);
  color: var(--blue);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.review-nav:hover { background: var(--blue-soft); }
.review-nav:focus-visible, .review-dot:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.review-dots { display: flex; gap: 8px; }
.review-dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; }
.review-dot[aria-current="true"] { background: var(--blue); }
.review-source { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { .review { transition: none; } }

/* Draft placeholders: anything highlighted needs your input before launch */
.todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  border-radius: 4px;
  padding: 0 0.35em;
  outline: 1px dashed currentColor;
  outline-offset: -1px;
  font-size: 0.95em;
}

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