/* South Bay Dental & Orthodontics — shared design system */

:root {
  --bg: #F5F9F8;
  --surface: #FFFFFF;
  --surface-soft: #EAF3F1;
  --primary: #1F6F6B;
  --primary-600: #175552;
  --primary-050: #E6F1EF;
  --accent: #0E7C86;
  --text: #1E2D33;
  --muted: #475A60;
  --line: #DAE7E4;
  --footer: #13232A;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(19, 35, 42, .06), 0 4px 12px rgba(19, 35, 42, .06);
  --shadow-md: 0 12px 34px rgba(19, 35, 42, .12);
  --container: 1120px;
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { height: 100%; background: var(--bg); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
main { flex: 1 1 auto; }

img { max-width: 100%; height: auto; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
.a-reset { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

.section { padding: 3.5rem 0; }

h1, h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.15rem); margin: 0 0 1rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 .5rem; }
h4 { font-size: 1rem; margin: 0 0 .75rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.lead { font-size: 1.125rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.eyebrow {
  color: var(--primary);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .76rem;
  margin: 0 0 .5rem;
}
.section-intro { color: var(--muted); max-width: 68ch; margin-top: -.25rem; }

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: .75rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--text);
  font-size: 1rem;
}
.brand:hover { color: var(--primary); }

.nav-links { display: flex; gap: .25rem; align-items: center; }
.nav-links a {
  color: var(--text);
  font-weight: 700;
  font-size: .95rem;
  padding: .55rem .75rem;
  border-radius: 999px;
  transition: background-color .18s ease, color .18s ease;
}
.nav-links a:hover { background: var(--primary-050); color: var(--primary-600); }
.nav-links a[aria-current="page"] { color: var(--primary-600); background: var(--primary-050); }

.call-cta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-left: .35rem;
  background: var(--primary);
  color: #fff !important;
  padding: .6rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .95rem;
  box-shadow: var(--shadow-sm);
  transition: background-color .18s ease, transform .18s ease;
}
.call-cta:hover { background: var(--primary-600); transform: translateY(-1px); }

/* Mobile nav */
.hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 3px auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(19, 35, 42, .38);
  z-index: 45;
}
.menu-backdrop.open { display: block; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 1rem + 3vw, 4rem) 0 clamp(1rem, .5rem + 1vw, 1.5rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 80% at 88% 10%, rgba(31, 111, 107, .12), transparent 70%),
    radial-gradient(45% 65% at 8% 90%, rgba(14, 124, 134, .08), transparent 72%);
}
.hero + .section { padding-top: 1rem; }
.hero-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}
.hero-copy { max-width: 60ch; }
.hero-actions { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow-md);
  padding: .6rem;
  width: 100%;
}
.hero-wrap .hero-card {
  justify-self: stretch;
  max-width: 100%;
}
.hero-wrap .hero-card img {
  aspect-ratio: 360 / 182;
  object-fit: cover;
}
.hero-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: .8rem 1.35rem;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: currentColor; }
.btn-outline:hover { background: var(--primary-050); color: var(--primary-600); }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { font-family: "Playfair Display", Georgia, serif; font-size: 1.2rem; }
.card p { color: var(--muted); margin: 0 0 .9rem; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 800;
  font-size: .92rem;
  color: var(--primary);
}
.card-link::after { content: "→"; transition: transform .18s ease; }
.card-link:hover::after { transform: translateX(3px); }

.card li a,
.prose p a,
.error-page p a,
.form-note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: var(--primary-050);
  color: var(--primary);
}
.card-icon svg { width: 26px; height: 26px; }

/* Trust / social proof */
.trust-panel {
  display: grid;
  grid-template-columns: .9fr 1.35fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
}
.trust-heading h2 { margin-bottom: .35rem; }
.trust-heading .section-intro { margin-top: 0; }
/* The link sits on its own line below the intro */
.intro-link { display: block; margin-top: .35rem; }
/* Two cards now that directions/hours lives in the fixed bottom CTA */
.trust-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
/* The trust section and the services section each had 3.5rem of padding,
   stacking into ~7rem of dead space between them. */
.trust-section { padding-bottom: 1.25rem; }
.services-section { padding-top: 1.5rem; }
.trust-stat {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .9rem;
  line-height: 1.45;
}
a.trust-stat { transition: border-color .18s ease, transform .18s ease; }
a.trust-stat:hover { border-color: var(--primary); transform: translateY(-1px); }
.trust-stat strong { font-size: 1.02rem; line-height: 1.3; }
.trust-stat span { color: var(--muted); }
.trust-link { margin-top: auto; padding-top: .35rem; color: var(--primary) !important; font-weight: 800; font-size: .84rem; }
.trust-stat svg { width: 22px; height: 22px; color: var(--primary); margin-bottom: .1rem; }

