/* ============================================================================
   Homepage styles. Every rule is scoped to body.home. Fonts, container width, gutters, section spacing and the colour blocks
   (--band-cream, --band-sage, --band-dark) come from the shared tokens in styles.css, so the homepage matches every other page.
   The page is a stack of SOLID colour blocks (cream, sage, dark green) with open layouts: no gradients, no floating white panels.
   ============================================================================ */
body.home {
  --h-ink: #24302b; --h-ink-dim: #3a4d3f; --h-ink-faint: #4a5e4f; --h-deep: #63534a; --h-rule: rgba(36,48,43,0.16);
  margin: 0; font-family: var(--font-body); color: var(--h-ink); background: var(--band-cream);
  -webkit-font-smoothing: antialiased; user-select: text; -webkit-user-select: text;
}
:where(body.home main) * { box-sizing: border-box; }
:where(body.home main) h1, :where(body.home main) h2, :where(body.home main) h3 { margin: 0; }
:where(body.home main) p { margin: 0; }
:where(body.home main) a { color: inherit; }
body.home .page-overflow-guard { width: 100%; }
body.home .wrap { position: relative; z-index: 2; }
body.home .announcement-bar, body.home footer.site-footer, body.home .cta-band { position: relative; z-index: 3; }

/* ---------- colour blocks, alternating down the page ---------- */
body.home main > section, body.home .cinematic-hero { position: relative; padding-block: var(--section-y); }
body.home .cinematic-hero { background: var(--band-cream); }
body.home .intro-section { background: var(--band-sage); }
body.home .services-section { background: var(--band-cream); }
body.home .ba-section { background: var(--band-sage); }
body.home .why-section, body.home .painless-section { background: var(--band-dark); color: #EFEBE1; }
body.home .doctors-section { background: var(--band-cream); }
body.home .coverage-section { background: var(--band-sage); }
body.home .faq-section { background: var(--band-cream); }
body.home .visit-section { background: var(--band-sage); }

/* ---------- section labels, headings, "see all" links ---------- */
body.home .sec-label { font-family: var(--font-body); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; color: var(--h-deep); margin-bottom: 12px; }
body.home h2 { color: var(--h-ink); }
body.home .cta-band h2 { color: var(--white); }
body.home .sec-head { margin-bottom: var(--gap-head); }
body.home .sec-head-row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px 40px; }
body.home .sec-sub { color: var(--h-ink-dim); margin-top: 14px; max-width: 56ch; }
body.home .link-arrow { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 0.9375rem; color: var(--h-ink); text-decoration: none; border-bottom: 1px solid var(--h-ink); padding-bottom: 4px; white-space: nowrap; transition: color 0.2s ease, border-color 0.2s ease; }
body.home .link-arrow:hover { color: var(--h-deep); border-color: var(--h-deep); }

