@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage-grotesque-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage-grotesque-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/assets/fonts/nunito-sans-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("/assets/fonts/nunito-sans-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
  --text-sm: 0.9rem;
  --text-base: clamp(1.0625rem, 1rem + 0.25vw, 1.2rem);
  --text-lead: clamp(1.25rem, 1.1rem + 0.8vw, 1.7rem);
  --text-h2: clamp(2rem, 1.4rem + 2.8vw, 3.75rem);
  --text-title: clamp(2.6rem, 1.5rem + 5.4vw, 6.5rem);
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4.5rem;
  --space-xl: clamp(6rem, 12vw, 12rem);
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --content-max: 76rem;
  --prose-max: 54ch;
  --radius-card: 1.75rem;
  --color-text: #12393c;
  --color-surface: #eaf2ee;
  --color-card: #fbfdfb;
  --color-tint: #cfe3da;
  --color-accent: #b23c22;
  --color-error: #a11212;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; padding-bottom: 5rem; background: var(--color-surface); color: var(--color-text); font-family: var(--font-body); font-size: var(--text-base); line-height: 1.65; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.06; letter-spacing: -0.02em; hyphens: auto; margin: 0; }
p { margin: 0 0 var(--space-sm); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: 0.25rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link { position: absolute; left: var(--gutter); top: -6rem; z-index: 40; padding: 0.75rem 1rem; background: var(--color-text); color: #fff; border-radius: 1rem; }
.skip-link:focus { top: 0.5rem; }
.demo-notice { margin: 0; padding-inline: var(--gutter); font-size: var(--text-sm); background: var(--color-tint); }
.demo-notice a { display: inline-block; padding-block: 0.7rem; min-height: 44px; }

.site-header { padding: var(--space-sm) var(--gutter); }
.site-header__brand { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; text-decoration: none; }
.site-header__brand svg { width: 0.9rem; height: 1.8rem; }

/* Phone: tab bar at the thumb. From 60rem the same links sit at the top right. */
.tabs { position: fixed; left: 0.5rem; right: 0.5rem; bottom: 0.5rem; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); padding: 0.25rem; background: var(--color-text); border-radius: 1.5rem; }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; min-height: 56px; border-radius: 1.25rem; color: #fff; font-size: 0.8rem; font-weight: 600; text-decoration: none; transition: background-color 200ms; }
@media (max-width: 24rem) { .tabs a { font-size: 0.7rem; } }
.tabs svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current="page"] { background: #fff; color: var(--color-text); }

.hero { padding: var(--space-md) var(--gutter) var(--space-lg); position: relative; }
.hero__title { font-size: var(--text-title); max-width: 13ch; margin-bottom: var(--space-sm); hyphens: manual; }
.hero__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: var(--space-md) 0 0; padding: 0; font-size: var(--text-sm); font-weight: 600; }
.hero__tagline { font-size: var(--text-lead); line-height: 1.35; max-width: 34ch; }

.map { display: grid; gap: var(--space-md); padding: var(--space-lg) var(--gutter); }
.map__head h2 { font-size: var(--text-h2); margin-bottom: var(--space-xs); }
.map__figure { margin: 0; max-width: 20rem; justify-self: center; width: 100%; }
.map__figure svg { display: block; width: 100%; height: auto; }
.body-part { fill: #b4d3c6; }
.body-limb { fill: none; stroke: #b4d3c6; stroke-width: 24; stroke-linecap: round; }
.body-limb--torso { stroke-width: 62; }
.body-limb--leg { stroke-width: 28; }
.map__caption { text-align: center; font-size: var(--text-sm); }
.body-zone { fill: transparent; cursor: pointer; }
.body-zone__dot { fill: var(--color-accent); opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0.4); transition: opacity 200ms, transform 300ms ease; pointer-events: none; }
.is-active > .body-zone__dot { opacity: 0.9; transform: scale(1); }
.map__picker { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.map__picker button { display: none; min-height: 48px; padding: 0.4rem 1.1rem; border: 2px solid var(--color-text); border-radius: 99px; background: none; color: inherit; font: 600 1rem var(--font-body); cursor: pointer; transition: background-color 200ms, color 200ms; }
.js .map__picker button { display: block; }
.map__picker button[aria-pressed="true"] { background: var(--color-text); color: #fff; }
.map__panels { display: grid; gap: var(--space-sm); }
.panel { padding: var(--space-md); background: var(--color-card); border-radius: var(--radius-card); }
.panel h3 { font-size: 1.75rem; margin-bottom: var(--space-xs); }
.panel ul { margin: 0 0 var(--space-sm); padding-left: 1.1rem; }
.js .panel:not(.is-revealed) { display: none; }
.js .panel.is-revealed { animation: rise 350ms ease; }
@keyframes rise { from { opacity: 0; transform: translateY(0.5rem); } }

.cards { list-style: none; margin: 0; padding: var(--space-lg) var(--gutter); display: grid; gap: var(--space-sm); }
.card { padding: var(--space-md); background: var(--color-card); border-radius: var(--radius-card); }
.card h2, .card h3 { font-size: 1.6rem; margin-bottom: var(--space-xs); }
.card p:last-child { margin: 0; }

.lead-in { padding: var(--space-xl) var(--gutter); }
.lead-in h2 { font-size: var(--text-h2); max-width: 18ch; margin-bottom: var(--space-sm); }
.lead-in p { max-width: var(--prose-max); }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0.8rem 1.6rem; border: 0; border-radius: 99px; background: var(--color-accent); color: #fff; font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: transform 250ms ease; }
.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--color-accent); text-underline-offset: 0.25em; }

.page { max-width: var(--content-max); margin-inline: auto; padding: var(--space-md) var(--gutter) var(--space-lg); }
.page h1 { font-size: var(--text-title); max-width: 14ch; margin-bottom: var(--space-sm); }
.page__lead { font-size: var(--text-lead); line-height: 1.35; max-width: 40ch; margin-bottom: var(--space-lg); }
.page .cards { padding: 0; }
.timeline { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.timeline li { counter-increment: step; position: relative; padding: 0 0 var(--space-md) 3.25rem; }
.timeline li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--color-text); color: #fff; font-weight: 600; }
.timeline li::after { content: ""; position: absolute; left: 1.1rem; top: 2.5rem; bottom: 0.3rem; border-left: 2px dotted var(--color-text); }
.timeline li:last-child::after { display: none; }
.timeline h2 { font-size: 1.5rem; margin-bottom: 0.25rem; }

.form { max-width: 34rem; display: grid; gap: var(--space-sm); }
.form__field { display: grid; gap: 0.25rem; }
.form__field input, .form__field select, .form__field textarea { min-height: 50px; padding: 0.6rem 0.9rem; border: 2px solid var(--color-text); border-radius: 1rem; background: var(--color-card); color: inherit; font: inherit; }
.radios { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; min-width: 0; }
.radios legend { padding: 0; margin-bottom: 0.25rem; }
.radios label { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; cursor: pointer; }
.radios input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--color-accent); }
.form__hint { font-size: var(--text-sm); margin: 0; }
.form__status { font-weight: 600; color: var(--color-accent); margin: 0; }