/* Compact, honest review links — no ratings or counts while the listing is thin */
.trust-review-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .55rem;
  margin: .9rem 0 0;
  font-size: .9rem;
  font-weight: 700;
}
.trust-review-links a {
  color: var(--primary-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.trust-review-links a:hover { color: var(--primary); }
.trust-review-sep { color: var(--muted); font-weight: 400; }

/* Lead reassurance card */
.trust-stat-lead {
  background: var(--primary-050);
  border-color: var(--primary);
}

/* Real-results card: small filmstrip of actual patient "after" photos */
.trust-results-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  margin-bottom: .1rem;
}
.trust-results-strip img {
  width: 100%;
  height: auto;
  aspect-ratio: 227 / 131;
  object-fit: cover;
  border-radius: 5px;
  background: var(--surface-soft);
  display: block;
}

/* Conversion band */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(135deg, var(--primary-600), var(--primary));
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-md);
  color: #fff;
}
.cta-band h2 { color: #fff; margin-bottom: .35rem; }
.cta-band p { color: rgba(255, 255, 255, .86); max-width: 58ch; margin-bottom: 0; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: .75rem; flex: none; }
.cta-band .btn-primary { background: #fff; color: var(--primary-600); }
.cta-band .btn-primary:hover { background: var(--primary-050); color: var(--primary-600); }
.cta-band .btn-outline { color: #fff; border-color: rgba(255, 255, 255, .72); }
.cta-band .btn-outline:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* Section variants */
.section-flush { padding-top: 0; }
.section-flush-both { padding-top: 0; padding-bottom: 0; }
main > .section:last-of-type:not(.section-flush-both) { padding-bottom: 2rem; }

/* Card grid variants */
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card-title { font-size: 1.25rem; }

/* Topics */
.toc { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; }
.toc a {
  display: inline-block;
  padding: .4rem;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  font-size: .95rem;
  width: 100%;
  text-align: center;
}
.edu-section { margin-top: 1.2rem; }
.edu-section + .edu-section { border-top: 1px solid rgba(0, 0, 0, .06); padding-top: 1rem; }
.edu-section p { max-width: 72ch; }
.edu-section h3 { margin: 1rem 0 .35rem; font-size: 1rem; color: var(--primary-600); }

/* Office */
.office-hero { padding: 0; }
.office-hero-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}
.office-hero-card img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}
.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  margin: 0 0 .4rem;
  font-size: 1.5rem;
}
.section-lead { margin-bottom: 1.5rem; }
.tech-card h3 { font-size: 1.1rem; }
.office-tour-card { margin-bottom: 1.5rem; }

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.bento-grid > div {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.bento-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
@media (min-width: 769px) {
  .bento-grid { grid-template-columns: 1fr 1.3fr; }
  .bento-tall { grid-row: 1 / 3; }
  .bento-wide { grid-column: 1 / -1; }
}
.exterior-img {
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.location-grid { grid-template-columns: 1.2fr 1fr; }
.location-photo { padding: 0; overflow: hidden; border-radius: 12px; }
.location-photo img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

/* Contact & appointment request */
.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 1.5rem;
  align-items: start;
}
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: grid; grid-template-columns: 24px 1fr; gap: .65rem; align-items: start; }
.contact-list svg { width: 21px; height: 21px; color: var(--primary); margin-top: .15rem; }
.contact-list strong {
  display: block;
  margin-bottom: .1rem;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.contact-list a { font-weight: 700; }
.appointment-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.form-field label { font-weight: 800; font-size: .9rem; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.form-field textarea { min-height: 7rem; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.form-note {
  padding: .8rem .95rem;
  margin-bottom: 1.1rem;
  background: var(--primary-050);
  border: 1px solid #CFE4E0;
  border-radius: 10px;
  color: var(--primary-600);
  font-size: .86rem;
}
.form-status {
  margin: 1rem 0 0;
  padding: .8rem .95rem;
  background: var(--primary-050);
  border-radius: 10px;
  color: var(--primary-600);
  font-weight: 700;
}
.card p.form-note { margin: 0 0 1.1rem; color: var(--primary-600); }
.card p.form-status { margin: 1rem 0 0; color: var(--primary-600); }

/* Error page */
.error-page { padding: clamp(3rem, 8vw, 6rem) 0; text-align: center; }
.error-code {
  margin: 0;
  color: var(--primary);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  line-height: 1;
}
.error-page p { max-width: 62ch; margin-inline: auto; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.error-links { margin-top: 1.5rem; }

/* Gallery page */
.gallery-viewer-section { margin: 0; padding-bottom: 0; }
.gallery-viewer-card { padding: 0; overflow: visible; max-width: 680px; margin-inline: auto; }
.gallery-thumbs-section { padding-top: 1.25rem; margin-top: 0; }
.gallery-hint { text-align: center; margin-top: .75rem; }
.edu-section, #appointment, .cards .card[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* Dentists */
.dentist-cards { display: grid; gap: 2rem; }
@media (min-width: 800px) {
  .dentist-cards { grid-template-columns: 1fr 1fr; }
}
.dentist-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  grid-template-rows: minmax(210px, auto) auto;
  gap: 1rem;
  align-items: start;
}
.dentist-card img {
  width: 160px;
  height: 210px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.dentist-name { font-size: 1.35rem; margin: 0 0 .25rem; }
.dentist-credentials { grid-column: 1 / -1; }
.dentist-credentials h3 { margin: .6rem 0 .3rem; font-size: 1rem; }
.dentist-credentials ul { padding-left: 2ch; text-align: left; }
@media (max-width: 399px) {
  .dentist-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    justify-items: center;
    text-align: center;
  }
  .dentist-credentials { grid-column: auto; }
}

/* Relocation notice */
.relocation-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding: .55rem 1rem;
  background: var(--primary-050);
  border: 1px solid #CFE4E0;
  color: var(--primary-600);
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  font-size: .88rem;
}
.relocation-notice svg { flex: none; }
.relocation-notice a { color: var(--primary-600); text-decoration: underline; text-underline-offset: 2px; }
.relocation-notice a:hover { color: var(--primary); }

/* Page header / legacy content */
.page-header { padding: clamp(2rem, 4vw, 3rem) 0 1rem; }
.page-title { font-family: "Playfair Display", Georgia, serif; margin: 0 0 .5rem; font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.6rem); }
.content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1rem, 2vw, 1.75rem);
}
.content img, .content table img { border-radius: var(--radius-sm); }
.content table { width: 100%; border-collapse: collapse; }
.content th, .content td { padding: .6rem; vertical-align: top; }
.content tr + tr td, .content tr + tr th { border-top: 1px solid var(--line); }

