/* ============================================================
   Physio Karma — public marketing site
   webapp/static/marketing.css · full replacement
   Direction: Editorial-clinical. Warm paper, deep teal-blue +
   cyan, Spectral display serif + Hanken Grotesk body, EEG/
   brain-network data-viz motif. CSS-only (SSR-safe, no JS dep).
   All .m-* selectors from the brief §5 are preserved.
   ============================================================ */

/* ---- Tokens ---------------------------------------------- */
.m-public {
  /* colour — built on the brand blue from the Physio Karma logo (#0B65C5) */
  --m-primary: #0B65C5;
  --m-primary-strong: #084E99;
  --m-secondary: #2E86DD;
  --m-accent: #18A0DB;
  --m-accent-strong: #1487BE;
  --m-light: #E4EEFB;
  --m-text: #13202E;
  --m-text-muted: #4F6173;
  --m-text-subtle: #8493A2;
  --m-bg: #FAFBFD;
  --m-bg-soft: #EDF2F8;
  --m-paper: #FFFFFF;
  --m-border: #E2E8F0;
  --m-border-strong: #CCD6E2;
  --m-success: #2F7A4A;
  --m-footer: #0A1B2E;
  --m-footer-soft: #16304A;
  --m-footer-text: #A8BCD4;
  --m-wa: #25D366;

  /* gradients */
  --m-grad-primary: linear-gradient(135deg, var(--m-primary) 0%, var(--m-secondary) 55%, var(--m-accent) 100%);
  --m-grad-ink: linear-gradient(150deg, #0A1B2E 0%, #103251 60%, #0C2A44 100%);

  /* type */
  --m-font-display: "Spectral", Georgia, "Times New Roman", serif;
  --m-font-sans: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --m-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* spacing / radius / shadow */
  --m-radius-sm: 10px;
  --m-radius-md: 16px;
  --m-radius-lg: 24px;
  --m-radius-pill: 999px;
  --m-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --m-shadow-md: 0 10px 30px -12px rgba(12, 90, 119, .18);
  --m-shadow-lg: 0 30px 70px -28px rgba(12, 90, 119, .35);
  --m-container: 1180px;

  font-family: var(--m-font-sans);
  color: var(--m-text);
  background: var(--m-bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  margin: 0;
}

.m-public *, .m-public *::before, .m-public *::after { box-sizing: border-box; }
.m-public h1, .m-public h2, .m-public h3, .m-public h4 {
  font-family: var(--m-font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--m-text);
}
.m-public h1 { font-size: clamp(36px, 5.2vw, 60px); font-weight: 500; }
.m-public h2 { font-size: clamp(27px, 3.4vw, 40px); }
.m-public h3 { font-size: 22px; }
.m-public h4 { font-size: 18px; }
.m-public p { margin: 0; }
.m-public a { color: var(--m-primary); text-decoration: none; }
.m-public a:hover { color: var(--m-primary-strong); }
.m-public img { max-width: 100%; display: block; }
.m-public ul { margin: 0; padding: 0; list-style: none; }
.m-public :focus-visible { outline: 2px solid var(--m-accent); outline-offset: 3px; border-radius: 4px; }

/* ---- Layout primitives ----------------------------------- */
.m-container {
  width: 100%;
  max-width: var(--m-container);
  margin: 0 auto;
  padding: 0 24px;
}
.m-section { padding: 88px 0; }
.m-section--alt { background: var(--m-bg-soft); }
.m-section--light { background: var(--m-light); }
.m-section__head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.m-section__head p {
  color: var(--m-text-muted);
  font-size: 19px;
  margin-top: 16px;
  text-wrap: pretty;
}
.m-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--m-font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--m-primary);
  background: var(--m-light);
  padding: 7px 14px;
  border-radius: var(--m-radius-pill);
  margin-bottom: 20px;
}
.m-eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--m-accent);
}

