/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Besley";
  src: url("/fonts/besley-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Besley";
  src: url("/fonts/besley-latin-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Cabin";
  src: url("/fonts/cabin-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cabin";
  src: url("/fonts/cabin-latin-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --film: #0e2a3b;        /* radiograph film blue: dark panels, headings */
  --film-lift: #17405a;   /* lightbox glow behind the plate */
  --backdrop: #c7c7c8;    /* the studio backdrop of the portrait */
  --paper: #f5f6f5;       /* page */
  --bone: #dfe4e4;        /* rules and quiet fills */
  --line: #a9cbda;        /* linework on film */
  --iodine: #dd8c1f;      /* surgical-prep amber: actions and keys */
  --iodine-ink: #86490a;  /* amber dark enough for text on paper */
  --ink: #1a2e3a;
  --ink-soft: #485a65;

  --serif: "Besley", "Rockwell", "Georgia", serif;
  --sans: "Cabin", "Gill Sans", "Gill Sans MT", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --band: clamp(56px, 8vw, 104px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--film); margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-color: var(--iodine); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 3px; }
address { font-style: normal; }
cite { font-style: italic; }
:focus-visible { outline: 3px solid var(--iodine); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

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

.btn {
  display: inline-block;
  background: var(--iodine);
  color: var(--film);
  font-weight: 700;
  text-decoration: none;
  padding: 0.8em 1.35em;
  border-radius: 999px;
  line-height: 1.2;
  transition: background-color 0.15s ease, translate 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}
.btn:hover { background: #eea030; translate: 0 -2px; box-shadow: 0 12px 22px -12px rgba(190, 110, 10, 0.9); }
.btn:active { translate: 0 0; box-shadow: none; }
.btn--small { font-size: 0.95rem; padding: 0.62em 1.1em; white-space: nowrap; }
.textlink { font-weight: 600; }
.note { font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Social links ---------- */
.socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 14px;
  border: 1.5px solid currentColor; border-radius: 999px;
  color: inherit; font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, translate 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}
.social svg { width: 20px; height: 20px; flex: none; }
.social--icon { width: 44px; padding: 0; justify-content: center; }
.social:hover { background: var(--iodine); border-color: var(--iodine); color: var(--film); translate: 0 -2px; box-shadow: 0 12px 22px -12px rgba(190, 110, 10, 0.9); }
.social:active { translate: 0 0; box-shadow: none; }
.socials--society { margin: 4px 0 18px; color: var(--film); }
.footer .socials { margin-top: 14px; color: var(--film); }
.masthead__social { width: 40px; height: 40px; color: var(--film); border-color: var(--bone); margin-right: -6px; }
.masthead__social svg { width: 18px; height: 18px; }

/* ---------- Masthead and navigation ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bone);
  transition: box-shadow 0.3s ease;
}
.masthead.is-scrolled { box-shadow: 0 14px 30px -24px rgba(14, 42, 59, 0.6); }
.masthead__row { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.masthead__name { text-decoration: none; display: grid; line-height: 1.15; margin-right: auto; }
.masthead__name strong { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--film); white-space: nowrap; }
.masthead__name span { font-size: 0.82rem; color: var(--ink-soft); white-space: nowrap; }
.masthead__progress { position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--iodine); transform-origin: 0 50%; scale: var(--progress, 0) 1; }

/* the row of sections; a soft pill slides to whichever one you are reading or pointing at */
.masthead__nav { position: relative; display: flex; align-items: center; gap: 2px; font-size: 0.97rem; }
.masthead__nav > a, .masthead__group > a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: color 0.2s ease;
}
.masthead__nav > a:hover, .masthead__group > a:hover, .masthead__nav a[aria-current] { color: var(--film); }
.masthead__nav > a[aria-current]::after, .masthead__group > a[aria-current]::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 16px; height: 2px; translate: -50% 0; border-radius: 2px; background: var(--iodine);
}
.masthead__pill {
  position: absolute; left: 0; top: 50%; height: 36px; width: var(--pill-w, 0px);
  translate: var(--pill-x, 0px) -50%; border-radius: 999px; background: rgba(14, 42, 59, 0.09);
  opacity: var(--pill-o, 0); pointer-events: none;
  transition: translate 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}
.masthead__group { position: relative; }
.masthead__group > a svg { width: 11px; height: 11px; transition: rotate 0.25s ease; }
.masthead__group:hover > a svg, .masthead__group:focus-within > a svg { rotate: 180deg; }
.masthead__group::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; }
.masthead__sub {
  position: absolute; z-index: 2; left: 50%; top: calc(100% + 12px); translate: -50% 8px;
  min-width: 250px; margin: 0; padding: 8px; list-style: none;
  background: #fff; border-radius: 16px;
  box-shadow: 0 28px 50px -26px rgba(14, 42, 59, 0.55), 0 0 0 1px var(--bone);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, translate 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.25s;
}
.masthead__group:hover .masthead__sub, .masthead__group:focus-within .masthead__sub { opacity: 1; visibility: visible; translate: -50% 0; transition-delay: 0s; }
.masthead__sub a { display: block; padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.masthead__sub a:hover, .masthead__sub a[aria-current] { background: rgba(14, 42, 59, 0.07); color: var(--film); }
.masthead__book-short { display: none; }

/* the menu for narrower screens: a list of every section */
.menu { display: none; }
.menu__toggle {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 12px; margin-right: -6px;
  list-style: none; cursor: pointer; border-radius: 999px; font-weight: 600; color: var(--film); user-select: none;
}
.menu__toggle::-webkit-details-marker { display: none; }
.menu__icon { position: relative; width: 26px; height: 26px; }
.menu__icon i { position: absolute; left: 3px; right: 3px; height: 2px; border-radius: 2px; background: currentColor; transition: top 0.25s ease, rotate 0.25s ease; }
.menu__icon i:first-child { top: 9px; }
.menu__icon i:last-child { top: 16px; }
.menu[open] .menu__icon i { top: 12px; }
.menu[open] .menu__icon i:first-child { rotate: 45deg; }
.menu[open] .menu__icon i:last-child { rotate: -45deg; }
.menu__scrim { position: absolute; left: 0; right: 0; top: 100%; height: 100vh; height: 100dvh; background: rgba(8, 24, 34, 0.55); }
.menu__panel {
  position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100vh - 68px); max-height: calc(100dvh - 68px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--film); color: #dbe7ec; padding: 10px 0 26px; border-radius: 0 0 22px 22px;
  box-shadow: 0 40px 60px -30px rgba(8, 24, 34, 0.8);
}
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list a {
  display: flex; align-items: center; gap: 14px; padding: 13px 0; text-decoration: none;
  font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.25; color: #fff;
  border-bottom: 1px solid rgba(169, 203, 218, 0.2);
}
.menu__list a::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 2px solid rgba(169, 203, 218, 0.55); }
.menu__list a[aria-current] { color: var(--iodine); }
.menu__list a[aria-current]::before { background: var(--iodine); border-color: var(--iodine); }
.menu__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; color: #fff; }
.menu__phone { display: grid; text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.5rem; color: var(--iodine); line-height: 1.2; }
.menu__phone span { font-family: var(--sans); font-weight: 400; font-size: 0.9rem; color: #a9bfca; }
.menu :focus-visible { outline-color: #fff; }
.menu__toggle:focus-visible { outline-color: var(--iodine); }
.menu-open body { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu__panel { animation: unroll 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .menu[open] .menu__scrim { animation: fade 0.3s ease both; }
  .menu[open] .menu__list li, .menu[open] .menu__foot { animation: lift 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--n, 0) * 38ms + 90ms); }
  .menu.is-closing .menu__panel { animation: unroll 0.22s ease reverse both; }
  .menu.is-closing .menu__scrim { animation: fade 0.22s ease reverse both; }
  .menu.is-closing .menu__list li, .menu.is-closing .menu__foot { animation: none; }
}
@keyframes unroll { from { clip-path: inset(0 0 100% 0); opacity: 0.6; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--backdrop);
  overflow: hidden;
  isolation: isolate;
  perspective: 1400px;
}
/* a slow band of studio light crossing the backdrop */
.hero__light {
  position: absolute; inset: -10% -40%; z-index: 0; pointer-events: none;
  background: linear-gradient(102deg, transparent 38%, rgba(255, 255, 255, 0.5) 50%, transparent 62%);
  mix-blend-mode: soft-light;
}
.hero__grid { position: relative; z-index: 2; display: grid; min-height: clamp(520px, 74vh, 720px); align-items: center; pointer-events: none; }
.hero__text {
  max-width: 42%; padding-block: 64px; pointer-events: auto;
  transform: translate3d(calc(var(--mx, 0) * 7px), calc(var(--my, 0) * 5px + var(--sy, 0) * -0.08px), 0);
}
.hero h1 { font-size: clamp(2.7rem, 5.4vw, 4.5rem); line-height: 1.02; letter-spacing: -0.022em; font-weight: 600; }
.hero h1 .line { display: block; width: max-content; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero h1 .line > span { display: block; white-space: nowrap; }
.hero__role { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 500; color: var(--film); margin: 22px 0 2px; }
.hero__quals { color: var(--ink); font-size: 1.02rem; margin: 0 0 26px; }
.hero__lede { font-size: 1.18rem; line-height: 1.5; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }

.hero__stage { position: absolute; inset: 0 0 0 auto; width: min(58%, 1040px); z-index: 1; transform-style: preserve-3d; }
.hero__portrait {
  position: absolute; inset: 0; display: block;
  transform: translate3d(calc(var(--mx, 0) * -14px), calc(var(--my, 0) * -8px + var(--sy, 0) * 0.13px), 0) scale(1.04);
  transform-origin: 50% 100%;
}
.hero__portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%);
  mask-image: linear-gradient(to right, transparent 0, #000 30%);
}

.hero__depth {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  opacity: 0; transition: opacity 1.2s ease;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%);
  mask-image: linear-gradient(to right, transparent 0, #000 30%);
}
.hero__depth.is-on { opacity: 1; }

/* credentials that float in front of the portrait */
.chip {
  position: absolute; z-index: 3; margin: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 14px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  box-shadow: 0 24px 40px -22px rgba(14, 42, 59, 0.55), 0 2px 6px rgba(14, 42, 59, 0.08);
  color: var(--film); text-decoration: none; line-height: 1.25;
  transform: translate3d(calc(var(--mx, 0) * 24px), calc(var(--my, 0) * 16px + var(--sy, 0) * -0.1px), 0) rotateX(calc(var(--my, 0) * -7deg)) rotateY(calc(var(--mx, 0) * 9deg));
}
.chip--rating { left: 4%; bottom: 13%; }
.chip--office { right: max(5%, calc((100vw - 1240px) / 2 + 12px)); bottom: 27%; padding-left: 18px; border-left: 4px solid var(--iodine); border-radius: 6px 16px 16px 6px; }
.chip__figure { font-family: var(--serif); font-weight: 600; font-size: 2rem; line-height: 1; }
.chip__text { display: grid; font-size: 0.9rem; }
.chip__text strong { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.chip__stars { color: var(--iodine); letter-spacing: 2px; font-size: 0.95rem; }
a.chip:hover { background: rgba(255, 255, 255, 0.88); }

@media (prefers-reduced-motion: no-preference) {
  .hero__light { animation: sweep 12s ease-in-out infinite alternate; }
  .js .hero h1 .line > span { animation: rise 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .js .hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }
  .js .hero__role, .js .hero__quals, .js .hero__lede, .js .hero__actions { animation: lift 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .js .hero__role { animation-delay: 0.38s; }
  .js .hero__quals { animation-delay: 0.46s; }
  .js .hero__lede { animation-delay: 0.56s; }
  .js .hero__actions { animation-delay: 0.68s; }
  .js .hero__portrait img { animation: develop 1.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .js .chip { animation: pop 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.2) both, bob 7s ease-in-out 2s infinite; }
  .js .chip--rating { animation-delay: 1s, 2s; }
  .js .chip--office { animation-delay: 1.2s, 3.4s; }
}
@keyframes sweep { from { translate: -22% 0; } to { translate: 22% 0; } }
@keyframes rise { from { translate: 0 108%; } to { translate: 0 0; } }
@keyframes lift { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes develop { from { opacity: 0; scale: 1.08; filter: blur(8px); } to { opacity: 1; scale: 1; filter: blur(0); } }
@keyframes pop { from { opacity: 0; scale: 0.8; } to { opacity: 1; scale: 1; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }

/* ---------- At a glance ---------- */
.stats { border-bottom: 1px solid var(--bone); padding-bottom: 22px; }
.stats__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.stats__list > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 34px 24px 22px 0; }
.stats__list > div + div { border-left: 1px solid var(--bone); padding-left: 28px; }
.stats dd { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(2.5rem, 4.8vw, 3.9rem); line-height: 1; letter-spacing: -0.02em; color: var(--film); font-variant-numeric: tabular-nums; }
.stats__unit { color: var(--iodine); margin-left: 2px; }
.stats dt { color: var(--ink-soft); font-size: 1rem; line-height: 1.35; margin-top: 10px; max-width: 13rem; }
.stats__note { font-size: 0.92rem; color: var(--ink-soft); margin: 0; padding-top: 16px; border-top: 1px solid var(--bone); }

/* ---------- Bands and the side-headed layout ---------- */
.band { padding-block: var(--band); }
.band + .band { border-top: 1px solid var(--bone); }
.band--flush { border-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.split__head { font-size: clamp(1.75rem, 3vw, 2.3rem); line-height: 1.1; letter-spacing: -0.01em; position: sticky; top: 104px; }
.split__body { min-width: 0; }
.prose { max-width: 41rem; }
.prose > :last-child { margin-bottom: 0; }
.lead { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.38; color: var(--film); font-weight: 450; margin-bottom: 0.9em; }

/* ---------- The plate: foot and ankle map ---------- */
.plate {
  background: radial-gradient(120% 90% at 30% 40%, var(--film-lift) 0%, var(--film) 62%);
  color: #e8f0f3;
  padding-block: clamp(48px, 7vw, 88px);
}
.plate__head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px clamp(32px, 6vw, 96px); align-items: start; padding-bottom: clamp(36px, 5vw, 60px); margin-bottom: clamp(36px, 5vw, 60px); border-bottom: 1px solid rgba(169, 203, 218, 0.25); }
.plate__head h2 { color: #fff; font-size: clamp(1.75rem, 3vw, 2.3rem); line-height: 1.1; letter-spacing: -0.01em; }
.plate__lead { max-width: 41rem; color: #c5d6de; }
.plate__lead .lead { color: #fff; }
.plate__lead > :last-child { margin-bottom: 0; }
.plate__intro { max-width: 40rem; margin-bottom: clamp(20px, 3vw, 36px); }
.plate h3 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; margin-bottom: 10px; }
.plate__intro p { color: #c5d6de; margin: 0; }
.plate__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 72px); align-items: start; }

.footmap { margin: 0; position: sticky; top: 96px; }
.footmap__stage { position: relative; aspect-ratio: 640 / 440; }
.footmap__stage > svg { width: 100%; height: 100%; overflow: visible; }
.footmap figcaption { font-size: 0.92rem; color: #a9bfca; margin-top: 14px; }
.footmap__deep, .footmap__canvas, .footmap__hint { display: none; }

/* 3D mode: the canvas replaces the drawing, and the letters follow the bones as they turn */
.footmap--3d .footmap__stage { aspect-ratio: 640 / 470; }
.footmap--3d .footmap__stage::before {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 3%; height: 22%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(169, 203, 218, 0.2), transparent);
  filter: blur(6px);
}
.footmap--3d .footmap__stage > svg, .footmap--3d .footmap__flat { display: none; }
.footmap--3d .footmap__deep { display: inline; }
.footmap--3d .footmap__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; outline-offset: -3px; border-radius: 12px; }
.footmap--3d .is-grabbing .footmap__canvas, .footmap--3d .footmap__stage.is-grabbing .footmap__canvas { cursor: grabbing; }
.footmap--3d .footmap__canvas:focus-visible { outline-color: #fff; }
.footmap--3d .footmap__hint {
  display: flex; align-items: center; gap: 8px; position: absolute; right: 4px; top: 4px; margin: 0;
  padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 0.88rem; color: #dbe9ef;
  background: rgba(169, 203, 218, 0.14); border: 1px solid rgba(169, 203, 218, 0.3);
  pointer-events: none; transition: opacity 0.6s ease;
}
.footmap--3d .is-touched .footmap__hint { opacity: 0; }
.footmap--3d .pin { left: 0; top: 0; transform: translate3d(var(--px, -200px), var(--py, -200px), 0); }
.footmap--3d .pin.is-off { visibility: hidden; }
.footmap--3d .footmap__canvas { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%); mask-image: linear-gradient(to bottom, transparent 0, #000 16%); }

.outline { fill: rgba(169, 203, 218, 0.05); stroke: var(--line); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.bones > * { fill: rgba(214, 231, 238, 0.13); stroke: rgba(214, 231, 238, 0.62); stroke-width: 1.25; stroke-linejoin: round; }
.tendon { fill: none; stroke: rgba(221, 140, 31, 0.6); stroke-width: 5; stroke-linecap: round; }
.fascia { fill: none; stroke: rgba(221, 140, 31, 0.6); stroke-width: 2; stroke-dasharray: 0.012 0.012; }

.pin {
  position: absolute;
  left: calc(var(--x) / 640 * 100%);
  top: calc(var(--y) / 440 * 100%);
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 2px solid var(--iodine);
  background: var(--film);
  color: #fff;
  font: 600 0.95rem/1 var(--serif);
  cursor: pointer;
  display: grid; place-items: center;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, scale 0.15s ease;
}
.pin::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.pin:hover { background: #22506d; scale: 1.12; }
.pin[aria-pressed="true"] { background: var(--iodine); color: var(--film); box-shadow: 0 0 0 6px rgba(221, 140, 31, 0.28); }
.pin:focus-visible { outline-color: #fff; }

.legend { border-top: 1px solid rgba(169, 203, 218, 0.3); }
.legend details { border-bottom: 1px solid rgba(169, 203, 218, 0.3); }
.legend summary {
  display: grid; grid-template-columns: 34px 1fr 16px; align-items: center; gap: 14px;
  padding: 13px 4px 13px 0; cursor: pointer; list-style: none;
}
.legend summary::-webkit-details-marker { display: none; }
.legend summary::after {
  content: ""; width: 9px; height: 9px; justify-self: end;
  border-right: 2px solid var(--line); border-bottom: 2px solid var(--line);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s ease;
}
.legend details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.legend__key {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--iodine); color: #fff;
  font: 600 0.9rem/1 var(--serif);
  display: grid; place-items: center;
}
.legend details[open] .legend__key { background: var(--iodine); color: var(--film); }
.legend__name { font-family: var(--serif); font-weight: 500; font-size: 1.14rem; color: #fff; }
.legend summary:hover .legend__name { text-decoration: underline; text-decoration-color: var(--iodine); text-underline-offset: 0.2em; }
.legend summary:focus-visible { outline-color: #fff; }
.legend__body { padding: 0 8px 20px 48px; color: #d3e0e6; font-size: 1.03rem; }
.legend__body p { margin-bottom: 0.7em; }
.legend__body ul { margin: 0; padding: 0; list-style: none; }
.legend__body li { position: relative; padding-left: 18px; margin-bottom: 0.3em; }
.legend__body li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 2px; background: var(--iodine); }

/* one orchestrated moment: the plate draws itself when it scrolls into view */
@media (prefers-reduced-motion: no-preference) {
  .js .footmap .outline { transition: stroke-dashoffset 1.7s cubic-bezier(0.6, 0, 0.2, 1); }
  .js .footmap .bones, .js .footmap .tendon, .js .footmap .fascia { transition: opacity 0.9s ease 1s; }
  .js .footmap .pin { transition: opacity 0.4s ease calc(1.5s + var(--i, 0) * 70ms), scale 0.4s ease calc(1.5s + var(--i, 0) * 70ms), background-color 0.15s ease, box-shadow 0.15s ease; }
  .js .footmap:not(.is-drawn) .outline { stroke-dashoffset: 1; }
  .js .footmap:not(.is-drawn) .bones, .js .footmap:not(.is-drawn) .tendon, .js .footmap:not(.is-drawn) .fascia { opacity: 0; }
  .js .footmap:not(.is-drawn) .pin { opacity: 0; scale: 0.6; }
  .js .footmap.is-settled .pin { transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, scale 0.15s ease; }
  .pin[aria-pressed="true"]::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--iodine); animation: ping 1.8s ease-out infinite; }
}

@keyframes ping { from { scale: 1; opacity: 0.9; } to { scale: 2.3; opacity: 0; } }

/* ---------- Demonstrations: sliders that move the bones ---------- */
.demo { display: none; margin-top: 18px; padding: 16px 18px 14px; border-radius: 14px; background: rgba(169, 203, 218, 0.1); border: 1px solid rgba(169, 203, 218, 0.3); }
.has-3d .demo, .skeleton .demo { display: block; }
.demo__title { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.08rem; color: #fff; margin-bottom: 8px; }
.demo__range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer; }
.demo__range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--iodine) var(--fill, 0%), rgba(169, 203, 218, 0.4) var(--fill, 0%)); }
.demo__range::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--iodine) var(--fill, 0%), rgba(169, 203, 218, 0.4) var(--fill, 0%)); }
.demo__range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--iodine); border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
.demo__range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--iodine); border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
.demo__range:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 6px; }
.demo__ends { display: flex; justify-content: space-between; gap: 8px; font-size: 0.88rem; color: #a9bfca; }
.demo .demo__read { margin: 10px 0 0; font-weight: 600; color: #fff; }
.demo .demo__note { margin: 6px 0 0; font-size: 0.92rem; color: #a9bfca; }
.demo--paper { margin-top: 14px; background: #fff; border-color: var(--bone); box-shadow: 0 20px 34px -28px rgba(14, 42, 59, 0.5); }
.demo--paper .demo__title, .demo--paper .demo__read { color: var(--film); }
.demo--paper .demo__ends { color: var(--ink-soft); }
.demo--paper .demo__range::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--bone) 0, var(--bone) calc(50% - 1px), var(--film) calc(50% - 1px), var(--film) calc(50% + 1px), var(--bone) calc(50% + 1px)); }
.demo--paper .demo__range::-moz-range-track { background: var(--bone); }
.demo--paper .demo__range:focus-visible { outline-color: var(--iodine); }

.tour { display: none; }
.footmap--3d .tour {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; margin-top: 14px; padding: 0 20px 0 12px;
  border: 1.5px solid rgba(169, 203, 218, 0.55); border-radius: 999px; background: transparent; color: #fff;
  font: 600 1rem/1 var(--sans); cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, translate 0.25s ease;
}
.tour svg { width: 22px; height: 22px; }
.tour:hover { translate: 0 -2px; border-color: #fff; }
.tour:focus-visible { outline-color: #fff; }
.tour__stop { display: none; }
.tour[aria-pressed="true"] { background: var(--iodine); border-color: var(--iodine); color: var(--film); }
.tour[aria-pressed="true"] .tour__play { display: none; }
.tour[aria-pressed="true"] .tour__stop { display: inline; }
.footmap--3d figcaption { margin-top: 10px; }

/* ---------- Children: the hips-to-toes model, drawn in ink on paper ---------- */
.kids { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 0 clamp(32px, 6vw, 96px); align-items: start; }
.kids .conditions { margin-top: 0; grid-column: 2; }
.kids--3d { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 clamp(28px, 5vw, 72px); }
.kids--3d .conditions { grid-column: auto; }
.skeleton { margin: 0; position: sticky; top: 92px; }
.skeleton__stage {
  position: relative; height: clamp(420px, 64vh, 640px); border-radius: 22px; overflow: hidden;
  background: radial-gradient(80% 60% at 50% 42%, #fff 0%, #eaf0f0 78%);
  box-shadow: inset 0 0 0 1px var(--bone), 0 30px 50px -40px rgba(14, 42, 59, 0.5);
}
.skeleton__canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; border-radius: inherit; outline-offset: -4px; }
.skeleton__stage.is-grabbing .skeleton__canvas { cursor: grabbing; }
.skeleton figcaption { font-size: 0.92rem; color: var(--ink-soft); margin-top: 12px; }
.tag {
  position: absolute; left: 0; top: 0; padding: 7px 14px; border-radius: 999px;
  transform: translate3d(var(--px, -300px), var(--py, -300px), 0) translate(-50%, -50%);
  border: 2px solid var(--iodine); background: #fff; color: var(--film);
  font: 600 0.95rem/1 var(--sans); white-space: nowrap; cursor: pointer;
  box-shadow: 0 10px 18px -10px rgba(14, 42, 59, 0.6);
  transition: background-color 0.15s ease, scale 0.15s ease, opacity 0.4s ease;
}
.tag:hover { scale: 1.07; }
.tag[aria-pressed="true"] { background: var(--iodine); }
.tag.is-off { visibility: hidden; }
.skeleton:not(.is-drawn) .tag { opacity: 0; }
.kids--3d .conditions li { cursor: pointer; margin-inline: -14px; padding-inline: 14px; border-radius: 12px; transition: background-color 0.25s ease, opacity 0.25s ease; }
.kids--3d .conditions li:hover { background: rgba(14, 42, 59, 0.05); }
.kids--3d .conditions li:focus-visible { outline-offset: -3px; }
.kids--3d .conditions.is-filtered li:not(.is-match) { opacity: 0.4; }
.kids--3d .conditions li.is-match { background: rgba(221, 140, 31, 0.13); }

/* ---------- The map of his hospitals ---------- */
.map { margin: 0 0 clamp(40px, 6vw, 72px); }
.map__stage {
  position: relative; aspect-ratio: 21 / 10; border-radius: 22px; overflow: hidden;
  background: radial-gradient(110% 90% at 50% 35%, var(--film-lift) 0%, var(--film) 72%);
  box-shadow: 0 40px 60px -42px rgba(14, 42, 59, 0.8);
}
.map__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; outline-offset: -4px; border-radius: inherit;
  -webkit-mask-image: radial-gradient(ellipse 78% 82% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 82% at 50% 50%, #000 58%, transparent 100%);
}
.map__stage.is-grabbing .map__canvas { cursor: grabbing; }
.map__canvas:focus-visible { outline-color: #fff; }
.map__label, .map__town { position: absolute; left: 0; top: 0; white-space: nowrap; }
.map__label {
  display: grid; text-align: center; padding: 6px 12px 7px; border-radius: 12px; line-height: 1.2;
  transform: translate3d(var(--px, -400px), var(--py, -400px), 0) translate(-50%, -100%);
  background: rgba(255, 255, 255, 0.95); color: var(--film); text-decoration: none;
  box-shadow: 0 12px 22px -10px rgba(0, 0, 0, 0.65);
  transition: scale 0.2s ease, opacity 0.5s ease;
}
.map__label strong { font-family: var(--serif); font-weight: 600; font-size: 0.98rem; }
.map__label span { font-size: 0.8rem; color: var(--ink-soft); }
.map__label--nhs { background: var(--iodine); }
/* neighbours lean apart so their names do not sit on top of each other */
.map__label[data-place="qeh"] { transform: translate3d(var(--px, -400px), var(--py, -400px), 0) translate(-12%, -100%); }
.map__label[data-place="blackheath"] { transform: translate3d(var(--px, -400px), var(--py, -400px), 0) translate(-88%, -100%); }
.map__label--nhs span { color: var(--film); }
.map__label:hover, .map__label:focus-visible, .map__label.is-lit { scale: 1.1; z-index: 3; }
.map__label:focus-visible { outline-color: #fff; }
.map__town { transform: translate3d(var(--px, -400px), var(--py, -400px), 0) translate(-50%, -50%); font-size: 0.8rem; color: rgba(197, 214, 222, 0.7); pointer-events: none; transition: opacity 0.6s ease; }
.map:not(.is-drawn) .map__label, .map:not(.is-drawn) .map__town { opacity: 0; }
.map.is-drawn .map__label { transition-delay: 1.5s, 0s, 0s; transition-property: opacity, scale; }
.map figcaption { font-size: 0.92rem; color: var(--ink-soft); margin-top: 12px; }
.place.is-lit { box-shadow: 0 0 0 3px var(--iodine), 0 26px 44px -30px rgba(14, 42, 59, 0.5); }
.place--nhs.is-lit { box-shadow: none; }
.place--nhs.is-lit picture { box-shadow: 0 0 0 3px var(--iodine), 0 30px 50px -34px rgba(14, 42, 59, 0.6); }

/* ---------- Children's conditions ---------- */
.conditions { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 1px solid var(--bone); }
.conditions li { padding: 18px 0 20px; border-bottom: 1px solid var(--bone); display: grid; gap: 3px; align-content: start; }
.conditions strong { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--film); line-height: 1.3; }
.conditions span { color: var(--ink-soft); font-size: 1rem; line-height: 1.45; }

/* ---------- Timeline (a real sequence, so it gets a spine) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: calc(4.6rem + 16px); top: 12px; bottom: 12px; width: 2px; background: var(--bone); }
.timeline::after { content: ""; position: absolute; left: calc(4.6rem + 16px); top: 12px; bottom: 12px; width: 2px; background: var(--iodine); transform-origin: 50% 0; scale: 1 var(--read, 0); }
.timeline li { display: grid; grid-template-columns: 4.6rem 1fr; gap: 0 40px; padding-bottom: 26px; position: relative; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(4.6rem + 11px); top: 9px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--film); z-index: 1;
  transition: border-color 0.4s ease, background-color 0.4s ease, scale 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.timeline li.is-read::before { border-color: var(--iodine); scale: 1.15; }
.timeline li:last-child::before { background: var(--iodine); border-color: var(--iodine); }
.timeline__year { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--iodine-ink); text-align: right; line-height: 1.7; }
.timeline h3 { font-size: 1.15rem; line-height: 1.35; font-weight: 600; padding-top: 2px; }
.timeline p { margin: 4px 0 0; color: var(--ink-soft); font-size: 1.02rem; max-width: 36rem; }

/* ---------- Leadership ---------- */
.lead-item--feature { display: grid; grid-template-columns: 200px 1fr; gap: 36px; align-items: start; margin-bottom: 44px; }
.lead-item--feature picture { display: block; overflow: hidden; border-radius: 12px; box-shadow: 0 26px 40px -28px rgba(14, 42, 59, 0.6); }
.lead-item--feature img { width: 100%; }
.lead-item--feature h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.2; margin-bottom: 12px; }
.lead-item--feature p { max-width: 36rem; }
.lead-item--feature .note { margin-bottom: 0; }
.roles { margin: 0; border-top: 1px solid var(--bone); }
.roles > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 40px; padding: 22px 0; border-bottom: 1px solid var(--bone); }
.roles dt { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; line-height: 1.35; color: var(--film); }
.roles dd { margin: 0; color: var(--ink); font-size: 1.02rem; }

/* ---------- Publications ---------- */
.pubs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--bone); }
.pubs li { display: grid; grid-template-columns: 4.6rem 1fr; gap: 0 28px; padding: 18px 0; border-bottom: 1px solid var(--bone); }
.pubs__year { font-family: var(--serif); font-weight: 600; color: var(--iodine-ink); line-height: 1.6; }
.pubs p { margin: 0; max-width: 44rem; }
.pubs a, .pubs__title { font-weight: 600; font-style: normal; color: var(--film); }
.pubs a { text-decoration-thickness: 1px; }
.pubs a:hover { text-decoration-thickness: 2px; }
.pubs p > span { display: block; color: var(--ink-soft); font-size: 0.98rem; margin-top: 4px; }

