/* Halvercroft Physio and Massage: today's free-times board. Graphite, chalk, slot cyan (only for
   free and bookable), and red only for the "now" line. Chivo 800 and Lexend 400/600. */

@font-face { font-family: Chivo; src: url("/demos/halvercroft/after/fonts/chivo-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: Lexend; src: url("/demos/halvercroft/after/fonts/lexend-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Lexend; src: url("/demos/halvercroft/after/fonts/lexend-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --g: #15181b;
  --g2: #1c2024;
  --g3: #262b30;
  --line: #343a40;
  --chalk: #f2f2ee;
  --muted: #a8aeb3;
  --cyan: #2cc6d8;
  --cyan-ink: #0c2f34;
  --red: #ff5a4e;
  --head: Chivo, "Arial Black", system-ui, sans-serif;
  --body: Lexend, system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--g); color: var(--chalk); font: 400 1rem/1.55 var(--body); font-variant-numeric: tabular-nums; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--chalk); color: var(--g); padding: 10px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 6px; border: 0; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button.cyan { background: var(--cyan); color: var(--cyan-ink); }
.button.cyan:hover { background: #5ad5e3; }
.button.chalk { background: var(--chalk); color: var(--g); }
.button.ghost { background: transparent; color: var(--chalk); box-shadow: inset 0 0 0 1.5px var(--chalk); }
.link { background: none; border: 0; padding: 8px 0; text-decoration: underline; cursor: pointer; color: var(--muted); }

/* ---- Header ---- */
.top { position: sticky; top: 0; z-index: 20; background: var(--g); border-bottom: 1px solid transparent; }
.top.is-raised { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1440px; margin: 0 auto; padding: 10px 24px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-weight: 800; font-size: 1.15rem; }
.wordmark em { font-style: normal; font-family: var(--body); font-weight: 400; color: var(--muted); font-size: 0.9rem; margin-left: 4px; }
.top nav { display: flex; align-items: center; gap: 22px; }
.nav-link { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.nav-link:hover { color: var(--chalk); }
.nav-phone { text-decoration: none; font-weight: 600; }
.nav-cta { min-height: 40px; }

/* ---- Hero ---- */
.strip { position: relative; margin: 0; }
.strip img { width: 100%; height: clamp(180px, 19vw, 280px); object-fit: cover; object-position: 50% 22%; }
.open { position: absolute; left: 24px; bottom: 16px; background: var(--g); padding: 6px 12px 6px 10px; border-radius: 4px; font-size: 0.88rem; display: flex; align-items: center; gap: 8px; }
.open::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.open.is-open::before { background: var(--cyan); }

.hero-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; max-width: 1440px; margin: 0 auto; padding: 28px 24px 56px; }
.kicker { color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; }
.hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.4rem); }
.hero h1 span { display: block; color: var(--cyan); }
.sub { margin-top: 14px; color: #d4d7d9; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.hero-call { font-weight: 600; font-size: 1.1rem; text-decoration: none; border-bottom: 1.5px solid var(--muted); }

.ask { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.ask label { display: block; font-family: var(--head); font-weight: 800; font-size: 1.15rem; margin-bottom: 10px; }
.ask-row { display: flex; gap: 8px; }
.ask-row input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--g2); }
.ask-row input::placeholder { color: #8b9196; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips button { background: var(--g3); border: 0; border-radius: 4px; padding: 6px 10px; font-size: 0.85rem; cursor: pointer; }
.chips button:hover { background: var(--line); }
.demo { margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.answer { margin-top: 14px; padding: 16px; background: var(--g2); border-radius: 6px; }
.answer h3 { font-size: 1.2rem; margin-bottom: 6px; }
.answer dl { margin: 10px 0 14px; display: grid; gap: 6px; }
.answer dl div { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; }
.answer dt { color: var(--muted); }
.answer dd { margin: 0; }
.answer .note { margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.answer.is-urgent { background: #3a1d1b; }

/* ---- The board ---- */
.board-wrap { min-width: 0; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.board-head h2 { font-size: 1.5rem; }
.next { color: var(--cyan); font-weight: 600; }
.board-note { font-size: 0.8rem; color: var(--muted); margin: 4px 0 10px; }
.board { position: relative; height: 430px; overflow: auto; background: var(--g2); border-radius: 8px; border: 1px solid var(--line); overscroll-behavior: contain; }
.board-fallback { padding: 20px; }
.grid { min-width: 540px; }
.lanes-head { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px 8px 8px 52px; background: var(--g2); border-bottom: 1px solid var(--line); }
.lane-head b { display: block; font-family: var(--head); font-weight: 800; font-size: 1.05rem; }
.lane-head span { display: block; font-size: 0.72rem; color: var(--muted); line-height: 1.3; }
.body { position: relative; height: calc(var(--h) + 24px); padding: 12px 8px 12px 52px; }
.axis { position: absolute; left: 0; top: 12px; width: 48px; }
.tick { position: absolute; right: 8px; transform: translateY(-50%); font-size: 0.7rem; color: #80878d; }
.lanes { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; height: var(--h); background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 60px); }
.lane { position: relative; list-style: none; margin: 0; padding: 0; transition: opacity 0.3s; }
.slot { position: absolute; left: 0; right: 0; padding: 1px 0; }
.slot > * { display: flex; align-items: center; gap: 6px; height: 100%; border-radius: 3px; padding: 0 7px; font-size: 0.74rem; line-height: 1; overflow: hidden; }
.free { background: var(--cyan); color: var(--cyan-ink); text-decoration: none; }
.free b { font-weight: 600; font-size: 0.8rem; }
.free:hover { background: #6ddbe7; }
.taken { background: #30363c; }
.is-past.free { background: transparent; color: #6b7177; box-shadow: inset 0 0 0 1px var(--line); text-decoration: line-through; pointer-events: none; }
.is-past.taken { opacity: 0.4; }
.now { position: absolute; z-index: 2; left: 4px; right: 0; top: 12px; height: 2px; background: var(--red); pointer-events: none; }
.now.is-live { transition: transform 1s linear; }
.now span { position: absolute; left: 0; top: -9px; background: var(--red); color: #fff; font-size: 0.68rem; font-weight: 600; padding: 2px 5px; border-radius: 3px; }
.board.has-pick .lane:not(.is-pick), .board.has-pick .lane-head:not(.is-pick) { opacity: 0.25; }
.lane-head.is-pick b { color: var(--cyan); }
.key { display: flex; gap: 18px; list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.8rem; color: var(--muted); }
.key li { display: flex; align-items: center; gap: 6px; }
.key i { width: 14px; height: 10px; border-radius: 2px; }
.k-free { background: var(--cyan); }
.k-taken { background: #30363c; }
.k-now { background: var(--red); height: 2px !important; }

/* ---- Sections ---- */
.section { padding: 80px 0; border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.lede { margin-top: 12px; color: #d4d7d9; max-width: 40em; }

.first { background: var(--g2); }
.first-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: center; }
.segments { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 8px; }
.segments li { border-radius: 6px; background: var(--g); }
.segments button { display: flex; width: 100%; gap: 16px; align-items: baseline; text-align: left; background: none; border: 0; padding: 14px 16px; cursor: pointer; }
.segments button b { font-weight: 600; color: var(--muted); min-width: 7em; }
.segments button span { font-family: var(--head); font-weight: 800; font-size: 1.1rem; }
.segments p { display: none; padding: 0 16px 16px calc(7em + 32px); color: #d4d7d9; }
.segments li.is-on { box-shadow: inset 0 0 0 1.5px var(--cyan); }
.segments li.is-on b { color: var(--cyan); }
.segments li.is-on p { display: block; }
.dial { margin: 0; }
.dial svg { width: 100%; max-width: 320px; margin: 0 auto; display: block; }
.dial-track { fill: none; stroke: var(--g3); stroke-width: 20; }
.dial-seg { fill: none; stroke: var(--line); stroke-width: 20; transition: stroke 0.25s; }
.dial-seg.is-on { stroke: var(--cyan); }
.dial-num { fill: var(--chalk); font-family: var(--head); font-weight: 800; font-size: 54px; }
.dial-unit { fill: var(--muted); font-size: 15px; }

.team { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.team li { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.team b { font-family: var(--head); font-weight: 800; font-size: 1.2rem; }
.role { color: var(--cyan); font-weight: 600; font-size: 0.9rem; }
.team p { color: #d4d7d9; font-size: 0.95rem; }
.speaks { color: var(--muted); font-size: 0.85rem; }
.team a { margin-top: auto; padding-top: 8px; font-weight: 600; }

.fees-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 48px; }
.fee-table { width: 100%; border-collapse: collapse; }
.fee-table th, .fee-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); font-weight: 400; }
.fee-table thead th { color: var(--muted); font-size: 0.85rem; }
.fee-table tbody th span { color: var(--muted); font-size: 0.85rem; margin-left: 4px; }
.fee-table td:last-child { text-align: right; font-weight: 600; }

.answers { margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.answers dt { font-weight: 600; margin-bottom: 4px; }
.answers dd { margin: 0; color: #d4d7d9; }

.visit-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.stairs { margin: 0; }
.stairs img { border-radius: 6px; }
.stairs figcaption { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }
.visit p { margin-top: 12px; color: #d4d7d9; }
.hours { margin: 24px 0 0; display: grid; gap: 8px; }
.hours div { display: grid; grid-template-columns: 11em 1fr; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; }

.foot { padding: 48px 0 96px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.foot p + p { margin-top: 8px; }
.foot-name { font-family: var(--head); font-weight: 800; color: var(--chalk); font-size: 1.05rem; }
.dock { display: none; }

/* ---- Booking page ---- */
.book { padding-top: 40px; padding-bottom: 80px; }
.book h1 { font-size: clamp(2rem, 4vw, 3rem); }
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; margin-top: 28px; align-items: start; }
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step > legend { font-family: var(--head); font-weight: 800; font-size: 1.4rem; margin-bottom: 14px; padding: 0; }
.who-pick, .days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.who-pick button, .days button { background: var(--g2); border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; cursor: pointer; }
.who-pick button[aria-pressed="true"], .days button[aria-pressed="true"] { background: var(--chalk); color: var(--g); border-color: var(--chalk); }
.slot-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.g-name { font-weight: 600; margin-bottom: 8px; }
.g-row { display: flex; flex-wrap: wrap; gap: 6px; }
.g-row .free { border: 0; border-radius: 4px; padding: 8px 12px; display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.hint { color: var(--muted); font-size: 0.88rem; margin-top: 10px; }
.picked { font-weight: 600; margin-bottom: 12px; color: var(--cyan); }
.types { display: grid; gap: 6px; }
.type, .pay label, .check { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--g2); border-radius: 6px; cursor: pointer; }
.type .tmeta { margin-left: auto; color: var(--muted); white-space: nowrap; }
.type input, .pay input, .check input { accent-color: var(--cyan); width: 18px; height: 18px; flex: none; }
.step-actions { display: flex; align-items: center; gap: 20px; margin-top: 18px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field input { min-height: 48px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--g2); }
.pay { border: 0; margin: 20px 0 0; padding: 0; display: grid; gap: 6px; }
.pay legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.check { margin-top: 12px; background: none; padding-left: 0; }
.error { margin-top: 14px; color: #ffb4ad; }
#confirm { margin-top: 20px; }
.done h2 { font-size: 2rem; color: var(--cyan); }
.done p { margin-top: 12px; }
.done .button { margin-top: 20px; }
.summary { position: sticky; top: 84px; background: var(--g2); border-radius: 8px; padding: 20px; }
.summary h2 { font-size: 1.2rem; }
.summary dl { margin: 14px 0 0; display: grid; gap: 10px; }
.summary dl div { display: grid; grid-template-columns: 5.5em 1fr; gap: 8px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; }
.s-where { margin-top: 16px; font-size: 0.85rem; color: var(--muted); }

/* ---- Narrow screens ---- */
@media (max-width: 1060px) {
  .top nav .nav-link { display: none; }
  .hero-in { grid-template-columns: 1fr; }
  .first-grid, .fees-grid, .visit-grid { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
}

@media (max-width: 767px) {
  .top-in { padding: 8px 16px; }
  .wordmark em { display: none; }
  .nav-phone { display: none; }
  .strip img { height: 172px; object-position: 50% 30%; }
  .open { left: 16px; bottom: 12px; font-size: 0.8rem; }
  .hero-in { padding: 16px 16px 40px; gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy > .kicker, .hero-copy > h1, .hero-copy > .sub, .hero-copy > .hero-actions { order: 0; }
  .hero h1 { font-size: 2.05rem; }
  .sub { font-size: 0.95rem; margin-top: 10px; }
  .hero-actions { margin-top: 14px; }
  .board-wrap { order: 1; min-width: 0; margin-top: 24px; }
  .ask { order: 2; margin-top: 24px; min-width: 0; }
  .board { height: 360px; }
  .grid { min-width: 600px; }
  .ask-row { flex-direction: column; }
  .wrap { padding: 0 16px; }
  .section { padding: 56px 0; }
  .team { grid-template-columns: 1fr; }
  .answers { grid-template-columns: 1fr; }
  .segments p { padding-left: 16px; }
  .hours div { grid-template-columns: 1fr; gap: 0; }
  .fields { grid-template-columns: 1fr; }
  .dock { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--g); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform 0.25s; }
  .dock.is-on { transform: none; }
  .dock .button { flex: 1; }
  .book { padding-top: 24px; }
}

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