/*
  Rob Leather Physiotherapy: design system and shared components
  Plain CSS, mobile first. Breakpoints: 640px, 900px, 1180px.
  See COMPONENTS.md for the markup that goes with each block.
*/

/* ==========================================================================
   1. Fonts
   ========================================================================== */

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-italic.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   2. Tokens
   ========================================================================== */

:root {
  /* Brand colours (taken from the 2026 logo pack: navy #0B2545, blue #1F6FD1, sky #3FB6E8, light tint #BDE7FA) */
  --navy: #0b2545;
  --navy-deep: #071a33;
  --royal: #1f6fd1;
  --royal-hover: #185db3;
  --blue: #1f6fd1;
  --sky-bright: #3fb6e8;
  --sky: #bde7fa;
  --pale: #eef6fc;
  --ink: #1d1d1b;
  --text: #2b2f3a;
  --muted: #5b6270;
  --line: #dfe4ee;
  --paper: #f7f8fb;
  --white: #ffffff;
  --gold: #d99a2b;
  --success: #1f8a5b;
  --teal: #1e8f9e;

  /* Functional (form errors only) */
  --danger: #b42318;
  --danger-bg: #fdf0ef;
  --success-bg: #ecf7f1;

  /* Tints for icon chips (brand colour at about 12%) */
  --tint-sky-bg: var(--sky);
  --tint-teal-bg: rgba(30, 143, 158, 0.12);
  --tint-green-bg: rgba(31, 138, 91, 0.12);
  --tint-gold-bg: rgba(217, 154, 43, 0.14);
  --tint-blue-bg: rgba(31, 111, 209, 0.12);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, var(--navy-deep), var(--navy) 55%, var(--blue));

  /* Type */
  --font: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-body: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --fs-small: 0.9375rem;
  --fs-xs: 0.875rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  --fs-h1: clamp(2.125rem, 1.55rem + 2.4vw, 3.25rem);
  --fs-display: clamp(2.3rem, 1.45rem + 3.6vw, 4rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.7vw, 2.625rem);
  --fs-h3: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  --fs-h4: 1.0625rem;

  /* Shape */
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;

  /* Soft layered shadows, tinted with navy */
  --shadow-xs: 0 1px 2px rgba(26, 42, 107, 0.06);
  --shadow-sm: 0 1px 2px rgba(26, 42, 107, 0.05), 0 4px 12px -2px rgba(26, 42, 107, 0.07);
  --shadow-md: 0 2px 4px rgba(26, 42, 107, 0.05), 0 12px 28px -8px rgba(26, 42, 107, 0.16);
  --shadow-lg: 0 4px 10px rgba(26, 42, 107, 0.06), 0 28px 56px -16px rgba(26, 42, 107, 0.26);

  /* Layout */
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(48px, 3vw + 36px, 96px);
  --gap: clamp(20px, 1.5vw + 12px, 32px);
  --header-h: 68px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 180ms;
}

@media (min-width: 900px) {
  :root {
    --header-h: 84px;
  }
}

/* ==========================================================================
   3. Reset and base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Room for the mobile sticky call/book bar */
