/* ==========================================================================
   Affinity Family Dental Muncie — Design System
   Premium, warm, trustworthy family-dental aesthetic.
   ========================================================================== */

/* -------------------- Custom properties -------------------- */
:root {
  /* Brand palette sampled directly from affinityfamilydentalmuncie.com's
     live computed styles: navy header/headings, brand blue CTAs, a green
     highlight accent (used on the phone number + logo wordmark), and the
     same light slate page background. */
  --color-primary: #0a2540;
  --color-primary-dark: #071a2d;
  --color-primary-light: #14395e;
  --color-primary-50: #eaf2fa;
  --color-accent: #0486cc;
  --color-accent-dark: #036999;
  --color-accent-light: #4fb2e8;
  --color-gold: #2f9e5c;
  --color-bg: #f1f5f9;
  --color-bg-alt: #e7eef5;
  --color-surface: #ffffff;
  --color-text: #101c28;
  --color-text-muted: #5b6b7a;
  --color-text-soft: #8a97a3;
  --color-border: #dde6ee;
  --color-success: #2f9e5c;

  --font-display: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-max: 1200px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(10, 37, 64, 0.07);
  --shadow-md: 0 10px 30px rgba(10, 37, 64, 0.12);
  --shadow-lg: 0 24px 60px rgba(10, 37, 64, 0.18);

  --header-h: 84px;
  --mobile-cta-h: 62px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: var(--mobile-cta-h);
  overflow-x: hidden;
  width: 100%;
}
img { max-width: 100%; display: block; }
svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--color-primary-dark); }
p { margin: 0 0 1em; color: var(--color-text-muted); line-height: 1.7; }
button { font-family: inherit; cursor: pointer; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* -------------------- Layout helpers -------------------- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-primary { background: var(--color-primary); color: #fff; }
.section-primary p { color: rgba(255,255,255,.78); }
.section-primary h2, .section-primary h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; font-size: 12.5px; color: var(--color-accent-dark);
  background: rgba(4,134,204,.1); padding: 7px 16px; border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.section-primary .eyebrow { color: var(--color-gold); background: rgba(47,158,92,.14); }

.section-head { max-width: 680px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { font-size: 17px; }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 15.5px;
  padding: 16px 28px; border-radius: var(--radius-pill); border: 2px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.btn-accent { background: var(--color-accent); color: #fff; box-shadow: 0 10px 24px rgba(4,134,204,.32); }
.btn-accent:hover { background: var(--color-accent-dark); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(4,134,204,.4); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 10px 24px rgba(10,37,64,.28); }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; transform: translateY(-2px); }
.btn-outline-dark { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline-dark:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: rgba(10,37,64,.06); color: var(--color-primary); }
.btn-ghost:hover { background: rgba(10,37,64,.12); }
.btn-block { width: 100%; }
.btn-sm { padding: 11px 20px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* -------------------- Top utility bar -------------------- */
.topbar {
  background: var(--color-primary-dark); color: rgba(255,255,255,.86);
  font-size: 13.5px; padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar a { display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; }
.topbar-left { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar svg { width: 14px; height: 14px; opacity: .85; }

/* -------------------- Header / nav -------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60; background: rgba(241,245,249,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px; background: var(--color-primary);
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { line-height: 1.15; }
.brand-text .name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--color-primary-dark); }
.brand-text .loc { display: block; font-size: 12px; color: var(--color-text-soft); letter-spacing: .04em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a, .main-nav > ul > li > button.nav-toggle-link {
  display: flex; align-items: center; gap: 5px; padding: 12px 14px; font-size: 15px; font-weight: 600;
  color: var(--color-primary-dark); border-radius: var(--radius-sm); background: none; border: none;
  transition: background-color .2s, color .2s;
  white-space: nowrap;
}
.main-nav > ul > li > a:hover, .main-nav > ul > li.open > button.nav-toggle-link { background: var(--color-primary-50); color: var(--color-primary); }
.main-nav > ul > li > a.active { color: var(--color-accent-dark); }
.main-nav svg.chev { width: 13px; height: 13px; transition: transform .2s; }
.main-nav li.open svg.chev { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 250px;
  background: var(--color-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border); padding: 10px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.main-nav li.open .dropdown, .main-nav li:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 11px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--color-text); }
.dropdown a:hover { background: var(--color-primary-50); color: var(--color-primary); }
.dropdown a .desc { display: block; font-weight: 400; font-size: 12.5px; color: var(--color-text-soft); margin-top: 2px; }
.dropdown.mega { min-width: 620px; padding: 18px; }
.dropdown.mega .mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin-bottom: 10px; }
.dropdown.mega .mega-link { display: flex; align-items: center; gap: 10px; }
.dropdown.mega .mega-link .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--color-primary-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dropdown.mega .mega-link .ic svg { width: 17px; height: 17px; color: var(--color-primary); }
.dropdown.mega .mega-foot { border-top: 1px solid var(--color-border); margin-top: 6px; padding-top: 10px; }
.dropdown.mega .mega-foot a { color: var(--color-accent-dark); display: flex; align-items: center; justify-content: space-between; }

.header-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* Icon-only call button in the header at every desktop width — keeps the header
   row compact and uncluttered (one clear primary action: Book Appointment) and
   removes the fragile "does the text pill fit" breakpoint math entirely. The
   full "Call Us Now / number" treatment still appears in the hero and sticky
   mobile bar, so the number is never more than a glance away. */
.header-phone {
  display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 50%;
  background: none;
}
.header-phone .icon-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--color-primary-50); display: flex; align-items: center; justify-content: center; color: var(--color-primary); transition: background-color .2s, color .2s; }
.header-phone:hover .icon-circle { background: var(--color-primary); color: #fff; }
.header-phone .icon-circle svg { width: 18px; height: 18px; }
.header-phone .txt { display: none; }

.hamburger {
  display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--color-border);
  background: #fff; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.hamburger span { display: block; width: 21px; height: 2px; background: var(--color-primary-dark); border-radius: 2px; transition: transform .25s, opacity .25s; }
.hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------- Mobile nav drawer -------------------- */
.mobile-nav {
  position: fixed; inset: 0; z-index: 90; visibility: hidden;
}
.mobile-nav.is-open { visibility: visible; }
.mobile-nav-backdrop {
  position: absolute; inset: 0; background: rgba(8,37,35,.55); opacity: 0; transition: opacity .3s var(--ease);
}
.mobile-nav.is-open .mobile-nav-backdrop { opacity: 1; }
.mobile-nav-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(360px, 86vw); background: #fff;
  box-shadow: var(--shadow-lg); padding: 22px; overflow-y: auto;
  transform: translateX(100%); transition: transform .32s var(--ease);
  display: flex; flex-direction: column; gap: 6px;
}
.mobile-nav.is-open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mobile-nav-close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--color-border); background: #fff; display: flex; align-items: center; justify-content: center; }
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav .top-link svg { width: 16px; height: 16px; color: var(--color-text-soft); transition: transform .25s var(--ease); }
.mobile-nav li.open > .top-link svg { transform: rotate(180deg); }
.mobile-nav a.top-link, .mobile-nav button.top-link {
  display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left;
  padding: 14px 8px; font-size: 16.5px; font-weight: 700; color: var(--color-primary-dark);
  border-bottom: 1px solid var(--color-border); background: none; border-left: none; border-right: none; border-top: none;
}
.mobile-nav .sub-list { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.mobile-nav li.open .sub-list { max-height: 600px; }
.mobile-nav .sub-list a { display: block; padding: 11px 10px 11px 20px; font-size: 14.5px; color: var(--color-text-muted); font-weight: 600; }
.mobile-nav-cta { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }

/* -------------------- Sticky mobile CTA bar -------------------- */
.mobile-cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: none;
  height: var(--mobile-cta-h); background: var(--color-surface); border-top: 1px solid var(--color-border);
  box-shadow: 0 -6px 24px rgba(10,37,64,.14);
}
.mobile-cta-bar .row { display: grid; grid-template-columns: 1fr 1fr; height: 100%; }
.mobile-cta-bar a { display: flex; align-items: center; justify-content: center; gap: 9px; font-weight: 800; font-size: 15px; }
.mobile-cta-bar a.call { background: var(--color-accent); color: #fff; }
.mobile-cta-bar a.book { background: var(--color-primary); color: #fff; }
.mobile-cta-bar svg { width: 19px; height: 19px; }

/* -------------------- Breadcrumbs -------------------- */
.breadcrumbs { padding: 18px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--color-text-soft); }
.breadcrumbs a { color: var(--color-text-soft); font-weight: 600; }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--color-border); }
.breadcrumbs li[aria-current] { color: var(--color-primary-dark); font-weight: 600; }

/* -------------------- Hero -------------------- */
.hero { position: relative; overflow: hidden; padding: 60px 0 90px; background: var(--color-bg); }
.hero-bg-shape {
  position: absolute; top: -180px; right: -220px; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--color-primary-50), transparent 70%);
  z-index: 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--color-border);
  padding: 8px 14px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; color: var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
}
.hero-badge svg { width: 15px; height: 15px; color: var(--color-accent); }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); margin-bottom: 20px; }
.hero h1 .accent { color: var(--color-accent); }
.hero-lede { font-size: 18.5px; max-width: 540px; margin-bottom: 30px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 30px; }
.hero-call-btn { position: relative; }
.hero-call-btn .pulse {
  position: absolute; inset: -4px; border-radius: var(--radius-pill); border: 2px solid var(--color-accent);
  animation: pulse-ring 2.2s var(--ease) infinite;
}
@keyframes pulse-ring { 0% { opacity: .65; transform: scale(1);} 100% { opacity: 0; transform: scale(1.12);} }
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; color: var(--color-text-muted); }
.hero-meta span { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hero-meta svg { width: 17px; height: 17px; color: var(--color-primary); }

.hero-visual { position: relative; }
.hero-photo-card {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); position: relative;
  aspect-ratio: 4/5; background: linear-gradient(155deg, var(--color-primary) 0%, var(--color-primary-light) 55%, var(--color-accent) 130%);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.9);
}
.hero-pattern, .frame-pattern {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.22) 1.5px, transparent 1.5px);
  background-size: 26px 26px; -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 68%);
}
.frame-pattern { opacity: .7; background-image: radial-gradient(rgba(10,37,64,.1) 1.5px, transparent 1.5px); }

