/* Dr. Athira's Dental Clinic — styles
   Palette taken from the clinic logo (leaf green) with a deep bottle green for text. */

/* Self-hosted fonts (SIL Open Font License)
   Cormorant Garamond: refined display serif for headings and names.
   Geist: quiet, precise sans for reading text and interface. */
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-wght-normal.woff2") format("woff2-variations"), url("fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --paper: #ffffff;
  --mist: #f1f6eb;
  --mist-2: #e4eed9;
  --ink: #17332b;
  --ink-2: #456158;
  --leaf: #a4cd35;          /* logo green */
  --leaf-hover: #b5da50;
  --leaf-deep: #3f6a0a;     /* text-safe green on white */
  --line: #d6e1cd;
  --amber: #b35f00;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--leaf-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.06; margin: 0; letter-spacing: -0.015em; }
h3 { font-size: 1.55rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--leaf-deep); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.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; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; color: #fff; }
.small { font-size: 0.9rem; color: var(--ink-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 2px solid transparent;
  font: 500 1rem/1 var(--sans); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-lg { min-height: 56px; padding: 0 26px; font-size: 1.0625rem; }
.btn-leaf { background: var(--leaf); color: var(--ink); }
.btn-leaf:hover { background: var(--leaf-hover); color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #24493e; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand img { height: 54px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 450;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { background: var(--mist); }
.header-call { min-height: 44px; padding: 0 18px; }
.menu-btn { display: none; }
.show-sm { display: none; }

/* ---------- Hero ---------- */
.hero { background: var(--mist); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center; gap: 48px;
  padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(56px, 8vw, 112px);
}
.hero h1 { font-size: clamp(2.75rem, 6vw, 4.85rem); line-height: 1.0; letter-spacing: -0.02em; max-width: 14ch; }
.lead { margin-top: 24px; font-size: 1.1875rem; line-height: 1.6; color: var(--ink-2); max-width: 46ch; }

.status { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-weight: 500; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); flex: none; }
.status.is-open .dot { background: #2f9e44; box-shadow: 0 0 0 4px rgba(47,158,68,.18); }
.status.is-closed .dot { background: var(--amber); }

.hero .cta-row { margin-top: 18px; }

.hero-art { position: relative; aspect-ratio: 1 / 1.02; display: grid; place-items: center; }
.wall {
  position: absolute; inset: -12% -40% -12% -6%;
  display: flex; flex-wrap: wrap; align-content: center; gap: 0 .45em;
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.85rem, 3.6vw, 3rem); line-height: 1.15;
  color: var(--mist-2); user-select: none;
  transform: rotate(-4deg);
}
.wall span { white-space: nowrap; }
.wall span:nth-child(3n+2) { color: #d7e6c7; }
.tooth-art { position: relative; width: 84%; overflow: visible; }
.tooth-frame { fill: none; stroke: var(--leaf); stroke-width: 9; stroke-linejoin: round; }
.tooth-photo { filter: drop-shadow(0 26px 40px rgba(23,51,43,.28)); }
.art-tag {
  position: absolute; left: 6%; bottom: 9%;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--ink);
  font-size: .85rem; font-weight: 500;
  box-shadow: 0 10px 30px -16px rgba(23,51,43,.45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.art-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }

/* Key facts under the buttons */
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 600px; }
.hero-facts li { flex: 1 1 0; min-width: 0; padding: 0 18px; border-left: 1px solid var(--line); }
.hero-facts li:first-child { padding-left: 0; border-left: 0; }
.hero-facts a { color: inherit; text-decoration: none; display: block; }
.hero-facts a:hover span { text-decoration: underline; }
.hero-facts strong { display: flex; align-items: baseline; gap: 4px; font-family: var(--serif); font-weight: 600; font-size: 2.1rem; line-height: 1; letter-spacing: -0.01em; }
.hero-facts .fact-star { color: #e3a008; font-family: var(--sans); font-size: 1.1rem; }
.hero-facts span:not(.fact-star) { display: block; margin-top: 6px; font-size: .88rem; line-height: 1.35; color: var(--ink-2); }

/* One orchestrated load moment: the speciality wall settles, then the tooth arrives. */
@media (prefers-reduced-motion: no-preference) {
  .wall span { animation: wallIn .9s cubic-bezier(.2,.7,.2,1) both; }
  .wall span:nth-child(2n) { animation-delay: .08s; }
  .wall span:nth-child(3n) { animation-delay: .16s; }
  .wall span:nth-child(5n) { animation-delay: .24s; }
  .tooth-photo { animation: toothIn 1.1s .25s cubic-bezier(.2,.8,.2,1) both; transform-box: fill-box; transform-origin: 50% 60%; }
  .tooth-frame { stroke-dasharray: 1800; stroke-dashoffset: 1800; animation: frameDraw 1.8s .35s cubic-bezier(.6,0,.2,1) forwards; }
  @keyframes frameDraw { to { stroke-dashoffset: 0; } }
  .art-tag { animation: tagIn .8s 1s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes tagIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes wallIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes toothIn { from { opacity: 0; transform: translateY(28px) scale(.92) rotate(-6deg); } to { opacity: 1; transform: none; } }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head h2 { font-size: clamp(2.4rem, 4.8vw, 3.5rem); }
.section-head p { margin-top: 14px; color: var(--ink-2); font-size: 1.125rem; }

/* ---------- Find care (symptom picker) ---------- */
.finder { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 10px 18px;
  border: 2px solid var(--line); border-radius: 999px;
  font-weight: 450; background: var(--paper);
  transition: background-color .15s ease, border-color .15s ease;
}
.chips label:hover span { border-color: var(--ink-2); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--leaf-deep); outline-offset: 3px; }

.answer {
  background: var(--mist); border-radius: 28px;
  padding: clamp(24px, 3.5vw, 40px);
  border-left: 8px solid var(--leaf);
}
.answer-spec { font-weight: 550; color: var(--leaf-deep); }
.answer h3 { font-size: clamp(1.85rem, 3vw, 2.45rem); margin-top: 6px; line-height: 1.08; }
.answer > p[data-a-body] { margin-top: 14px; color: var(--ink-2); max-width: 56ch; }
.answer-docs { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.answer-label { font-size: .9rem; color: var(--ink-2); }
.answer-docs ul { list-style: none; margin-top: 6px; display: grid; gap: 4px; }
.answer-docs strong { font-weight: 600; }
.answer .cta-row { margin-top: 24px; }
.answer.is-changing { animation: swap .32s ease both; }
@media (prefers-reduced-motion: reduce) { .answer.is-changing { animation: none; } }
@keyframes swap { from { opacity: .2; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Treatments ---------- */
.treatments { background: var(--paper); border-top: 1px solid var(--line); }
.treat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); }
.treat { padding: 28px 0 30px; border-top: 1px solid var(--line); }
.treat h3 { font-size: 1.8rem; }
.treat-spec { margin-top: 4px; font-size: .95rem; color: var(--leaf-deep); font-weight: 550; }
.treat > p:not(.treat-spec) { margin-top: 10px; color: var(--ink-2); max-width: 48ch; }
.treat ul { list-style: none; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.treat li { font-size: .92rem; padding: 4px 12px; border-radius: 999px; background: var(--mist); }

/* ---------- Doctors (card carousel) ---------- */
.doctors { background: var(--mist); overflow: hidden; }
.doctors-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.doctors-head .section-head { margin-bottom: clamp(28px, 3.5vw, 44px); }
.doc-controls { display: flex; gap: 10px; margin-bottom: clamp(28px, 3.5vw, 44px); flex: none; }
.round-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--line);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
}
.round-btn svg { width: 22px; height: 22px; }
.round-btn:hover:not(:disabled) { background: var(--ink); color: #fff; border-color: var(--ink); transform: scale(1.06); }
.round-btn:active:not(:disabled) { transform: scale(.96); }
.round-btn:disabled { opacity: .35; cursor: default; }

.doc-carousel { position: relative; }
.doc-track {
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  list-style: none; margin: 0;
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(250px, 23vw, 292px);
  gap: clamp(16px, 2vw, 24px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 8px var(--edge) 28px;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
  cursor: grab;
}
.doc-track::-webkit-scrollbar { display: none; }
.doc-track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.doc-track.is-dragging a { pointer-events: none; }
.doc-track:focus-visible { outline-offset: -3px; }

.doc-card {
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--paper); border-radius: 26px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(23,51,43,.06), 0 10px 30px -18px rgba(23,51,43,.35);
  transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s cubic-bezier(.2,.8,.2,1);
}
.doc-card:hover { transform: translateY(-6px); box-shadow: 0 1px 0 rgba(23,51,43,.06), 0 26px 48px -22px rgba(23,51,43,.45); }

.doc-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--mist-2); }
.doc-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.doc-card:hover .doc-photo img { transform: scale(1.05); }
.doc-photo::after { /* soft fade so the photo meets the card body gently */
  content: ""; position: absolute; inset: auto 0 0 0; height: 22%;
  background: linear-gradient(to top, rgba(23,51,43,.18), transparent); pointer-events: none;
}
.doc-photo.is-empty {
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 30% 15%, #f7fbf2 0%, var(--mist-2) 70%);
}
.doc-photo.is-empty::after { display: none; }
.doc-photo.is-empty svg { position: absolute; width: 74%; fill: #d3e3c1; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.doc-card:hover .doc-photo.is-empty svg { transform: rotate(-4deg) scale(1.04); }
.doc-initials { position: relative; font-family: var(--serif); font-weight: 500; font-size: 3.8rem; color: var(--ink); letter-spacing: .04em; }
.is-chief .doc-photo.is-empty { background: radial-gradient(120% 90% at 30% 15%, #eef7d9 0%, #dcebb8 75%); }
.is-chief .doc-photo.is-empty svg { fill: var(--leaf); opacity: .55; }

.doc-body { display: flex; flex-direction: column; gap: 2px; padding: 20px 22px 22px; flex: 1; }
.doc-spec { font-size: .92rem; font-weight: 550; color: var(--leaf-deep); }
.doc-body h3 { font-size: 1.75rem; margin-top: 2px; }
.doc-qual { color: var(--ink-2); font-size: .95rem; }
.doc-book {
  margin-top: auto; padding-top: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 500; font-size: .95rem; text-decoration: none;
}
.doc-book svg { width: 18px; height: 18px; color: var(--leaf-deep); }
.doc-book:hover { color: var(--leaf-deep); text-decoration: underline; }

.doc-progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.doc-progress span { display: block; height: 100%; width: 30%; background: var(--ink); border-radius: 3px; transform-origin: left; transition: width .3s ease, transform .3s ease; }

/* ---------- First visit ---------- */
.steps-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.steps-grid .section-head { margin-bottom: 0; }
.steps { list-style: none; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; position: relative; padding: 22px 0 22px 72px; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 20px;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--leaf); color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.6rem; line-height: 1;
}
.steps p { margin-top: 6px; color: var(--ink-2); }

/* ---------- Reviews band ---------- */
.reviews { background: var(--ink); color: #fff; padding: clamp(48px, 7vw, 80px) 0; }
.reviews-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.reviews h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); max-width: 22ch; margin-top: 8px; }
.rev-stars { color: #f2b818; letter-spacing: 4px; font-size: 1.3rem; }

/* ---------- Visit ---------- */
.visit-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: stretch; }
.visit h2 { font-size: clamp(2.4rem, 4.8vw, 3.5rem); margin-bottom: 24px; }
.info-block { padding: 18px 0; border-top: 1px solid var(--line); }
.info-block h3 { font-family: var(--sans); font-size: .95rem; font-weight: 500; letter-spacing: 0; color: var(--ink-2); margin-bottom: 6px; }
.info-block a { color: var(--ink); font-weight: 500; text-decoration: none; }
.info-block a:hover { text-decoration: underline; }
.hours { border-collapse: collapse; width: 100%; max-width: 360px; margin: 2px 0 10px; }
.hours th, .hours td { text-align: left; padding: 5px 0; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; }
.hours tr.is-today th::after { content: "Today"; margin-left: 10px; font-size: .75rem; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--leaf); vertical-align: 2px; }
.visit .cta-row { margin-top: 18px; }
.map { border-radius: 28px; overflow: hidden; min-height: 420px; background: var(--mist-2); border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* ---------- FAQ ---------- */
.faq { background: var(--mist); }
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative;
  font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.2;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px;
  border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list details p { padding: 0 44px 22px 0; color: var(--ink-2); max-width: 60ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.82); padding: 56px 0 40px; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.footer-inner img { width: 220px; height: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-meta { font-size: .92rem; text-align: right; display: grid; gap: 4px; }

/* ---------- Mobile action bar ---------- */
.action-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav { display: none; }
  .menu-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: 4px;
    border: 0; border-radius: 50%; background: var(--mist); color: var(--ink); cursor: pointer;
  }
  .menu-btn svg { width: 22px; height: 22px; }
  .header-call { margin-left: auto; }
  .nav.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .nav.is-open a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--mist-2); font-size: 1.1rem; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .brand img { height: 44px; }
  .header-call { display: none; }
  .menu-btn { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-art { order: -1; aspect-ratio: auto; height: 300px; margin: -16px calc(var(--gutter) * -1) 16px; overflow: hidden; }
  .wall { inset: -10% -10%; font-size: 1.75rem; }
  .tooth-art { width: auto; height: 286px; aspect-ratio: 480 / 520; }
  .art-tag { display: none; }
  .hero-facts li { padding: 0 12px; }
  .hero-facts strong { font-size: 1.8rem; }
  .finder, .steps-grid, .visit-grid, .faq-grid { grid-template-columns: 1fr; }
  .treat-list { grid-template-columns: 1fr; }
  .doc-track { grid-auto-columns: 74%; }
  .doc-controls { display: none; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .site-footer nav { justify-content: flex-start; }
  .footer-meta { text-align: left; }
  .map, .map iframe { min-height: 320px; }

  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .action-bar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--ink);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
    box-shadow: 0 -6px 24px rgba(23,51,43,.18);
  }
  .action-bar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 52px; border-radius: 14px;
    color: #fff; text-decoration: none; font-weight: 500; font-size: .85rem;
  }
  .action-bar a:first-child { background: var(--leaf); color: var(--ink); }
  .action-bar svg { width: 22px; height: 22px; }
}

@media (max-width: 520px) {
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .header-call { padding: 0 16px; }
  .hero .cta-row .btn { flex: 1 1 100%; }
  .chips span { font-size: .95rem; padding: 8px 14px; min-height: 44px; }
  .answer { border-radius: 22px; border-left-width: 6px; }
  .answer .cta-row .btn { flex: 1 1 100%; }
  .steps li { padding-left: 64px; }
  .reviews .cta-row .btn, .visit .cta-row .btn { flex: 1 1 100%; }
}

@media print {
  .site-header, .action-bar, .hero-art, .map { display: none; }
  body { padding: 0; }
}
.footer-meta a { text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   Motion
   Everything below only runs when JavaScript is on and the
   visitor hasn't asked for reduced motion.
   ========================================================= */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }

/* Buttons: a gentle lift and press */
.btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.btn-leaf:hover, .btn-ink:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(23,51,43,.5); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }

