/* ==========================================================================
   Components
   Note: cards are deliberately NOT one uniform rounded-box treatment.
   Procedure cards, testimonial cards and FAQ rows each get their own
   structure so the page reads as designed rather than assembled from a kit.
   ========================================================================== */

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }

/* Filled blue. Uses --color-accent-strong: white on cyan fails AA. */
.btn-primary {
  background: var(--color-accent-strong);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-navy-900);
  color: var(--color-text);
}
.btn-outline:hover {
  background: var(--color-navy-900);
  color: var(--color-white);
}

/* For use over photography / dark panels */
.btn-on-dark {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--color-white);
}
.btn-on-dark:hover {
  background: var(--color-white);
  color: var(--color-navy-900);
  border-color: var(--color-white);
}

.btn-plain {
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
  color: var(--color-accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* --- Top contact bar ----------------------------------------------------- */
/* Sits above the sticky header and scrolls away, so it is prominent on
   arrival without permanently costing vertical space. */

.topbar {
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  font-size: var(--text-sm);
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3) var(--space-6);
  padding-block: var(--space-3);
}
.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-on-dark);
  text-decoration: none;
  min-height: 32px;
  font-weight: 500;
}
.topbar__item:hover { color: var(--color-accent-on-dark); text-decoration: underline; }
.topbar__item svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--color-accent-on-dark); }
.topbar__note {
  margin: 0;
  margin-right: auto;
  color: var(--color-muted-on-dark);
  font-size: var(--text-xs);
}
@media (max-width: 640px) {
  .topbar__inner { justify-content: center; gap: var(--space-4); }
  .topbar__note { display: none; }
}

/* --- Header / nav -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid transparent;
  transition: background-color var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}
.site-header.is-stuck {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-soft);
}

/* Wider than --container-max: at 16px nav links the row needs ~1116px, which
   does not fit the 1200px body container once gutters are taken off. */
.site-header > .container { max-width: 1320px; }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
  padding-block: var(--space-3);
}

/* Wordmark lockup: reserved 40px logomark slot + two-line type */
.wordmark {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}
.wordmark__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
  color: var(--color-accent);
}
.wordmark__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.wordmark__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.005em;
  color: var(--color-heading);
}
/* Below ~380px the full lockup cannot fit beside a 48px toggle inside the
   gutters, so the type steps down rather than pushing the toggle off-screen. */
@media (max-width: 379px) {
  .wordmark { gap: var(--space-2); }
  .wordmark__mark { width: 32px; height: 32px; }
  .wordmark__name { font-size: 1.125rem; }
  .wordmark__place { font-size: 0.6875rem; letter-spacing: 0.12em; }
  .site-header__inner { gap: var(--space-3); }
}

.wordmark__place {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--color-text-caption);
  margin-top: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list li { margin: 0; }
.nav__link {
  display: inline-block;
  padding: var(--space-2) 0;
  font-size: 1rem;
  white-space: nowrap;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav__link:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}
.nav__link[aria-current="page"] {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

.nav > .btn { font-size: 1rem; }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

@media (max-width: 1199px) {
  .nav__toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: 0;
    z-index: 150;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: var(--color-bg);
    padding: var(--space-5) var(--gutter) var(--space-8);
    overflow-y: auto;
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform var(--duration-base) var(--ease-out),
                visibility var(--duration-base);
  }
  /* Visible at once on open (focus can only move into a visible panel);
     the delay applies only on close, so the panel stays visible while it slides away. */
  .nav.is-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform var(--duration-base) var(--ease-out), visibility 0s;
  }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: var(--space-7);
  }
  .nav__link {
    display: block;
    padding: var(--space-4) 0;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    border-bottom: 1px solid var(--color-border);
  }
  .nav__link:hover,
  .nav__link[aria-current="page"] { border-bottom-color: var(--color-border); }
  .nav__link[aria-current="page"] { color: var(--color-accent-strong); }
  .nav .btn { margin-top: var(--space-6); }
  .nav__close {
    position: absolute;
    top: var(--space-5);
    right: var(--gutter);
    width: 48px; height: 48px;
    display: inline-flex;
    align-items: center; justify-content: center;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    cursor: pointer;
  }
}
@media (min-width: 1200px) {
  .nav__close { display: none; }
}
/* 1200–1319px: the full nav needs ~1250px at standard spacing, so it is
   tightened here rather than collapsing to the menu button on common laptops. */
