/* =========================================================
   base.css — colour tokens, typography, buttons, utilities
   Loaded first on every page.
   ========================================================= */
:root {
  /* Palette taken from the book cover */
  --paper: #ffffff;
  --ink: #2a2222;          /* body text — the cover's charcoal branch, warmed */
  --ink-deep: #1c0607;     /* deepest maroon — hero base, footer */
  --chrome: #3d0b0d;       /* dark maroon (cover corner) — header & dark bands */
  --signal: #b5161b;       /* cover red — buttons, links, accents */
  --signal-deep: #8a1416;  /* darker red — hover */
  --signal-bright: #d42026;/* bright red highlight */
  --signal-soft: #f3b8b2;  /* light red for text on dark backgrounds */
  --accent-blue: #0b4aa6;  /* the cover subtitle blue — used sparingly */
  --quiet: #6b5d5c;        /* secondary text */
  --rule: #eee2e1;         /* hairlines */
  --soft: #fbf4f3;         /* pale blush panels */
  --hover-text: #e35d5d;   /* light red: text hover on light backgrounds */
  --hover-text-dark: #f6bdb7; /* light red: text hover on dark backgrounds */
  --lift: 0 14px 34px rgba(70, 12, 14, .12);
  --lift-soft: 0 6px 18px rgba(70, 12, 14, .08);
  --header-h: 92px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: clip;
}
site-header, site-footer { display: block; }
site-header { position: sticky; top: 0; z-index: 20; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: 'Lato', sans-serif; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
h1 { font-size: clamp(42px, 5.3vw, 76px); }
h2 { font-size: clamp(31px, 3.3vw, 46px); }
h3 { font-size: 26px; }
em { font-style: normal; color: var(--signal); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
svg { flex: none; }
[hidden] { display: none !important; }
/* Text selection: a very light, see-through red so the text keeps its own
   colour and stays readable on both light and dark sections */
::selection { background: rgba(227, 93, 93, .2); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 5px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.section-rail { max-width: 1240px; margin-inline: auto; padding-inline: 52px; }

.eyebrow { font-size: 10px; letter-spacing: 1.65px; font-weight: 600; line-height: 1.6; text-transform: uppercase; }
.muted { color: var(--quiet); }
.large-copy { font-size: 19px; line-height: 1.7; }

.text-link {
  display: inline-flex; align-items: center; gap: 24px; padding: 7px 0;
  border-bottom: 1px solid var(--ink); font-size: 14px; font-weight: 600; transition: color .2s;
}
.text-link:hover { color: var(--hover-text); border-color: var(--hover-text); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 24px; background: var(--signal); color: #fff; border: 1px solid var(--signal);
  font-size: 14px; font-weight: 700; letter-spacing: .4px; border-radius: 4px;
  box-shadow: var(--lift-soft); transition: background .2s, transform .2s, box-shadow .2s; min-height: 46px;
}
.button:hover { background: var(--signal-deep); border-color: var(--signal-deep); box-shadow: var(--lift); }
.button:active, button:active { transform: translateY(1px); }
.button.light { background: #fff; color: #10161f; border-color: #fff; }
.button.light:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
/* Outlined secondary button */
.button.button-outline { background: transparent; color: var(--signal); box-shadow: none; }
.button.button-outline:hover { background: var(--soft); color: var(--hover-text); border-color: var(--hover-text); }

input {
  padding: 12px 14px; background: transparent; border: 1px solid var(--rule); color: var(--ink);
  border-radius: 2px; width: 100%; font-size: 13px; min-height: 46px;
}
input::placeholder { color: var(--quiet); }

.empty-state { padding: 45px 0; }
.empty-state p { margin: 15px 0; }

@media (max-width: 767px) {
  body { font-size: 14px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.25px; }
  .large-copy { font-size: 17px; }
}
@media (max-width: 1024px) {
  .section-rail { padding-inline: 35px; }
}
@media (max-width: 767px) {
  .section-rail { padding-inline: 24px; }
}

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