@media (max-width: 899.98px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

img,
picture,
video,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

svg {
  flex-shrink: 0;
}

a {
  color: var(--royal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--t-fast) ease;
}

a:hover {
  color: var(--royal-hover);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

address {
  font-style: normal;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

::selection {
  background: var(--sky);
  color: var(--navy-deep);
}

/* Focus: always visible for keyboard users */
:focus-visible {
  outline: 3px solid var(--royal);
  outline-offset: 3px;
  border-radius: 4px;
}

.hero :focus-visible,
.section-navy :focus-visible,
.cta-band :focus-visible,
.site-footer :focus-visible,
.on-dark :focus-visible {
  outline-color: var(--white);
}

/* ==========================================================================
   4. Typography
   ========================================================================== */

h1,
h2,
h3,
h4 {
  font-family: var(--font);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 680;
  color: var(--navy);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 650;
  line-height: 1.25;
  color: var(--ink);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
}

p {
  text-wrap: pretty;
}

strong,
b {
  font-weight: 650;
}

/* Heading size helpers, for when the outline level and visual size differ */
.h2 {
  font-size: var(--fs-h2);
}

.h3 {
  font-size: var(--fs-h3);
}

.h4 {
  font-size: var(--fs-h4);
}

.display {
  font-size: var(--fs-display);
  line-height: 1.06;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--muted);
}

/* Small plain-text label above a heading. Sentence case, no dash, no mono. */
.eyebrow {
  display: block;
  margin-bottom: 12px;
  font-size: var(--fs-small);
  font-weight: 650;
  letter-spacing: 0;
  color: var(--royal);
}

.text-muted {
  color: var(--muted);
}

.text-small {
  font-size: var(--fs-small);
}

.text-center {
  text-align: center;
}

.measure {
  max-width: 68ch;
}

/* Vertical rhythm for stacked content */
.stack > * + * {
  margin-top: 1em;
}

.stack-sm > * + * {
  margin-top: 0.5em;
}

.stack-lg > * + * {
  margin-top: 1.5em;
}

/* Long-form copy, e.g. privacy policy */
.prose {
  max-width: 72ch;
}

.prose > * + * {
  margin-top: 1em;
}

.prose h2 {
  margin-top: 2em;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
}

.prose h3 {
  margin-top: 1.6em;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose a {
  font-weight: 550;
}

/* Inline "Learn more" style link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  color: var(--royal);
  text-decoration: none;
}

.link-arrow .icon {
  width: 18px;
  height: 18px;
  transition: transform var(--t-fast) ease;
}

.link-arrow:hover .icon,
.service-card:hover .link-arrow .icon {
  transform: translateX(3px);
}

a.link-arrow:hover {
  color: var(--royal-hover);
  text-decoration: underline;
}

/* ==========================================================================
   5. Layout helpers
   ========================================================================== */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  max-width: calc(820px + var(--gutter) * 2);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform var(--t-fast) ease;
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--white);
}

/* Responsive grids. 1 column on phones, then 2, then the named count. */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.align-center {
  align-items: center;
}

/* Two-column layout with a narrower first column, e.g. contact details + form */
.layout-sidebar {
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 900px) {
  .layout-sidebar {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(32px, 4vw, 56px);
  }

  .layout-sidebar.sidebar-right {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

/* Keeps a column in view while the other scrolls (desktop only) */
@media (min-width: 900px) {
  .is-sticky {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Full-width buttons on phones in heroes and bands */
@media (max-width: 639.98px) {
  .hero .btn-row .btn,
  .cta-band .btn-row .btn,
  .btn-row.stack-mobile .btn {
    width: 100%;
  }
}

.text-center .btn-row,
.btn-row.center {
  justify-content: center;
}

/* Spacing utilities (use sparingly) */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 40px; }
.mt-xl { margin-top: clamp(48px, 4vw + 24px, 72px); }

/* ==========================================================================
   6. Icons
   ========================================================================== */

/* Inline SVG icons: <svg class="icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"> */
.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-fill {
  fill: currentColor;
  stroke: none;
}

/* Tinted icon chip */
.icon-chip {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--tint-sky-bg);
  color: var(--royal);
}

.icon-chip .icon {
  width: 26px;
  height: 26px;
}

.icon-chip-sm {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

.icon-chip-sm .icon {
  width: 20px;
  height: 20px;
}

.tint-sky { background: var(--tint-sky-bg); color: var(--royal); }
.tint-blue { background: var(--tint-blue-bg); color: var(--blue); }
.tint-teal { background: var(--tint-teal-bg); color: var(--teal); }
.tint-green { background: var(--tint-green-bg); color: var(--success); }
.tint-gold { background: var(--tint-gold-bg); color: var(--gold); }
.tint-navy { background: var(--navy); color: var(--white); }

/* ==========================================================================
   7. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--t-fast) ease,
    border-color var(--t-fast) ease,
    color var(--t-fast) ease,
    box-shadow var(--t-fast) ease,
    transform var(--t-fast) ease;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--royal);
  color: var(--white);
  box-shadow: 0 1px 2px rgba(26, 42, 107, 0.18);
}

.btn-primary:hover {
  background: var(--royal-hover);
  color: var(--white);
  box-shadow: 0 10px 22px -8px rgba(48, 73, 182, 0.55);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: rgba(34, 52, 130, 0.25);
}

.btn-secondary:hover {
  background: var(--pale);
  color: var(--navy-deep);
  border-color: rgba(34, 52, 130, 0.4);
  box-shadow: var(--shadow-md);
}

/* On dark bands (hero, navy sections, CTA band) */
.btn-on-dark {
  background: var(--white);
  color: var(--navy);
}

.btn-on-dark:hover {
  background: var(--sky);
  color: var(--navy-deep);
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.45);
}

.btn-on-dark-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-on-dark-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: var(--white);
}

.btn-sm {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 0.9375rem;
}

.btn-lg {
  min-height: 54px;
  padding: 16px 26px;
  font-size: 1.0625rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   8. Header, navigation, dropdown
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  transition: box-shadow 200ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--line), 0 10px 28px -14px rgba(26, 42, 107, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
}

.brand img {
  width: auto;
  height: 48px;
}

@media (min-width: 900px) {
  .brand img {
    height: 60px;
  }
}

.primary-nav {
  display: none;
}

@media (min-width: 900px) {
  .primary-nav {
    display: block;
  }
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

@media (min-width: 1180px) {
  .nav-list {
    gap: 6px;
  }
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 0.96875rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}

.nav-link:hover {
  color: var(--royal);
  background: var(--pale);
}

.nav-link[aria-current="page"],
.nav-link.is-current {
  color: var(--royal);
}

.nav-link[aria-current="page"]::after,
.nav-link.is-current::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--royal);
}

.dropdown-toggle .icon {
  width: 16px;
  height: 16px;
  transition: transform var(--t-fast) ease;
}

.dropdown-toggle.is-current::after {
  right: 31px;
}

/* Dropdown panel */
.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 70;
  width: 300px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity var(--t-fast) ease, transform var(--t-fast) ease, visibility 0s linear var(--t-fast);
}