/* Header gets a soft shadow once you scroll */
.site-header { transition: border-color .3s ease, box-shadow .3s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 30px -24px rgba(23,51,43,.55); }

@media (prefers-reduced-motion: no-preference) {
  /* Hero copy arrives line by line on load */
  .js .hero-copy > * { animation: heroIn 1s var(--ease-out) both; }
  .js .hero-copy > :nth-child(1) { animation-delay: .05s; }
  .js .hero-copy > :nth-child(2) { animation-delay: .18s; }
  .js .hero-copy > :nth-child(3) { animation-delay: .3s; }
  .js .hero-copy > :nth-child(4) { animation-delay: .4s; }
  .js .hero-copy > :nth-child(5) { animation-delay: .5s; }
  @keyframes heroIn { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

  /* Hero art drifts slightly as you scroll (values set by script.js) */
  .hero-art .tooth-art { translate: 0 var(--py-tooth, 0px); }
  .hero-art .art-tag { translate: 0 var(--py-tooth, 0px); }
  .hero-art .wall { translate: 0 var(--py-wall, 0px); }

  /* Scroll reveals */
  .js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  .js [data-reveal="clip"] { opacity: 1; transform: none; clip-path: inset(12% 6% 12% 6% round 28px); transition: clip-path 1.3s var(--ease-out); }
  .js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0 round 28px); }

  /* Headings rise out of a mask */
  .js .mask { clip-path: inset(0 0 100% 0); transform: translateY(35%); transition: clip-path 1.1s var(--ease-out) .05s, transform 1.1s var(--ease-out) .05s; }
  .js .is-in .mask, .js .mask.is-in { clip-path: inset(-10% -2% -20% -2%); transform: none; }

  /* Staggered groups: each child follows the one before */
  .js [data-stagger] > * { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
  .js [data-stagger].is-in > * { opacity: 1; transform: none; }

  /* Dentist cards slide in from the right */
  .js .doc-track[data-stagger] > * { transform: translateX(60px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out), box-shadow .5s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .doc-track[data-stagger].is-in > * { transform: none; }
  .js .doc-track.is-in > .doc-card:hover { transform: translateY(-6px); transition-delay: 0s; }

  /* Step numbers pop in */
  .js .steps > li::before { transform: scale(.3); transition: transform .8s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i, 0) * 90ms + .15s); }
  .js .steps.is-in > li::before { transform: scale(1); }

  /* Review stars light up one by one */
  .js .rev-stars span { display: inline-block; opacity: .15; transform: scale(.6); transition: opacity .5s ease, transform .6s cubic-bezier(.34, 1.56, .64, 1); }
  .js .is-in .rev-stars span { opacity: 1; transform: none; }
  .js .rev-stars span:nth-child(2) { transition-delay: .08s; }
  .js .rev-stars span:nth-child(3) { transition-delay: .16s; }
  .js .rev-stars span:nth-child(4) { transition-delay: .24s; }
  .js .rev-stars span:nth-child(5) { transition-delay: .32s; }

  /* FAQ answers ease open */
  .faq-list details[open] p { animation: faqOpen .5s var(--ease-out); }
  @keyframes faqOpen { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

  /* Selected concern chip settles in */
  .chips input:checked + span { animation: chipPick .45s cubic-bezier(.34, 1.56, .64, 1); }
  @keyframes chipPick { 0% { transform: scale(.94); } 100% { transform: scale(1); } }
}