/* ---------- reveal ---------- */
body.home .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.22,1,0.36,1); transition-delay: var(--rd, 0s); }
body.home .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- hero: headline on the left, the drawn logo as the visual on the right ---------- */
body.home .cinematic-hero { display: flex; align-items: center; min-height: clamp(380px, 54vh, 560px); padding-top: clamp(24px, 3vw, 40px); overflow-x: clip; }
body.home .hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(24px, 5vw, 80px); align-items: center; width: 100%; }
body.home .cinematic-headline { text-align: left; visibility: hidden; animation: heroIn 0.9s cubic-bezier(0.19,1,0.22,1) 2.6s both; }
body.home .cinematic-headline h1 { max-width: 15ch; margin: 0 0 clamp(22px, 2.6vw, 36px); color: var(--h-ink); }
body.home .cinematic-headline .btn { min-height: 48px; padding: 14px 32px; font-size: 1rem; }
body.home .logo-stage { justify-self: center; width: clamp(150px, 22vw, 300px); display: flex; align-items: center; justify-content: center; }
body.home .cinematic-logo-static { position: relative; width: 100%; height: auto; display: block; }
body.home .cinematic-logo-static path { fill: none; stroke: #75927d; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 10px rgba(36,48,43,0.16)); }
html.logo-done body.home .cinematic-headline { animation-name: heroInGo; animation-delay: 0s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(12px); visibility: hidden; } to { opacity: 1; transform: none; visibility: visible; } }
@keyframes heroInGo { from { opacity: 0.01; transform: translateY(12px); visibility: visible; } to { opacity: 1; transform: none; visibility: visible; } }
@keyframes headerIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes headerInGo { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
body.home header.site-header { animation: headerIn 0.8s ease 2.6s both; }
html.logo-done body.home header.site-header { animation-name: headerInGo; animation-delay: 0s; }

/* ---------- intro: heading left, text right ---------- */
body.home .intro-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: baseline; }
body.home .intro-grid h2 { font-size: clamp(1.5rem, 0.95rem + 2.2vw, 2.6rem); }
body.home .intro-grid p { color: #34443a; font-size: 1.0625rem; line-height: 1.75; max-width: 62ch; }
body.home .intro-grid p a, body.home .faq-list p a { color: var(--h-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.home .intro-grid p a:hover, body.home .faq-list p a:hover { color: var(--h-ink); }

/* ---------- services: a segmented bar, then an open panel ---------- */
body.home .svc-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--band-sage); border: 1px solid var(--h-rule); border-radius: 14px; }
body.home .svc-list-item { min-height: 52px; padding: 12px 16px; background: transparent; border: 0; border-radius: 10px; font: inherit; font-size: 0.9375rem; font-weight: 500; line-height: 1.25; color: var(--h-ink-dim); text-align: center; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
body.home .svc-list-item:hover { background: rgba(255,255,255,0.65); }
body.home .svc-list-item[aria-selected="true"] { background: var(--band-dark); color: #fff; }
body.home .svc-preview { margin-top: clamp(24px, 3vw, 40px); }
body.home .svc-panel[hidden] { display: none; }
body.home .svc-panel { animation: svcPanelIn 0.4s ease both; }
@keyframes svcPanelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body.home .svc-panel-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; min-height: 190px; }
body.home .svc-preview-icon { width: 56px; height: 56px; color: var(--h-deep); margin-bottom: 16px; }
body.home .svc-preview-icon svg { width: 100%; height: 100%; }
body.home .svc-panel h3 { font-size: clamp(1.5rem, 1rem + 1.8vw, 2.4rem); color: var(--h-ink); }
body.home .svc-preview-desc { font-size: 1.0625rem; line-height: 1.7; color: var(--h-ink-dim); max-width: 56ch; margin-bottom: 18px; }
body.home .svc-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
body.home .svc-preview-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 0.9375rem; color: var(--h-deep); text-decoration: none; border-bottom: 1px solid var(--h-deep); }
body.home .svc-preview-link:hover { color: var(--h-ink); border-color: var(--h-ink); }

/* ---------- before & after ---------- */
body.home .ba-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
body.home .ba-card { background: var(--card-bg); border: 1px solid var(--card-line); border-radius: 18px; overflow: hidden; }
body.home .ba-card .ba-slider { border-radius: 0; }
body.home .ba-card .ba-label-after { background: var(--band-dark); color: #fff; }
body.home .ba-meta { padding: 16px 20px 22px; }
body.home .ba-tag { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--h-deep); margin-bottom: 6px; }
body.home .ba-meta h3 { font-size: 1.3rem; margin: 0 0 6px; color: var(--h-ink); }
body.home .ba-meta p { font-size: 0.9375rem; color: var(--h-ink-dim); line-height: 1.55; }
body.home .ba-notes { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 20px; font-size: 0.8125rem; color: var(--h-ink-faint); }
@media (max-width: 1099px) { body.home .ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px)  { body.home .ba-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- why: a dark block with the numbers in a row ---------- */
body.home .why-top { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 80px); align-items: baseline; }
body.home .why-section h2, body.home .painless-section h2 { color: #fff; }
body.home .why-section h2 em, body.home .painless-section h2 em { font-style: italic; color: #BFD3BD; }
body.home .why-section .sec-label, body.home .painless-section .sec-label { color: #BFD0BD; }
body.home .why-copy { color: #E7E2D5; font-size: 1.0625rem; line-height: 1.75; max-width: 52ch; }
body.home .why-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: clamp(32px, 4vw, 56px); padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid rgba(255,255,255,0.24); }
body.home .stat-row { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
body.home .hstat-num { font-family: var(--font-display); font-size: clamp(2.5rem, 2rem + 1.6vw, 3.5rem); line-height: 1; color: #fff; }
body.home .hstat-label { font-size: 0.9375rem; line-height: 1.35; color: #D9E2D6; max-width: 15ch; }

/* ---------- team: photo, then name and credential below ---------- */
body.home .doctors-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
body.home .doc-card { display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--card-line); border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit; transition: border-color 0.2s ease; }
body.home .doc-card:hover { border-color: var(--h-deep); }
body.home .doc-photo { aspect-ratio: 1080 / 990; background: #4d4d4d; overflow: hidden; }
body.home .doc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.home .doc-overlay { padding: 18px 20px 22px; }
body.home .hrole { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em; color: var(--h-deep); margin-bottom: 4px; }
body.home .doc-card h3 { font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem); color: var(--h-ink); }
body.home .doc-cred { font-size: 0.875rem; color: var(--h-ink-faint); margin-top: 4px; }

/* ---------- insurance and common questions: open lists, identical columns so they line up ---------- */
body.home .coverage-grid, body.home .faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: baseline; }
body.home .coverage-list, body.home .faq-list { width: 100%; border-top: 1px solid var(--h-rule); }
body.home .coverage-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 20px 0; min-height: 44px; border-bottom: 1px solid var(--h-rule); text-decoration: none; color: var(--h-ink); }
body.home .coverage-title { font-family: var(--font-display); font-size: clamp(1.2rem, 1rem + 0.7vw, 1.45rem); line-height: 1.3; }
body.home .coverage-desc { grid-column: 1; color: var(--h-ink-dim); font-size: 0.9375rem; }
body.home .coverage-arrow { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--h-deep); font-size: 1.3rem; transition: transform 0.3s ease; }
body.home .coverage-row:hover .coverage-arrow { transform: translateX(6px); }
body.home .hfaq-item { border-bottom: 1px solid var(--h-rule); }
body.home .hfaq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 44px; padding: 20px 0; font-family: var(--font-display); font-size: clamp(1.2rem, 1rem + 0.7vw, 1.45rem); line-height: 1.3; color: var(--h-ink); }
body.home .hfaq-item summary::-webkit-details-marker { display: none; }
body.home .hfaq-item summary::after { content: '+'; font-family: var(--font-body); font-size: 1.4rem; color: var(--h-deep); transition: transform 0.3s ease; flex-shrink: 0; }
body.home .hfaq-item[open] summary::after { transform: rotate(45deg); }
body.home .hfaq-item p { color: var(--h-ink-dim); font-size: 1rem; line-height: 1.7; padding: 0 40px 22px 0; max-width: 62ch; }
body.home main p a, body.home .hfaq-item a { color: var(--h-deep); }

/* ---------- visit ---------- */
body.home .visit-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: baseline; }
body.home .visit-grid .btn { margin-top: 22px; }
body.home .visit-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; font-style: normal; }
body.home .visit-k { font-size: 0.875rem; font-weight: 600; color: var(--h-ink-faint); margin-bottom: 10px; }
body.home .visit-col p { font-size: 1.0625rem; line-height: 1.6; color: var(--h-ink); }
body.home .visit-phone { display: inline-block; font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.15; color: var(--h-ink); text-decoration: none; margin-bottom: 8px; }
body.home .visit-mail { display: block; font-size: 0.9375rem; color: var(--h-ink-dim); overflow-wrap: anywhere; }
body.home .visit-map-wrap { margin-top: clamp(28px, 3.4vw, 48px); border-radius: 18px; overflow: hidden; border: 1px solid var(--card-line); aspect-ratio: 16 / 6; min-height: 260px; background: #dfe3d8; }
body.home .visit-map { width: 100%; height: 100%; border: 0; display: block; filter: saturate(0.85); }

/* ---------- stacking on tablets and phones ---------- */
@media (max-width: 860px) {
  body.home .hero-grid { grid-template-columns: 1fr; text-align: center; }
  body.home .cinematic-headline { text-align: center; }
  body.home .cinematic-headline h1 { margin-inline: auto; }
  body.home .logo-stage { order: -1; width: clamp(110px, 30vw, 150px); }
  body.home .intro-grid, body.home .why-top, body.home .coverage-grid, body.home .faq-grid, body.home .visit-grid, body.home .svc-panel-grid { grid-template-columns: 1fr; }
  body.home .svc-panel-grid { min-height: 0; }
  body.home .svc-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.home .svc-list-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  body.home .why-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  body.home .doctors-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.home .visit-map-wrap { aspect-ratio: 4 / 3; min-height: 0; }
}
@media (max-width: 600px) { body.home .stat-row { flex-direction: column; align-items: flex-start; gap: 6px; } body.home .hstat-label { max-width: none; } }
@media (max-width: 480px) { body.home .visit-rows { grid-template-columns: 1fr; } body.home .doc-overlay { padding: 14px 14px 18px; } }

/* ---------- focus and motion ---------- */
:where(body.home main) a:focus-visible, :where(body.home main) summary:focus-visible, :where(body.home main) button:focus-visible { outline: 3px solid var(--h-deep); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  body.home .reveal { opacity: 1; transform: none; transition: none; }
  body.home .cinematic-headline { visibility: visible; animation: none; opacity: 1; transform: none; }
  body.home header.site-header { animation: none; }
  body.home .svc-panel { animation: none !important; }
  body.home .coverage-arrow, body.home .doc-card { transition: none; }
}

/* ---------- "Now Welcoming New Patients" badge under the intro heading ---------- */
body.home .intro-badge { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 22px; padding: 10px 22px; border-radius: 999px; background: var(--band-dark); color: #fff; font-weight: 600; font-size: 0.9375rem; text-decoration: none; transition: background-color 0.2s ease; }
body.home .intro-badge:hover { background: #3C5E4D; }
body.home .intro-dot { width: 9px; height: 9px; border-radius: 50%; background: #A9D8B2; flex-shrink: 0; }

/* ---------- painless dentistry: five tools in a row on the dark block ---------- */
body.home .painless-section .sec-sub { color: #E1E8DD; max-width: 58ch; }
body.home .painless-section .link-arrow { color: #fff; border-bottom-color: rgba(255,255,255,0.7); }
body.home .painless-section .link-arrow:hover { color: #BFD3BD; border-color: #BFD3BD; }
body.home .pl-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); }
body.home .pl-item { display: block; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.28); color: inherit; text-decoration: none; transition: border-color 0.2s ease; }
body.home .pl-item:hover { border-top-color: #BFD3BD; }
body.home .pl-num { display: block; font-size: 0.8125rem; font-weight: 600; color: #BFD0BD; margin-bottom: 12px; }
body.home .pl-item h3 { font-size: clamp(1.4rem, 1.1rem + 0.9vw, 1.9rem); color: #fff; margin-bottom: 10px; }
body.home .pl-item p { font-size: 0.9375rem; line-height: 1.6; color: #DCE5D9; }
body.home .pl-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 8px; font-size: 0.875rem; font-weight: 600; color: #fff; border-bottom: 1px solid transparent; }
body.home .pl-item:hover .pl-more { border-bottom-color: #fff; }
body.home .pl-note { margin-top: clamp(20px, 2.4vw, 32px); font-size: 0.8125rem; color: #BFD0BD; }
@media (max-width: 1099px) { body.home .pl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; } }
@media (max-width: 639px)  { body.home .pl-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { body.home .pl-item, body.home .intro-badge { transition: none; } }

/* ---------- text beside a heading sits level with the heading's first line ----------
   the small label hangs above the heading so the heading, not the label, is the first line the text lines up with */
body.home .why-top > div:first-child, body.home .visit-grid > div:first-child, body.home .coverage-grid > div:first-child, body.home .faq-grid > div:first-child { position: relative; padding-top: calc(0.875rem * 1.5 + 12px); }
body.home .why-top > div:first-child > .sec-label, body.home .visit-grid > div:first-child > .sec-label, body.home .coverage-grid > div:first-child > .sec-label, body.home .faq-grid > div:first-child > .sec-label { position: absolute; top: 0; left: 0; margin: 0; line-height: 1.5; }