/* Prose */
.prose p { margin: .7rem 0; max-width: 72ch; }
.prose ul { margin: .7rem 0 .7rem 1.2rem; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

/* Footer */
.site-footer {
  background: var(--footer);
  color: #fff;
  padding: 2rem 0;
}
.site-footer a { color: rgba(255, 255, 255, .82); }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.footer-brand {
  display: block;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.footer-brand:hover { color: #fff; }
.footer-section h4 { color: #fff; font-weight: 700; }
.footer-section a, .footer-links a { display: inline-block; color: rgba(255, 255, 255, .82); }
.footer-links { display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.footer-address-link { color: rgba(255, 255, 255, .82); display: block; line-height: 1.7; }
.footer-address-link:hover { color: #fff; text-decoration: underline; }
.footer-phone { display: block; margin-top: .5rem; color: #fff; font-weight: 700; }
.footer-hours { display: grid; grid-template-columns: auto 1fr; gap: .5rem .8rem; font-size: .9rem; color: rgba(255, 255, 255, .82); }
.footer-hours > div:nth-child(odd) { white-space: nowrap; }
.address { color: rgba(255, 255, 255, .82); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .68);
  font-size: .82rem;
}
.footer-copy { margin: 0; }
.footer-payments { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem; }
.footer-payments img {
  width: auto;
  height: 22px;
  padding: 2px 4px;
  background: #fff;
  border-radius: 4px;
}
.footer-trust-link { color: rgba(255, 255, 255, .82); font-weight: 700; }

/* Responsive */
@media (max-width: 960px) {
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-wrap .hero-card { justify-self: stretch; max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .trust-panel { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .trust-stats { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 760px) {
  .location-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .hamburger { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% - .25rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: .6rem;
    z-index: 60;
  }
  body.menu-open .nav-links { display: flex; }
  .nav-links a { padding: .7rem .8rem; }
  .call-cta { margin-left: 0; margin-top: .35rem; justify-content: center; }
}

@media (max-width: 680px) {
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .hero-actions .btn { width: 100%; }
  .cta-band-actions { width: 100%; }
  .cta-band-actions .btn { width: 100%; }
  .appointment-form .form-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  /* Fixed CTA is ~65px tall; reserve exactly that so no empty space shows
     below the buttons and the bar never shifts when the OS nav bar changes. */
  body { padding-bottom: 68px; }
}

/* Sticky mobile call/directions bar */
.mobile-cta { display: none; }
@media (max-width: 680px) {
  .mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    padding: .55rem .75rem;
    /* Opaque background: backdrop-filter re-samples the animated gallery
       backdrop on every swipe frame and makes this bar flicker on Android. */
    background: #FFFFFF;
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(19, 35, 42, .12);
  }
  .mobile-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 46px;
    padding: .65rem .5rem;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
  }
  .mobile-cta svg { width: 17px; height: 17px; flex: none; }
  .mobile-cta-call { background: var(--primary); color: #fff; }
  .mobile-cta-call:hover { color: #fff; background: var(--primary-600); }
  .mobile-cta-directions { background: var(--primary-050); color: var(--primary-600); }
  .mobile-cta-directions:hover { background: #D8E9E6; color: var(--primary-600); }
  body.menu-open .mobile-cta,
  body.lightbox-open .mobile-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
