/* Hallmark · genre: editorial · macrostructure: Narrative Workflow · theme: Almanac
 * enrichment: none (typography + real photography) · nav: N6 · footer: Ft4
 * tone: utilitarian · audience: omakotitalon omistaja / taloyhtiö / välittäjä
 * use-case: tarjouspyyntö
 * theme axes: paper light (L 96.2%) · display slab-serif · accent warm 42°
 * type: Zilla Slab 700 / Newsreader 400 / IBM Plex Mono (outlier)
 * motion: reveal-on-load (hero only) · accordion-open
 *
 * pre-emit critique: P5 H5 E5 S4 R5 V5
 * contrast: pass (40–41) — 156/156 text nodes ≥ WCAG AA; focus ring 6.35:1
 * mobile: pass (34, 49, 50–57) — 320/375/414/768/1280/1920, zero overflow
 * honest: pass (46) — no fabricated metrics; unknowns ship as labelled slots
 * chrome: pass (47) · tokens: pass (48) · icons: pass (30) · nav/footer: pass (42–45)
 *
 * DEVIATION · gate 38 (outlier in ≤2 slots): IBM Plex Mono carries one role —
 * "the record": labels, figures, nav tags, colophon. Never body copy. The
 * almanac register depends on it, and N6 + Ft4 both specify a mono voice.
 * Deliberate, not drift.
 */

@import url("tokens.css");

/* ===================================================================== */
/* Reset + root                                                          */
/* ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  overflow-x: clip;
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--dur-micro) var(--ease-out);
}
a:hover { color: var(--color-accent-hi); }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  /* Focus rings appear instantly — never transitioned. */
}

::selection { background: var(--color-accent-soft); color: var(--color-ink); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-md); top: var(--space-md);
  transform: translateY(-200%);
  background: var(--color-ink); color: var(--color-paper);
  padding: var(--space-sm) var(--space-md);
  z-index: var(--z-modal);
  text-decoration: none;
}
.skip-link:focus-visible { transform: translateY(0); }

/* ===================================================================== */
/* Layout primitives                                                     */
/* ===================================================================== */

.wrap {
  width: 100%;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}
.wrap--narrow { max-width: 56rem; }

.prose { max-width: var(--measure); }

.rule {
  border: 0;
  border-top: var(--rule-hair) solid var(--color-rule);
  margin: 0;
}
.rule--thick { border-top-width: var(--rule-thick); border-top-color: var(--color-ink); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--color-muted); }

/* Section rhythm — deliberately uneven. */
.section { padding-block: var(--space-3xl); }
.section--tight { padding-block: var(--space-2xl) var(--space-3xl); }
.section--tall  { padding-block: var(--space-4xl) var(--space-3xl); }

.section__head { max-width: 46rem; margin-bottom: var(--space-xl); }
.section__head h2 { font-size: var(--text-2xl); }
.section__head p { margin-top: var(--space-md); color: var(--color-muted); }

/* ===================================================================== */
/* N6 · Newspaper masthead                                               */
/* ===================================================================== */

.mast { padding-top: var(--space-md); }

.mast__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs) var(--space-md);
  color: var(--color-muted);
  text-align: center;
}
.mast__meta a { color: inherit; text-decoration: none; }
.mast__meta a:hover { color: var(--color-accent); }

.mast__name {
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  line-height: 1.0;
  letter-spacing: 0.02em;
  text-align: center;
  margin-block: var(--space-xs) var(--space-2xs);
}
.mast__name .mast__dot { color: var(--color-accent); }

.mast__tag {
  text-align: center;
  color: var(--color-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
}

.mast__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs) var(--space-lg);
  list-style: none;
}
/* 44 px hit target without pushing the rule away from the word — the box is
 * tall, the underline is drawn where the text actually sits. */
.mast__nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-2xs);
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--dur-micro) var(--ease-out);
}
.mast__nav a::after {
  content: "";
  position: absolute;
  left: var(--space-2xs);
  right: var(--space-2xs);
  bottom: 11px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-micro) var(--ease-out);
}
.mast__nav a:hover { color: var(--color-accent); }
.mast__nav a:hover::after { transform: scaleX(1); }

.mast__rule {
  border: 0;
  border-top: var(--rule-hair) solid var(--color-ink);
  border-bottom: var(--rule-thick) solid var(--color-ink);
  height: 4px;
  margin-top: var(--space-sm);
}

/* ===================================================================== */
/* H2 · Split diptych hero                                               */
/* ===================================================================== */