/* Invisible bridge so the menu stays open while the pointer travels down */
.dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity var(--t-fast) ease, transform var(--t-fast) ease, visibility 0s;
}

.has-dropdown:hover .dropdown-toggle .icon,
.has-dropdown:focus-within .dropdown-toggle .icon,
.has-dropdown.is-open .dropdown-toggle .icon {
  transform: rotate(180deg);
}

/* Escape closes the menu even while focus is inside it */
.has-dropdown.is-closed .dropdown {
  opacity: 0;
  visibility: hidden;
}

.has-dropdown.is-closed .dropdown-toggle .icon {
  transform: none;
}

.dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color var(--t-fast) ease;
}

.dropdown a:hover,
.dropdown a:focus-visible {
  background: var(--pale);
}

.dropdown a[aria-current="page"] {
  background: var(--pale);
}

.dropdown-title {
  display: block;
  font-weight: 650;
  color: var(--ink);
}

.dropdown a:hover .dropdown-title,
.dropdown a[aria-current="page"] .dropdown-title {
  color: var(--royal);
}

.dropdown-desc {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.4;
}

/* Right-hand header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-phone {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-weight: 650;
  font-size: 0.96875rem;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}

.header-phone .icon {
  width: 18px;
  height: 18px;
  color: var(--royal);
}

.header-phone:hover {
  color: var(--royal);
  background: var(--pale);
}

@media (min-width: 1180px) {
  .header-phone {
    display: inline-flex;
  }
}

.header-book {
  display: none;
}

@media (min-width: 640px) {
  .header-book {
    display: inline-flex;
  }
}

/* Hamburger */
.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-right: -6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--navy);
}

.menu-toggle:hover {
  background: var(--pale);
}

.menu-toggle .icon {
  width: 26px;
  height: 26px;
}

.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: inline-block;
}

@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile overlay menu */
.mobile-menu {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 16px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--white);
  border-top: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 200ms var(--ease), visibility 0s linear 200ms;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 200ms ease, transform 200ms var(--ease), visibility 0s;
}

@media (min-width: 900px) {
  .mobile-menu {
    display: none;
  }
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav > ul > li {
  border-bottom: 1px solid var(--line);
}

.mobile-nav a,
.mobile-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  font-size: 1.1875rem;
  font-weight: 620;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.mobile-nav a[aria-current="page"] {
  color: var(--royal);
}

.mobile-sub-toggle .icon {
  width: 22px;
  height: 22px;
  color: var(--muted);
  transition: transform var(--t-fast) ease;
}

.mobile-sub-toggle[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

.mobile-sub {
  display: none;
  padding: 0 0 12px 12px;
}

.mobile-sub-toggle[aria-expanded="true"] + .mobile-sub {
  display: block;
}

.mobile-sub a {
  min-height: 48px;
  font-size: 1.0625rem;
  font-weight: 550;
  color: var(--text);
}

.mobile-menu-actions {
  display: grid;
  gap: 12px;
}

.mobile-menu-note {
  font-size: var(--fs-small);
  color: var(--muted);
}

/* Mobile sticky call / book bar */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -12px rgba(26, 42, 107, 0.2);
}

.mobile-bar .btn {
  min-height: 50px;
  padding: 12px 14px;
}

body.menu-open .mobile-bar {
  display: none;
}

@media (min-width: 900px) {
  .mobile-bar {
    display: none;
  }
}

/* ==========================================================================
   9. Sections
   ========================================================================== */

.section {
  padding-block: var(--section-y);
}

.section-sm {
  padding-block: clamp(40px, 2vw + 32px, 64px);
}

.section-flush-top {
  padding-top: 0;
}

.section-white {
  background: var(--white);
}

.section-pale {
  background: var(--pale);
}

.section-paper {
  background: var(--paper);
}

.section-navy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--gradient-brand);
  color: rgba(255, 255, 255, 0.88);
}

