/* Hallmark · shape: a pocket guide (contents page as the cover, four chapters, the booking page) · genre: editorial · theme: custom · job: book · idea: "a guide for nervous patients where every answer is signed by the patient who gave it" · vibe: "calm, plain-spoken, bold type, lilac and ink"
 * paper: oklch(99.2% 0.005 308) · accent: oklch(47% 0.2 308) · display: Parkinsans 800 · body: Parkinsans 400/600 · hero: type-led book page, the guide's title over its contents, five leader lines from question to the patient who answers · nav: masthead strip (wordmark and trade line left, rating and call right); the contents list is the page's nav · footer: ink band, name and address left, how the guide was written right · imagery: none · signature: the leader line, question then heavy violet dots then the answering patient's name, used as contents, chapter heads and the booking line
 * axes: light/grotesk-heavy/chromatic-violet · posture: committed (lilac and ink bands carry the surfaces below the cover; violet is the signal) · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V5 · weakest: P and S, a type-only guide could read as a FAQ; every chapter turns the leader line into its own diagram (visit to later that day, California to S Regal St) so the idea runs the page */
/* Hallmark · display tracking is +0.04em, not the craft default of -0.02em: Sam's house rule for heavy display type (no letters touching) */
/* Hallmark · dismissed F1 · the one straight quote is the hidden Netlify honeypot label, whose markup the factory brief fixes word for word */
/* Hallmark · hero-review: fix · 5 findings · 4 resolved (fold filled at 1440 and 1920 with a centred cover; headline now states the idea; leader dots doubled in weight; booking line ruled off and set at full size) 1 partial (phone contents rows take two lines, question then dots and name, by design) */
/* Hallmark · finish-review: folded into Impeccable critique A · 2 findings · 2 resolved (h2 heads raised to 40px or more at 1024; chapter 4 diagram capped at the quote size) */
/* Hallmark · dismissed 3 · the 10px dotted left borders are the vertical leader lines of the day and California diagrams, on no card or box */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --text-h1: clamp(2rem, 3.9vw + 1rem, 4.625rem);
  --text-toc: clamp(1.25rem, 1.5vw + 0.8rem, 2.125rem);
  --text-q: clamp(1.75rem, 2.4vw + 1rem, 3rem);
  --text-cap: 1.125rem;
  --text-quote: clamp(1.375rem, 1.9vw + 0.9rem, 2.75rem);
  --text-poster: clamp(1.75rem, 3.2vw + 0.9rem, 4rem);
  --num: 1.5em;
  --dot: var(--color-accent);
}

/* skip link and preview bar */
.skip { position: absolute; left: var(--space-md); top: var(--space-xs); z-index: var(--z-modal); display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-md); background: var(--color-ink); color: var(--color-paper); font-weight: 600; text-decoration: none; transform: translateY(-300%); }
.skip:focus, .skip:focus-visible { transform: none; outline: 3px solid var(--color-focus); outline-offset: 3px; }
.previewbar { margin: 0; padding: var(--space-xs) var(--gutter); background: var(--color-paper-2); color: var(--color-ink); font-size: var(--text-sm); text-align: center; }

/* buttons: one filled violet primary, square-shouldered like a book's tab */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 var(--space-lg); border: 2px solid var(--color-accent); border-radius: var(--radius-btn); background: var(--color-accent); color: var(--color-accent-ink); font: 800 var(--text-lg)/1 var(--font-display); letter-spacing: 0.02em; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-accent-deep); border-color: var(--color-accent-deep); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }

/* masthead */
.mast { border-bottom: 3px solid var(--color-ink); }
.mast__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding-block: var(--space-sm); }
.mast__id { display: grid; min-width: 0; }
.mast__name { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; font: 800 var(--text-xl)/1.1 var(--font-display); letter-spacing: 0.04em; color: var(--color-ink); text-decoration: none; }
.mast__name:hover { color: var(--color-accent-deep); }
.mast__what { color: var(--color-ink-2); }
.mast__act { display: flex; align-items: center; gap: var(--space-lg); }
.mast__rating { font-weight: 600; }

/* the cover: title over its contents page */
.cover { padding-block: var(--space-2xl); }
@media (min-width: 60.01rem) { .cover { display: flex; flex-direction: column; justify-content: center; min-height: min(calc(100svh - 8rem), 62rem); } }
.cover h1 { max-width: 15em; font-size: var(--text-h1); font-weight: 800; line-height: 1.04; letter-spacing: var(--tracking-display); color: var(--color-ink); }
.cover__lede { margin-top: var(--space-md); font-size: var(--text-lead); color: var(--color-ink-2); }
.cover__call { display: none; }
.cover__rating { font-weight: 600; }
.contents { margin-top: var(--space-xl); }
.contents ol { margin: 0; padding: 0; list-style: none; counter-reset: q; }
.contents li { counter-increment: q; }
.contents li:last-child { margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 3px solid var(--color-ink); }
.leader--book .leader__tel { font-size: 1em; }
.contents .leader::before { content: counter(q); }

