/* fonts: self-hosted, Hebrew + Latin subsets */
@font-face { font-family: "Secular One"; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/secular-one-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Secular One"; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/secular-one-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Assistant"; font-weight: 200 800; font-display: swap;
  src: url("../assets/fonts/assistant-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Assistant"; font-weight: 200 800; font-display: swap;
  src: url("../assets/fonts/assistant-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --enamel: #0f1b3d;
  --enamel-deep: #0a1430;
  --enamel-raised: #16264f;
  --rule: #263a6b;
  --porcelain: #eef2f7;
  --porcelain-dim: #b3c0d9;
  --route: #b9e0dc;
  --fascia: #e5383b;
  --osteo: #4a86e8;
  --massage: #f4a52a;
  --reflex: #2fb36e;
  --chinese: #c77dd9;
  --action: #d7313a;
  --action-hover: #ea4049;

  --display: "Secular One", "Assistant", system-ui, sans-serif;
  --body: "Assistant", system-ui, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spine-x: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; scrollbar-color: var(--rule) var(--enamel-deep); }
body {
  margin: 0;
  background: var(--enamel);
  color: var(--porcelain);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--route); color: var(--enamel); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--enamel-deep); }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 10px; border: 2px solid var(--enamel-deep); }
:focus-visible { outline: 3px solid var(--route); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: var(--s4); top: -60px; z-index: 20; background: var(--route); color: var(--enamel); padding: var(--s2) var(--s4); border-radius: 6px; font-weight: 700; }
.skip:focus { top: var(--s3); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
  height: 72px; padding-inline: clamp(var(--s4), 4vw, 64px);
  background: color-mix(in srgb, var(--enamel) 92%, transparent);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(1.2) blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; }
.brand-badge {
  width: 28px; height: 28px; border-radius: 50%;
  border: 5px solid var(--route); background: var(--enamel);
  box-shadow: 0 0 0 2px var(--enamel), 0 0 0 4px var(--porcelain);
}
.brand-name { font-family: var(--display); font-size: 1.25rem; letter-spacing: .01em; }
.topnav { display: flex; align-items: center; gap: var(--s5); font-size: 1.0625rem; }
.topnav a { text-decoration: none; color: var(--porcelain-dim); transition: color .2s; }
.topnav a:hover { color: var(--porcelain); }
.topnav .topnav-cta {
  color: var(--porcelain); padding: 6px 18px; border: 2px solid var(--porcelain); border-radius: 999px; font-weight: 700;
  transition: background .2s, color .2s;
}
.topnav .topnav-cta:hover { background: var(--porcelain); color: var(--enamel); }

/* ---------- hero map ---------- */
.hero { background: var(--enamel); overflow: hidden; }
.hero-frame { position: relative; max-width: 1680px; margin-inline: auto; }
.map { display: block; width: 100%; height: auto; overflow: visible; }
.map-tall { display: none; }