.section-navy h2,
.section-navy h3,
.section-navy h4 {
  color: var(--white);
}

.section-navy .eyebrow {
  color: var(--sky);
}

.section-navy .lead,
.section-navy .text-muted {
  color: rgba(255, 255, 255, 0.8);
}

.section-navy a:not(.btn) {
  color: var(--white);
}

/* Section heading block */
.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 2vw + 20px, 52px);
}

.section-head > * + * {
  margin-top: 14px;
}

.section-head .eyebrow + h2,
.section-head .eyebrow + h1 {
  margin-top: 0;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

/* Heading on the left, link or button on the right */
.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(32px, 2vw + 20px, 52px);
}

.section-head-row .section-head {
  margin-bottom: 0;
}

/* ==========================================================================
   10. Hero (home)
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 86vh, 780px);
  padding-block: 72px 80px;
  overflow: hidden;
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.9);
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  z-index: -2;
}

.hero-media img {
  object-fit: cover;
  object-position: 65% 50%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(26, 42, 107, 0.78) 0%, rgba(26, 42, 107, 0.86) 60%, rgba(26, 42, 107, 0.94) 100%);
}

@media (min-width: 900px) {
  .hero::before {
    background:
      linear-gradient(98deg, rgba(26, 42, 107, 0.95) 0%, rgba(34, 52, 130, 0.88) 36%, rgba(34, 52, 130, 0.55) 60%, rgba(32, 116, 180, 0.12) 100%),
      linear-gradient(0deg, rgba(26, 42, 107, 0.35), rgba(26, 42, 107, 0) 40%);
  }
}

.hero-content {
  max-width: 640px;
}

.hero-label {
  display: block;
  margin-bottom: 18px;
  font-size: var(--fs-small);
  font-weight: 650;
  color: var(--sky);
}

.hero h1 {
  font-size: var(--fs-display);
  line-height: 1.06;
  color: var(--white);
}

.hero-lead {
  margin-top: 22px;
  max-width: 560px;
  font-size: var(--fs-lead);
  color: rgba(255, 255, 255, 0.88);
}

.hero .btn-row {
  margin-top: 32px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 32px;
  font-size: var(--fs-small);
  font-weight: 550;
  color: rgba(255, 255, 255, 0.86);
}

.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-trust .icon {
  width: 18px;
  height: 18px;
  color: var(--sky);
}

/* ==========================================================================
   11. Page header (inner pages)
   ========================================================================== */

.page-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(36px, 3vw + 24px, 72px) clamp(40px, 3vw + 28px, 80px);
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(219, 230, 248, 0.95) 0%, rgba(219, 230, 248, 0) 60%),
    var(--pale);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  max-width: 820px;
}

.page-head-lead {
  max-width: 680px;
  margin-top: 16px;
  font-size: var(--fs-lead);
  color: var(--muted);
}

.page-head .btn-row {
  margin-top: 28px;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 20px;
  font-size: var(--fs-xs);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 8px;
  background: currentColor;
  opacity: 0.6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-weight: 550;
  color: var(--royal);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  font-weight: 550;
  color: var(--text);
}

/* ==========================================================================
   12. Cards, tiles and service cards
   ========================================================================== */

.card {
  position: relative;
  padding: clamp(24px, 1.5vw + 16px, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.card > * + * {
  margin-top: 12px;
}

.card-flat {
  box-shadow: none;
}

.card-pale {
  background: var(--pale);
  border-color: transparent;
  box-shadow: none;
}

/* Lift on hover, for cards that are links or contain a stretched link */
.card-hover,
.service-card,
.tile-link {
  transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease, border-color var(--t-fast) ease;
}

.card-hover:hover,
.service-card:hover,
.tile-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(48, 73, 182, 0.25);
}

/* Makes a whole card clickable from one real link inside it */
.stretched-link {
  text-decoration: none;
  color: inherit;
}

.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.stretched-link:hover {
  color: var(--royal);
}

.card:has(.stretched-link:focus-visible),
.service-card:has(.stretched-link:focus-visible),
.tile:has(.stretched-link:focus-visible) {
  outline: 3px solid var(--royal);
  outline-offset: 3px;
}

.stretched-link:focus-visible {
  outline: none;
}

/* Feature tile with tinted icon chip */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: clamp(24px, 1.5vw + 16px, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.tile .icon-chip {
  margin-bottom: 6px;
}

.tile p {
  color: var(--muted);
}

.tile .link-arrow {
  margin-top: auto;
  padding-top: 4px;
}

/* Plain variant without border, for use on pale sections */
.tile-plain {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

/* Service card with photo */
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.service-card-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--sky);
}

.service-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.service-card:hover .service-card-media img {
  transform: scale(1.04);
}

.service-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 22px 24px 24px;
}

