/* ==========================================================================
   Clinic template — styles
   Theme tokens below are the defaults; clinic.config.js `theme` overrides them.
   ========================================================================== */
:root {
  /* brand (overridable from config) */
  --primary: #0E7490;
  --primary-dark: color-mix(in srgb, var(--primary) 80%, black);
  --on-primary: #FFFFFF;
  --accent: #047857;
  --bg: #F5FBFC;
  --ink: #0F2F3A;
  --tint: color-mix(in srgb, var(--primary) 12%, white);
  --radius: 24px;
  --font-heading: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, sans-serif;

  /* derived from the brand colours above, so any primary/ink works */
  --surface: #FFFFFF;
  --soft: color-mix(in srgb, var(--primary) 5%, white);
  --media: color-mix(in srgb, var(--primary) 18%, white);
  --border: color-mix(in srgb, var(--primary) 16%, #E5E7EB);
  --border-strong: color-mix(in srgb, var(--primary) 30%, #D1D5DB);
  --accent-tint: color-mix(in srgb, var(--accent) 15%, white);
  --avatar-1: color-mix(in srgb, var(--primary) 25%, white);
  --avatar-2: color-mix(in srgb, var(--primary) 40%, white);
  --avatar-3: color-mix(in srgb, var(--primary) 55%, white);
  --muted-fg: color-mix(in srgb, var(--ink) 80%, white);    /* body copy, ≥7:1 on white for dark inks */
  --subtle-fg: color-mix(in srgb, var(--ink) 75%, white);   /* labels, ≥4.5:1 on white */
  --on-dark: color-mix(in srgb, var(--primary) 12%, white);
  --dark-line: color-mix(in srgb, var(--ink) 70%, white);
  --dark-accent: color-mix(in srgb, var(--primary) 45%, white);
  --star: #B45309;
  --alert: #B91C1C;
  --alert-tint: #FDECEC;
  --radius-sm: 12px;
  --max: 1200px;
  --gutter: 24px;
  --section-y: clamp(64px, 9vw, 96px);
  --shadow: 0 12px 32px rgba(15, 47, 58, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html.is-loading body { visibility: hidden; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--dark-accent);
  outline-offset: 2px;
}
button, summary, a { cursor: pointer; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 16px; color: #fff; }

.container { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.band { background: var(--surface); border-block: 1px solid var(--border); }

/* ---------- type helpers ---------- */
.eyebrow { color: var(--primary); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.h2 { font-size: clamp(32px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -.015em; }
.lead { color: var(--muted-fg); font-size: 18px; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 680px; }
.section-head--row { max-width: none; flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-head--row > div { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; border: 0;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn svg { width: 20px; height: 20px; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-dark); color: var(--on-primary); }
.btn--ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border-strong); }
.btn--ghost:hover { color: var(--ink); border-color: var(--primary); }
.btn--lg { min-height: 56px; padding: 16px 30px; font-size: 18px; }
.text-link { font-weight: 700; padding-block: 10px; display: inline-block; }

/* ---------- top bar + nav ---------- */
.topbar { background: var(--ink); color: var(--on-dark); font-size: 15px; }
.topbar .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 10px; }
.topbar a { color: #fff; font-weight: 700; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-heading); font-size: 21px; font-weight: 700; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--tint); color: var(--primary); display: grid; place-items: center; }
.brand__mark svg { width: 26px; height: 26px; }
.brand__logo { height: 44px; width: auto; }
.nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.nav__links a:not(.btn) { color: var(--ink); text-decoration: none; padding-block: 10px; }
.nav__links a:not(.btn):hover { color: var(--primary); }
/* On phones the wrapped nav is tall — don't pin it over the content. */
@media (max-width: 720px) {
  .site-header { position: static; }
  .nav__links { gap: 0 20px; }
}

/* ---------- hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 72px 64px; }
.hero__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero__visual { flex: 1 1 440px; min-width: 0; position: relative; }
.pill { align-self: flex-start; background: var(--tint); color: var(--primary-dark); font-weight: 700; font-size: 15px; padding: 8px 16px; border-radius: 999px; }
.hero h1 { font-size: clamp(40px, 5.2vw, 64px); line-height: 1.08; letter-spacing: -.02em; }
.hero__sub { font-size: 20px; color: var(--muted-fg); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Quick-book bar (hero.quickBook: true) — replaces the hero's primary button */
.quickbook { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.quickbook label { font-weight: 700; font-size: 15px; }
.quickbook__row { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: calc(var(--radius) * .75); }
.quickbook select { flex: 1 1 220px; min-width: 0; min-height: 48px; border: 0; background: transparent; font: inherit; color: var(--ink); padding: 0 10px; }
.hero__copy:has(.quickbook:not([hidden])) .actions .btn--primary { display: none; }

.proof { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-top: 8px; }
.avatars { display: flex; }
.avatars span { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--bg); margin-left: -12px; }
.avatars span:first-child { margin-left: 0; background: var(--avatar-1); }
.avatars span:nth-child(2) { background: var(--avatar-2); }
.avatars span:nth-child(3) { background: var(--avatar-3); }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars svg { width: 18px; height: 18px; }
.proof__text { font-size: 15px; color: var(--muted-fg); }
.proof__text strong { color: var(--ink); }

.media { width: 100%; border-radius: calc(var(--radius) + 8px); overflow: hidden; background: var(--media); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--hero { aspect-ratio: 4 / 4.4; }
.media--wide { aspect-ratio: 5 / 4; }
.media__ph { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 32px; text-align: center; color: var(--primary-dark); font-weight: 700; }
.media__ph svg { width: 48px; height: 48px; }

.float-card {
  position: absolute; background: var(--surface); border-radius: 20px; padding: 14px 18px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; line-height: 1.3;
}
.float-card--bl { left: -20px; bottom: 40px; }
.float-card--tr { right: -12px; top: 36px; font-weight: 700; font-size: 15px; max-width: 220px; }
.float-card small { display: block; font-size: 14px; color: var(--muted-fg); }
.icon-tile { flex: none; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--tint); color: var(--primary); display: grid; place-items: center; }
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile--ok { background: var(--accent-tint); color: var(--accent); }
@media (max-width: 560px) {
  .float-card--bl { left: 12px; bottom: 12px; }
  .float-card--tr { right: 12px; top: 12px; }
}

/* ---------- insurers ---------- */
.insurers .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 28px; }
.insurers__label { font-size: 15px; font-weight: 700; color: var(--muted-fg); }
.insurers__list { display: flex; flex-wrap: wrap; gap: 12px 20px; flex: 1 1 600px; justify-content: flex-end; list-style: none; margin: 0; padding: 0; }
.insurers__list li { padding: 10px 22px; border-radius: 10px; background: var(--soft); color: var(--subtle-fg); font-weight: 700; font-size: 15px; }
.insurers__list img { height: 28px; width: auto; }

/* ---------- cards / grids ---------- */
.stack-lg { display: flex; flex-direction: column; gap: 48px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
}
.card__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--tint); color: var(--primary); display: grid; place-items: center; }
.card__icon svg { width: 26px; height: 26px; }
.card.is-alert .card__icon { background: var(--alert-tint); color: var(--alert); }
.card__label { font-size: 14px; font-weight: 700; color: var(--subtle-fg); text-transform: uppercase; letter-spacing: .06em; }
.card h3 { font-size: 22px; line-height: 1.3; }
.card p { color: var(--muted-fg); }
.card .text-link { margin-top: auto; }

/* ---------- why us ---------- */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.split > .media { flex: 1 1 420px; min-width: 0; }
.split__body { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.points { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); list-style: none; margin: 0; padding: 0; }
.points li { display: flex; gap: 14px; }
.points .check { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.points .check svg { width: 20px; height: 20px; }
.points h3 { font-size: 19px; margin-bottom: 4px; }
.points p { color: var(--muted-fg); font-size: 16px; }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); padding-top: 8px; }
.stat { background: var(--soft); border-radius: 18px; padding: 20px; }
.stat__value { font-size: 34px; font-weight: 700; color: var(--primary); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--muted-fg); font-size: 15px; }

/* ---------- reviews ---------- */
.review { margin: 0; gap: 20px; }
.review blockquote { margin: 0; font-size: 18px; line-height: 1.6; }
.review figcaption { margin-top: auto; display: flex; align-items: center; gap: 12px; line-height: 1.3; }
.review figcaption span:last-child { display: flex; flex-direction: column; }
.review figcaption small { color: var(--subtle-fg); font-size: 15px; }
.review__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--avatar-1); flex: none; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-wrap: wrap; gap: 48px; }
.faq__intro { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.faq__list { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: 18px; padding: 4px 24px; background: var(--soft); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-weight: 700; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 26px; line-height: 1; color: var(--primary); transition: transform 200ms ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-bottom: 20px; color: var(--muted-fg); }

/* ---------- booking ---------- */
.book {
  background: var(--ink); color: #fff; border-radius: calc(var(--radius) + 12px);
  padding: clamp(28px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start;
}
.book__copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.book__copy h2 { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.12; letter-spacing: -.015em; }
.book__copy > p { font-size: 19px; color: var(--on-dark); }
.contact-list { list-style: none; margin: 0; padding: 8px 0 0; display: flex; flex-direction: column; gap: 14px; color: var(--on-dark); }
.contact-list li { display: flex; align-items: flex-start; gap: 12px; }
.contact-list svg { margin-top: 2px; }
.contact-list svg { width: 22px; height: 22px; color: var(--dark-accent); flex: none; }
.contact-list a { color: #fff; font-weight: 700; }

.form { flex: 1 1 420px; min-width: 0; background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.form h3 { font-size: 24px; }
.form__row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 15px; }
.field input, .field select, .field textarea {
  min-height: 50px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0 14px; font: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus { border-color: var(--primary); }
.form .btn { min-height: 56px; font-size: 18px; }
.form__note { font-size: 14px; color: var(--subtle-fg); text-align: center; }
.form__status { font-weight: 700; text-align: center; }
.form__status.is-ok { color: var(--accent); }
.form__status.is-error { color: var(--alert); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); }
.site-footer .container { padding-block: 64px 32px; display: flex; flex-direction: column; gap: 40px; }
.footer__grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer__col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.footer__col h4 { color: #fff; font-size: 16px; margin-bottom: 4px; }
.footer__col a { color: var(--on-dark); text-decoration: none; }
.footer__col a:hover { color: #fff; text-decoration: underline; }
.footer__brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-heading); font-size: 20px; font-weight: 700; }
.footer__brand svg { width: 24px; height: 24px; color: var(--dark-accent); }
.newsletter { display: flex; flex-wrap: wrap; gap: 8px; }
.newsletter input { flex: 1 1 160px; min-width: 0; min-height: 46px; border: 1px solid var(--dark-line); border-radius: 999px; padding: 0 16px; font: inherit; font-size: 15px; background: rgba(255,255,255,.06); color: #fff; }
.newsletter input::placeholder { color: var(--dark-accent); }
.newsletter button { min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 15px; }
.footer__bottom { border-top: 1px solid var(--dark-line); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }
.footer__bottom nav { display: flex; gap: 20px; }
.footer__bottom a { color: var(--on-dark); }

/* ---------- sales preview notice ---------- */
.preview-bar {
  position: fixed; z-index: 90; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 14px 52px 14px 20px; border-radius: 16px;
  background: #111827; color: #F9FAFB; font-family: system-ui, sans-serif; font-size: 15px; line-height: 1.45;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
}
.preview-bar p { flex: 1 1 280px; margin: 0; }
.preview-bar .btn { min-height: 44px; padding: 10px 18px; font-size: 15px; border-radius: 999px; text-transform: none; letter-spacing: 0; }
.preview-bar__close {
  position: absolute; top: 6px; right: 6px; width: 44px; height: 44px;
  border: 0; background: none; color: #D1D5DB; font-size: 24px; line-height: 1;
}
.preview-bar__close:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
