/* ============================================================
   Herscher Dentistry — shared stylesheet
   Design system mirrors the family brand (Washington Dental
   Studio / Sandwich Dentistry): Lora headings, Karla body,
   navy #1D4E76, teal #007B7C, AA-safe orange #B45309.
   ADA requirements baked in: 44px tap targets, focus-visible
   rings, keyboard-operable menu, reduced-motion support.
   ============================================================ */

@font-face {
  font-family: "Karla";
  src: url("../fonts/Karla-VariableFont_wght.ttf") format("truetype-variety");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../fonts/Lora-VariableFont_wght.ttf") format("truetype-variety");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --navy: #1d4e76;
  --navy-dark: #143a59;
  --teal: #007b7c;
  --teal-light: #5ebec8;
  --teal-pale: #e9f5f5;
  --accent: #b45309;
  --accent-hover: #8f4206;
  --text: #2f3e46;
  --muted: #5a6c76;
  --bg: #ffffff;
  --bg-soft: #f5f8f8;
  --border: #d7e0e2;
  --radius: 10px;
  --maxw: 1140px;
  --font-body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Lora", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.75em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

img, svg { max-width: 100%; height: auto; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* Layout container */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ============================================================
   Top utility bar
   ============================================================ */
.topbar {
  background: var(--navy);
  color: #fff;
  font-size: 0.95rem;
}
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: #fff; text-decoration: none; font-weight: 700; }
.topbar a:hover { color: var(--teal-light); text-decoration: underline; }
.topbar .topbar-hours { color: #cfe3e8; }

/* ============================================================
   Header + primary navigation
   ============================================================ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(29, 78, 118, 0.07);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand-mark {
  width: 46px; height: 46px; flex: 0 0 46px;
  background: var(--teal); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name strong { font-family: var(--font-head); font-size: 1.35rem; color: var(--navy); font-weight: 700; }
.brand-name span { font-size: 0.78rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--teal); font-weight: 700; }

/* Desktop nav */
.nav-desktop { display: none; }
.nav-desktop ul {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-desktop a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 6px 12px;
  color: var(--navy); font-weight: 700; text-decoration: none;
  border-radius: 6px; font-size: 1rem;
}
.nav-desktop a:hover, .nav-desktop a:focus-visible { color: var(--accent); background: var(--bg-soft); }
.nav-desktop .has-sub { position: relative; }
.nav-desktop .has-sub > a::after {
  content: ""; margin-left: 7px;
  border: 5px solid transparent; border-top-color: currentColor;
  transform: translateY(2px);
}
.nav-desktop .submenu {
  position: absolute; top: 100%; left: 0;
  min-width: 260px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 12px 30px rgba(20, 58, 89, 0.16);
  padding: 8px; list-style: none;
  display: none; z-index: 120;
}
.nav-desktop .has-sub:hover .submenu,
.nav-desktop .has-sub:focus-within .submenu { display: block; }
.nav-desktop .submenu a { display: flex; width: 100%; font-weight: 400; font-size: 0.98rem; }

.header-cta {
  display: none;
  align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 22px;
  background: var(--accent); color: #fff !important;
  font-weight: 700; text-decoration: none; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 1px; font-size: 0.92rem;
  white-space: nowrap;
}
.header-cta:hover, .header-cta:focus-visible { background: var(--navy); color: #fff !important; }

/* Hamburger (mobile) */
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: var(--teal); border: 0; border-radius: 8px; cursor: pointer;
}
.menu-toggle svg { width: 26px; height: 26px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle:hover { background: var(--navy); }

/* Mobile dropdown panel — white links on teal (~5.6:1) */
.mobile-panel {
  display: none;
  background: var(--teal);
  border-top: 1px solid rgba(255,255,255,0.25);
}
.mobile-panel.open { display: block; }
.mobile-panel ul { list-style: none; margin: 0; padding: 8px 0 16px; }
.mobile-panel li { margin: 0; }
.mobile-panel a {
  display: flex; align-items: center;
  min-height: 48px; padding: 10px 24px;
  color: #ffffff; font-weight: 700; font-size: 1.08rem; text-decoration: none;
}
.mobile-panel a:hover, .mobile-panel a:focus-visible { background: rgba(255,255,255,0.14); color: #fff; }
.mobile-panel .mobile-sub > a { font-size: 1rem; font-weight: 400; padding-left: 44px; min-height: 44px; }
.mobile-panel .mobile-group-label {
  color: var(--teal-light); text-transform: uppercase; letter-spacing: 2px;
  font-size: 0.78rem; font-weight: 700; padding: 14px 24px 2px;
}
.mobile-panel .mobile-call {
  margin: 10px 20px 4px; background: var(--accent); border-radius: 8px;
  justify-content: center; text-transform: uppercase; letter-spacing: 1px; font-size: 1rem;
}

@media (min-width: 1024px) {
  .nav-desktop { display: block; }
  .header-cta { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-panel { display: none !important; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--teal) 130%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.09) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  pointer-events: none;
}
.hero .wrap { position: relative; padding-top: 72px; padding-bottom: 72px; max-width: 900px; }
.hero h1 { color: #fff; margin-bottom: 0.5em; }
.hero p.lede { font-size: 1.22rem; color: #dcecf1; max-width: 640px; }
.hero .hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 30px;
  border-radius: 8px; font-weight: 700; font-size: 1rem;
  text-decoration: none; text-transform: uppercase; letter-spacing: 1px;
  border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover, .btn-outline:focus-visible { background: #fff; color: var(--navy); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover, .btn-teal:focus-visible { background: var(--navy); color: #fff; }

/* Interior page hero (slimmer) */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--teal) 135%);
  color: #fff;
}
.page-hero .wrap { padding-top: 52px; padding-bottom: 44px; }
.page-hero h1 { color: #fff; margin-bottom: 0.35em; }
.page-hero p { color: #dcecf1; max-width: 720px; margin-bottom: 0; }
.breadcrumb { font-size: 0.92rem; color: #bcd6dd; margin-bottom: 12px; }
.breadcrumb a { color: #fff; }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-teal { background: var(--teal-pale); }
.section-navy { background: var(--navy); color: #fff; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy p { color: #dcecf1; }
.kicker {
  display: inline-block; color: var(--teal); font-weight: 700;
  text-transform: uppercase; letter-spacing: 2.5px; font-size: 0.82rem;
  margin-bottom: 10px;
}
.section-navy .kicker { color: var(--teal-light); }
.center { text-align: center; }
.lede { font-size: 1.18rem; color: var(--muted); }
.section-navy .lede { color: #dcecf1; }

.two-col {
  display: grid; grid-template-columns: 1fr; gap: 36px; align-items: start;
}
@media (min-width: 860px) { .two-col { grid-template-columns: 1.05fr 0.95fr; } }

/* Service cards */
.cards {
  display: grid; grid-template-columns: 1fr; gap: 20px;
  list-style: none; margin: 32px 0 0; padding: 0;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column;
  box-shadow: 0 2px 10px rgba(29, 78, 118, 0.06);
}
.card:hover { box-shadow: 0 8px 24px rgba(29, 78, 118, 0.12); }
.card .card-icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--teal-pale);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card .card-icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 0.4em; font-size: 1.22rem; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { color: var(--muted); flex: 1; }
.card .card-link { font-weight: 700; color: var(--teal); text-decoration: none; }
.card .card-link:hover { color: var(--accent); text-decoration: underline; }

/* Steps / numbered list */
.steps { list-style: none; margin: 28px 0 0; padding: 0; counter-reset: step; display: grid; gap: 18px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; counter-increment: step; position: relative;
}
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 1.15rem; margin-bottom: 12px;
}
.steps h3 { font-size: 1.12rem; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--accent) 0%, #d06f1a 100%);
  color: #fff; border-radius: 16px;
  padding: 44px 36px; text-align: center; margin: 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #fff3e2; max-width: 640px; margin: 0 auto 24px; }
.cta-band .btn-primary { background: #fff; color: var(--accent); }
.cta-band .btn-primary:hover { background: var(--navy); color: #fff; }
.cta-band .btn-outline { border-color: #fff; }

/* Check list */
.checklist { list-style: none; padding: 0; margin: 20px 0; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 12px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>') center/13px no-repeat;
}

/* Price / plan table */
.plan-table { width: 100%; border-collapse: collapse; margin: 24px 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 10px rgba(29,78,118,0.08); }
.plan-table th, .plan-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.plan-table th { background: var(--navy); color: #fff; font-family: var(--font-head); }
.plan-table tr:last-child th, .plan-table tr:last-child td { border-bottom: 0; }
.plan-price { font-family: var(--font-head); font-size: 2.6rem; color: var(--navy); font-weight: 700; }
.plan-price small { font-family: var(--font-body); font-size: 1rem; color: var(--muted); font-weight: 400; }

/* ============================================================
   FAQ accordion (native details/summary = keyboard accessible)
   ============================================================ */
.faq-list { max-width: 820px; margin: 28px auto 0; }
.faq-list details {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden;
}
.faq-list summary {
  cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--navy);
  font-size: 1.08rem; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; font-size: 1.6rem; line-height: 1; color: var(--teal); flex: 0 0 auto;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list summary:hover { color: var(--accent); }
.faq-list .faq-answer { padding: 0 22px 20px; color: var(--muted); }
.faq-list .faq-answer p:last-child { margin-bottom: 0; }

/* ============================================================
   Contact form (honeypot anti-spam)
   ============================================================ */
.hd-contact-form { max-width: 640px; }
.hd-contact-form .form-row { margin-bottom: 1.1rem; }
.hd-contact-form label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.hd-contact-form input[type="text"],
.hd-contact-form input[type="tel"],
.hd-contact-form input[type="email"],
.hd-contact-form textarea,
.hd-contact-form select {
  width: 100%; min-height: 48px; padding: 0.65rem 0.8rem;
  border: 1px solid #aebfc4; border-radius: 8px;
  font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--text);
}
.hd-contact-form textarea { min-height: 140px; resize: vertical; }
.hd-contact-form button[type="submit"] {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  min-height: 52px; padding: 0.85rem 2.4rem;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px; cursor: pointer;
}
.hd-contact-form button[type="submit"]:hover,
.hd-contact-form button[type="submit"]:focus-visible { background: var(--navy); }
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.92rem; color: var(--muted); }
.form-success {
  border: 1px solid var(--teal-light); background: var(--teal-pale);
  border-radius: var(--radius); padding: 1.2rem 1.4rem; max-width: 640px;
}
.form-success[hidden] { display: none; }
.field-error { color: #9c2b0e; font-size: 0.92rem; font-weight: 700; }

/* Contact info rows */
.info-rows { display: grid; gap: 14px; margin: 24px 0; }
.info-row { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.info-row .info-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; background: var(--teal-pale); display: inline-flex; align-items: center; justify-content: center; }
.info-row .info-icon svg { width: 22px; height: 22px; }
.info-row strong { display: block; color: var(--navy); font-family: var(--font-head); }
.hours-list { list-style: none; padding: 0; margin: 8px 0 0; }
.hours-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); margin: 0; }
.hours-list li:last-child { border-bottom: 0; }

/* ============================================================
   Testimonials
   ============================================================ */
.reviews { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.reviews-grid { display: grid; grid-template-columns: 1fr; gap: 20px; text-align: left; margin-top: 32px; }
@media (min-width: 860px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }
.review { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: 0 2px 14px rgba(0,0,0,0.08); border: 1px solid var(--border); }
.review .stars { color: var(--accent); font-size: 1.25rem; letter-spacing: 3px; margin-bottom: 12px; }
.review blockquote { margin: 0 0 14px; font-style: italic; line-height: 1.6; color: var(--text); }
.review cite { font-style: normal; font-weight: 700; color: var(--navy); }

/* Note / callout boxes */
.note {
  border-left: 5px solid var(--teal); background: var(--teal-pale);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 24px 0;
}
.note strong { color: var(--navy); }
.note-warn { border-left-color: var(--accent); background: #fdf3e7; }

/* Generic content table */
.data-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.data-table th, .data-table td { padding: 12px 16px; border: 1px solid var(--border); text-align: left; }
.data-table th { background: var(--bg-soft); color: var(--navy); }

/* Sitemap page list */
.sitemap-cols { columns: 1; column-gap: 40px; }
@media (min-width: 700px) { .sitemap-cols { columns: 2; } }
@media (min-width: 1000px) { .sitemap-cols { columns: 3; } }
.sitemap-cols h3 { break-inside: avoid; margin-top: 24px; }
.sitemap-cols ul { list-style: none; padding: 0; margin: 0 0 8px; break-inside: avoid; }
.sitemap-cols li { margin-bottom: 8px; }

/* Doctor / team cards */
.team-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }
@media (min-width: 760px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
.team-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; text-align: center; box-shadow: 0 2px 10px rgba(29,78,118,0.06); }
.team-avatar {
  width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--teal-pale); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 2.2rem; color: var(--teal); font-weight: 700;
}
.team-photo {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 18px; display: block; border: 3px solid var(--teal-pale);
}
.team-card h3 { margin-bottom: 4px; }
.team-card .team-role { color: var(--teal); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.85rem; margin-bottom: 12px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--navy-dark); color: #d5e4ea; margin-top: 0; }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 36px;
  padding: 56px 0 40px;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; } }
.site-footer h3 { color: #fff; font-size: 1.1rem; margin-bottom: 16px; font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #d5e4ea; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand .brand-name strong { color: #fff; }
.footer-brand .brand-name span { color: var(--teal-light); }
.footer-contact strong { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.18);
  padding: 20px 0 28px; font-size: 0.92rem; color: #a9c2cc;
}
.footer-bottom .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
.footer-bottom a { color: #a9c2cc; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Small screens */
@media (max-width: 640px) {
  .section { padding: 44px 0; }
  .hero .wrap { padding-top: 52px; padding-bottom: 52px; }
  .cta-band { padding: 32px 22px; }
  .topbar .topbar-hours { display: none; }
}