.service-card-body p {
  color: var(--muted);
}

.service-card-body .link-arrow {
  margin-top: auto;
  padding-top: 6px;
}

/* ==========================================================================
   13. Checklist
   ========================================================================== */

.checklist {
  display: grid;
  gap: 12px 28px;
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  padding: 0;
}

@media (min-width: 640px) {
  .checklist.cols-2,
  .checklist.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .checklist.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.checklist li {
  position: relative;
  padding-left: 36px;
  line-height: 1.5;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--sky);
}

.checklist li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 14px;
  height: 14px;
  background: var(--royal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Each item as a small white tile, good for long condition lists */
.checklist.boxed {
  gap: 12px;
}

.checklist.boxed li {
  padding: 14px 16px 14px 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-xs);
  font-weight: 550;
  color: var(--ink);
}

.checklist.boxed li::before {
  left: 16px;
  top: 14px;
}

.checklist.boxed li::after {
  left: 21px;
  top: 19px;
}

.checklist.on-dark li::before,
.section-navy .checklist li::before {
  background: rgba(255, 255, 255, 0.14);
}

.checklist.on-dark li::after,
.section-navy .checklist li::after {
  background: var(--white);
}

/* ==========================================================================
   14. Process steps
   ========================================================================== */

.steps {
  display: grid;
  gap: 32px var(--gap);
  grid-template-columns: minmax(0, 1fr);
  counter-reset: step;
  list-style: none;
  padding: 0;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr));
  }

  .steps.steps-3 {
    --steps: 3;
  }

  .steps.steps-5 {
    --steps: 5;
  }
}

.step {
  position: relative;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border: 2px solid var(--sky);
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--royal);
}

/* Connector line between numbers on wide screens */
@media (min-width: 900px) {
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 26px;
    left: 64px;
    right: calc(var(--gap) * -1 + 12px);
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--sky), rgba(219, 230, 248, 0.4));
  }
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: var(--muted);
}

.section-pale .step::before {
  border-color: var(--white);
}

/* ==========================================================================
   15. Split media sections (image left or right)
   ========================================================================== */