.ln, .route { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ln { stroke-width: 11; transition: opacity .35s var(--ease-out), stroke-width .35s var(--ease-out); }
.ln[data-line="fascia"] { stroke: var(--fascia); }
.ln[data-line="osteo"] { stroke: var(--osteo); }
.ln[data-line="massage"] { stroke: var(--massage); }
.ln[data-line="reflex"] { stroke: var(--reflex); }
.route { stroke: var(--route); stroke-width: 16; }
.route-cap { stroke: var(--route); stroke-width: 10; stroke-linecap: round; }
.st { fill: var(--porcelain); stroke: var(--enamel); stroke-width: 5; }
.xchg { fill: var(--enamel); stroke: var(--porcelain); stroke-width: 8; }
.st-ln { stroke: var(--c); stroke-width: 5; transition: opacity .35s var(--ease-out); }
[data-focus] .st-ln { opacity: .3; }
.latin { white-space: nowrap; unicode-bidi: isolate; }
.nowrap { white-space: nowrap; }
.st-label, .xchg-label, .ln-label { font-family: var(--display); }
.st-label { fill: var(--porcelain); font-size: 34px; }
.xchg-label { fill: var(--porcelain); font-size: 30px; }
.ln-label { font-size: 24px; transition: opacity .35s var(--ease-out); }
.map-tall .ln-label { font-size: 20px; }
.ln-label[data-line="fascia"] { fill: var(--fascia); }
.ln-label[data-line="osteo"] { fill: #7aa6ef; }
.ln-label[data-line="massage"] { fill: var(--massage); }
.ln-label[data-line="reflex"] { fill: var(--reflex); }

/* the chosen line burns brightest */
[data-focus] .ln { opacity: .22; }
[data-focus] .ln-label { opacity: .3; }
[data-focus="fascia"] [data-line="fascia"],
[data-focus="osteo"] [data-line="osteo"],
[data-focus="massage"] [data-line="massage"],
[data-focus="reflex"] [data-line="reflex"] { opacity: 1; }
[data-focus="fascia"] .ln[data-line="fascia"],
[data-focus="osteo"] .ln[data-line="osteo"],
[data-focus="massage"] .ln[data-line="massage"],
[data-focus="reflex"] .ln[data-line="reflex"] { stroke-width: 15; }

/* overlays positioned on the 1440x760 map */
.hero-title { position: absolute; inset-inline-start: 4.5%; top: 7%; width: 47%; }
.hero-title h1 { font-size: clamp(64px, 6.4vw, 104px); letter-spacing: -.01em; line-height: 1; }
.hero-name { margin-top: var(--s4); font-family: var(--display); font-size: clamp(30px, 2.9vw, 46px); line-height: 1.1; color: var(--porcelain); }
.hero-sub { margin-top: var(--s3); font-size: clamp(20px, 1.75vw, 28px); color: var(--porcelain-dim); font-weight: 600; }
.hero-tag { margin-top: var(--s4); font-family: var(--display); font-size: clamp(22px, 1.9vw, 30px); color: var(--route); display: flex; gap: .6em; }

/* the action waits at the treatment interchange, between the osteo and reflex lines */
.hero-action { position: absolute; left: 20.833%; top: 73.5%; transform: translateX(-50%); display: flex; }
.hero-board {
  position: absolute; inset-inline-start: 4.5%; top: 68%; width: 52%;
  display: grid; grid-template-columns: repeat(4, auto) 1fr; gap: 0; margin: 0;
  border: 2px solid var(--rule); border-radius: 12px; background: var(--enamel-deep);
}
.hero-board > div { padding: var(--s3) var(--s5); border-inline-start: 2px solid var(--rule); }
.hero-board > div:first-child { border-inline-start: 0; }
.hero-board dt { font-size: .875rem; color: var(--porcelain-dim); line-height: 1.3; }
.hero-board dd { margin: 0; font-family: var(--display); font-size: 1.375rem; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s3);
  min-height: 52px; padding: 0 var(--s5);
  border-radius: 999px; font-family: var(--body); font-weight: 700; font-size: 1.1875rem; text-decoration: none;
  transition: background .2s, transform .2s var(--ease-out), box-shadow .2s;
}
.btn-primary { background: var(--action); color: #fff; box-shadow: 0 4px 12px -4px rgba(4, 8, 20, .6); }
.btn-primary:hover { background: var(--action-hover); transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(4, 8, 20, .7); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { color: var(--porcelain); border: 2px solid var(--rule); }
.btn-ghost:hover { border-color: var(--porcelain-dim); }
.btn-lg { min-height: 64px; padding: 0 var(--s6); font-size: 1.375rem; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease-out); }
.btn:hover .ico { transform: translateX(-4px); }

/* ---------- route spine and sections ---------- */
.spine-wrap {
  position: relative;
  max-width: 1200px; margin-inline: auto;
  padding: var(--s9) clamp(var(--s4), 5vw, 64px) var(--s8);
  padding-inline-start: calc(var(--spine-x) + clamp(48px, 6vw, 96px));
}
.spine {
  position: absolute; top: 0; bottom: 120px;
  inset-inline-start: var(--spine-x);
  width: 12px; border-radius: 12px; background: var(--rule);
}
.spine-lit {
  position: absolute; inset: 0; border-radius: inherit; background: var(--route);
  transform-origin: top; transform: scaleY(var(--progress, 0));
}
.section { position: relative; padding-bottom: var(--s9); }
.section h2 { position: relative; font-size: clamp(36px, 4vw, 56px); margin-bottom: var(--s5); }
.stop {
  position: absolute; top: .5em; transform: translateY(-50%);
  inset-inline-start: calc(-1 * clamp(48px, 6vw, 96px) - 8px);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--enamel); border: 6px solid var(--rule);
  transition: border-color .5s var(--ease-out), background .5s var(--ease-out);
}
.section.reached .stop { border-color: var(--porcelain); background: var(--route); }
.stop-end { width: 40px; height: 40px; inset-inline-start: calc(-1 * clamp(48px, 6vw, 96px) - 14px); }
.lede { font-size: clamp(1.1875rem, 1.5vw, 1.375rem); max-width: 60ch; color: var(--porcelain-dim); }

/* stations */
.stations-list { list-style: none; margin: var(--s7) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.stations-list::before {
  content: ""; position: absolute; top: 13px; inset-inline: 10px calc(33.333% - 30px);
  height: 10px; border-radius: 10px; background: var(--route);
}
.stations-list li { position: relative; padding-top: 56px; padding-inline-end: var(--s6); }
.stations-list li::before {
  content: ""; position: absolute; top: 4px; inset-inline-start: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--porcelain); border: 5px solid var(--enamel);
}
.stations-list li:last-child::before { width: 40px; height: 40px; top: -2px; background: var(--enamel); border: 7px solid var(--porcelain); }
.stations-list h3 { font-size: 2rem; color: var(--route); margin-bottom: var(--s3); }
.stations-list p { max-width: 34ch; }

/* lines legend + merge */
/* desktop: legend text sits flush against the line ends; each row is 150px, heading centred on its line */
.lines-map { display: grid; grid-template-columns: 1fr 400px; align-items: start; margin-top: var(--s7); }
.legend { list-style: none; margin: 0; padding: 0; }
.legend li {
  display: flex; flex-direction: column; align-items: flex-end; text-align: end; gap: var(--s1);
  height: 150px; padding-top: 75px; padding-inline: var(--s5) var(--s3);
  border-radius: 12px; cursor: default; outline-offset: -3px;
  transition: background .3s var(--ease-out);
}
.legend li:hover, .legend li:focus-visible { background: var(--enamel-raised); }
.legend h3 { font-size: 1.75rem; line-height: 32px; margin-top: -16px; display: flex; align-items: center; gap: var(--s3); }
.legend h3::before { content: ""; width: 28px; height: 10px; border-radius: 10px; background: var(--c); flex: none; display: none; }
.legend p { color: var(--porcelain-dim); max-width: 52ch; line-height: 1.5; text-align: start; align-self: stretch; }
@media (min-width: 1100px) {
  .legend li { width: min(46ch, 100%); margin-inline-start: auto; }
}
[data-line="fascia"] { --c: var(--fascia); }
[data-line="osteo"] { --c: var(--osteo); }
[data-line="massage"] { --c: var(--massage); }
[data-line="reflex"] { --c: var(--reflex); }
[data-line="chinese"] { --c: var(--chinese); }
.merge { display: block; width: 400px; height: 600px; overflow: visible; }

/* takeaways */
.takeaways { list-style: none; margin: 0; padding: 0; max-width: 64ch; }
.takeaways li { position: relative; padding: var(--s4) 0; padding-inline-start: 44px; border-bottom: 1px solid var(--rule); font-size: 1.25rem; }
.takeaways li:last-child { border-bottom: 0; }
.takeaways li::before {
  content: ""; position: absolute; inset-inline-start: 4px; top: calc(var(--s4) + .55em);
  width: 18px; height: 18px; border-radius: 50%; background: var(--porcelain); border: 4px solid var(--route);
}
.takeaways strong { font-weight: 700; color: var(--porcelain); }

/* departures board */
.board { border: 2px solid var(--rule); border-radius: 16px; background: var(--enamel-deep); overflow: hidden; max-width: 880px; }
.board table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th, .board td { text-align: start; padding: var(--s4) var(--s5); }
.board thead th { font-size: .9375rem; font-weight: 600; color: var(--porcelain-dim); border-bottom: 2px solid var(--rule); }
.board tbody tr + tr { border-top: 1px solid var(--rule); }
.board tbody td { font-size: 1.1875rem; }
.num {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--route); color: var(--enamel); font-family: var(--display); font-size: 1.125rem;
}
.tbd { color: var(--massage); font-weight: 600; }
.board-meta { display: grid; grid-template-columns: repeat(4, auto); margin: 0; border-top: 2px solid var(--rule); }
.board-meta > div { padding: var(--s4) var(--s5); }
.board-meta > div + div { border-inline-start: 2px solid var(--rule); }
.board-meta dt { font-size: .9375rem; color: var(--porcelain-dim); }
.board-meta dd { margin: 0; font-family: var(--display); font-size: 1.375rem; }