@media print {
  .js [data-reveal], .js [data-stagger] > *, .js .mask { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
.js [data-stagger].is-settled > * { transition-delay: 0s; }
@media (prefers-reduced-motion: no-preference) {
  .js .steps.is-settled > li::before { transition-delay: 0s; }
}

/* ---------- Inside the clinic ---------- */
.gallery { background: var(--paper); }
.gallery-grid { display: grid; grid-template-columns: minmax(0, 1.875fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 28px); align-items: start; }
.shot { margin: 0; }
.shot-frame { position: relative; overflow: hidden; border-radius: 28px; background: var(--mist-2); }
.shot-wide .shot-frame { aspect-ratio: 3 / 2; }
.shot-tall .shot-frame { aspect-ratio: 4 / 5; }
.shot-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.6s var(--ease-out, cubic-bezier(.16,1,.3,1)); }
.shot:hover .shot-frame img { transform: scale(1.04); }
.shot figcaption { margin-top: 12px; font-size: .95rem; color: var(--ink-2); }

/* Board photo in Visit us */

@media (prefers-reduced-motion: no-preference) {
  /* Photos unveil with a slow clip and settle from a slight zoom */
  .js .gallery-grid[data-stagger] > .shot { opacity: 1; transform: none; }
  .js .gallery-grid .shot-frame { clip-path: inset(14% 10% 14% 10% round 28px); transition: clip-path 1.4s var(--ease-out); transition-delay: calc(var(--i, 0) * 140ms); }
  .js .gallery-grid .shot-frame img { transform: scale(1.18); transition: transform 1.8s var(--ease-out); transition-delay: calc(var(--i, 0) * 140ms); }
  .js .gallery-grid.is-in .shot-frame { clip-path: inset(0 0 0 0 round 28px); }
  .js .gallery-grid.is-in .shot-frame img { transform: scale(1.001); }
  .js .gallery-grid.is-in.is-settled .shot-frame img { transition: transform 1.6s var(--ease-out); transition-delay: 0s; }
  .js .gallery-grid.is-settled .shot:hover .shot-frame img { transform: scale(1.04); }
  .js .gallery-grid .shot figcaption { opacity: 0; transform: translateY(8px); transition: opacity .8s ease, transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 140ms + .5s); }
  .js .gallery-grid.is-in .shot figcaption { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .shot-tall .shot-frame { aspect-ratio: 4 / 4.4; }
}

/* ---------- Review carousel ---------- */
.rev-strip { margin-top: clamp(36px, 5vw, 56px); }
.rev-track {
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  list-style: none; margin: 0;
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(300px, 31vw, 400px);
  gap: 22px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 4px var(--edge) 8px;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
  cursor: grab;
}
.rev-track::-webkit-scrollbar { display: none; }
.rev-track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.rev-track:focus-visible { outline: 3px solid var(--leaf); outline-offset: -3px; }
.rev-track > li { scroll-snap-align: start; display: flex; }
.rev-card {
  margin: 0; width: 100%;
  display: flex; flex-direction: column; gap: 14px;
  padding: 26px 28px 24px;
  border-radius: 24px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  transition: background-color .4s ease, border-color .4s ease;
}
.rev-card:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.rev-card-stars { color: #f2b818; letter-spacing: 3px; font-size: .95rem; }
.rev-card blockquote { margin: 0; flex: 1; }
.rev-card blockquote p {
  font-family: var(--serif); font-weight: 500;
  font-size: 1.32rem; line-height: 1.38; color: #fff;
}
.rev-card figcaption { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: rgba(255,255,255,.72); }
.rev-card figcaption strong { display: block; color: #fff; font-weight: 500; }
.rev-src { display: block; font-size: .85rem; }
.rev-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--leaf); color: var(--ink);
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem;
}

.rev-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.rev-note { font-size: .85rem; color: rgba(255,255,255,.55); }
.rev-arrows { display: flex; gap: 10px; }
.round-btn-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.round-btn-dark:hover:not(:disabled) { background: var(--leaf); color: var(--ink); border-color: var(--leaf); }

@media (max-width: 520px) {
  .rev-track { grid-auto-columns: 84%; gap: 14px; }
  .rev-card { padding: 22px 22px 20px; }
  .rev-card blockquote p { font-size: 1.22rem; }
  .rev-arrows .round-btn { width: 46px; height: 46px; }
}