.split {
  display: grid;
  gap: clamp(28px, 3vw + 12px, 64px);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split.split-reverse .split-media {
    order: 2;
  }

  .split.split-wide-media {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .split.split-wide-media.split-reverse {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .split.align-start {
    align-items: start;
  }
}

.split-media {
  position: relative;
}

.split-media picture,
.split-media img {
  width: 100%;
}

.split-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.split-media.portrait img {
  aspect-ratio: 4 / 5;
}

.split-media.landscape img {
  aspect-ratio: 3 / 2;
}

/* Soft tinted shape behind the image */
.split-media.framed::before {
  content: "";
  position: absolute;
  inset: 24px -16px -16px 24px;
  z-index: -1;
  border-radius: 24px;
  background: var(--sky);
}

.split-reverse .split-media.framed::before {
  inset: 24px 24px -16px -16px;
}

.section-pale .split-media.framed::before {
  background: var(--white);
}

.split-body > * + * {
  margin-top: 16px;
}

.split-body .eyebrow + h2 {
  margin-top: 0;
}

.split-body .btn-row,
.split-body .checklist {
  margin-top: 24px;
}

/* ==========================================================================
   16. Photo grid
   ========================================================================== */

.photo-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-grid picture,
.photo-grid img {
  width: 100%;
  height: 100%;
}

.photo-grid img {
  object-fit: cover;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}

/* Feature layout: first photo large, others stacked beside it */
.photo-grid .is-large {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .photo-grid {
    gap: 16px;
  }

  .photo-grid.feature {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, auto);
  }

  .photo-grid.feature .is-large {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .photo-grid.feature .is-large,
  .photo-grid.cols-3 .is-large {
    position: relative;
    min-height: 220px;
  }

  .photo-grid.feature .is-large img,
  .photo-grid.cols-3 .is-large img {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  .photo-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .photo-grid.cols-3 .is-large {
    grid-column: span 2;
    grid-row: span 2;
  }

}

@media (min-width: 900px) {
  .photo-grid {
    gap: 20px;
  }

  .photo-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.photo-grid figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* With a caption, the picture keeps its own aspect ratio instead of filling the figure */
.photo-grid figure picture,
.photo-grid figure img {
  height: auto;
}

.photo-grid figcaption {
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* Full-width wide photo band (e.g. physio-stretch-wide, running-group) */
.media-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.media-band img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

@media (min-width: 900px) {
  .media-band img {
    aspect-ratio: 21 / 7;
  }
}

/* ==========================================================================
   17. Testimonials, quotes, stars, awards
   ========================================================================== */

.stars {
  display: inline-block;
  width: 100px;
  height: 18px;
  background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath d='M10 0.8l2.6 5.3 5.8.8-4.2 4.1 1 5.8L10 14.1l-5.2 2.7 1-5.8-4.2-4.1 5.8-.8z'/%3E%3C/svg%3E") 0 0 / 20px 18px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath d='M10 0.8l2.6 5.3 5.8.8-4.2 4.1 1 5.8L10 14.1l-5.2 2.7 1-5.8-4.2-4.1 5.8-.8z'/%3E%3C/svg%3E") 0 0 / 20px 18px repeat-x;
}

.testimonial {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  margin: 0;
  padding: clamp(24px, 1.5vw + 16px, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.testimonial blockquote {
  margin: 0;
  color: var(--text);
}

.testimonial blockquote p + p {
  margin-top: 0.75em;
}

.testimonial figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.testimonial-name {
  display: block;
  font-weight: 650;
  color: var(--ink);
}

.testimonial-context {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* Initials avatar (no stock faces) */
.avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}

.avatar-lg {
  width: 100%;
  height: 100%;
  border-radius: 0;
  font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  letter-spacing: 0.04em;
  background:
    radial-gradient(80% 80% at 30% 20%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 70%),
    var(--sky);
}

/* Large feature quote, e.g. Paul Nixon */
.quote-feature {
  position: relative;
  margin: 0;
}

.split-body .quote-feature {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.section-navy .split-body .quote-feature {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.quote-feature .quote-mark {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--sky);
}

.quote-feature blockquote {
  margin: 0;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.quote-feature figcaption {
  margin-top: 18px;
  font-size: var(--fs-small);
  color: var(--muted);
}

.quote-feature figcaption strong {
  display: block;
  font-size: 1rem;
  color: var(--ink);
}

.section-navy .quote-feature .quote-mark {
  color: rgba(255, 255, 255, 0.35);
}

.section-navy .quote-feature blockquote {
  color: var(--white);
}

.section-navy .quote-feature figcaption {
  color: rgba(255, 255, 255, 0.75);
}

.section-navy .quote-feature figcaption strong {
  color: var(--white);
}

/* Award items */
.award-list {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  padding: 0;
}

@media (min-width: 900px) {
  .award-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.award {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.award .icon-chip {
  flex-shrink: 0;
}

.award-win {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 650;
  color: var(--muted);
}

.award-title {
  display: block;
  font-weight: 650;
  line-height: 1.35;
  color: var(--ink);
}

.award-source {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* Simple carousel (scroll snap + prev/next). No autoplay. */
.carousel {
  position: relative;
}

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 88%);
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 2px 12px;
  list-style: none;
  margin: 0;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track > * {
  scroll-snap-align: start;
}

@media (min-width: 640px) {
  .carousel-track {
    grid-auto-columns: calc((100% - var(--gap)) / 2);
  }
}

@media (min-width: 1180px) {
  .carousel-track {
    grid-auto-columns: calc((100% - var(--gap) * 2) / 3);
  }
}

.carousel-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.carousel-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(34, 52, 130, 0.25);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  transition: background-color var(--t-fast) ease, transform var(--t-fast) ease;
}

.carousel-btn:hover:not([disabled]) {
  background: var(--pale);
  transform: translateY(-2px);
}

.carousel-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

.carousel-btn .icon {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   18. Logo row and chips
   ========================================================================== */

.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 40px;
  list-style: none;
  padding: 0;
}

.logo-row img {
  width: auto;
  height: 56px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter var(--t-fast) ease, opacity var(--t-fast) ease;
}

.logo-row li:hover img {
  filter: none;
  opacity: 1;
}

.logo-row.start {
  justify-content: flex-start;
}

/* Logos inside small white tiles: works on any background */
.logo-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
}

@media (min-width: 640px) {
  .logo-tiles {
    grid-template-columns: repeat(var(--tiles, 4), minmax(0, 1fr));
  }
}

.logo-tile {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-xs);
  text-align: center;
}

.logo-tile img {
  width: auto;
  max-width: 100%;
  height: 64px;
  object-fit: contain;
}

.logo-tile-text {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--navy);
}

.logo-tile-text small {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

/* Chip row, e.g. insurers */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.chip-row.center {
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-xs);
  font-size: var(--fs-small);
  font-weight: 620;
  color: var(--navy);
}

.chip::before {
  content: "";
  width: 16px;
  height: 16px;
  background: var(--blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Chip without the shield icon, e.g. qualifications */
.chip.plain::before {
  display: none;
}

.chip.small {
  min-height: 34px;
  padding: 6px 12px;
  font-size: var(--fs-xs);
  box-shadow: none;
  background: var(--pale);
  border-color: transparent;
}

/* ==========================================================================
   19. CTA band
   ========================================================================== */

.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(36px, 4vw + 16px, 72px) clamp(24px, 4vw + 8px, 72px);
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-lg);
}

.cta-band-media,
.cta-band-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cta-band-media {
  z-index: -2;
}

.cta-band-media img {
  object-fit: cover;
  opacity: 0.12;
  mix-blend-mode: luminosity;
}

.cta-band::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -120px;
  top: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 116, 180, 0.55), rgba(32, 116, 180, 0) 70%);
}

.cta-band-content {
  max-width: 680px;
}

.cta-band h2 {
  color: var(--white);
}

.cta-band p {
  margin-top: 14px;
  font-size: var(--fs-lead);
  color: rgba(255, 255, 255, 0.86);
}

.cta-band .btn-row {
  margin-top: 28px;
}

@media (min-width: 900px) {
  .cta-band.cta-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }

  .cta-band.cta-inline .btn-row {
    margin-top: 0;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   20. Prices
   ========================================================================== */

.price-group {
  padding: clamp(22px, 1.5vw + 14px, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.price-group-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.price-group-title {
  font-size: var(--fs-h3);
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.price-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name amount"
    "duration amount";
  gap: 2px 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.price-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.price-name {
  grid-area: name;
  font-weight: 620;
  color: var(--ink);
  line-height: 1.4;
}

.price-note {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--muted);
}

.price-duration {
  grid-area: duration;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-small);
  color: var(--muted);
}

.price-duration::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.price-amount {
  grid-area: amount;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-align: right;
}

@media (min-width: 640px) {
  .price-item {
    grid-template-columns: minmax(0, 1fr) 150px 90px;
    grid-template-areas: "name duration amount";
  }
}

.price-footnote {
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--muted);
}

/* ==========================================================================
   21. Info list, notice, timeline, accordion, team card
   ========================================================================== */

/* Icon + text rows, e.g. contact details, facilities */
.info-list {
  display: grid;
  gap: 20px;
  list-style: none;
  padding: 0;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.info-title {
  display: block;
  margin-bottom: 2px;
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
}

.info-list p,
.info-list address {
  color: var(--text);
}

.info-list a {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Callout */
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid rgba(48, 73, 182, 0.18);
  border-radius: var(--radius);
  background: var(--pale);
  color: var(--text);
}

.notice .icon {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--royal);
}

/* Timeline (dated experience) */
/* ol.timeline (not .timeline) so the left gutter beats the ul[class], ol[class] reset */
ol.timeline,
ul.timeline {
  position: relative;
  display: grid;
  gap: 24px;
  list-style: none;
  padding: 0 0 0 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: var(--sky);
}

.timeline li {
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 5px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--royal);
  box-shadow: 0 0 0 2px var(--sky);
}

.timeline-date {
  display: block;
  font-size: var(--fs-small);
  font-weight: 650;
  color: var(--royal);
}

.timeline h3 {
  margin-top: 2px;
  font-size: 1.125rem;
}

.timeline p {
  margin-top: 4px;
  color: var(--muted);
}

/* Accordion using native details/summary */
.accordion {
  display: grid;
  gap: 12px;
}

.accordion details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-xs);
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  font-weight: 650;
  color: var(--ink);
  list-style: none;
  cursor: pointer;
  border-radius: var(--radius);
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--royal);
  transition: transform var(--t-fast) ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.accordion details[open] summary::after {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 20px 20px;
}

.accordion-body > * + * {
  margin-top: 12px;
}

/* Team card */
.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.team-card-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--sky);
}