/* ---- Topbar ---------------------------------------------- */
.m-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 251, 253, .88);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--m-border);
}
.m-topbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 74px;
}
.m-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 19px;
  color: var(--m-text);
  letter-spacing: -0.01em;
}
.m-brand:hover { color: var(--m-text); }
.m-brand__mark {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 3px;
  box-shadow: var(--m-shadow-sm), inset 0 0 0 1px rgba(12,90,119,.08);
}
.m-brand__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.m-brand__name small {
  display: block;
  font-family: var(--m-font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--m-text-subtle);
  margin-top: -2px;
}
.m-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.m-nav a {
  padding: 9px 14px;
  border-radius: var(--m-radius-pill);
  font-size: 15px;
  font-weight: 500;
  color: var(--m-text-muted);
}
.m-nav a:hover { color: var(--m-text); background: var(--m-bg-soft); }
.m-nav a.is-active { color: var(--m-primary); }
.m-nav__cta { margin-left: 8px; }

/* ---- Dark topbar variant --------------------------------- */
/* Add `m-topbar--dark` to the <header> for a navy navbar. The mobile
   slide-down nav panel stays dark too. Hamburger + CTA still work. */
.m-topbar--dark {
  background: rgba(10, 26, 33, .82);
  border-bottom-color: var(--m-footer-soft);
}
.m-topbar--dark .m-brand { color: #fff; }
.m-topbar--dark .m-brand:hover { color: #fff; }
.m-topbar--dark .m-brand__name small { color: rgba(255, 255, 255, .55); }
.m-topbar--dark .m-nav a { color: rgba(255, 255, 255, .72); }
.m-topbar--dark .m-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.m-topbar--dark .m-nav a.is-active { color: var(--m-accent); }
.m-topbar--dark .m-nav-burger {
  background: var(--m-footer-soft);
  border-color: rgba(255, 255, 255, .14);
}
.m-topbar--dark .m-nav-burger span,
.m-topbar--dark .m-nav-burger span::before,
.m-topbar--dark .m-nav-burger span::after { background: #fff; }
@media (max-width: 840px) {
  .m-topbar--dark .m-nav {
    background: var(--m-footer);
    border-bottom-color: var(--m-footer-soft);
  }
  .m-topbar--dark .m-nav a { color: rgba(255, 255, 255, .82); }
}

/* CSS-only mobile nav (checkbox hack — SSR-safe, no JS) */
.m-nav-toggle, .m-nav-burger { display: none; }
.m-nav-burger {
  margin-left: auto;
  width: 48px; height: 48px;
  border-radius: 12px;
  border: 1px solid var(--m-border);
  background: var(--m-paper);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.m-nav-burger span,
.m-nav-burger span::before,
.m-nav-burger span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--m-text);
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.m-nav-burger span::before { position: absolute; top: -6px; }
.m-nav-burger span::after { position: absolute; top: 6px; }

/* ---- Buttons --------------------------------------------- */
.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--m-radius-pill);
  font-family: var(--m-font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.m-btn:active { transform: translateY(1px); }
.m-btn svg { width: 18px; height: 18px; }
.m-btn--primary {
  background: var(--m-primary);
  color: #fff;
  box-shadow: var(--m-shadow-sm);
}
.m-btn--primary:hover { background: var(--m-primary-strong); color: #fff; box-shadow: var(--m-shadow-md); }
.m-btn--accent {
  background: var(--m-accent);
  color: #062438;
}
.m-btn--accent:hover { background: var(--m-accent-strong); color: #fff; }
.m-btn--ghost {
  background: var(--m-paper);
  color: var(--m-text);
  border-color: var(--m-border-strong);
}
.m-btn--ghost:hover { background: var(--m-bg-soft); color: var(--m-text); border-color: var(--m-primary); }
.m-btn--lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.m-btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; gap: 7px; }
.m-btn--sm svg { width: 15px; height: 15px; }

/* Anchor-button color overrides — `.m-public a` (0,1,1) outranks bare
   `.m-btn--*` (0,1,0); these scoped rules (0,2,0 / 0,2,1) restore the
   button label color when the button is an <a>. */
.m-public .m-btn--primary, .m-public .m-btn--primary:hover { color: #fff; }
.m-public .m-btn--accent { color: #062438; }
.m-public .m-btn--accent:hover { color: #fff; }
.m-public .m-btn--ghost, .m-public .m-btn--ghost:hover { color: var(--m-text); }

/* ---- Hero ------------------------------------------------ */
.m-hero {
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}
.m-hero::before {
  /* soft tinted wash behind hero */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 85% 0%, rgba(19, 181, 196, .14) 0%, transparent 60%),
    radial-gradient(50% 70% at 0% 100%, rgba(12, 90, 119, .08) 0%, transparent 55%);
  pointer-events: none;
}
.m-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.m-hero__title {
  font-size: clamp(38px, 5.4vw, 62px);
  font-weight: 500;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.m-hero__title em {
  font-style: italic;
  color: var(--m-primary);
}
.m-hero__sub {
  font-size: 20px;
  color: var(--m-text-muted);
  margin-top: 22px;
  max-width: 54ch;
  text-wrap: pretty;
}
.m-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.m-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--m-border);
}
.m-hero__trust-item { display: flex; flex-direction: column; }
.m-hero__trust-item b {
  font-family: var(--m-font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--m-primary);
  line-height: 1;
}
.m-hero__trust-item span { font-size: 13px; color: var(--m-text-muted); margin-top: 4px; }
.m-hero__art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--m-radius-lg);
  background: var(--m-grad-primary);
  box-shadow: var(--m-shadow-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.m-hero__art svg { width: 86%; height: 86%; }
.m-hero__art-badge {
  position: absolute;
  left: 18px; bottom: 18px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--m-shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
}
.m-hero__art-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--m-success); box-shadow: 0 0 0 4px rgba(47,122,74,.18); }
.m-hero__art-badge b { font-size: 14px; }
.m-hero__art-badge span { font-size: 12px; color: var(--m-text-muted); display: block; }

/* ---- Grids ----------------------------------------------- */
.m-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.m-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.m-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

/* ---- Cards ----------------------------------------------- */
.m-card {
  background: var(--m-paper);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  padding: 26px;
  box-shadow: var(--m-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.m-card:hover { transform: translateY(-4px); box-shadow: var(--m-shadow-md); border-color: var(--m-border-strong); }
.m-card--feature { padding: 30px; }
.m-card__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--m-light);
  color: var(--m-primary);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.m-card__icon svg { width: 26px; height: 26px; }
.m-card__title { font-size: 20px; margin-bottom: 8px; }
.m-card__body { color: var(--m-text-muted); font-size: 16px; }

/* ---- Speciality tiles ------------------------------------ */
.m-speciality {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--m-paper);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  padding: 26px;
  box-shadow: var(--m-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  overflow: hidden;
}
.m-speciality::after {
  content: "";
  position: absolute;
  right: -30px; top: -30px;
  width: 110px; height: 110px;
  background: radial-gradient(circle, rgba(19,181,196,.12), transparent 70%);
  transition: transform .25s ease;
}
.m-speciality:hover { transform: translateY(-4px); box-shadow: var(--m-shadow-md); border-color: var(--m-primary); }
.m-speciality:hover::after { transform: scale(1.4); }
.m-speciality__icon {
  width: 54px; height: 54px;
  border-radius: 15px;
  background: var(--m-grad-primary);
  color: #fff;
  display: grid;
  place-items: center;
}
.m-speciality__icon svg { width: 27px; height: 27px; }
.m-speciality__label { font-family: var(--m-font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.m-speciality__more {
  font-size: 15px;
  font-weight: 600;
  color: var(--m-primary);
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.m-speciality--ghost {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

/* ---- Conditions pill cloud ------------------------------- */
.m-conditions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 940px;
  margin: 0 auto;
}
.m-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--m-radius-pill);
  background: var(--m-paper);
  border: 1px solid var(--m-border-strong);
  font-size: 15px;
  font-weight: 500;
  color: var(--m-text);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.m-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--m-accent);
}
.m-pill:hover { background: var(--m-primary); color: #fff; border-color: var(--m-primary); }
.m-pill:hover::before { background: #fff; }
.m-pill--accent { background: var(--m-light); border-color: transparent; }

/* ---- Tech tiles ------------------------------------------ */
.m-tech {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--m-paper);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-sm);
  box-shadow: var(--m-shadow-sm);
  transition: transform .15s ease, border-color .15s ease;
}
.m-tech:hover { transform: translateY(-3px); border-color: var(--m-accent); }
.m-tech__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--m-light);
  color: var(--m-primary);
  display: grid; place-items: center;
  margin-bottom: 8px;
}
.m-tech__icon svg { width: 20px; height: 20px; }
.m-tech__name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.m-tech__role { font-size: 13px; color: var(--m-text-muted); }

/* ---- CTA banner ------------------------------------------ */
.m-cta-banner {
  position: relative;
  overflow: hidden;
  background: var(--m-grad-primary);
  border-radius: var(--m-radius-lg);
  padding: 64px 56px;
  color: #fff;
  text-align: center;
  box-shadow: var(--m-shadow-lg);
}
.m-cta-banner::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 56px);
  pointer-events: none;
}
.m-cta-banner h2 { color: #fff; position: relative; }
.m-cta-banner p { color: rgba(255,255,255,.86); font-size: 19px; margin: 16px auto 0; max-width: 56ch; position: relative; }
.m-cta-banner .m-hero__cta { justify-content: center; position: relative; margin-top: 30px; }
.m-cta-banner .m-btn--primary { background: #fff; color: var(--m-primary-strong); }
.m-cta-banner .m-btn--primary:hover { background: var(--m-light); }
.m-cta-banner .m-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.m-cta-banner .m-btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---- Page hero (interior pages) -------------------------- */
.m-page-hero {
  padding: 56px 0 64px;
  background: linear-gradient(180deg, var(--m-light) 0%, var(--m-bg) 100%);
  border-bottom: 1px solid var(--m-border);
  position: relative;
  overflow: hidden;
}
.m-page-hero__inner { max-width: 820px; position: relative; }
.m-page-hero h1 { margin-top: 14px; }
.m-page-hero .m-hero__sub { margin-top: 18px; }
.m-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--m-text-muted);
}
.m-breadcrumb a { color: var(--m-text-muted); }
.m-breadcrumb a:hover { color: var(--m-primary); }
.m-breadcrumb span { color: var(--m-text-subtle); }