.hero { padding-block: var(--space-2xl) var(--space-3xl); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: end;
}

.hero__title {
  font-size: var(--text-display);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero__lede {
  margin-top: var(--space-lg);
  font-size: var(--text-md);
  line-height: 1.5;
  max-width: 46ch;
  color: var(--color-muted);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  align-items: center;
  margin-top: var(--space-xl);
}
.hero__place {
  margin-top: var(--space-lg);
  color: var(--color-muted);
}
.hero__figure { margin: 0; }
.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: var(--rule-hair) solid var(--color-rule);
}
.hero__caption {
  margin-top: var(--space-xs);
  color: var(--color-muted);
}

@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl); }
}

/* ===================================================================== */
/* Buttons                                                               */
/* ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid var(--color-ink);
  border-radius: var(--radius-none);
  background: var(--color-ink);
  color: var(--color-paper);
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro) var(--ease-out),
              color var(--dur-micro) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}
.btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--color-paper-3);
  border-color: var(--color-rule);
  color: var(--color-muted);
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-ink);
}
.btn--ghost:hover { background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }

.btn--tel {
  font-family: var(--font-display);
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  text-transform: none;
  border-width: 0 0 2px 0;
  border-color: var(--color-accent);
  background: transparent;
  color: var(--color-ink);
  padding-inline: 0;
}
.btn--tel:hover { background: transparent; color: var(--color-accent); border-color: var(--color-accent); }

/* ===================================================================== */
/* Oireet — dark band                                                    */
/* ===================================================================== */

.band {
  background: var(--color-ink-deep);
  color: var(--color-paper);
}
.band h2, .band h3 { color: var(--color-paper); }
.band .muted { color: var(--color-muted-on-dark); }
.band a { color: var(--color-accent-on-dark); }
.band .rule { border-top-color: var(--color-rule-on-dark); }

.symptoms {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
}
@media (min-width: 60rem) {
  /* Deliberately unequal — the list carries the weight, the plates qualify it. */
  .symptoms { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--space-2xl); align-items: start; }
}

.symptom-list { list-style: none; }
.symptom-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-md);
  align-items: baseline;
  padding-block: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule-on-dark);
  font-size: var(--text-md);
  line-height: 1.45;
}
.symptom-list li:last-child { border-bottom: var(--rule-hair) solid var(--color-rule-on-dark); }
.symptom-list .tick {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent-on-dark);
  font-variant-numeric: tabular-nums;
}

.plates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: var(--space-md);
}
.plate { margin: 0; }
.plate img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.85);
}
.plate figcaption {
  margin-top: var(--space-xs);
  color: var(--color-muted-on-dark);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  line-height: 1.4;
}
/* The first plate breaks the grid — one element crossing a boundary. */
@media (min-width: 42rem) {
  .plate--wide { grid-column: 1 / -1; }
  .plate--wide img { aspect-ratio: 16 / 9; }
}

.band__note {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: var(--rule-thick) solid var(--color-accent-on-dark);
  max-width: 52ch;
  font-size: var(--text-md);
  line-height: 1.5;
}

/* ===================================================================== */
/* F4 · Step sequence — the spine of the page                            */
/* ===================================================================== */

.steps { list-style: none; counter-reset: step; }

.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
  padding-block: var(--space-xl);
  border-top: var(--rule-hair) solid var(--color-rule);
}
.step:first-child { border-top: var(--rule-thick) solid var(--color-ink); }
.step:last-child { border-bottom: var(--rule-hair) solid var(--color-rule); }

/* Number sits ABOVE the heading, same column — never tag-left / heading-right. */
.step__no {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-xs);
}
.step__title { font-size: var(--text-xl); }
.step__body {
  margin-top: var(--space-md);
  max-width: 54ch;
  color: var(--color-muted);
}
.step__body strong { color: var(--color-ink); font-weight: 600; }

.step__figure { margin: 0; }
.step__figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: var(--rule-hair) solid var(--color-rule);
}

@media (min-width: 60rem) {
  .step { grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr); gap: var(--space-2xl); align-items: start; }
  /* Alternate the plate side so the spine doesn't read as a template.
   * The track widths swap with the order — text always keeps the wide column,
   * otherwise the plate inflates and the copy is squeezed into a gutter. */
  .step:nth-child(even) { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr); }
  .step:nth-child(even) .step__text { order: 2; }
  .step:nth-child(even) .step__figure { order: 1; }
}