/* -------------------- Brand emblem (stand-in for a real photo) --------------------
   A dashed orbit ring + frosted-glass core holding the main icon, with two small
   accent chips. Used in the hero, about sections, and doctor bio slot instead of
   a bare icon-in-a-box with "photo placeholder" caption text. */
.emblem { position: relative; width: 46%; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; }
.emblem-ring {
  position: absolute; inset: -70%; border: 1.5px dashed rgba(255,255,255,.28); border-radius: 50%;
  animation: emblem-spin 50s linear infinite;
}
.emblem-ring.ring-2 { inset: -32%; border: 1px solid rgba(255,255,255,.16); border-style: solid; animation: none; }
.emblem-core {
  position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%;
  background: rgba(255,255,255,.14); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 24px 54px rgba(2,12,26,.28), inset 0 0 0 1px rgba(255,255,255,.28);
  animation: emblem-float 5.5s ease-in-out infinite;
}
.emblem-core svg.emblem-icon { width: 44%; height: 44%; color: #fff; stroke-width: 1.4; }
.emblem-core .emblem-initials { font-family: var(--font-display); font-weight: 700; font-size: 15.5vw; color: var(--color-primary); line-height: 1; }
@media (min-width: 620px) { .emblem-core .emblem-initials { font-size: 4.2vw; } }
@media (min-width: 1080px) { .emblem-core .emblem-initials { font-size: 46px; } }
.emblem-chip {
  position: absolute; z-index: 2; width: 25%; height: 25%; min-width: 40px; min-height: 40px; max-width: 58px; max-height: 58px;
  border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.emblem-chip svg { width: 44%; height: 44%; }
.emblem-chip.chip-a { top: 2%; right: -6%; color: var(--color-gold); }
.emblem-chip.chip-b { bottom: 6%; left: -10%; color: var(--color-accent); animation: emblem-float 5.5s ease-in-out infinite .4s; }
@keyframes emblem-spin { to { transform: rotate(360deg); } }
@keyframes emblem-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .emblem-ring, .emblem-core, .emblem-chip.chip-b { animation: none; } }

/* Light variant for use on light section backgrounds (e.g. the About frame) */
.emblem.light .emblem-ring { border-color: rgba(10,37,64,.14); }
.emblem.light .emblem-ring.ring-2 { border-color: rgba(10,37,64,.1); }
.emblem.light .emblem-core { background: var(--color-surface); box-shadow: 0 24px 54px rgba(10,37,64,.12), inset 0 0 0 1px rgba(10,37,64,.06); }
.emblem.light .emblem-core svg.emblem-icon { color: var(--color-primary); }
.emblem.light .emblem-chip { box-shadow: var(--shadow-sm); }
.floating-card {
  position: absolute; background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 16px 18px; display: flex; align-items: center; gap: 12px; max-width: 240px;
}
.floating-card.card-1 { top: 26px; left: -34px; }
.floating-card.card-2 { bottom: 30px; right: -28px; }
.floating-card .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--color-primary-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.floating-card .ic svg { width: 22px; height: 22px; color: var(--color-primary); }
.floating-card strong { display: block; font-size: 14.5px; color: var(--color-primary-dark); font-family: var(--font-display); }
.floating-card small { font-size: 12px; color: var(--color-text-soft); }

/* -------------------- Trust bar -------------------- */
.trust-strip { background: var(--color-primary); }
.trust-strip .grid { grid-template-columns: repeat(4, 1fr); gap: 0; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; padding: 34px 22px; border-left: 1px solid rgba(255,255,255,.12); color: #fff; }
.trust-item:first-child { border-left: none; }
.trust-item .ic { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trust-item .ic svg { width: 24px; height: 24px; color: var(--color-gold); }
.trust-item h3 { color: #fff; font-size: 16.5px; margin-bottom: 4px; }
.trust-item p { color: rgba(255,255,255,.72); font-size: 13.6px; margin: 0; }

/* -------------------- Cards -------------------- */
.card {
  background: var(--color-surface); border-radius: var(--radius-md); border: 1px solid var(--color-border);
  padding: 32px 28px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.service-card { display: flex; flex-direction: column; height: 100%; }
.service-card .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--color-primary-50); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.service-card .ic svg { width: 28px; height: 28px; color: var(--color-primary); }
.service-card h3 { font-size: 19.5px; margin-bottom: 8px; }
.service-card p { font-size: 14.8px; flex-grow: 1; }
.service-card .learn { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; color: var(--color-accent-dark); margin-top: 14px; }
.service-card .learn svg { width: 15px; height: 15px; transition: transform .2s; }
.service-card:hover .learn svg { transform: translateX(4px); }

/* Dark, numbered service-card variant — used on navy section backgrounds,
   echoing the source site's "Our Dental Services" grid. */
.service-card.on-dark {
  position: relative; overflow: hidden; background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1); backdrop-filter: blur(2px);
}
.service-card.on-dark .ic { background: rgba(255,255,255,.12); }
.service-card.on-dark .ic svg { color: #fff; }
.service-card.on-dark h3 { color: #fff; }
.service-card.on-dark p { color: rgba(255,255,255,.66); }
.service-card.on-dark .learn { color: var(--color-accent-light); }
.service-card.on-dark:hover { background: rgba(255,255,255,.08); }
.service-card .card-num {
  position: absolute; right: 18px; bottom: 6px; font-family: var(--font-display);
  font-size: 50px; font-weight: 700; color: rgba(255,255,255,.08); line-height: 1; pointer-events: none;
}

/* Circle-and-label CTA — a compact secondary button style: a round icon
   badge plus a bold label inside one pill. */
.btn-cta { display: inline-flex; align-items: center; gap: 12px; background: var(--color-surface); border-radius: var(--radius-pill); padding: 6px 22px 6px 6px; box-shadow: var(--shadow-sm); font-weight: 800; font-size: 14.5px; color: var(--color-primary-dark); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-cta .circle { width: 34px; height: 34px; border-radius: 50%; background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn-cta .circle svg { width: 15px; height: 15px; }
.btn-cta.on-dark { background: var(--color-primary-dark); color: #fff; }
.btn-cta.on-dark .circle { background: #fff; color: var(--color-primary-dark); }
.btn-cta.accent .circle { background: var(--color-accent); }

.promo-card { position: relative; border-top: 5px solid var(--color-accent); text-align: center; }
.promo-card .value-tag { position: absolute; top: -14px; right: 22px; background: var(--color-accent); color: #fff; font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: var(--radius-pill); box-shadow: var(--shadow-sm); }
.promo-card .price { font-family: var(--font-display); font-size: 46px; color: var(--color-primary-dark); margin: 10px 0 2px; }
.promo-card .price small { font-size: 15px; font-weight: 600; color: var(--color-text-soft); }
.promo-card h3 { font-size: 18px; }
.promo-card ul { text-align: left; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.promo-card ul li { display: flex; gap: 8px; font-size: 14px; color: var(--color-text-muted); }
.promo-card ul li svg { width: 16px; height: 16px; color: var(--color-success); flex-shrink: 0; margin-top: 3px; }
.promo-card .fine { font-size: 11.6px; color: var(--color-text-soft); margin-top: 14px; }
.promo-card.featured { border-top-color: var(--color-accent-light); background: var(--color-primary); transform: translateY(-14px); box-shadow: var(--shadow-lg); }
.promo-card.featured h3, .promo-card.featured .price { color: #fff; }
.promo-card.featured p, .promo-card.featured ul li { color: rgba(255,255,255,.75); }
.promo-card.featured .price small { color: rgba(255,255,255,.55); }
.promo-card.featured .fine { color: rgba(255,255,255,.5); }
.promo-restrictions li { font-size: 12px; color: var(--color-text-soft); }
.promo-card.featured .promo-restrictions li { color: rgba(255,255,255,.55); }
.promo-card .popular-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--color-gold); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 14px; border-radius: var(--radius-pill); }
@media (max-width: 860px) { .promo-card.featured { transform: none; } }

.team-card { text-align: center; }
.team-photo {
  width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-md); margin-bottom: 20px; overflow: hidden;
  background: linear-gradient(155deg, var(--color-primary-light), var(--color-primary)); display: flex; align-items: center; justify-content: center;
}
.team-photo span.initials { font-family: var(--font-display); font-size: 42px; color: #fff; opacity: .92; }
.team-card h3 { font-size: 19px; margin-bottom: 2px; }
.team-card .role { display: block; font-size: 13px; font-weight: 700; color: var(--color-accent-dark); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }

.value-card { text-align: left; }
.value-card .ic { width: 50px; height: 50px; border-radius: 14px; background: var(--color-primary-50); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.value-card .ic svg { width: 25px; height: 25px; color: var(--color-primary); }

/* -------------------- Emergency banner -------------------- */
.emergency-band { background: linear-gradient(120deg, var(--color-primary-dark), var(--color-primary)); position: relative; overflow: hidden; }
.emergency-band::after {
  content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(4,134,204,.28), transparent 55%);
}
.emergency-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding: 52px 0; }
.emergency-inner .txt h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.emergency-inner .txt p { color: rgba(255,255,255,.8); margin: 0; max-width: 520px; }
.emergency-inner .badge-urgent { display: inline-flex; align-items: center; gap: 8px; background: rgba(4,134,204,.18); color: var(--color-accent-light); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: var(--radius-pill); margin-bottom: 14px; }

/* -------------------- About section -------------------- */
.about-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 60px; align-items: center; }
.about-photo { position: relative; }
.about-photo .frame {
  aspect-ratio: 3/4; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); position: relative;
  background: linear-gradient(160deg, var(--color-bg-alt), var(--color-primary-50)); border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px;
}
.benefit-list { display: flex; flex-direction: column; gap: 16px; margin: 28px 0 32px; }
.benefit-list li { display: flex; gap: 14px; align-items: flex-start; }
.benefit-list .tick { width: 30px; height: 30px; border-radius: 50%; background: var(--color-primary-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.benefit-list .tick svg { width: 16px; height: 16px; color: var(--color-primary); }
.benefit-list strong { display: block; color: var(--color-primary-dark); font-size: 15.5px; }
.benefit-list span.d { font-size: 14px; color: var(--color-text-muted); }

/* -------------------- FAQ -------------------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px; background: none; border: none; text-align: left; font-family: var(--font-display);
  font-size: 16.5px; font-weight: 600; color: var(--color-primary-dark);
}
.faq-q .plus { width: 30px; height: 30px; border-radius: 50%; background: var(--color-primary-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .3s var(--ease), background-color .3s; }
.faq-q .plus svg { width: 15px; height: 15px; color: var(--color-primary); transition: transform .3s var(--ease); }
.faq-item.open .faq-q .plus { background: var(--color-accent); }
.faq-item.open .faq-q .plus svg { color: #fff; transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq-a-inner { padding: 0 24px 22px; font-size: 15px; color: var(--color-text-muted); }
.faq-a-inner p:last-child { margin-bottom: 0; }

/* -------------------- Testimonial-free trust badges row -------------------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--color-bg-alt); border: 1px solid var(--color-border); padding: 9px 16px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 700; color: var(--color-primary-dark); }
.badge-pill svg { width: 16px; height: 16px; color: var(--color-accent); }

/* -------------------- Insurance logos strip -------------------- */
.insurance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.insurance-chip { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 16px 14px; text-align: center; font-weight: 700; font-size: 13.6px; color: var(--color-primary-dark); }
.insurance-grid.on-dark .insurance-chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; }

/* -------------------- Wave divider -------------------- */
/* An organic, hand-shaped section break instead of a hard rectangle edge —
   used sparingly at 2-3 key transitions to give the page a made-for-this-brand
   rhythm rather than a stack of generic boxes. */
.wave-divider { display: block; line-height: 0; width: 100%; overflow: hidden; }
.wave-divider svg { width: 100%; height: 64px; display: block; }
.wave-divider.flip svg { transform: rotate(180deg); }
@media (max-width: 620px) { .wave-divider svg { height: 34px; } }

/* -------------------- Veteran-owned / trust micro-badge -------------------- */
/* Lives in the dark topbar (not the main header row) so it never competes
   with the primary nav for space — the topbar already wraps safely via
   flex-wrap on narrow widths, so this badge is always visible, never overlaps. */
.veteran-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 20px;
  background: rgba(255,255,255,.1); flex-shrink: 0; white-space: nowrap;
}
.veteran-badge .star { width: 17px; height: 17px; border-radius: 50%; background: var(--color-gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.veteran-badge .star svg { width: 10px; height: 10px; color: #fff; }
.veteran-badge span:last-child { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: #fff; line-height: 1.2; white-space: nowrap; }
.footer-veteran { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 8px; border-radius: 11px; background: rgba(255,255,255,.07); margin-top: 14px; }
.footer-veteran .star { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.footer-veteran .star svg { width: 12px; height: 12px; color: var(--color-gold); }
.footer-veteran span { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.85); }

/* -------------------- Floating desktop CTA -------------------- */
.desktop-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 70; display: none; align-items: center; gap: 10px;
  background: var(--color-accent); color: #fff; padding: 15px 24px; border-radius: var(--radius-pill);
  font-weight: 800; font-size: 14.5px; box-shadow: 0 14px 32px rgba(4,134,204,.38);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.desktop-fab:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(4,134,204,.46); }
.desktop-fab svg { width: 18px; height: 18px; }
@media (min-width: 1081px) { .desktop-fab { display: inline-flex; } }

/* -------------------- CTA band -------------------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 38px); max-width: 700px; margin-left: auto; margin-right: auto; }
.cta-band p { max-width: 560px; margin: 0 auto 30px; }
.cta-band .btn-row { justify-content: center; }

/* -------------------- Process steps -------------------- */
.steps { counter-reset: step; display: grid; gap: 26px; grid-template-columns: repeat(3, 1fr); }
.step { position: relative; padding-top: 8px; }
.step .num { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--color-primary); color: #fff; font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* -------------------- Footer -------------------- */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,.72); padding: 76px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .brand-mark { background: rgba(255,255,255,.1); }
.footer-brand .name { color: #fff; font-family: var(--font-display); font-size: 18px; }
.site-footer h4 { color: #fff; font-size: 14.5px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; }
.site-footer ul { display: flex; flex-direction: column; gap: 11px; }
.site-footer a { font-size: 14.5px; color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 17px; height: 17px; color: var(--color-gold); flex-shrink: 0; margin-top: 2px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0; font-size: 13px; flex-wrap: wrap; }
.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* -------------------- Inner page hero (simpler) -------------------- */
.page-hero { padding: 40px 0 60px; background: var(--color-bg-alt); position: relative; overflow: hidden; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(30px, 4vw, 46px); max-width: 780px; }
.page-hero p.lede { font-size: 17.5px; max-width: 620px; }
.page-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }

/* -------------------- Service detail page -------------------- */
.service-detail-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 56px; align-items: start; }
.service-body h2 { font-size: 25px; margin-top: 40px; }
.service-body h2:first-child { margin-top: 0; }
.sidebar-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 28px; box-shadow: var(--shadow-sm); position: sticky; top: calc(var(--header-h) + 24px); }
.sidebar-card h3 { font-size: 17px; }
.sidebar-card .info-line { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--color-border); font-size: 14px; }
.sidebar-card .info-line:first-of-type { border-top: none; }
.sidebar-card .info-line svg { width: 18px; height: 18px; color: var(--color-primary); flex-shrink: 0; margin-top: 1px; }
.sidebar-card .info-line strong { display: block; color: var(--color-primary-dark); }
.related-services { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.related-services a { font-size: 14px; font-weight: 600; padding: 10px 12px; border-radius: 10px; background: var(--color-primary-50); color: var(--color-primary-dark); display: flex; justify-content: space-between; }
.related-services a:hover { background: var(--color-primary); color: #fff; }

/* -------------------- Doctor bio -------------------- */
.doctor-hero { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.credential-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.credential-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 18px 20px; }
.credential-card .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-soft); font-weight: 700; margin-bottom: 4px; }
.credential-card .val { font-size: 14.5px; color: var(--color-primary-dark); font-weight: 700; }

/* -------------------- Contact page -------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info-list { display: flex; flex-direction: column; gap: 22px; margin: 28px 0; }
.contact-info-list .row { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-list .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--color-primary-50); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-info-list .ic svg { width: 22px; height: 22px; color: var(--color-primary); }
.contact-info-list strong { display: block; color: var(--color-primary-dark); font-size: 15.5px; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); aspect-ratio: 16/11; }
.map-embed iframe { width: 100%; height: 100%; border: 0; }

.form-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; color: var(--color-primary-dark); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 10px; border: 1.5px solid var(--color-border);
  font-family: var(--font-body); font-size: 15px; background: var(--color-bg); color: var(--color-text);
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-primary); outline: none; }
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 12.5px; color: var(--color-text-soft); margin-top: 10px; }

/* -------------------- Promotions disclaimer -------------------- */
.disclaimer-box { background: var(--color-bg-alt); border: 1px dashed var(--color-border); border-radius: var(--radius-md); padding: 24px 28px; font-size: 13.5px; color: var(--color-text-soft); }
.disclaimer-box strong { color: var(--color-primary-dark); }

/* -------------------- Reveal animation -------------------- */
/* Reveal-on-scroll is opt-in: only hide content once JS has confirmed it can
   animate it back in (html.js, set by an inline script in <head>). Without
   JavaScript, or before it runs, everything is simply visible. */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-call-btn .pulse { animation: none; }
  html { scroll-behavior: auto; }
}

/* -------------------- Breadcrumb schema visual helper -------------------- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-primary); color: #fff; padding: 12px 18px;
  border-radius: 0 0 10px 0; z-index: 999; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; margin: 0 auto; }
  .about-grid, .doctor-hero, .page-hero-grid { grid-template-columns: 1fr; }
  .service-detail-grid { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .trust-strip .grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(3) { border-left: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mobile-cta-bar { display: block; }
}

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .insurance-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .credential-grid { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .topbar-left { gap: 14px; }
  .topbar .container { justify-content: center; text-align: center; }
  .veteran-badge { display: none; }
  .emergency-inner { flex-direction: column; text-align: center; }
  .emergency-inner .btn-row { justify-content: center; }
  .floating-card { display: none; }
  .hero { padding: 36px 0 60px; }
  section { padding: 52px 0; }
  .container { padding: 0 18px; }
}

/* Header: on narrow phones, the icon-only phone button + hamburger is enough —
   the sticky bottom bar already offers both Call and Book Appointment, so the
   full-width header pill would only fight the logo for space. */
@media (max-width: 520px) {
  .nav-wrap { gap: 8px; }
  .header-cta { gap: 6px; }
  .header-cta > a.btn-accent { display: none; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-mark svg { width: 22px; height: 22px; }
  .brand-text .name { font-size: 15.5px; }
  .brand-text .loc { font-size: 10.5px; }
  .header-phone { padding: 6px; background: transparent; }
  .header-phone .icon-circle { width: 40px; height: 40px; }
}
@media (max-width: 360px) {
  .brand-text .loc { display: none; }
}