/* ---- Prose (long-form) ----------------------------------- */
.m-prose {
  max-width: 760px;
  margin: 0 auto;
}
.m-prose > * + * { margin-top: 22px; }
.m-prose h2 { margin-top: 48px; font-size: 30px; }
.m-prose h2:first-child { margin-top: 0; }
.m-prose h3 { margin-top: 32px; }
.m-prose p { color: var(--m-text-muted); font-size: 18px; }
.m-prose ul { display: flex; flex-direction: column; gap: 12px; }
.m-prose ul li {
  position: relative;
  padding-left: 30px;
  color: var(--m-text-muted);
  font-size: 18px;
}
.m-prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--m-light);
  box-shadow: inset 0 0 0 2px var(--m-accent);
}
.m-prose ol {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0;
  list-style: none;
}
.m-prose ol li {
  counter-increment: step;
  position: relative;
  padding-left: 56px;
  color: var(--m-text-muted);
  font-size: 18px;
  min-height: 40px;
}
.m-prose ol li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--m-grad-primary);
  color: #fff;
  font-family: var(--m-font-display);
  font-weight: 600;
  display: grid;
  place-items: center;
}
.m-prose ol li b, .m-prose ol li strong { color: var(--m-text); }

/* ---- FAQ accordion --------------------------------------- */
.m-faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.m-faq details {
  background: var(--m-paper);
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-sm);
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.m-faq details[open] { border-color: var(--m-primary); box-shadow: var(--m-shadow-sm); }
.m-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.m-faq summary::-webkit-details-marker { display: none; }
.m-faq summary::after {
  content: "+";
  margin-left: auto;
  font-size: 24px;
  font-weight: 400;
  color: var(--m-primary);
  transition: transform .2s ease;
}
.m-faq details[open] summary::after { transform: rotate(45deg); }
.m-faq details > p {
  padding: 0 24px 22px;
  color: var(--m-text-muted);
  font-size: 17px;
}