/* ===================================================================== */
/* F3 · Tabular spec sheet                                               */
/* ===================================================================== */

.spec-wrap { overflow-x: auto; }

.spec {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.spec caption {
  text-align: left;
  color: var(--color-muted);
  padding-bottom: var(--space-md);
  font-size: var(--text-sm);
}
.spec th, .spec td {
  padding: var(--space-md) var(--space-md) var(--space-md) 0;
  border-bottom: var(--rule-hair) solid var(--color-rule);
  vertical-align: baseline;
}
.spec thead th {
  border-bottom: var(--rule-thick) solid var(--color-ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--color-muted);
}
.spec tbody th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  width: 34%;
}
.spec td.spec__val {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-ink);
}
.spec td.spec__note { color: var(--color-muted); font-size: var(--text-sm); }

@media (max-width: 48rem) {
  .spec thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .spec tbody tr { display: block; padding-block: var(--space-md); border-bottom: var(--rule-hair) solid var(--color-rule); }
  .spec tbody th, .spec tbody td { display: block; width: auto; border: 0; padding: 0 0 var(--space-2xs); }
}

/* ===================================================================== */
/* Kenelle — S5 bottom-anchored head                                     */
/* ===================================================================== */

.who {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-xl);
}
/* Unequal tracks — three identical cards is the AI feature-grid tell. */
@media (min-width: 60rem) {
  .who { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr) minmax(0, 0.9fr); }
}
.who__item { margin: 0; }
.who__item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: var(--rule-hair) solid var(--color-rule);
}
.who__item h3 { margin-top: var(--space-md); font-size: var(--text-md); }
.who__item p { margin-top: var(--space-xs); color: var(--color-muted); font-size: var(--text-sm); line-height: 1.55; }

.who__label {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
  color: var(--color-muted);
}

/* ===================================================================== */
/* Placeholder blocks — honest holes, not invented content               */
/* ===================================================================== */

.todo {
  border: 2px dashed var(--color-rule);
  background: var(--color-paper-2);
  padding: var(--space-lg);
}
.todo__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}
.todo p { color: var(--color-muted); max-width: 56ch; }

.todo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: var(--space-md);
}
.todo-plate {
  border: 2px dashed var(--color-rule);
  background: var(--color-paper-2);
  aspect-ratio: 3 / 2;
  display: grid;
  place-content: center;
  text-align: center;
  padding: var(--space-md);
  color: var(--color-muted);
}
.todo-plate span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===================================================================== */
/* FAQ · accordion                                                       */
/* ===================================================================== */

.faq { border-top: var(--rule-thick) solid var(--color-ink); max-width: 60rem; }

.faq__item { border-bottom: var(--rule-hair) solid var(--color-rule); }

.faq__q {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-md);
  align-items: center;
  min-height: 56px;
  padding: var(--space-md) 0;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  line-height: 1.25;
  color: var(--color-ink);
  cursor: pointer;
  transition: color var(--dur-micro) var(--ease-out);
}
.faq__q:hover { color: var(--color-accent); }
.faq__q:active { transform: translateY(1px); }
.faq__q:disabled { color: var(--color-muted); cursor: not-allowed; opacity: 0.55; }

.faq__sign {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  position: relative;
}
.faq__sign::before, .faq__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 2px;
  background: var(--color-accent);
  transition: transform var(--dur-short) var(--ease-in-out);
}
.faq__sign::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__sign::after { transform: rotate(0deg); }

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-long) var(--ease-in-out);
}
.faq__q[aria-expanded="true"] + .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p {
  max-width: 62ch;
  color: var(--color-muted);
  padding-bottom: var(--space-lg);
}
.faq__a p + p { padding-top: var(--space-sm); }

/* ===================================================================== */
/* C2 · Tarjouspyyntö form                                               */
/* ===================================================================== */

.quote { background: var(--color-paper-2); }

.quote__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2xl);
}
@media (min-width: 60rem) {
  .quote__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-3xl); align-items: start; }
}

.quote__aside h2 { font-size: var(--text-2xl); }
.quote__aside p { margin-top: var(--space-md); color: var(--color-muted); max-width: 46ch; }
.quote__contact {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: var(--rule-thick) solid var(--color-ink);
  display: grid;
  gap: var(--space-sm);
}
.quote__contact dt { color: var(--color-muted); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; }
.quote__contact dd { margin: 0 0 var(--space-md); font-size: var(--text-md); }

.form { display: grid; gap: var(--space-lg); }