/* ---------- Patient quotes ---------- */
.quote { margin: 0; }
.quote blockquote { margin: 0; }
.quote figcaption { color: var(--ink-soft); font-size: 0.98rem; margin-top: 12px; }
.quote--lead { border-left: 3px solid var(--iodine); padding-left: clamp(20px, 3vw, 36px); margin-bottom: 44px; }
.quote--lead p { font-family: var(--serif); font-size: clamp(1.3rem, 2.3vw, 1.7rem); line-height: 1.38; color: var(--film); font-weight: 450; margin: 0; max-width: 40rem; }
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 1px solid var(--bone); margin-bottom: 22px; }
.quotes .quote { padding: 24px 0 26px; border-bottom: 1px solid var(--bone); }
.quotes .quote p { margin: 0; }

/* ---------- Locations ---------- */
.place picture { display: block; overflow: hidden; border-radius: 12px; background: var(--bone); }
.place--nhs picture { box-shadow: 0 30px 50px -34px rgba(14, 42, 59, 0.6); }

/* cards and photographs lean towards the pointer */
.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
  will-change: transform;
}
.tilt.is-tilting { transition: transform 0.1s linear, box-shadow 0.3s ease; }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.5), transparent 46%);
  opacity: 0; transition: opacity 0.3s ease; mix-blend-mode: soft-light;
}
.tilt.is-tilting::after { opacity: 1; }
.places .place.tilt > picture { transform: translateZ(26px); }
.places .place.tilt > h4, .places .place.tilt > address { transform: translateZ(16px); }
picture.tilt { position: relative; }
.place img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.place--nhs { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 48px); align-items: start; margin-bottom: 64px; }
.place--nhs img { aspect-ratio: 16 / 10; }
.place__kind { font-size: 0.95rem; color: var(--iodine-ink); font-weight: 700; margin-bottom: 6px; }
.place--nhs h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.2; margin-bottom: 6px; }
.place__text p, .place__text address { margin-bottom: 10px; }
.place__text address { color: var(--ink-soft); }
.subhead { font-size: 1.45rem; margin-bottom: 6px; }
.subhead__note { color: var(--ink-soft); font-size: 1rem; margin-bottom: 28px; max-width: 40rem; }
.places { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.where .place--nhs { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
.where .place__text { max-width: 34rem; }
.places .place {
  display: grid; align-content: start; position: relative;
  background: #fff; border-radius: 18px; padding: 14px 14px 20px;
  box-shadow: 0 1px 0 rgba(14, 42, 59, 0.05), 0 26px 44px -30px rgba(14, 42, 59, 0.5);
}
.places .place > :not(picture) { padding-inline: 8px; }
.places .place .hours { margin-inline: 8px; padding-inline: 0; }
.places h4 { font-size: 1.22rem; margin: 16px 0 4px; }
.places address { color: var(--ink-soft); font-size: 1rem; margin-bottom: 12px; }
.hours { margin: 0 0 14px; font-size: 1rem; border-top: 1px solid var(--bone); }
.hours > div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--bone); }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- Contact ---------- */
.contact { background: var(--film); color: #dbe7ec; padding-block: var(--band); position: relative; overflow: hidden; isolation: isolate; }
.contact__glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.contact__glow::before, .contact__glow::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); }
.contact__glow::before { width: 46vw; height: 46vw; left: -12vw; top: -18vw; background: rgba(40, 112, 150, 0.5); }
.contact__glow::after { width: 30vw; height: 30vw; right: -6vw; bottom: -14vw; background: rgba(221, 140, 31, 0.22); }
@media (prefers-reduced-motion: no-preference) {
  .contact__glow::before { animation: wander 18s ease-in-out infinite alternate; }
  .contact__glow::after { animation: wander 22s ease-in-out infinite alternate-reverse; }
}
@keyframes wander { from { translate: 0 0; } to { translate: 12vw 6vw; } }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 6vw, 96px); align-items: start; }
.contact h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.015em; margin-bottom: 22px; }
.contact__intro p { max-width: 30rem; }
.ways { margin: 0; border-top: 1px solid rgba(169, 203, 218, 0.3); }
.ways > div { display: grid; grid-template-columns: 11rem 1fr; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid rgba(169, 203, 218, 0.3); align-items: baseline; }
.ways dt { color: #a9bfca; font-size: 0.98rem; }
.ways dd { margin: 0; color: #fff; overflow-wrap: anywhere; }
.ways__big { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 3.2vw, 2.3rem); text-decoration: none; letter-spacing: 0.01em; color: var(--iodine); }
.ways__big:hover { text-decoration: underline; }
.contact :focus-visible { outline-color: #fff; }

/* ---------- What to expect (a real sequence, so it is numbered) ---------- */
.band__title { font-size: clamp(1.75rem, 3vw, 2.3rem); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: clamp(28px, 4vw, 48px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 40px; position: relative; }
.steps::before, .steps::after { content: ""; position: absolute; left: 22px; right: calc((100% - 120px) / 4 - 22px); top: 21px; height: 2px; background: var(--bone); }
.steps::after { background: var(--iodine); transform-origin: 0 50%; scale: var(--walked, 1) 1; transition: scale 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s; }
.steps li { position: relative; z-index: 1; }
.steps__n { width: 44px; height: 44px; border-radius: 50%; background: var(--film); color: #fff; display: grid; place-items: center; font: 600 1.15rem/1 var(--serif); box-shadow: 0 0 0 8px var(--paper); margin-bottom: 20px; }
.steps h3 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; max-width: 17rem; }

/* ---------- Insurers ---------- */
.insurers { padding-block: clamp(36px, 5vw, 56px); border-top: 1px solid var(--bone); overflow: hidden; }
.insurers__label { color: var(--ink-soft); font-size: 1rem; margin-bottom: 18px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { list-style: none; margin: 0; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; gap: 10px clamp(36px, 5vw, 72px); }
.marquee__track li { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2.3rem); color: var(--film); white-space: nowrap; }
.marquee.is-running .marquee__track { flex-wrap: nowrap; width: max-content; padding: 0; animation: slide 34s linear infinite; }
.marquee.is-running .marquee__track li { padding-right: clamp(36px, 5vw, 72px); }
.marquee.is-running .marquee__track { gap: 0; }
.marquee.is-running:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { translate: -50% 0; } }

/* ---------- Scroll reveals (added by script.js; without it everything is simply visible) ---------- */
.anim .rv { opacity: 0; translate: 0 30px; transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--d, 0) * 85ms); }
.anim .rv.is-in { opacity: 1; translate: 0 0; }
.anim .rv--left { translate: -30px 0; }
.anim .steps:not(.is-in) { --walked: 0; }
.anim .steps:not(.is-in) .steps__n { scale: 0.4; opacity: 0; }
.anim .steps .steps__n { transition: scale 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.5), opacity 0.4s ease; transition-delay: calc(var(--d, 0) * 380ms + 200ms); }

