:root {
  --paper: #FBFBF9;
  --ink: #1E2B2F;
  --ink-soft: #4D5B5F;
  --line: #D7DDDB;
  --wash: #EEF3F2;
  --body: #DCE4E2;
  --blue: #2B5D9E;
  --blue-dark: #214A80;
  --pain: #D4443B;
  --yellow: #E8B931;
  --green: #3E8E5A;
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { font: 400 1.0625rem/1.6 var(--font); color: var(--ink); background: var(--paper); }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em; margin-bottom: 1.5rem; max-width: 22ch; }
h3 { font-size: 1.125rem; font-weight: 700; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* Buttons */
.btn { display: inline-block; padding: 0.8rem 1.25rem; border-radius: 10px; font: 700 1rem/1.2 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; text-align: center; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); color: #fff; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: #fff; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; flex-direction: column; font-weight: 800; font-size: 1.45rem; line-height: 1.1; letter-spacing: -0.01em; color: #1B3A5C; text-decoration: none; }
.brand-sub { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #5A6B7D; margin-top: 4px; }
.links { display: flex; gap: 24px; margin-left: auto; }
.links a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.links a:hover { color: var(--ink); text-decoration: underline; }
.top-call { padding: 0.6rem 1rem; }

/* Hero: scroll story */
.story { position: relative; height: 280vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#scene { position: fixed; inset: 0; z-index: 0; width: 100vw; height: 100vh; display: block; pointer-events: none; }
main, .foot { position: relative; z-index: 1; }
.stage { cursor: grab; touch-action: pan-y; }
.stage:active { cursor: grabbing; }
.spine-slot[data-slot="hero"] { position: absolute; right: 0; top: 9%; width: 50%; height: 84%; pointer-events: none; }
.beats { position: relative; z-index: 2; height: 100%; display: grid; align-items: center; pointer-events: none; }
.stage::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, var(--paper) 0%, rgba(251, 251, 249, 0.85) 30%, rgba(251, 251, 249, 0) 52%); }
.beat { grid-area: 1 / 1; max-width: 520px; padding-top: 40px; opacity: 0; transform: translateY(16px); visibility: hidden; transition: opacity 0.5s ease, transform 0.5s ease, visibility 0s linear 0.5s; }
.beat.on { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity 0.5s ease, transform 0.5s ease, visibility 0s; }
.beat h1, .beat-title { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.025em; line-height: 1.02; margin-bottom: 1.25rem; max-width: 11ch; font-weight: 800; }
.h1-local { display: block; font-size: 1.05rem; font-weight: 700; letter-spacing: 0; line-height: 1.4; color: var(--blue); margin-bottom: 0.6rem; }
.about { background: var(--paper); }
.about p { font-size: 1.15rem; max-width: 68ch; color: var(--ink); }
.about p + p { margin-top: 1em; }
.about .source-note { font-size: 0.95rem; color: var(--ink-soft); }
.all-conditions { margin-top: 28px; max-width: 820px; border-top: 1px solid var(--line); }
.all-conditions summary { cursor: pointer; padding: 16px 0; font-weight: 700; color: var(--blue); }
.all-conditions dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; padding-bottom: 8px; }
.all-conditions dt { font-weight: 700; }
.all-conditions dd { color: var(--ink-soft); }
.intro { font-size: 1.2rem; color: var(--ink-soft); max-width: 36ch; margin-bottom: 1.75rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1.5rem; }
.hv-note { color: var(--ink-soft); }
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.doc { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(255, 255, 255, 0.94); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.doc-id { min-width: 0; }
.doc-name { font-weight: 700; line-height: 1.25; }
.doc-name span { font-weight: 400; color: var(--ink-soft); }
.doc-num { color: var(--ink-soft); font-size: 0.92rem; font-variant-numeric: tabular-nums; margin-top: 2px; }
.doc-btns { display: flex; gap: 8px; flex: none; }
.ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.ic svg { width: 20px; height: 20px; fill: currentColor; }
.ic span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic-call { background: var(--blue); }
.ic-call:hover { background: var(--blue-dark); color: #fff; }
.ic-wa { background: #1FAF5A; }
.ic-wa:hover { background: #178A47; color: #fff; }

/* "Read more" (phones only) and tap-to-open rows */
.more-btn { display: none; }
.who-item { border-bottom: 1px solid var(--line); }
.who-item:first-child { border-top: 1px solid var(--line); }
.who-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 700; font-size: 1.1rem; }
.who-item summary::-webkit-details-marker { display: none; }
.who-item summary::after { content: "+"; font-weight: 400; color: var(--ink-soft); }
.who-item[open] summary::after { content: "\2013"; }
.who-item p { color: var(--ink-soft); padding-bottom: 14px; max-width: 52ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--blue); font-weight: 700; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--blue); }
.chip:first-child { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip:first-child:hover { background: var(--blue-dark); color: #fff; }
.fc { margin-bottom: 18px; }
.fc-name { color: var(--ink) !important; font-weight: 700; margin-bottom: 0 !important; }
.fc-area { margin-top: 4px; }

/* Who-to-contact chooser */
.pick { margin: auto; width: min(420px, calc(100% - 32px)); border: 0; border-radius: 16px; padding: 24px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 60px rgba(30, 43, 47, 0.25); }
.pick form { padding: 0; background: none; border-radius: 0; display: block; }
.pick::backdrop { background: rgba(30, 43, 47, 0.45); }
.pick h2 { font-size: 1.4rem; margin-bottom: 4px; }
.pick-sub { color: var(--ink-soft); margin-bottom: 16px; }
.pick-list { display: grid; gap: 10px; margin-bottom: 12px; }
.pick-item { display: flex; flex-direction: column; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; }
.pick-item:hover, .pick-item:focus-visible { border-color: var(--blue); }
.pick-name { font-weight: 700; }
.pick-num { color: var(--blue); font-weight: 700; margin-top: 2px; }
.pick-cancel { width: 100%; padding: 12px; border: 0; background: none; font: 700 1rem var(--font); color: var(--ink-soft); cursor: pointer; }
.hv-note strong { color: var(--ink); }
.beat-steps { z-index: 2; position: absolute; left: 0; right: 0; bottom: 32px; list-style: none; display: flex; gap: 28px; font-size: 0.95rem; color: var(--ink-soft); pointer-events: none; }
.beat-steps li { padding-top: 10px; border-top: 3px solid var(--line); min-width: 120px; transition: border-color 0.4s, color 0.4s; }
.beat-steps li.on { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.drag-hint { z-index: 2; position: absolute; right: 24px; bottom: 36px; font-size: 0.9rem; color: var(--ink-soft); pointer-events: none; }
html:not(.has-3d) .drag-hint { display: none; }

.chart-block .lede { color: var(--ink-soft); margin: -0.75rem 0 1.75rem; max-width: 50ch; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; align-items: start; }
.spine-slot[data-slot="where"] { height: 560px; align-self: center; }
.slot-col { height: 100%; }
.sticky { position: sticky; top: 96px; }
.spine-slot[data-slot="visit"] { height: min(calc(100vh - 150px), 640px); }
#first-visit .steps { grid-template-columns: 1fr; gap: 28px; max-width: 560px; }
html:not(.has-3d) .spine-slot:not([data-slot="hero"]) { display: none; }
html:not(.has-3d) #where .split, html:not(.has-3d) #first-visit .split { grid-template-columns: 1fr; }

/* Knee */
.knee { margin: 0; display: none; }
.knee.live { display: block; }
#kneeCanvas { width: 100%; height: min(62vh, 520px); display: block; }
.knee figcaption { color: var(--ink-soft); font-size: 0.95rem; max-width: 38ch; }
.knee-read { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 4px; }
.knee-read strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; margin-left: 6px; }
#treat .who { max-width: 620px; }

/* Body chart */
.chart { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.chart-body svg { width: 100%; height: auto; }
.figure > * { fill: var(--body); stroke: var(--body); stroke-linecap: round; stroke-linejoin: round; }
.figure circle, .figure ellipse, .figure path { stroke-width: 0; }
.spot { cursor: pointer; }
.spot circle { fill: transparent; stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 3 3; transition: fill 0.2s, stroke 0.2s, r 0.2s; }
.spot:hover circle { stroke: var(--pain); stroke-dasharray: none; }
.spot.on circle { fill: var(--pain); fill-opacity: 0.85; stroke: var(--pain); stroke-dasharray: none; }
.spot.on circle.halo { fill: none; stroke: var(--pain); stroke-opacity: 0.35; stroke-width: 6; }
.spot circle.halo { fill: none; stroke: none; }
.chart-ask { font-weight: 700; font-size: 1.15rem; margin-bottom: 12px; }
.areas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.areas button { font: 500 0.95rem/1 var(--font); padding: 9px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.areas button:hover { border-color: var(--ink-soft); }
.areas button[aria-pressed="true"] { background: var(--pain); border-color: var(--pain); color: #fff; }
.result { border-top: 1px solid var(--line); padding-top: 18px; }
.result h3 { margin-bottom: 4px; }
.result p { color: var(--ink-soft); margin-bottom: 10px; }
.result ul { margin: 0 0 18px 1.1em; }
.result li { margin-bottom: 2px; }
.result:not([hidden]) { animation: show 0.25s ease-out; }
@keyframes show { from { opacity: 0; transform: translateY(4px); } }

/* Sections */
.block { padding: 88px 0; border-top: 1px solid var(--line); }


/* Home visits */
.home { background: var(--wash); border-top: 0; }
.home-in { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: center; }
.home-in p { color: var(--ink-soft); max-width: 46ch; }
.places { list-style: none; }
.places li { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; padding: 10px 0; border-bottom: 2px solid var(--ink); }
.places li:first-child { border-top: 2px solid var(--ink); }
.home-foot { grid-column: 1 / -1; }


/* Steps: band colours light to strong */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: s; }
.steps li { counter-increment: s; padding-top: 22px; border-top: 6px solid var(--band); transition: opacity 0.4s ease, border-width 0.3s ease; }
html.has-3d #first-visit .steps li { opacity: 0.45; }
html.has-3d #first-visit .steps li.active { opacity: 1; border-top-width: 10px; padding-top: 18px; }
.steps h3 { margin-bottom: 6px; }
.steps h3::before { content: counter(s) ". "; }
.steps p { color: var(--ink-soft); font-size: 1rem; }
.wear { margin-top: 32px; color: var(--ink-soft); }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; max-width: 760px; }
.person { display: flex; gap: 20px; align-items: center; }
.portrait { flex: none; width: 112px; height: 136px; border-radius: 8px; background: var(--wash); display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: var(--ink-soft); }
.person p { color: var(--ink-soft); }
.team-note { margin-top: 28px; color: var(--ink-soft); }

/* FAQ */
.faq { max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--ink-soft); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 20px; color: var(--ink-soft); max-width: 60ch; }

/* Booking */
.book { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-top: 0; }
#bookCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.book-in { position: relative; }
.book a { color: #fff; }
.book-in { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; }
.book-in > div p { color: #C9D3D5; max-width: 34ch; }
form { background: #fff; color: var(--ink); padding: 28px; border-radius: 14px; display: grid; gap: 6px; }
form label, legend { font-weight: 700; font-size: 0.95rem; }
form input[type="text"], form input[type="tel"], textarea { font: 400 1rem var(--font); padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 8px; margin-bottom: 14px; background: var(--paper); color: var(--ink); width: 100%; }
form input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43, 93, 158, 0.18); }
form input.bad { border-color: var(--pain); }
fieldset { border: 0; margin-bottom: 14px; }
legend { margin-bottom: 6px; }
fieldset { display: flex; flex-wrap: wrap; gap: 8px; }
fieldset legend { width: 100%; }
.opt { position: relative; display: inline-flex; align-items: center; font-weight: 500; font-size: 0.95rem; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--paper); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) { background: var(--blue); border-color: var(--blue); color: #fff; }
.opt:has(input:focus-visible) { outline: 3px solid var(--yellow); outline-offset: 2px; }
.opt-tag { font-weight: 400; color: var(--ink-soft); }
form .btn { margin-top: 4px; justify-self: start; }
.form-msg { min-height: 1.4em; font-size: 0.95rem; }
.form-msg.err { color: var(--pain); }
.form-msg.ok { color: var(--green); }

/* Footer */
.foot { padding: 48px 0 32px; }
.foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot p { color: var(--ink-soft); margin-bottom: 4px; }
.foot .brand { color: #1B3A5C; margin-bottom: 10px; }
.legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-soft); }
.mbar { display: none; }

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .spine-slot[data-slot="where"], .spine-slot[data-slot="visit"], .slot-col:has(.spine-slot) { display: none; }
  .spine-slot[data-slot="hero"] { left: 0; width: 100%; top: 6px; height: 47%; }
  #treat .slot-col { order: -1; }
  .knee.sticky { position: static; }
  #kneeCanvas { height: 340px; }
  html.has-3d #first-visit .steps li { opacity: 1; }
  .links { display: none; }
  .top-in { justify-content: space-between; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-in, .home-in { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  /* Phones: normal scrolling hero, no pinned scroll story */
  .story { height: auto; }
  .stage { position: relative; height: calc(100svh - var(--head-h, 76px)); min-height: 600px; max-height: 900px; touch-action: auto; cursor: default; } /* screen minus the sticky header */
  .beat[data-beat="1"], .beat[data-beat="2"], .beat-steps { display: none; }
  .beats { align-items: end; padding-bottom: 72px; } /* clears the 52px bottom Call/WhatsApp bar */
  .beat h1 { margin-bottom: 0.9rem; }
  .beat[data-beat="0"] .intro { display: none; } /* same message is in the H1 line and the cards */
  .h1-local { font-size: 0.9rem; margin-bottom: 0.4rem; }
  .docs { grid-template-columns: 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .doc { border: 0; border-radius: 0; background: transparent; padding: 10px 12px; }
  .doc + .doc { border-top: 1px solid var(--line); }
  .stage::before { background: linear-gradient(180deg, rgba(251, 251, 249, 0) 44%, var(--paper) 56%); }
  .beat { max-width: none; padding: 20px 0 0; background: linear-gradient(rgba(251,251,249,0), var(--paper) 22%); }
  .beat h1, .beat-title { font-size: clamp(2rem, 9vw, 2.6rem); }
  .intro { font-size: 1.05rem; margin-bottom: 1.1rem; }
  .actions { margin-bottom: 0.75rem; }
  .beat-steps { bottom: 64px; gap: 12px; font-size: 0.8rem; }
  .beat-steps li { min-width: 0; flex: 1; }
  .drag-hint { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; line-height: 1.55; }
  h2 { font-size: 1.5rem; margin-bottom: 1rem; }
  .top-call { display: none; }
  .team, .steps, .all-conditions dl { grid-template-columns: 1fr; }

  /* About: first lines only; "Read more" reveals the rest (all text stays in the HTML) */
  .about p { font-size: 1rem; }
  .about-body { position: relative; max-height: 9.3em; overflow: hidden; }
  .about-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3em; background: linear-gradient(rgba(251, 251, 249, 0), var(--paper)); }
  .about-body.expanded { max-height: none; }
  .about-body.expanded::after { display: none; }
  .more-btn { display: inline-block; margin-top: 8px; padding: 8px 0; border: 0; background: none; font: 700 1rem var(--font); color: var(--blue); cursor: pointer; }

  /* Body chart: figure and area buttons side by side, result underneath */
  .chart-block .lede { margin: -0.4rem 0 1rem; }
  .chart { grid-template-columns: 104px 1fr; gap: 6px 14px; padding: 14px; }
  .chart-side { display: contents; }
  .chart-body { grid-column: 1; grid-row: 1 / span 2; }
  .chart-ask { grid-column: 2; font-size: 1rem; margin-bottom: 0; }
  .areas { grid-column: 2; gap: 6px; margin-bottom: 0; align-content: start; }
  .areas button { font-size: 0.82rem; padding: 7px 9px; }
  .result { grid-column: 1 / -1; padding-top: 14px; margin-top: 8px; }
  .all-conditions summary { font-size: 0.95rem; }

  /* Steps: compact list */
  .steps { gap: 16px; }
  .steps li { padding-top: 10px; border-top-width: 4px; }
  html.has-3d #first-visit .steps li.active { border-top-width: 4px; padding-top: 10px; }
  .steps h3 { font-size: 1rem; margin-bottom: 2px; }
  .steps p { font-size: 0.92rem; }
  .wear { margin-top: 16px; font-size: 0.92rem; }

  /* Who we usually see + knee */
  .who-item summary { font-size: 1rem; padding: 12px 0; }
  .who-item p { font-size: 0.95rem; }
  #kneeCanvas { height: 230px; }
  .knee figcaption { font-size: 0; max-width: none; } /* keep only the angle reading on phones */
  .knee-read { font-size: 1rem; margin: 0; }
  .knee-read strong { font-size: 1.3rem; }

  /* Home visits, FAQ, team, booking */
  .home-in p { font-size: 0.95rem; }
  .places li { font-size: 1.9rem; padding: 6px 0; }
  .faq summary { font-size: 1rem; padding: 14px 0; }
  .faq details p { font-size: 0.95rem; padding-bottom: 14px; }
  .team-note { font-size: 0.92rem; margin-top: 18px; }
  .book-in > div p { font-size: 0.95rem; }
  .opt { font-size: 0.88rem; padding: 7px 12px; }

  .block { padding: 52px 0; }
  .actions .btn { flex: 1 1 100%; }
  .person { gap: 16px; }
  .portrait { width: 64px; height: 78px; font-size: 1.2rem; }
  .chip { padding: 7px 11px; font-size: 0.85rem; }
  form { padding: 20px; }
  .mbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border-top: 1px solid var(--line); background: var(--paper); }
  .mbar a { padding: 14px; text-align: center; font-weight: 700; text-decoration: none; color: var(--ink); }
  .mbar a:first-child { background: var(--blue); color: #fff; }
  body { padding-bottom: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