.team-card-media picture,
.team-card-media img {
  width: 100%;
  height: 100%;
}

.team-card-media img {
  object-fit: cover;
}

.team-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 22px 24px 26px;
}

.team-role {
  font-size: var(--fs-small);
  font-weight: 650;
  color: var(--royal);
}

.team-card-body h3 + .team-role {
  margin-top: -6px;
}

.team-card-body p {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
}

.tag-list li {
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--pale);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--navy);
}

/* ==========================================================================
   22. Forms
   ========================================================================== */

.form {
  display: grid;
  gap: 20px;
}

.form-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .form-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid .span-2 {
    grid-column: 1 / -1;
  }
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.field-label {
  font-size: var(--fs-small);
  font-weight: 650;
  color: var(--ink);
}

.field .req {
  color: var(--danger);
  margin-left: 2px;
}

.field .optional {
  font-weight: 450;
  color: var(--muted);
}

.field-hint {
  margin-top: -2px;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.input,
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #c9d1e1;
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(26, 42, 107, 0.04);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
  appearance: none;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field select {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f6fd1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #a9b4cc;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 4px rgba(48, 73, 182, 0.18);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--royal);
  outline-offset: 1px;
}

.field ::placeholder {
  color: #8a91a0;
}

/* Error state */
.field.is-invalid input:not([type="checkbox"]):not([type="radio"]),
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--danger);
  background-color: var(--danger-bg);
}