/* ---- NAP card -------------------------------------------- */
.m-nap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 18px;
  margin: 0;
}
.m-nap dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-text-subtle);
  padding-top: 3px;
}
.m-nap dd { margin: 0; font-size: 17px; color: var(--m-text); }
.m-nap dd a { font-weight: 600; }

/* ---- Footer ---------------------------------------------- */
.m-footer {
  background: var(--m-footer);
  color: var(--m-footer-text);
  padding: 72px 0 28px;
}
.m-footer a { color: var(--m-footer-text); }
.m-footer a:hover { color: #fff; }

/* Footer grid — col 1 brand + description, cols 2-4 centre cards */
.m-footer__grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr 1fr;
  gap: 24px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--m-footer-soft);
}
.m-footer__brand .m-brand { color: #fff; margin-bottom: 16px; }
.m-footer__blurb { color: var(--m-footer-text); font-size: 15px; margin: 0; max-width: 40ch; }

/* Single-centre footer: brand column + one wide embedded map. */
.m-footer__grid--centre { grid-template-columns: 0.8fr 3fr; }
.m-footer__map {
  position: relative;
  border-radius: var(--m-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  min-height: 260px;
}
.m-footer__map-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  border: 0;
}
.m-centre-card {
  background: var(--m-footer-soft);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--m-radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.m-centre-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.m-centre-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.m-footer .m-centre-card__name { color: #fff; font-size: 18px; margin: 0; }
.m-centre-card__dir {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--m-primary);
  color: #fff;
}
.m-centre-card__dir:hover { background: var(--m-primary-strong); color: #fff; }
.m-centre-card__dir svg { width: 16px; height: 16px; }
.m-centre-card__addr {
  font-style: normal;
  color: var(--m-footer-text);
  font-size: 14px;
  line-height: 1.6;
}
.m-centre-card__hours { color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.m-centre-card__phone { margin-top: auto; padding-top: 10px; font-size: 15px; font-weight: 600; }
.m-centre-card__phone a { color: #fff; }
.m-centre-card__phone a:hover { color: var(--m-accent); }
.m-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 26px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}

/* ---- Floating CTA ---------------------------------------- */
.m-float {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.m-float a {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--m-shadow-lg);
  transition: transform .12s ease;
}
.m-float a:hover { transform: scale(1.08); color: #fff; }
.m-float a svg { width: 28px; height: 28px; }
.m-float--wa { background: var(--m-wa); }
.m-float--call { background: var(--m-primary); }

/* ---- App banner (reserved) ------------------------------- */
.m-app-banner {
  background: var(--m-footer);
  color: #fff;
  padding: 12px 0;
  font-size: 14px;
}
.m-app-banner__inner { display: flex; align-items: center; gap: 16px; justify-content: center; }
.m-app-banner a { color: var(--m-accent); font-weight: 600; }

/* ---- EEG divider motif ----------------------------------- */
.m-eeg-divider {
  height: 48px;
  width: 100%;
  color: var(--m-accent);
  opacity: .5;
}
.m-eeg-divider svg { width: 100%; height: 100%; }

/* ---- Image slots / figures ------------------------------- */
/* Each .m-figure shows the brand gradient underneath, so a slow or
   missing image degrades gracefully instead of a broken-image icon. */
.m-figure {
  position: relative;
  border-radius: var(--m-radius-lg);
  overflow: hidden;
  background: var(--m-grad-primary);
  box-shadow: var(--m-shadow-lg);
  isolation: isolate;
}
.m-figure > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Auto carousel (CSS-only crossfade, SSR-safe, no JS) -- */
/* Stacks photos and cross-fades between them. Count-specific classes
   (--3 / --4) drive the timing so any slide set loops cleanly. */
.m-carousel { position: absolute; inset: 0; z-index: 1; }
.m-carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
/* Static fallback (reduced motion / animations off): show first frame. */
.m-carousel img:first-child { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .m-carousel--4 img { animation: m-xfade-4 18s infinite; }
  .m-carousel--4 img:nth-child(1) { animation-delay: 0s; }
  .m-carousel--4 img:nth-child(2) { animation-delay: 4.5s; }
  .m-carousel--4 img:nth-child(3) { animation-delay: 9s; }
  .m-carousel--4 img:nth-child(4) { animation-delay: 13.5s; }
  @keyframes m-xfade-4 {
    0% { opacity: 0; }
    3% { opacity: 1; }
    22% { opacity: 1; }
    28% { opacity: 0; }
    100% { opacity: 0; }
  }
  .m-carousel--3 img { animation: m-xfade-3 13.5s infinite; }
  .m-carousel--3 img:nth-child(1) { animation-delay: 0s; }
  .m-carousel--3 img:nth-child(2) { animation-delay: 4.5s; }
  .m-carousel--3 img:nth-child(3) { animation-delay: 9s; }
  @keyframes m-xfade-3 {
    0% { opacity: 0; }
    4% { opacity: 1; }
    30% { opacity: 1; }
    37% { opacity: 0; }
    100% { opacity: 0; }
  }
}

/* ---- Services carousel (JS-driven, captioned) ------------- */
/* Used on the per-centre pages: slide counts vary (9-12) so the timing is
   driven by a small script in clinic.html instead of count-specific
   keyframes. `.is-active` marks the visible slide; the caption tag is
   swapped in step by the same script. */
.m-svc-carousel img {
  animation: none;
  transition: opacity .8s ease;
}
.m-svc-carousel img.is-active { opacity: 1; }
.m-svc-carousel__nav {
  position: absolute;
  right: 14px; bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.m-svc-carousel__nav button {
  width: 36px; height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--m-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--m-shadow-sm);
}
.m-svc-carousel__nav button:hover { background: #fff; }
/* On the clinic pages the caption sits bottom-left so it reads as the
   slide's label rather than the section tag. */
.m-svc-carousel ~ .m-figure__tag { top: auto; bottom: 14px; }

.m-figure__tag {
  position: absolute;
  left: 14px; top: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  border-radius: var(--m-radius-pill);
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--m-primary);
  box-shadow: var(--m-shadow-sm);
}
.m-figure__tag::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--m-accent);
}

/* ---- Hero photo variant ---------------------------------- */
/* Reuses .m-hero__art box (aspect-ratio + radius + gradient) but holds
   a photo carousel instead of the inline SVG. The badge floats on top. */
.m-hero__art--photo { padding: 0; }
.m-hero__art--photo .m-hero__art-badge { z-index: 3; }

/* ---- Theme feature rows (image-led) ---------------------- */
.m-feature-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}
.m-feature-row + .m-feature-row { margin-top: 72px; }
/* Alternate image side on even rows for an editorial zig-zag. */
.m-feature-row--rev .m-feature-row__media { order: 2; }
.m-feature-row__media {
  aspect-ratio: 4 / 3;
}
.m-feature-row__body h3 {
  font-size: clamp(24px, 2.6vw, 32px);
  margin-top: 14px;
}
.m-feature-row__body > p {
  color: var(--m-text-muted);
  font-size: 18px;
  margin-top: 14px;
  text-wrap: pretty;
}
.m-feature-row__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.m-feature-row__list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--m-radius-pill);
  background: var(--m-paper);
  border: 1px solid var(--m-border-strong);
  font-size: 14px;
  font-weight: 500;
  color: var(--m-text);
}
.m-feature-row__list li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--m-accent);
}