@media (min-width: 1200px) and (max-width: 1319px) {
  .site-header__inner { gap: var(--space-4); }
  .nav,
  .nav__list { gap: var(--space-3); }
  .nav > .btn { padding-inline: 18px; }
}

/* --- Hero (inset frame — the Nils am See device) ------------------------- */

.hero {
  padding: var(--space-4) var(--gutter) var(--space-6);
}
.hero__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(460px, 72vh, 720px);
  display: flex;
  align-items: flex-end;
  max-width: 1400px;
  margin-inline: auto;
}
.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  z-index: -2;
}
/* Scrim: strongest at the bottom-left where the headline sits */
.hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(9, 30, 50, 0.86) 0%, rgba(9, 30, 50, 0.42) 45%, rgba(9, 30, 50, 0.14) 72%),
    linear-gradient(to right, rgba(9, 30, 50, 0.62) 0%, rgba(9, 30, 50, 0.15) 48%, rgba(9, 30, 50, 0) 66%);
}
.hero__body {
  position: relative;
  padding: clamp(var(--space-6), 5vw, var(--space-9));
  max-width: 46rem;
  color: var(--color-white);
}
.hero__body h1 { color: var(--color-white); }
.hero__lede {
  font-size: var(--text-md);
  color: rgba(255, 255, 255, 0.88);
  max-width: 42ch;
  margin-bottom: var(--space-6);
}

/* Split hero: portrait beside the words rather than behind them, so the
   photograph is shown whole — no crop across the face or arms. */
.hero--split .hero__frame {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  align-items: stretch;
  background: var(--color-surface-dark);
}
.hero--split .hero__frame::after { content: none; }
.hero--split .hero__media {
  position: static;
  width: 100%;
  height: auto;          /* natural aspect ratio — nothing is cropped */
  object-fit: contain;
  align-self: end;
  z-index: auto;
}
.hero--split .hero__body {
  max-width: none;
  align-self: center;
}
@media (min-width: 900px) {
  .hero--split .hero__frame { grid-template-columns: 1.02fr 0.98fr; }
  .hero--split .hero__body { order: -1; }   /* words left, portrait right */
}

/* A landscape photo of two people cannot fit the narrow, tall column the split
   gives it between 900px and ~1180px — there is no crop that keeps both faces.
   So the landscape variant stays stacked, image full-width above the words,
   until there is room for a column wide enough to hold both. */
@media (min-width: 900px) and (max-width: 1199px) {
  .hero--split.hero--fill .hero__frame { grid-template-columns: 1fr; }
  .hero--split.hero--fill .hero__body  { order: 0; }
}

/* Landscape source. "contain" is right for a portrait of a person — nothing may
   be cropped off a face — but a wide room photo would sit as a short letterboxed
   band beside a tall text panel. Here the image fills its column instead. */
.hero--split.hero--fill .hero__media {
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  /* The two people sit right of centre in the wisdom teeth photo; 56% keeps
     both heads in frame when the desktop split crops it to near-square. */
  object-position: 56% 55%;
  align-self: stretch;
}

/* Cases hero: a room photo reads better with more of the room in frame, so its
   column is wider than the standard split and the crop is looser. */
@media (min-width: 1200px) {
  .hero--split.hero--room .hero__frame { grid-template-columns: 0.86fr 1.14fr; }
}
.hero--split.hero--room .hero__media { object-position: 50% 58%; }
@media (max-width: 860px) {
  .hero--split.hero--room .hero__media { height: clamp(300px, 52vw, 440px); }
}

/* Narrow screens: stop overlaying type on a face. Photograph on top,
   words underneath on a solid panel — legible, and it looks deliberate. */
@media (max-width: 860px) {
  .hero__frame {
    display: block;
    min-height: 0;
    background: var(--color-surface-dark);
  }
  .hero__media {
    position: relative;
    height: clamp(260px, 42vw, 380px);
    object-position: 50% 26%;
    z-index: 0;
  }
  .hero__frame::after { content: none; }
  .hero__body { padding: var(--space-6) var(--space-5) var(--space-7); }
}