/* instructor */
.instructor { display: grid; grid-template-columns: minmax(280px, 40%) 1fr; gap: var(--s7); align-items: start; }
.ins-title { font-family: var(--display); font-size: clamp(36px, 3.6vw, 52px); line-height: 1.05; }
.ins-role { margin-top: var(--s3); color: var(--route); font-weight: 600; font-size: 1.25rem; }
.ins-body p { max-width: 62ch; font-size: 1.25rem; }
.ins-body p + p { margin-top: var(--s4); }
.studies { list-style: none; margin: var(--s6) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s3); }
.studies li {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 6px 16px 6px 14px; border-radius: 999px; border: 2px solid var(--rule); font-weight: 600;
}
.studies li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }

/* terminus */
.terminus { padding-bottom: var(--s7); }
.terminus h2 { font-size: clamp(44px, 5.2vw, 76px); }
.reg-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s6); margin-top: var(--s6); }
.phone { font-family: var(--display); font-size: 1.75rem; text-decoration: none; color: var(--porcelain); border-bottom: 2px solid var(--rule); }
.phone:hover { border-color: var(--route); }

/* footer */
.footer {
  background: var(--enamel-deep); border-top: 1px solid var(--rule);
  padding: var(--s8) var(--s5) var(--s6);
  display: flex; flex-direction: column; align-items: center; gap: var(--s5);
}
/* the logo's dark-teal lettering needs a light ground: it sits on a porcelain plate */
.footer-plate {
  background: var(--porcelain); border-radius: 16px; padding: var(--s3) var(--s5);
  box-shadow: 0 8px 24px -12px rgba(4, 8, 20, .7);
}
a.footer-plate { display: block; transition: transform .25s var(--ease-out); }
a.footer-plate:hover { transform: translateY(-2px); }
.footer-logo { display: block; width: min(420px, 76vw); height: auto; }
.footer-note { color: var(--porcelain-dim); font-size: .9375rem; }

