/* ==========================================================================
   D08 Patient Hub — page styles (warm patient theme, <body class="theme-patient">)
   Serif hero, scroll-driven journey timeline, patient story, FAQ and the
   treatment center finder with placeholder map.
   Behaviour: assets/js/pages/d08-patient-hub.js
   ========================================================================== */

.patient-page {
  /* Warm hairlines: sand-950 (#1F1A14) at fixed alphas, page-local */
  --sand-a05: rgba(31, 26, 20, .05);
  --sand-a08: rgba(31, 26, 20, .08);
  --sand-a10: rgba(31, 26, 20, .1);
  --sand-a14: rgba(31, 26, 20, .14);
  --sand-a24: rgba(31, 26, 20, .24);
  --sand-a30: rgba(31, 26, 20, .3);

  position: relative;
  min-height: 100vh;
  background: var(--sand-50);
}

/* Mono kicker above headings */
.patient-kicker {
  font: 500 12px/1 'Geist Mono', monospace;
  letter-spacing: .08em;
  color: var(--sand-700);
}

/* Kicker + serif H2 */
.patient-heading {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.patient-heading__title {
  margin: 0;
  font: 400 clamp(40px, 1.4rem + 3vw, 72px)/1 'Instrument Serif', serif;
  color: var(--sand-950);
}

/* Hatched photo placeholder label */
.photo-placeholder {
  max-width: 60%;
  text-align: center;
  font: 500 12px/1.5 'Geist Mono', monospace;
  letter-spacing: .06em;
  color: var(--sand-700);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.patient-hero {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 88px) clamp(20px, 4.2vw, 60px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.patient-hero__copy {
  flex: 1 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.patient-hero__title {
  margin: 0;
  font: 400 clamp(52px, 1.5rem + 6vw, 124px)/.95 'Instrument Serif', serif;
  letter-spacing: -.02em;
  color: var(--sand-950);
}

.patient-hero__lead {
  margin: 0;
  max-width: 520px;
  font: 400 20px/1.6 'Geist', sans-serif;
  color: var(--sand-900);
}

.patient-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.patient-hero__secondary,
.patient-hero__secondary:hover {
  border-color: var(--sand-a30);
  color: var(--sand-950);
}
.patient-hero__secondary:hover { border-color: var(--sand-950); }

.patient-hero__note {
  font: 400 14px/1.5 'Geist', sans-serif;
  color: var(--sand-700);
}

.patient-hero__photo {
  flex: 1 1 400px;
  min-width: 0;
  aspect-ratio: 4 / 5;
  max-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: repeating-linear-gradient(135deg, var(--sand-100) 0 14px, var(--sand-200) 14px 28px);
}

/* ── Journey timeline ───────────────────────────────────────────────────── */

.journey {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 112px) clamp(20px, 4.2vw, 60px);
  display: flex;
  flex-direction: column;
  gap: 40px;
  scroll-margin-top: 100px;
}

/* --fill (0…1) is set by the page script from the scroll position */
.journey__steps {
  --fill: 0;
  position: relative;
  margin: 0;
  padding: 0 0 0 56px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 7vw, 96px);
}

/* Track and progress line, from the first to the last marker centre */
.journey__steps::before,
.journey__steps::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 20px;
  width: 3px;
  border-radius: 2px;
}
.journey__steps::before {
  bottom: 20px;
  background: var(--sand-200);
}
.journey__steps::after {
  height: calc((100% - 40px) * var(--fill));
  background: var(--scrub-600);
  transition: height var(--dur-1) linear;
}

.journey-step {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
}

.journey-step__marker {
  position: absolute;
  left: -56px;
  top: 0;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #D8CFC2;
  border-radius: 50%;
  background: var(--sand-50);
  color: var(--sand-700);
  font: 500 14px/1 'Geist Mono', monospace;
  transition: background var(--dur-3), color var(--dur-3), border-color var(--dur-3);
}

.journey-step.is-active .journey-step__marker {
  border-color: var(--scrub-600);
  background: var(--scrub-600);
  color: var(--graphite-0);
}

.journey-step__body {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.journey-step__title {
  margin: 0;
  font: 400 clamp(30px, 1.2rem + 1.6vw, 44px)/1.1 'Instrument Serif', serif;
  color: var(--sand-950);
}

.journey-step__text {
  margin: 0;
  max-width: 520px;
  font: 400 18px/1.65 'Geist', sans-serif;
  color: var(--sand-900);
}

/* "You can" tip card */
.journey-tips {
  flex: 0 1 280px;
  min-width: 0;
  align-self: flex-start;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--sand-a10);
  border-radius: var(--radius-l);
  background: var(--graphite-0);
}

.journey-tips__label {
  font: 500 11px/1 'Geist Mono', monospace;
  letter-spacing: .08em;
  color: var(--sand-700);
}

.journey-tips__item {
  display: flex;
  gap: 10px;
  font: 400 16px/1.5 'Geist', sans-serif;
  color: var(--sand-900);
}

.journey-tips__check {
  flex: none;
  color: var(--scrub-600);
}

/* ── Patient story ──────────────────────────────────────────────────────── */

.story-section { padding: 0 clamp(8px, 1.2vw, 16px); }

.story {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--sand-a08);
  border-radius: 24px;
  background: var(--graphite-0);
}