/* the leader line: number, question, heavy dots, the patient who answers */
.leader { display: grid; grid-template-columns: var(--num) auto minmax(2.5rem, 1fr) auto; align-items: baseline; column-gap: var(--space-md); font-size: var(--text-toc); color: var(--color-ink); }
.leader::before { font: 800 1em/1.12 var(--font-display); letter-spacing: 0.04em; color: var(--color-accent); }
.leader[data-n]::before { content: attr(data-n); }
.leader__q { font: 800 1em/1.12 var(--font-display); letter-spacing: 0.04em; color: inherit; overflow-wrap: break-word; min-width: 0; }
.leader__dots { display: block; height: 0; min-width: 2.5rem; border-bottom: 0.24em dotted var(--dot); }
.leader__who { margin: 0; font: 600 0.62em/1.2 var(--font-body); color: var(--color-accent); white-space: nowrap; }
a.leader { min-height: 44px; padding-block: var(--space-sm); text-decoration: none; }
a.leader:hover .leader__q, .leader--book a.leader__q:hover { text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.14em; }
a.leader:active .leader__q { color: var(--color-accent-deep); }
a.leader:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.leader--book { padding-block: var(--space-sm); }
.leader--book a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.leader__tel { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.16em; }
.leader__tel:hover { color: var(--color-accent-deep); }
.leader__tel:active { color: var(--color-ink); }

/* chapters: the question as the head, the answer, then the signing leader to the patient */
.chapter { padding-block: var(--section-gap-s); }
.chapter--lilac { background: var(--color-paper-2); padding-block: var(--section-gap); }
.chapter--split { padding-block: var(--section-gap-l); }
.chapter--ink { background: var(--color-ink); color: var(--color-paper); padding-block: var(--section-gap); --dot: var(--color-paper-3); }
.chapter--ink .leader, .chapter--ink .leader__q { color: var(--color-paper); }
.chapter--ink .leader::before, .chapter--ink .leader__who { color: var(--color-paper-3); }
.leader--head { font-size: var(--text-q); }
.chap-head { display: grid; grid-template-columns: var(--num) minmax(0, 1fr); align-items: baseline; column-gap: var(--space-md); font-size: var(--text-q); }
.chap-head__n { font: 800 1em/1.1 var(--font-display); letter-spacing: 0.04em; color: var(--color-accent); }
.chap-head h2 { font-size: 1em; font-weight: 800; line-height: 1.1; letter-spacing: 0.04em; }
.chapter--ink .chap-head__n { color: var(--color-paper-3); }
.answer { margin: var(--space-xl) 0 0; margin-inline-start: calc(var(--text-q) * 1.5 + var(--space-md)); }
.answer blockquote { margin: 0; }
.answer blockquote p { max-width: 24em; font: 600 var(--text-quote)/1.3 var(--font-display); letter-spacing: 0.01em; text-indent: -0.42em; }
.answer--wide blockquote p { max-width: 30em; }
.answer--poster blockquote p { max-width: 14em; font-size: var(--text-poster); line-height: 1.22; }
.sign { display: grid; grid-template-columns: minmax(2.5rem, 1fr) auto; align-items: baseline; column-gap: var(--space-md); margin-top: var(--space-lg); font-size: var(--text-toc); }
.sign__who { font: 600 0.8em/1.2 var(--font-body); color: var(--color-accent); text-align: right; white-space: nowrap; }
.sign__src { grid-column: 1 / -1; text-align: right; margin-top: var(--space-2xs); font-size: var(--text-cap); font-weight: 400; line-height: 1.4; color: var(--color-ink-2); }
.chapter--ink .sign__who { color: var(--color-paper-3); }
.chapter--ink .sign__src { color: var(--color-ink-soft); }
.back { display: none; margin-top: var(--space-md); }
.back a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--color-accent); text-decoration-thickness: 2px; }
.back a:hover { color: var(--color-accent-deep); }
.back a:active { color: var(--color-ink); }
.chapter--ink .back a { color: var(--color-paper-3); }
.chapter--ink .back a:focus-visible { outline-color: var(--color-focus-on-ink); }

/* chapter 2: the question beside a poster-size answer */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--space-2xl); align-items: start; }
.split .answer { margin: 0; }

/* chapter 3: Denise H.'s day, drawn as a leader that runs down, in her words */
.after { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-columns); align-items: center; margin-top: var(--space-2xl); margin-inline-start: calc(var(--text-q) * 1.5 + var(--space-md)); }
.day { margin: 0; padding: 0; list-style: none; }
.day__stop { font: 800 var(--text-quote)/1.15 var(--font-display); letter-spacing: 0.04em; text-wrap: balance; }
.day__stop--then { color: var(--color-accent); }
.day__stop--then::before { content: ""; display: block; width: 0; height: 6rem; margin-block: var(--space-sm); margin-inline-start: var(--space-xs); border-left: 10px dotted var(--dot); }
.answer--side { margin: 0; }

/* chapter 4: from "Lives in California" to "when she is here", capped at the quote's size */
.miles { display: grid; grid-template-columns: auto minmax(2.5rem, 1fr) auto; align-items: center; column-gap: var(--space-md); max-width: 30em; margin-top: var(--space-2xl); margin-inline-start: calc(var(--text-q) * 1.5 + var(--space-md)); font: 800 var(--text-quote)/1.15 var(--font-display); letter-spacing: 0.04em; color: var(--color-paper-3); }
.miles__end { min-width: 0; }