/* ---------- entrance: route draws once ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .map .route, .js .map .ln { stroke-dasharray: 1.01 1.01; stroke-dashoffset: 1.01; }
  .js.drawn .map .route { stroke-dashoffset: 0; transition: stroke-dashoffset 1.3s var(--ease-out); }
  .js.drawn .map .ln { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease-out) .55s, opacity .35s var(--ease-out), stroke-width .35s var(--ease-out); }
  .spine-lit { transition: transform .15s linear; }
}

/* ---------- narrower screens ---------- */
@media (max-width: 1099px) {
  .topnav a:not(.topnav-cta) { display: none; }
  .map-wide { display: none; }
  .map-tall { display: block; max-width: 460px; margin: var(--s5) auto 0; }
  .hero-frame { padding: var(--s7) var(--s5) var(--s6); }
  .hero-title, .hero-action, .hero-board { position: static; width: auto; }
  .hero-title h1 { font-size: clamp(48px, 12vw, 80px); }
  .hero-name { font-size: clamp(26px, 7vw, 40px); }
  .hero-action { margin-top: var(--s6); transform: none; }
  .hero-board { margin-top: var(--s5); grid-template-columns: repeat(2, 1fr); }
  .hero-board > div { border-inline-start: 0; border-top: 2px solid var(--rule); }
  .hero-board > div:nth-child(-n+2) { border-top: 0; }
  .hero-board > div:nth-child(even) { border-inline-start: 2px solid var(--rule); }
  .hero-board .wide { grid-column: 1 / -1; border-inline-start: 0 !important; }
  .hero-board dd { white-space: normal; }

  .lines-map { grid-template-columns: 1fr; }
  .legend li { align-items: stretch; text-align: start; }
  .legend h3 { margin-top: 0; }
  .legend h3::before { display: block; }
  .merge {
    order: -1; position: sticky; top: 60px; z-index: 2; width: 100%; height: 180px;
    background: var(--enamel); border-bottom: 1px solid var(--rule); margin-bottom: var(--s3);
  }
  .legend li { height: auto; padding-block: var(--s4); }
  .instructor { grid-template-columns: 1fr; gap: var(--s5); }
}
@media (max-width: 720px) {
  :root { --spine-x: 14px; }
  body { font-size: 1.0625rem; }
  .topbar { height: 60px; }
  .brand-name { font-size: 1.125rem; }
  .spine-wrap { padding-top: var(--s8); padding-inline-start: calc(var(--spine-x) + 40px); }
  .stop { inset-inline-start: -48px; width: 24px; height: 24px; border-width: 5px; }
  .stop-end { inset-inline-start: -54px; width: 34px; height: 34px; }
  .section { padding-bottom: var(--s8); }
  .stations-list { grid-template-columns: 1fr; gap: var(--s5); }
  .stations-list::before { display: none; }
  .stations-list li { padding-top: 0; padding-inline-start: 44px; }
  .stations-list li::before { top: 4px; }
  .stations-list li:last-child::before { top: 0; }
  .board th, .board td { padding: var(--s3) var(--s3); }
  .board tbody td { font-size: 1rem; }
  .board-meta { grid-template-columns: 1fr; }
  .board-meta > div + div { border-inline-start: 0; border-top: 1px solid var(--rule); }
  .btn-lg { width: 100%; justify-content: center; }
}