/* Compact hero for interior pages: no photo, warm gradient panel */
.page-hero {
  background:
    radial-gradient(120% 120% at 12% 0%, rgba(63, 169, 190, 0.16) 0%, transparent 58%),
    linear-gradient(180deg, var(--color-ice-100) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
  padding-block: clamp(var(--space-8), 8vw, var(--space-9));
}
.page-hero__inner { max-width: 54ch; }
.page-hero h1 { margin-bottom: var(--space-4); }

/* --- Floating action bar ------------------------------------------------- */

/* Space is reserved at the foot of the document so the floating bar never
   sits on top of content; it previously covered 166px of the home page H1. */
body { padding-bottom: calc(56px + var(--space-6)); }
@media (min-width: 860px) { body { padding-bottom: 0; } }

.action-bar {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: var(--space-5);
  transform: translate(-50%, 0);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lift);
  transition: transform var(--duration-base) var(--ease-out),
              opacity var(--duration-base) var(--ease-out),
              visibility 0s;
  max-width: calc(100vw - 2 * var(--gutter));
}
/* visibility:hidden (applied after the slide-out) takes the links out of the
   tab order, so keyboard focus can never land on an invisible control. */
.action-bar.is-hidden {
  transform: translate(-50%, calc(100% + var(--space-6)));
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform var(--duration-base) var(--ease-out),
              opacity var(--duration-base) var(--ease-out),
              visibility 0s linear var(--duration-base);
}
.action-bar__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.action-bar__item:hover {
  background: var(--color-ice-100);
  color: var(--color-text);
}
.action-bar__item--primary {
  background: var(--color-accent-strong);
  color: var(--color-white);
}
.action-bar__item--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-white);
}
.action-bar__icon { width: 18px; height: 18px; flex-shrink: 0; }

@media (max-width: 560px) {
  .action-bar { width: calc(100% - 2 * var(--gutter)); justify-content: space-between; }
  .action-bar__item { padding-inline: var(--space-4); flex: 1; justify-content: center; }
  .action-bar__label-long { display: none; }
}

/* --- Stat row (hairline dividers, not boxes) ----------------------------- */

.stats {
  display: grid;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 700px) {
  .stats { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .stats__item + .stats__item {
    border-left: 1px solid var(--color-border);
    padding-left: var(--space-6);
  }
  .stats__item { padding-right: var(--space-6); }
}
.stats__item { margin: 0; }
.stats__value {
  display: block;
  font-family: var(--font-display);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  font-size: var(--text-lg);
  text-wrap: balance;
  font-weight: 400;
  color: var(--color-accent-strong);   /* 4.99:1 on the page ground; cyan was 2.6:1 */
  line-height: 1.1;
  margin-bottom: var(--space-2);
}
.stats__label {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-snug);
}

/* --- Procedure card (image/panel on top, rule under heading) ------------- */

.proc-card {
  display: flex;
  flex-direction: column;
  background: none;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.proc-card__panel {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-5);
  background:
    radial-gradient(110% 90% at 25% 15%, rgba(63, 169, 190, 0.18) 0%, transparent 62%),
    linear-gradient(155deg, var(--color-ice-100) 0%, var(--color-ice-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform var(--duration-base) var(--ease-out);
}
.proc-card:hover .proc-card__panel { transform: translateY(-4px); }

/* Circular artwork. The source art is a navy disc occupying 85.7% of a white
   square (measured), so the clip is set to its exact radius — otherwise a white
   ring shows against the tinted panel. */
.proc-card__art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  clip-path: circle(42.6% at 50% 50%);
}

/* The existing line mark is kept, tucked into a corner the disc leaves free. */
.proc-card__icon {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  width: 38px;
  height: 38px;
  color: var(--color-accent);
}
.proc-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.proc-card:hover .proc-card__title { border-bottom-color: var(--color-accent); }
.proc-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* Signature detail from the brief's reference: a short cyan rule under
   section headings. Decorative only — never carries meaning on its own. */
.section-head > h2::after,
.rule-under::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin-top: var(--space-4);
  background: var(--color-accent);
  border-radius: 2px;
}
.section-head--centred > h2::after { margin-inline: auto; }
.section--dark .section-head > h2::after { background: var(--color-accent-on-dark); }