.field { display: grid; gap: var(--space-2xs); }
.field--split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
@media (min-width: 40rem) {
  .field--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.label .req { color: var(--color-accent); }

.input, .textarea, .select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-ink);
  background: var(--color-paper);
  border: var(--rule-hair) solid var(--color-neutral);
  border-radius: var(--radius-none);
  transition: border-color var(--dur-micro) var(--ease-out),
              background-color var(--dur-micro) var(--ease-out);
}
.textarea { min-height: 8rem; resize: vertical; line-height: 1.55; }
.select { appearance: none; background-image: none; }

.input:hover, .textarea:hover, .select:hover { border-color: var(--color-ink); }
.input:disabled, .textarea:disabled, .select:disabled {
  background: var(--color-paper-3);
  color: var(--color-muted);
  border-color: var(--color-rule);
  opacity: 0.55;
  cursor: not-allowed;
}
.input::placeholder, .textarea::placeholder { color: var(--color-muted); }

/* Error keeps border-width at 1px — width changes shift layout. The extra
 * weight comes from an inset shadow instead. */
.input[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--color-danger);
  box-shadow: inset 0 0 0 1px var(--color-danger);
}

/* Reserved even when empty, so an appearing error never shifts the page. */
.field__error {
  color: var(--color-danger);
  font-size: var(--text-sm);
  line-height: 1.4;
  min-height: 1lh;
}

.field__hint { color: var(--color-muted); font-size: var(--text-sm); }

.check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-sm);
  align-items: start;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-muted);
  cursor: pointer;
}
.check input {
  width: 1.25rem; height: 1.25rem;
  margin: var(--space-3xs) 0 0;
  accent-color: var(--color-accent);
  flex: none;
}

.form__submit { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }

.btn.is-loading { cursor: progress; }
.btn.is-loading .btn__label { opacity: 0.55; }

.form__status {
  padding: var(--space-md);
  border: var(--rule-hair) solid var(--color-rule);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.form__status:empty { display: none; }
.form__status[data-state="error"]   { border-color: var(--color-danger);  color: var(--color-danger);  background: var(--color-paper); }
.form__status[data-state="success"] { border-color: var(--color-success); color: var(--color-success); background: var(--color-paper); }

/* ===================================================================== */
/* Ft4 · Dense colophon                                                  */
/* ===================================================================== */

.colophon {
  border-top: var(--rule-thick) solid var(--color-ink);
  padding-block: var(--space-xl) var(--space-2xl);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.75;
  letter-spacing: 0.01em;
}
.colophon p { max-width: 74ch; color: var(--color-muted); }
.colophon strong { color: var(--color-ink); font-weight: 600; }
.colophon a { color: var(--color-ink); text-decoration-color: var(--color-rule); }
.colophon a:hover { color: var(--color-accent); }
.colophon__tail { margin-top: var(--space-lg); color: var(--color-neutral); font-size: var(--text-xs); }

/* ===================================================================== */
/* C4 · Sticky bottom bar — narrow viewports only                        */
/* ===================================================================== */

.sticky-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: var(--z-sticky);
  display: none;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  padding-bottom: max(var(--space-xs), env(safe-area-inset-bottom));
  background: var(--color-paper);
  border-top: var(--rule-thick) solid var(--color-ink);
  align-items: center;
}
.sticky-cta .btn { flex: 1 1 0; min-width: 0; padding-inline: var(--space-sm); font-size: var(--text-xs); }

@media (max-width: 60rem) {
  .sticky-cta { display: flex; }
  body { padding-bottom: var(--sticky-bar-h); }
}

/* ===================================================================== */
/* Motion · two primitives: reveal-once + accordion-open                  */
/* ===================================================================== */

/* ONE orchestrated entrance, on load, in the hero only. Nothing else fades in
 * on scroll — scroll-reveal on every section leaves blank viewports when the
 * reader scrolls faster than the observer fires, and the page never settles. */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: reveal var(--dur-long) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 80ms);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
    transition-delay: 0ms !important;
  }
  /* Spatial motion collapses to an opacity crossfade. */
  .reveal { transform: none; }
  @keyframes reveal { to { opacity: 1; transform: none; } }
}

/* ===================================================================== */
/* Print                                                                 */
/* ===================================================================== */

@media print {
  .sticky-cta, .mast__nav, .quote { display: none; }
  .band { background: var(--color-paper); color: var(--color-ink); }
  .band h2, .band h3 { color: var(--color-ink); }
}