/* ---------- Footer ---------- */
.footer { padding-block: 44px 56px; font-size: 0.93rem; color: var(--ink-soft); line-height: 1.5; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); gap: 28px 48px; }
.footer__name { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--film); margin-bottom: 6px; }
.footer p:last-child { margin-bottom: 0; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1179px) {
  .masthead__nav, .masthead__social { display: none; }
  .menu { display: block; }
  .masthead__row { gap: 10px; }
}
@media (max-width: 1020px) {
  .split { grid-template-columns: 1fr; gap: 22px; }
  .plate__head { grid-template-columns: 1fr; gap: 18px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
  .places { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
  .kids { grid-template-columns: 1fr; }
  .kids .conditions { grid-column: auto; }
  .kids--3d { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .steps::before, .steps::after { display: none; }
  .split__head { position: static; }
  .plate__grid { grid-template-columns: 1fr; }
  .footmap { position: static; max-width: 620px; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  body { font-size: 1.0625rem; }
  .hero__grid { min-height: 0; }
  .hero__text { padding-block: 44px 8px; max-width: none; transform: none; }
  .hero h1 { font-size: clamp(1.9rem, 9.6vw, 4rem); }
  .hero__stage { position: relative; inset: auto; width: 100%; }
  .hero__portrait { position: relative; inset: auto; width: 100%; display: block; transform: none; }
  .hero__depth { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%); mask-image: linear-gradient(to bottom, transparent 0, #000 16%); }
  .chip { transform: none; padding: 10px 14px 10px 12px; }
  .chip--rating { left: 16px; bottom: 16px; }
  .chip--office { display: none; }
  .chip__figure { font-size: 1.6rem; }
  .hero__portrait img {
    height: auto; max-height: 62vh; aspect-ratio: 17 / 20; object-position: 50% 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 16%);
  }
  .stats__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats__list > div { padding: 22px 14px 18px 0; }
  .stats__list > div + div { border-left: 0; padding-left: 0; }
  .stats__list > div:nth-child(even) { border-left: 1px solid var(--bone); padding-left: 18px; }
  .stats__list > div:nth-child(n + 3) { border-top: 1px solid var(--bone); }
  .footmap--3d .footmap__stage { aspect-ratio: 10 / 9; }
  .kids, .kids--3d { grid-template-columns: 1fr; gap: 28px; }
  .kids .conditions { grid-column: auto; }
  .skeleton { position: static; }
  .skeleton__stage { height: min(118vw, 520px); }
  .map__stage { aspect-ratio: 1 / 1; }
  .where .place--nhs { grid-template-columns: 1fr; }
  .map__label span { display: none; }
  .map__label { padding: 5px 10px 6px; }
  .map__town { font-size: 0.72rem; }
  .timeline::after { left: calc(3.4rem + 13px); }
  .conditions, .quotes, .places { grid-template-columns: 1fr; }
  .lead-item--feature { grid-template-columns: 1fr; gap: 22px; }
  .lead-item--feature picture { max-width: 180px; }
  .roles > div { grid-template-columns: 1fr; }
  .place--nhs { grid-template-columns: 1fr; margin-bottom: 48px; }
  .ways > div { grid-template-columns: 1fr; }
  .timeline::before { left: calc(3.4rem + 13px); }
  .timeline li { grid-template-columns: 3.4rem 1fr; gap: 0 32px; }
  .timeline li::before { left: calc(3.4rem + 8px); }
  .timeline__year { font-size: 1rem; }
  .pubs li { grid-template-columns: 3.4rem 1fr; gap: 0 16px; }
  .pin { width: 30px; height: 30px; margin: -15px 0 0 -15px; font-size: 0.85rem; }
  .legend__body { padding-left: 44px; }
}
@media (max-width: 560px) {
  .masthead__book-long { display: none; }
  .masthead__book-short { display: inline; }
  .menu__list a { font-size: 1.2rem; padding: 12px 0; }
}
@media (max-width: 420px) {
  .masthead__name span { display: none; }
  .menu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .menu__toggle { padding-left: 6px; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

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

@media print {
  .masthead, .hero__actions, .pin, .chip, .footmap__canvas, .footmap__hint, .socials, .tour, .demo, .skeleton, .map, .hero__depth { display: none; }
  .plate, .contact { background: #fff; color: #000; }
  .legend details > .legend__body { display: block; }
}