.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--danger);
}

.field-error[hidden] {
  display: none;
}

/* Checkbox with label */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--text);
}

.checkbox input {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--royal);
  cursor: pointer;
}

.checkbox label {
  font-weight: 450;
  color: var(--text);
  cursor: pointer;
}

.field.is-invalid .checkbox input {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

/* Honeypot: hidden from people, visible to naive bots */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Form status message */
.form-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  font-weight: 550;
}

.form-status[hidden] {
  display: none;
}

.form-status .icon {
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.form-status.is-success {
  border: 1px solid rgba(31, 138, 91, 0.3);
  background: var(--success-bg);
  color: #17643f;
}

.form-status.is-error {
  border: 1px solid rgba(180, 35, 24, 0.3);
  background: var(--danger-bg);
  color: var(--danger);
}

.form-footnote {
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* Spinner inside the submit button while sending */
.btn .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn.is-loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Map embed */
.map-embed {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sky);
  box-shadow: var(--shadow-sm);
}

.map-embed iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 16px;
}

/* ==========================================================================
   23. Footer
   ========================================================================== */

.site-footer {
  position: relative;
  padding-top: clamp(48px, 4vw + 24px, 80px);
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-small);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: 40px 32px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.9fr);
    gap: 48px;
  }
}

.footer-logo-link {
  display: inline-block;
  border-radius: var(--radius-xs);
}

.footer-logo {
  width: auto;
  height: 72px;
}

.footer-brand p {
  max-width: 340px;
  margin-top: 18px;
  line-height: 1.6;
}

.footer-heading {
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--white);
}

.footer-links {
  display: grid;
  gap: 4px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.footer-contact {
  display: grid;
  gap: 14px;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.footer-contact .icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--sky);
}

.footer-contact a {
  overflow-wrap: anywhere;
}

.footer-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
  color: var(--white);
}

.footer-note .icon {
  width: 18px;
  height: 18px;
  color: var(--sky);
}

.social-links {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.social-links a {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  color: var(--white);
  transition: background-color var(--t-fast) ease, transform var(--t-fast) ease;
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.social-links .icon {
  width: 20px;
  height: 20px;
}

/* Registrations: small greyscale logos on soft white tiles */
.footer-registrations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: clamp(40px, 3vw + 24px, 56px);
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-registrations p {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-logos li {
  display: grid;
  place-items: center;
  height: 52px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0.7;
  transition: opacity var(--t-fast) ease;
}

.footer-logos li:hover {
  opacity: 1;
}

.footer-logos img {
  width: auto;
  height: 38px;
  filter: grayscale(1);
  transition: filter var(--t-fast) ease;
}

.footer-logos li:hover img {
  filter: none;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 28px;
  padding-block: 22px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.72);
}

.footer-bottom ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

/* ==========================================================================
   24. Error page
   ========================================================================== */

.error-page {
  display: grid;
  place-items: center;
  min-height: 42vh;
  text-align: center;
}

.error-code {
  display: block;
  font-size: clamp(4rem, 3rem + 6vw, 7.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--royal);
  opacity: 0.9;
}

.error-page h1 {
  margin-top: 8px;
}

.error-page p {
  max-width: 520px;
  margin: 16px auto 0;
  color: var(--muted);
}

.error-page .btn-row {
  justify-content: center;
  margin-top: 28px;
}

/* ==========================================================================
   25. Reveal on scroll
   Only hides content when scripting is on and the user is happy with motion.
   main.js adds .is-visible as elements enter the viewport.
   ========================================================================== */

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
    transition-delay: calc(var(--reveal-delay, 0) * 90ms);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .delay-1 { --reveal-delay: 1; }
  .delay-2 { --reveal-delay: 2; }
  .delay-3 { --reveal-delay: 3; }
  .delay-4 { --reveal-delay: 4; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .card-hover:hover,
  .service-card:hover,
  .tile-link:hover,
  .carousel-btn:hover,
  .social-links a:hover {
    transform: none;
  }

  .service-card:hover .service-card-media img {
    transform: none;
  }
}

/* ==========================================================================
   26. Print
   ========================================================================== */

@media print {
  .site-header,
  .mobile-bar,
  .mobile-menu,
  .cta-band,
  .site-footer .social-links {
    display: none !important;
  }

  body {
    padding-bottom: 0;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