/* --- Full-width media band ---------------------------------------------- */

.media-band {
  padding-inline: var(--gutter);
}
.media-band__inner {
  position: relative;
  max-width: 1400px;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 21 / 9;
}
@media (max-width: 720px) {
  .media-band__inner { aspect-ratio: 4 / 3; }
}
.media-band__inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

/* --- Media frame --------------------------------------------------------- */

.frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-ice-100);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--portrait { aspect-ratio: 4 / 5; }
.frame--square { aspect-ratio: 1 / 1; }
/* No fixed ratio: the photograph sets its own height and nothing is cropped. */
.frame--free img { height: auto; object-fit: fill; }

.figure-caption {
  font-size: var(--text-xs);
  color: var(--color-text-caption);
  margin-top: var(--space-3);
  max-width: 62ch;
}

/* Explanatory illustration. Source files are ~500px wide, so the frame is
   capped to keep them at native resolution rather than upscaled and soft. */
.figure {
  margin: var(--space-7) 0 0;
  max-width: 500px;   /* source illustrations are ~500px — never upscale them */
}
.figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-white);
}
/* For high-resolution artwork that can carry a larger display size. */
.figure--wide { max-width: 100%; }
.figure--wide img { border: 0; }
/* Portrait photographs: at full column width a 3:4 image runs ~1000px tall and
   swamps its section, so these are capped and centred instead. */
.figure--portrait { max-width: 520px; margin-inline: auto; }
.figure--portrait img { border: 0; }

/* --- Clinical case: before/after pair with supporting detail -------------- */

.case {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 3vw, var(--space-7));
}
.case + .case { margin-top: var(--space-7); }
.case { scroll-margin-top: 120px; }
.case__head { max-width: 62ch; margin-bottom: var(--space-5); }
.case__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  margin: 0 0 var(--space-2);
}
.case__summary { color: var(--color-text-muted); margin: 0; }

.case__pair,
.case__detail { display: grid; gap: var(--space-4); align-items: start; }
.case__detail { margin-top: var(--space-4); }
@media (min-width: 720px) {
  .case__pair   { grid-template-columns: 1fr 1fr; }
  .case__detail { grid-template-columns: repeat(var(--detail-cols, 3), 1fr); }
}

.case__shot { position: relative; margin: 0; }
.case__shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}
/* A lone supporting photo sits centred at the width of one half of the pair. */
@media (min-width: 720px) {
  .case__detail--single { grid-template-columns: minmax(0, 50%); justify-content: center; }
}
/* An X-ray is a narrow portrait; cap it so it does not tower over its row. */
.case__pair + .case__pair { margin-top: var(--space-4); }
.case__shot--xray img { max-width: 240px; margin-inline: auto; }

.case__label {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(14, 46, 77, 0.85);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}
.case__caption {
  font-size: var(--text-xs);
  color: var(--color-text-caption);
  margin-top: var(--space-2);
  text-align: center;
}
.case__note {
  font-size: var(--text-xs);
  color: var(--color-text-caption);
  margin: var(--space-5) 0 0;
}

/* --- Inline video --------------------------------------------------------- */

.video-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-video-ground);   /* the clip's own grey, so loading never flashes */
}
.video-frame__media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}
.video-frame__toggle {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(14, 46, 77, 0.78);
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}
.video-frame__toggle:hover { background: var(--color-navy-900); }
.video-frame__toggle svg { width: 16px; height: 16px; display: block; }
.video-frame__toggle .icon-play { display: none; }
.video-frame__toggle[data-state="paused"] .icon-play  { display: block; }
.video-frame__toggle[data-state="paused"] .icon-pause { display: none; }

/* --- Pull quote ---------------------------------------------------------- */

.pullquote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-display);
  line-height: var(--leading-snug);
  color: var(--color-heading);
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-5);
  margin-block: var(--space-6);
  max-width: 34ch;
}

/* --- Testimonial card ---------------------------------------------------- */

.quote-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  height: 100%;
}
.quote-card__mark {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 0.8;
  color: var(--color-accent);
}
.quote-card blockquote {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin: 0;
  flex-grow: 1;
}
/* --- Reserved space: content that is coming, shown honestly --------------
   Keeps the layout of a finished card so real content drops straight in,
   while stating plainly that nothing is being claimed yet. */