.story__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 96px) clamp(20px, 4.2vw, 60px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

/* content-box: the 14% side padding widens the circle into an oval, as designed */
.story__photo {
  flex: 0 1 360px;
  aspect-ratio: 1;
  padding: 0 14%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: repeating-linear-gradient(135deg, var(--sand-100) 0 12px, var(--sand-200) 12px 24px);
  text-align: center;
  font: 500 11px/1.5 'Geist Mono', monospace;
  color: var(--sand-700);
}

.story__body {
  flex: 1 1 440px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.story__quote {
  margin: 0;
  font: 400 clamp(30px, 1.2rem + 2vw, 50px)/1.15 'Instrument Serif', serif;
  color: var(--sand-950);
  text-wrap: pretty;
}

.story__caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.story__name { font: 500 17px/1.3 'Geist', sans-serif; }

.story__meta {
  font: 400 15px/1.5 'Geist', sans-serif;
  color: var(--sand-700);
}

.story__disclaimer {
  padding: 12px 14px;
  border-radius: var(--radius-m);
  background: var(--sand-50);
  font: 400 14px/1.5 'Geist', sans-serif;
  color: var(--sand-900);
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */

.patient-faq {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 112px) clamp(20px, 4.2vw, 60px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.patient-faq__title {
  margin: 0;
  font: 400 clamp(40px, 1.4rem + 3vw, 64px)/1 'Instrument Serif', serif;
  color: var(--sand-950);
}

.faq-item { border-top: 1px solid var(--sand-a14); }

.faq-item__heading { margin: 0; }

.faq-item__toggle {
  width: 100%;
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sand-950);
  font: 500 20px/1.35 'Geist', sans-serif;
  text-align: left;
  cursor: pointer;
}

.faq-item__sign {
  flex: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sand-a24);
  border-radius: 50%;
  font: 400 18px/1 'Geist Mono', monospace;
}

.faq-item__answer {
  margin: 0;
  padding: 0 56px 28px 0;
  font: 400 18px/1.65 'Geist', sans-serif;
  color: var(--sand-900);
}

/* ── Treatment center finder ────────────────────────────────────────────── */

.finder {
  border-top: 1px solid var(--sand-a10);
  background: var(--graphite-0);
  scroll-margin-top: 80px;
}

.finder__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 112px) clamp(20px, 4.2vw, 60px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.finder__form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.finder__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.finder__field--postcode { flex: 1 1 260px; }

.finder__label { font: 500 16px/1 'Geist', sans-serif; }

.finder__input {
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--sand-a30);
  border-radius: 10px;
  background: var(--graphite-0);
  font: 400 18px/1 'Geist', sans-serif;
}

.finder__radii {
  display: flex;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--sand-a30);
  border-radius: 10px;
}

