/* Everett Lowry — The Arithmetic. Navy-black ink on paper, buoy red as the one dramatic move. */
@font-face {
  font-family: 'Newsreader';
  src: url('fonts/newsreader.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
}
:root {
  --paper: #fafaf8;     /* page */
  --ink: #121b28;       /* 16.6:1 on paper */
  --body: #2c3644;      /* 11.7:1 on paper */
  --muted: #55606d;     /* 6.1:1 on paper */
  --red: #b3342b;       /* 5.8:1 on paper; white on red 6.1:1 */
  --red-deep: #8f261f;
  --navy: #1c2f4a;
  --white: #ffffff;
  --rule: #121b28;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  font-variant-numeric: lining-nums;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 10;
  height: env(safe-area-inset-top, 0px); background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap {
  max-width: 1200px; margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 30;
  background: var(--ink); color: var(--paper); padding: 10px 16px; font-weight: 700;
}
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }

/* Header: persistent, names where you are */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(250, 250, 248, 0.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 24px; padding-block: 12px;
}
.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1;
  color: var(--ink); text-decoration: none;
}
.wordmark:hover { color: var(--red); }
.nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 15px; font-weight: 600; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-underline-offset: 4px; }
.nav a:hover { color: var(--red); }
.nav a[aria-current="page"] { text-decoration-thickness: 2px; text-decoration-color: var(--red); }
.nav a.nav-cta { color: var(--red); }

/* Type */
.eyebrow { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.eyebrow.red { color: var(--red); }
.display {
  margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em;
  line-height: 0.95; text-wrap: balance; overflow-wrap: break-word;
}
.display .dot { color: var(--red); }
.d1 { font-size: clamp(58px, 10.5vw, 156px); line-height: 0.94; letter-spacing: -0.025em; }
.d2 { font-size: clamp(44px, 5.4vw, 68px); line-height: 1; }
.d3 { font-size: clamp(36px, 4vw, 52px); line-height: 1.02; }
.lede { margin: 0; max-width: 34em; font-size: clamp(18px, 2vw, 20px); color: var(--body); }
.pitch { margin: 0; max-width: 34em; font-family: var(--serif); font-size: clamp(20px, 2.2vw, 23px); line-height: 1.45; color: var(--ink); }
.prose { margin: 0; max-width: 36em; color: var(--body); }
.subtitle { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tagline { margin: 0; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--muted); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px;
  padding: 0 26px; font-family: var(--sans); font-weight: 700; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--navy); color: var(--paper); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); color: var(--white); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* Sections */
.hero .wrap { display: flex; flex-direction: column; gap: 28px; padding-block: clamp(48px, 7vw, 72px) clamp(56px, 8vw, 80px); }
.band { padding-block: clamp(64px, 9vw, 88px); }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink .eyebrow { color: #b9c2cd; }          /* 9.6:1 on ink */
.band-ink .display, .band-ink .pitch { color: var(--paper); }
.band-ink .big { color: #d9dee4; }              /* 13.6:1 on ink */
.ruled { border-top: 1px solid var(--rule); }
.split { display: flex; flex-wrap: wrap; gap: 40px; }
.split > :first-child { flex: 1 1 260px; min-width: 0; }
.split > :last-child { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.big { margin: 0; max-width: 34em; font-family: var(--serif); font-size: clamp(20px, 2.2vw, 23px); line-height: 1.5; color: var(--ink); }

/* By the numbers */
.figures-band { padding-block: clamp(56px, 8vw, 72px); }
.figures-band .wrap { display: flex; flex-direction: column; gap: 32px; }
.figures-red { background: var(--red); color: var(--white); }
.figures-red .eyebrow { color: var(--white); }
.figures-red :focus-visible { outline-color: var(--white); }
.figures { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid currentColor; }
.figure { margin: 0; padding: 22px 24px 26px 0; display: flex; flex-direction: column; gap: 6px; }
.figure dt { order: 2; font-weight: 600; font-size: 17px; max-width: 14em; }
.figure dd { order: 1; margin: 0; font-family: var(--serif); font-size: clamp(80px, 9vw, 112px); line-height: 0.9; }
.figures-plain .figure dd { color: var(--red); }

/* Book block */
.book { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.book-cover { flex: 0 1 280px; width: 280px; max-width: 100%; }
.book-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 18px 40px rgba(18, 27, 40, 0.18); }
.book-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.book-copy h2 a, .book-copy h1 a { color: inherit; text-decoration: none; }
.book-copy h2 a:hover { color: var(--red); }
.details {
  margin: 4px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 24px; font-size: 15px; max-width: 32em; padding-top: 16px; border-top: 1px solid #d5d9de;
}
.details dt { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.details dd { margin: 0; color: var(--body); }

/* Other book / series nav */
.next { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; }
.next img { width: 120px; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 10px 24px rgba(18, 27, 40, 0.18); }
.next div { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 320px; }

/* ARC */
.arc .wrap { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; }
.arc .arc-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; max-width: 38em; }
.facts li { padding-left: 24px; position: relative; color: var(--body); }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 12px; height: 2px; background: var(--red); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding-block: 24px; font-size: 14px; color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--red); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }

.lost { min-height: 50vh; display: flex; flex-direction: column; justify-content: center; gap: 24px; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wordmark { font-size: 24px; }
  .nav { gap: 0 16px; font-size: 14px; }
  .book { gap: 32px; }
  .book-cover { flex-basis: 220px; width: 220px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure { padding: 18px 12px 20px 0; }
  .figure dd { font-size: 72px; }
  .figure dt { font-size: 15px; }
  .site-header { position: static; }
  html { scroll-padding-top: 0; }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