.placeholder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 210px;
  padding: var(--space-6);
  text-align: center;
  background: var(--color-white);
  border: 1px dashed var(--color-ice-200);
  border-radius: var(--radius-md);
  height: 100%;
}
.placeholder-card__label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-caption);
  margin: 0;
}
.placeholder-card__note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 34ch;
}
.placeholder-card__mark {
  width: 30px;
  height: 30px;
  color: var(--color-cyan-500);
}

.quote-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-caption);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.quote-card { margin: 0; }
.quote-card blockquote p { margin: 0; }
.quote-card__stars {
  display: flex;
  gap: 3px;
  margin: 0;
  color: var(--color-blue-600);
}
.quote-card__stars svg { width: 18px; height: 18px; fill: currentColor; }
.quote-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}
.quote-card__meta a {
  display: inline-block;
  padding-block: 4px;   /* 29px tall: meets the 24px minimum target size */
}
.quote-card__name {
  font-weight: 600;
  color: var(--color-text);
}

/* --- Callout: a highlighted aside that needs to be noticed --------------- */

.callout {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: clamp(var(--space-5), 4vw, var(--space-7));
  box-shadow: var(--shadow-soft);
}
.callout > :last-child { margin-bottom: 0; }
/* Figures and keylists carry no bottom margin, so a callout straight after
   one sat flush against it. Callouts after paragraphs already get the
   paragraph's own spacing and are left alone. */
.figure + .callout,
.keylist + .callout { margin-top: var(--space-7); }
.callout__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-heading);
  margin: 0 0 var(--space-4);
}
.section--dark .callout {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  border-left-color: var(--color-accent-on-dark);
  box-shadow: none;
}
.section--dark .callout__title { color: var(--color-text-on-dark); }

/* Two-column key/value list for practical instructions */
.keylist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 720px) {
  .keylist { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
}
.keylist li { margin: 0; }
.keylist__term {
  display: block;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-1);
}
.section--dark .keylist__term { color: var(--color-accent-on-dark); }
.keylist__desc { font-size: var(--text-sm); color: var(--color-text-muted); }
.section--dark .keylist__desc { color: var(--color-muted-on-dark); }

/* --- Compliance banner --------------------------------------------------- */

.notice {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-accent-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.notice__icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--color-accent-hover); margin-top: 2px; }
.notice p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 76ch;
}
.notice p + p { margin-top: var(--space-2); }

.microcopy {
  font-size: var(--text-xs);
  color: var(--color-text-caption);
  max-width: 76ch;
}

/* --- FAQ accordion (native details/summary) ------------------------------ */

.faq-list { border-top: 1px solid var(--color-border); }

.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-heading);
  line-height: var(--leading-snug);
  min-height: 44px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: var(--color-accent-hover); }
.faq-item__sign {
  flex-shrink: 0;
  width: 22px; height: 22px;
  position: relative;
  margin-top: 3px;
  color: var(--color-accent);
}
.faq-item__sign::before,
.faq-item__sign::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform var(--duration-base) var(--ease-out);
}
.faq-item__sign::before { top: 10px; left: 2px; width: 18px; height: 1.5px; }
.faq-item__sign::after  { left: 10px; top: 2px; height: 18px; width: 1.5px; }
.faq-item[open] .faq-item__sign::after { transform: scaleY(0); }
.faq-item__answer {
  padding-bottom: var(--space-6);
  max-width: 72ch;
}
.faq-item__answer p:last-child { margin-bottom: 0; }

/* --- Procedure/referral list -------------------------------------------- */

.ref-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--color-border);
}
@media (min-width: 780px) {
  .ref-list { grid-template-columns: repeat(2, 1fr); column-gap: var(--space-8); }
}
.ref-list__item {
  margin: 0;
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}
.ref-list__term {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-2);
}
.ref-list__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 52ch;
}