.finder__radius {
  min-width: 72px;
  border: 0;
  border-right: 1px solid var(--sand-a14);
  background: var(--graphite-0);
  color: var(--sand-950);
  font: 500 15px/1 'Geist', sans-serif;
  cursor: pointer;
}
.finder__radius[aria-pressed="true"] {
  background: var(--sand-950);
  color: var(--sand-50);
}

.finder__submit {
  height: 56px;
  padding: 0 26px;
  border: 1px solid var(--sand-950);
  border-radius: var(--radius-pill);
  background: var(--sand-950);
  color: var(--sand-50);
  font: 500 16px/1 'Geist', sans-serif;
  cursor: pointer;
}

.finder__status {
  font: 400 15px/1.4 'Geist', sans-serif;
  color: var(--sand-700);
}

.finder__results {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
}

.finder__list {
  flex: 1 1 380px;
  min-width: 0;
  max-height: 560px;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finder__empty {
  padding: 24px;
  border: 1px dashed var(--sand-a30);
  border-radius: 14px;
  font: 400 17px/1.55 'Geist', sans-serif;
  color: var(--sand-900);
}

/* Center card (the whole card is the select button) */
.center {
  width: 100%;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--sand-a14);
  border-radius: 14px;
  background: var(--graphite-0);
  text-align: left;
  cursor: pointer;
}

.center[aria-pressed="true"] {
  border-color: var(--scrub-600);
  box-shadow: 0 0 0 1px var(--scrub-600);
}

.center__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.center__name {
  font: 500 18px/1.3 'Geist', sans-serif;
  color: var(--sand-950);
}

.center__km {
  flex: none;
  font: 500 13px/1 'Geist Mono', monospace;
  color: var(--sand-700);
  font-variant-numeric: tabular-nums;
}

.center__addr {
  font: 400 15px/1.45 'Geist', sans-serif;
  color: var(--sand-900);
}

.center__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.center__tag {
  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  background: var(--sand-50);
  font: 400 13px/1 'Geist', sans-serif;
  color: var(--sand-900);
}

/* Next steps, only on the selected card */
.center__actions {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}
.center[aria-pressed="true"] .center__actions { display: flex; }

.center__appointment {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--scrub-600);
  color: var(--graphite-0);
  font: 500 15px/1 'Geist', sans-serif;
}

.center__call {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  color: var(--sand-950);
  font: 500 15px/1 'Geist', sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Placeholder map */
.finder-map {
  --radius-ring: 280px;
  flex: 1.2 1 420px;
  min-width: 0;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--sand-a10);
  border-radius: var(--radius-l);
  background-color: #EFEDE7;
  background-image:
    linear-gradient(var(--sand-a05) 1px, transparent 1px),
    linear-gradient(90deg, var(--sand-a05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.finder-map[data-radius="10"]  { --radius-ring: 160px; }
.finder-map[data-radius="100"] { --radius-ring: 620px; }

.finder-map__label {
  position: absolute;
  left: 14px;
  top: 12px;
  font: 500 11px/1 'Geist Mono', monospace;
  letter-spacing: .06em;
  color: var(--sand-700);
}

.finder-map__radius {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--radius-ring);
  height: var(--radius-ring);
  margin-left: calc(var(--radius-ring) / -2);
  margin-top: calc(var(--radius-ring) / -2);
  border: 1px dashed rgba(10, 122, 95, .5);
  border-radius: 50%;
  background: rgba(10, 122, 95, .05);
  transition: all var(--dur-4) var(--ease-diastole);
}

.finder-map__origin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 3px solid var(--graphite-0);
  border-radius: 50%;
  background: var(--sand-950);
}

.finder-map__pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 18px;
  height: 18px;
  border: 2px solid var(--graphite-0);
  border-radius: 50% 50% 50% 0;
  background: var(--sand-700);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  transform: translate(-50%, -100%);
  rotate: -45deg;
  transition: all var(--dur-2);
}

.finder-map__pin.is-selected {
  width: 26px;
  height: 26px;
  background: var(--scrub-600);
}