/* ---- Reveal-on-scroll (CSS-only, progressive enhancement)- */
@media (prefers-reduced-motion: no-preference) {
  .m-reveal { animation: m-reveal-in linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  @keyframes m-reveal-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
}

/* ---- Responsive ------------------------------------------ */
@media (max-width: 980px) {
  .m-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .m-hero__art { max-width: 460px; }
  .m-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .m-footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .m-footer__grid--centre { grid-template-columns: 1fr; }

  /* Stack theme rows; image always on top regardless of zig-zag. */
  .m-feature-row { grid-template-columns: 1fr; gap: 28px; }
  .m-feature-row + .m-feature-row { margin-top: 48px; }
  .m-feature-row--rev .m-feature-row__media { order: -1; }
}
@media (max-width: 840px) {
  .m-grid-3 { grid-template-columns: 1fr 1fr; }
  .m-section { padding: 64px 0; }

  /* mobile nav */
  .m-nav-burger { display: flex; }
  .m-nav {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--m-paper);
    border-bottom: 1px solid var(--m-border);
    padding: 16px;
    margin-left: 0;
    transform: translateY(-120%);
    transition: transform .26s ease;
    box-shadow: var(--m-shadow-lg);
  }
  .m-nav a { padding: 14px 16px; font-size: 17px; border-radius: 12px; }
  .m-nav__cta { margin: 8px 0 0; }
  .m-nav-toggle:checked ~ .m-nav { transform: translateY(0); }
  .m-nav-toggle:checked ~ .m-nav-burger span { background: transparent; }
  .m-nav-toggle:checked ~ .m-nav-burger span::before { transform: translateY(6px) rotate(45deg); }
  .m-nav-toggle:checked ~ .m-nav-burger span::after { transform: translateY(-6px) rotate(-45deg); }
}
@media (max-width: 600px) {
  .m-public { font-size: 16px; }
  .m-grid-4, .m-grid-3, .m-grid-2 { grid-template-columns: 1fr; }
  .m-footer__grid { grid-template-columns: 1fr; }
  .m-cta-banner { padding: 44px 24px; }
  .m-hero__trust { gap: 16px; }
  .m-section__head { margin-bottom: 36px; }
}