/* --- Timeline (genuinely sequential content only) ------------------------ */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-6);
  counter-reset: step;
}
@media (min-width: 820px) {
  .timeline { grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
}
.timeline__item {
  margin: 0;
  padding-top: var(--space-5);
  border-top: 2px solid var(--color-accent);
}
.timeline__when {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.timeline__item p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* --- CTA band ------------------------------------------------------------ */

.cta-band {
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-7), 6vw, var(--space-9));
  text-align: center;
}
.cta-band h2 { color: var(--color-text-on-dark); margin-bottom: var(--space-4); }
@media (max-width: 359px) {
  .cta-band h2 { font-size: var(--text-xl); }
}
.cta-band p {
  color: var(--color-muted-on-dark);
  margin-inline: auto;
  margin-bottom: var(--space-6);
  max-width: 52ch;
}
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

/* --- Location card ------------------------------------------------------- */

.location {
  padding: var(--space-6);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  height: 100%;
  /* Grid children default to min-width:auto, so a long unbreakable string —
     the practice email — would otherwise set the track width and overflow. */
  min-width: 0;
}
.location a { overflow-wrap: anywhere; }
.location__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin: 0 0 var(--space-3);
}
.location address {
  font-style: normal;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.location__row {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}
.location__row a,
.location p a { display: inline-block; padding-block: 3px; }
.location__key {
  color: var(--color-text-caption);
  min-width: 4.5rem;
  flex-shrink: 0;
}

/* Opening hours inside a location card */
.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-4) 0 0;
}
.hours caption {
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
  padding-bottom: var(--space-2);
}
.hours th,
.hours td {
  padding: 6px 0;
  border-top: 1px solid var(--color-border);
  text-align: left;
  font-weight: 400;
}
.hours th { color: var(--color-text-caption); width: 45%; }
.hours td { color: var(--color-text-muted); }

/* --- Three-up gallery ----------------------------------------------------
   For studio photography shot on black. Lives inside a .section--dark so the
   photo backgrounds merge with the panel rather than sitting on the page as
   three heavy black rectangles. No captions by design. */

.gallery-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 720px) {
  .gallery-3 { grid-template-columns: repeat(3, 1fr); }
}
.gallery-3 li { margin: 0; }
.gallery-3 img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

/* --- Credentials strip ---------------------------------------------------
   Memberships and the implant system used. Deliberately NOT framed as
   partnership or accreditation: the marks are shown to state a fact, the
   heading says so, and the logos are not hyperlinked — a link to a
   manufacturer would read as an affiliation that does not exist. */

.creds-strip {
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
}
/* The footer carries a top margin for pages that end on a CTA band. When the
   credentials strip is the last thing in <main>, that margin shows as a stray
   pale gap between two solid blocks, so it is dropped. */
/* General sibling, not adjacent: the floating action bar sits between
   </main> and <footer> in the shared partial. */
main:has(> .creds-strip:last-child) ~ .site-footer { margin-top: 0; }
.creds-strip__inner {
  display: flex;
  justify-content: center;
}
.creds-strip__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--space-6), 6vw, var(--space-9));
  list-style: none;
  margin: 0;
  padding: 0;
}
.creds-strip__logos li { margin: 0; }
/* Sized by height so the two marks share an optical baseline despite
   different aspect ratios. */
.creds-strip__logos img {
  height: 38px;
  width: auto;
}
.creds-strip__logos img.is-baoms { height: 44px; }

/* --- Map embed (click-to-load) ------------------------------------------
   The Google iframe is only injected once the visitor asks for it, so no
   third-party request or cookie is made on page load. Without JavaScript the
   placeholder stays and the "Get directions" link still works. */

.map-embed {
  position: relative;
  margin-top: var(--space-5);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(63, 169, 190, 0.12) 0%, transparent 60%),
    var(--color-ice-100);
  aspect-ratio: 4 / 3;
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-embed__prompt {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5);
  text-align: center;
}
.map-embed__prompt svg {
  width: 30px;
  height: 30px;
  color: var(--color-accent);
}
.map-embed__note {
  font-size: var(--text-xs);
  color: var(--color-text-caption);
  margin: 0;
  max-width: 34ch;
}

/* --- Forms --------------------------------------------------------------- */

.form { max-width: 46rem; }
.form__row { margin-bottom: var(--space-5); }
@media (min-width: 680px) {
  .form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
  .form__grid > .form__row { margin-bottom: 0; }
}
.form__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
/* Microcopy that is only a link reads too small at caption size. */
.microcopy--link a { font-size: var(--text-sm); }