/* chapter 5: booking */
.visit__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); align-items: start; margin-top: var(--space-2xl); }
.visit__lede { max-width: 22em; font-size: var(--text-lead); }
.facts { display: grid; gap: var(--space-lg); margin: var(--space-xl) 0 0; }
.facts dt { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.facts dd { margin: var(--space-2xs) 0 0; font-size: var(--text-lg); line-height: 1.45; }
.facts__link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--color-accent); text-decoration-thickness: 2px; }
.facts__link:hover { color: var(--color-accent-deep); }
.facts__link:active { color: var(--color-ink); }

.ask { display: grid; gap: var(--space-md); padding: var(--space-xl); border: 3px solid var(--color-ink); border-radius: var(--radius-card); background: var(--color-paper); }
.ask h3 { font-size: var(--text-2xl); font-weight: 800; line-height: 1.1; letter-spacing: 0.04em; }
.field { display: grid; gap: var(--space-2xs); font-weight: 600; }
.field input, .field select, .field textarea { min-height: 52px; padding: 0 var(--space-md); border: 2px solid var(--color-muted); border-radius: var(--radius-btn); background: var(--color-paper); color: var(--color-ink); font-weight: 400; outline: 3px solid var(--color-clear); outline-offset: 1px; }
.field textarea { min-height: 7rem; padding-block: var(--space-sm); resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-color: var(--color-focus); }
.field input[aria-invalid], .field textarea[aria-invalid] { border-color: var(--color-error); }
.field input:disabled, .field select:disabled, .field textarea:disabled { opacity: 0.55; cursor: not-allowed; }
.ask__send { justify-self: start; }
.form-note { font-size: var(--text-lg); font-weight: 600; color: var(--color-ink); }
.form-note a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-accent); font-weight: 800; }

/* footer */
.foot { padding-block: var(--space-3xl) var(--space-2xl); background: var(--color-ink); color: var(--color-paper); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); }
.foot__name { font: 800 var(--text-xl)/1.1 var(--font-display); letter-spacing: 0.04em; }
.foot p + p { margin-top: var(--space-xs); }
.foot__link { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-paper); font-weight: 600; }
.foot__link:hover { color: var(--color-paper-3); }
.foot__link:focus-visible { outline-color: var(--color-focus-on-ink); }
.foot__notes { color: var(--color-ink-soft); }

@media (min-width: 60.01rem) and (max-width: 75rem) {
  .mast__rating { display: none; }
  .cover__call { display: block; margin-top: var(--space-md); }
  .cover__call .btn { display: none; }
}

/* phone call bar: appears once the cover's call button has scrolled away, never over the booking form */
.callbar { display: none; }

@media (max-width: 60rem) {
  .mast__act { display: none; }
  .mast__name { font-size: var(--text-lg); }
  .cover { padding-block: var(--space-xl) var(--space-2xl); }
  .cover__call { display: grid; justify-items: start; gap: var(--space-xs); margin-top: var(--space-lg); }
  .visit__grid, .foot__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .after, .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .back { display: block; }
  .js .callbar { display: block; position: fixed; inset: auto 0 0 0; z-index: var(--z-sticky); padding: var(--space-xs) var(--gutter) calc(var(--space-xs) + env(safe-area-inset-bottom)); background: var(--color-ink); visibility: hidden; transform: translateY(110%); transition: transform var(--dur-short) var(--ease-out), visibility 0s linear var(--dur-short); }
  .js .callbar.is-on { visibility: visible; transform: none; transition: transform var(--dur-short) var(--ease-out), visibility 0s; }
  .callbar__btn { width: 100%; }
  .callbar__btn:focus-visible { outline-color: var(--color-focus-on-ink); }
  .js .foot { padding-bottom: calc(var(--space-2xl) + var(--space-3xl)); }
}

@media (max-width: 40rem) {
  .cover__call .btn, .ask__send { width: 100%; }
  .leader { grid-template-columns: var(--num) minmax(0, 1fr) auto; grid-template-areas: "n q q" ". d w"; row-gap: var(--space-2xs); }
  .leader::before { grid-area: n; }
  .leader__q { grid-area: q; }
  .leader__dots { grid-area: d; }
  .leader__who { grid-area: w; font-size: 0.75em; }
  .answer, .after, .miles { margin-inline-start: 0; }
  .sign .leader__dots { grid-area: auto; }
  .sign { font-size: var(--text-toc); }
  .answer blockquote p { text-indent: 0; }
  .miles { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-sm); }
  .miles .miles__dots { grid-area: auto; justify-self: start; min-width: 0; width: 0; height: var(--space-2xl); margin-inline-start: var(--space-xs); border-bottom: 0; border-left: 10px dotted var(--dot); }
  .day__stop--then::before { height: var(--space-2xl); }
  .ask { padding: var(--space-lg) var(--space-md); }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .js .callbar, .js .callbar.is-on { transition: none; }
}