.site-footer { padding: var(--space-lg) var(--gutter); background: var(--color-text); color: #fff; border-radius: 2.5rem 2.5rem 0 0; display: grid; gap: var(--space-md); margin-bottom: -5rem; padding-bottom: 7rem; }
.site-footer__name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: var(--space-xs); }
.site-footer a { display: inline-block; padding-block: 0.65rem; }
.site-footer__nav { display: flex; gap: var(--space-sm); }

/* The plumb line hangs from the top of the page and settles after each scroll. */
.plumb { display: none; }

@media (min-width: 48rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .site-footer { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 60rem) {
  body { padding-bottom: 0; }
  .site-footer { margin-bottom: 0; padding-bottom: var(--space-lg); }
  .site-header { display: flex; align-items: center; justify-content: space-between; }
  .tabs { position: absolute; left: auto; right: var(--gutter); bottom: auto; top: 3.75rem; display: flex; gap: 0.25rem; background: none; padding: 0; }
  .tabs a { flex-direction: row; gap: 0.4rem; min-height: 48px; padding-inline: 1rem; color: var(--color-text); font-size: 1rem; }
  .tabs a:hover { background: var(--color-tint); }
  .tabs a[aria-current="page"] { background: var(--color-text); color: #fff; }
  .hero, .lead-in { max-width: var(--content-max); margin-inline: auto; }
  .hero { padding-top: var(--space-lg); }
  .map { grid-template-columns: minmax(14rem, 22rem) 1fr; column-gap: var(--space-lg); align-items: start; max-width: var(--content-max); margin-inline: auto; }
  .map__head { grid-column: 1 / -1; }
  .map__figure { grid-row: 2 / span 2; position: sticky; top: var(--space-sm); }
  .plumb { display: block; position: absolute; top: 0; right: var(--gutter); width: 3rem; height: 72vh; pointer-events: none; transform-origin: 50% 0; will-change: transform; }
  .plumb svg { display: block; width: 100%; height: 100%; }
}

@media (min-width: 90rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

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