.form__req {
  color: var(--color-error);
  font-weight: 700;
  margin-left: 2px;
}
.form__legend-note {
  font-size: var(--text-xs);
  color: var(--color-text-caption);
  margin: 0 0 var(--space-5);
}

.form__hint {
  display: block;
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--color-text-caption);
  margin-top: 2px;
}
.form__control {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  transition: border-color var(--duration-fast) var(--ease-out);
}
.form__control:hover { border-color: var(--color-navy-700); }
textarea.form__control { min-height: 140px; resize: vertical; }
select.form__control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%23556777' stroke-width='1.6' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-8);
}
.form__control[aria-invalid="true"] { border-color: var(--color-error); }

.form__error {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-error);
  margin-top: var(--space-2);
}
.form__error:empty { display: none; }

.form__check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  cursor: pointer;
}
.form__check input {
  width: 24px; height: 24px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-accent-strong);
}

.form__status {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-bottom: var(--space-5);
}
.form__status[data-state="success"] {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}
.form__status[data-state="error"] {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}
.form__status[hidden] { display: none; }

/* --- Grouped form sections (referrer / patient) --------------------------- */

.form__section {
  border: 0;
  border-top: 1px solid var(--color-ice-200);
  margin: 0 0 var(--space-6);
  padding: var(--space-6) 0 0;
}
.form__section:first-of-type { border-top: 0; padding-top: 0; }

.form__legend {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-text);
  padding: 0;
  margin-bottom: var(--space-5);
}

textarea.form__control--short { min-height: 5.5rem; }

/* --- File attachments (radiographs, referral letters) -------------------- */

.form__file {
  padding: var(--space-3);
  line-height: 1.4;
  cursor: pointer;
}
.form__file::file-selector-button {
  font: inherit;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-blue-600);
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  margin-right: var(--space-3);
  cursor: pointer;
}
.form__file::file-selector-button:hover { background: var(--color-navy-700); }

.form__filelist {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
}
.form__filelist:empty { display: none; }
.form__filelist li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-caption);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-ice-200);
}
.form__filelist li:last-child { border-bottom: 0; }
.form__filelist .is-oversize { color: var(--color-error); font-weight: 600; }

.form__note {
  font-size: var(--text-xs);
  line-height: 1.55;
  color: var(--color-text-caption);
  margin: var(--space-3) 0 0;
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-cyan-500);
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--color-surface-dark);
  color: var(--color-text-on-dark);
  padding-block: var(--space-9) var(--space-6);
  margin-top: var(--space-9);
}
.site-footer a { color: var(--color-cyan-400); }
.site-footer a:hover { color: var(--color-white); }

.footer-grid {
  display: grid;
  gap: var(--space-7);
}
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 0.9fr; }
}
.footer__title {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin: 0 0 var(--space-4);
  color: var(--color-accent-on-dark);
}
.footer__body,
.site-footer address {
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--color-muted-on-dark);
  line-height: var(--leading-body);
}
.footer__links { list-style: none; padding: 0; margin: 0; }
.footer__links li { margin-bottom: var(--space-1); }
.footer__links a,
.footer__body a {
  font-size: var(--text-sm);
  text-decoration: none;
  display: inline-block;
  padding-block: 3px;          /* 22px line box -> 28px target (WCAG 2.5.8) */
}
.footer__body a { font-size: inherit; text-decoration: underline; }
.footer__links a:hover { text-decoration: underline; }

.footer__wordmark .wordmark__name { color: var(--color-text-on-dark); }
.footer__wordmark .wordmark__place { color: var(--color-muted-on-dark); }

.footer__bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-muted-on-dark);
}
.footer__bottom p { margin: 0; max-width: 68ch; }

/* The floating action bar sits over the page, so the footer carries extra
   room beneath its content. This must live inside the footer rather than on
   <body>, or the page background shows as a pale strip below the dark footer. */
.site-footer { padding-bottom: calc(var(--space-6) + 76px); }
@media (min-width: 561px) {
  .site-footer { padding-bottom: calc(var(--space-6) + 32px); }
}