/* ============================================================
   TWEAK THEMES — each body[data-*] attribute swaps a whole
   token set, so the feel changes wholesale. Set/remove these
   attributes on <body> (theme switcher, CMS field, or a fixed
   default). Default = no attribute.
   ============================================================ */
/* default body has no attrs → marketing.css defaults apply */

  /* ---------- MOOD: Neuro Dark ---------- */
  body[data-mood="dark"] .m-public {
    --m-primary: #4FD1FF; --m-primary-strong: #2BB8EC;
    --m-secondary: #6AA9FF; --m-accent: #A06BFF; --m-accent-strong: #8A4FF0;
    --m-light: #122637;
    --m-text: #EAF2FA; --m-text-muted: #93A6BE; --m-text-subtle: #5E7088;
    --m-bg: #070B14; --m-bg-soft: #0D1422; --m-paper: #0E1626;
    --m-border: #1E2A3E; --m-border-strong: #2C3C56;
    --m-footer: #04070D; --m-footer-soft: #1E2A3E; --m-footer-text: #93A6BE;
    --m-grad-primary: linear-gradient(135deg, #1B6FB0 0%, #4FD1FF 50%, #A06BFF 100%);
  }
  body[data-mood="dark"] .m-btn--primary { color: #04111A; }
  body[data-mood="dark"] .m-pill:hover { color: #04111A; }
  body[data-mood="dark"] .m-pill:hover::before { background: #04111A; }
  body[data-mood="dark"] .m-topbar { background: rgba(7,11,20,.82); }
  body[data-mood="dark"] .m-cta-banner .m-btn--primary { background: #fff; color: #0E1626; }

  /* ---------- MOOD: Calm Restorative ---------- */
  body[data-mood="calm"] .m-public {
    --m-primary: #1C5D4A; --m-primary-strong: #134232;
    --m-secondary: #3E8E6F; --m-accent: #7CC79E; --m-accent-strong: #5BB082;
    --m-light: #E2EFE8;
    --m-text: #16241E; --m-text-muted: #4A5C53; --m-text-subtle: #82938B;
    --m-bg: #F4F7F4; --m-bg-soft: #E9F1EC; --m-paper: #FFFFFF;
    --m-border: #DCE7E0; --m-border-strong: #C2D4C9;
    --m-footer: #0E211A; --m-footer-soft: #1C3A2E; --m-footer-text: #AEC7BB;
    --m-grad-primary: linear-gradient(135deg, #134232 0%, #1C5D4A 50%, #3E8E6F 100%);
  }
  body[data-mood="calm"] .m-btn--accent { color: #0D2A20; }

  /* ---------- TYPE: Modern Geometric ---------- */
  body[data-type="geometric"] .m-public {
    --m-font-display: "Space Grotesk", "Hanken Grotesk", sans-serif;
  }
  body[data-type="geometric"] .m-public h1,
  body[data-type="geometric"] .m-public h2 { letter-spacing: -0.03em; font-weight: 600; }
  body[data-type="geometric"] .m-hero__title em { font-style: normal; }

  /* ---------- TYPE: Clean Humanist (sans headlines) ---------- */
  body[data-type="humanist"] .m-public {
    --m-font-display: "Hanken Grotesk", system-ui, sans-serif;
  }
  body[data-type="humanist"] .m-public h1 { font-weight: 800; letter-spacing: -0.035em; }
  body[data-type="humanist"] .m-public h2,
  body[data-type="humanist"] .m-public h3 { font-weight: 700; letter-spacing: -0.025em; }
  body[data-type="humanist"] .m-hero__title em { font-style: normal; }

  /* ---------- FORM: Airy & Rounded ---------- */
  body[data-form="airy"] .m-public {
    --m-radius-sm: 16px; --m-radius-md: 24px; --m-radius-lg: 34px; --m-radius-pill: 999px;
    font-size: 18px;
  }
  body[data-form="airy"] .m-section { padding: 116px 0; }
  body[data-form="airy"] .m-card, body[data-form="airy"] .m-speciality { padding: 34px; }
  body[data-form="airy"] .m-section__head { margin-bottom: 60px; }
  body[data-form="airy"] .m-hero { padding: 104px 0 120px; }

  /* ---------- FORM: Compact & Sharp ---------- */
  body[data-form="compact"] .m-public {
    --m-radius-sm: 3px; --m-radius-md: 5px; --m-radius-lg: 8px; --m-radius-pill: 5px;
    font-size: 15.5px;
  }
  body[data-form="compact"] .m-section { padding: 52px 0; }
  body[data-form="compact"] .m-card, body[data-form="compact"] .m-speciality { padding: 18px; }
  body[data-form="compact"] .m-section__head { margin-bottom: 32px; }
  body[data-form="compact"] .m-hero { padding: 52px 0 60px; }
  body[data-form="compact"] .m-brand__mark { border-radius: 6px; }
