/* ============ Just Call Me Buck — period newspaper / broadsheet ============ */

:root {
  --paper: #f1e7d0;
  --paper-deep: #e8dcc0;
  --paper-dark: #ddcfac;
  --ink: #2a1d10;
  --ink-soft: #4a3826;
  --ink-faint: #7a6647;
  --rule: #b89e6e;
  --rule-soft: #d4bf91;
  --terra: #9a4827;
  --terra-deep: #6a2e16;
  --display: "IM Fell English", "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --display-sc: "IM Fell English SC", "Playfair Display SC", Georgia, serif;
  --body: "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --label: "IM Fell DW Pica SC", "IM Fell English SC", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at top left, rgba(154,72,39,0.06), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(90,98,56,0.05), transparent 50%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch' seed='3'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.11  0 0 0 0 0.06  0 0 0 0.10 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; display: block; }
a { color: var(--terra-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terra); }

/* Focus ring. The period aesthetic has no rounded corners, so neither does this. */
:focus-visible {
  outline: 2px solid var(--terra-deep);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px;
  font-family: var(--label); font-size: 12px;
  letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ========= Top masthead bar ========= */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 28px;
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: var(--ink);
}
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-size: 22px;
  font-style: italic;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}
.nav__brand .star { color: var(--terra); font-size: 14px; }
.nav__links { display: flex; gap: 22px; justify-content: center; }
.nav__links a {
  text-decoration: none;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--terra); }

.nav__end { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.nav__download {
  color: var(--terra-deep);
  border-bottom: 1px solid var(--terra-deep);
  padding-bottom: 1px;
  text-decoration: none;
}
.nav__download:hover { color: var(--terra); border-color: var(--terra); }
.nav__meta { color: var(--ink-soft); font-size: 10px; }

/* ========= HERO — broadsheet front page ========= */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 96px 64px 80px;
  display: flex; flex-direction: column;
}

.dateline {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px;
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 10px;
  border-bottom: 3px double var(--ink);
  margin-bottom: 24px;
}
.dateline em {
  font-family: var(--body);
  font-style: italic;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

.masthead {
  text-align: center;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--ink);
}
.masthead__kicker {
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.masthead__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(72px, 11vw, 168px);
  line-height: 0.96;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.masthead__title em { font-style: italic; color: var(--terra-deep); }
.masthead__sub {
  margin-top: 14px;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 30px);
  color: var(--ink-soft);
}
.masthead__rule {
  margin: 14px auto 0;
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  color: var(--ink);
}
.masthead__rule .ornament { font-family: var(--display); font-size: 22px; color: var(--terra); }
.masthead__rule .line { height: 1px; width: 60px; background: var(--ink); }

.hero__columns {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 360px 1fr;
  gap: 40px;
  align-items: start;
}
.hero__col {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}
.hero__col .label {
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--terra-deep);
  margin-bottom: 8px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
}
.hero__col h2 {
  font-family: var(--display);
  font-size: 28px;
  text-align: center;
  margin: 0 0 14px;
  font-weight: 400;
  line-height: 1.05;
}
.hero__col p { margin: 0 0 12px; }
.hero__col p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 56px;
  line-height: 0.85;
  float: left;
  margin: 6px 8px 0 0;
  color: var(--terra-deep);
  font-weight: 400;
}

.hero__center { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.book {
  display: block;
  width: 320px;
  border: 1px solid var(--ink);
  padding: 10px;
  background: var(--paper-deep);
  box-shadow: 6px 10px 0 -2px var(--paper-dark), 8px 12px 0 -2px var(--ink);
  transform: rotate(-1deg);
  transition: transform 0.4s;
  text-decoration: none;
}
.book:hover { transform: rotate(0) translateY(-3px); }
.book img { width: 100%; height: auto; border: 1px solid var(--ink); }

.hero__cta { display: flex; gap: 14px; justify-content: center; margin-top: 6px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--terra-deep); border-color: var(--terra-deep); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ========= Section frame ========= */
section.frame {
  position: relative;
  padding: 90px 64px;
  border-top: 3px double var(--ink);
}
.frame__label {
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--terra-deep);
  text-align: center;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.frame__label::before, .frame__label::after {
  content: "";
  width: 50px; height: 1px;
  background: var(--ink);
}
.frame__title {
  font-family: var(--display);
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1.0;
  margin: 0 0 18px;
  color: var(--ink);
  text-align: center;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.frame__title em { font-style: italic; color: var(--terra-deep); }
.frame__rule {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 0 auto 50px;
  color: var(--terra);
  font-family: var(--display);
  font-size: 22px;
}
.frame__rule .line { height: 1px; width: 80px; background: var(--ink); }

/* ========= I. Synopsis ========= */
.synopsis { background: transparent; }
.synopsis__grid { display: grid; grid-template-columns: 1fr; max-width: 1100px; margin: 0 auto; }
.synopsis__lead {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.2;
  text-align: center;
  color: var(--ink);
  margin: 0 auto 40px;
  max-width: 820px;
}
.synopsis__lead em { font-style: normal; color: var(--terra-deep); }
.synopsis__body {
  column-count: 2;
  column-gap: 50px;
  column-rule: 1px solid var(--rule-soft);
}
.synopsis__body p { font-size: 18px; line-height: 1.65; color: var(--ink); margin: 0 0 16px; }
.synopsis__body p:first-child::first-letter {
  font-family: var(--display);
  font-size: 80px;
  line-height: 0.85;
  float: left;
  margin: 8px 12px 0 0;
  color: var(--terra-deep);
  font-weight: 400;
}
.synopsis__coda { font-style: italic; color: var(--terra-deep); }

.synopsis__stats {
  margin: 60px auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  max-width: 1100px;
}
.stat { padding: 22px 0; border-right: 1px solid var(--rule-soft); text-align: center; }
.stat:last-child { border-right: none; }
.stat__num {
  font-family: var(--display);
  font-size: 44px;
  color: var(--terra-deep);
  line-height: 1;
  font-style: italic;
}
.stat__lbl {
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ========= II. Excerpt ========= */
.excerpt { background: var(--paper-deep); }
.chapters {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
}
.chapters__list { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }

/* Real <button>s, so they are keyboard operable. Reset the UA chrome. */
.chapter-tab {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: baseline;
  width: 100%;
  padding: 18px 6px;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--rule-soft);
  border-left: 3px solid transparent;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}
.chapter-tab:hover { background: rgba(154,72,39,0.06); }
.chapter-tab.is-active {
  background: var(--paper);
  border-left-color: var(--terra);
  padding-left: 12px;
}
.chapter-tab__num {
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.chapter-tab__title {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  font-weight: 400;
}
.chapter-tab.is-active .chapter-tab__title { color: var(--terra-deep); }
.chapter-tab__pg { font-family: var(--body); font-style: italic; font-size: 13px; color: var(--ink-soft); }

.chapter-reader {
  background: var(--paper);
  padding: 44px 50px;
  border: 1px solid var(--ink);
  min-height: 600px;
  display: flex; flex-direction: column;
  position: relative;
  box-shadow: 4px 6px 0 -1px var(--ink-faint);
}
.chapter-reader::before {
  content: "";
  position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1px solid var(--rule-soft);
  pointer-events: none;
}
.chapter-reader__inner {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column;
}
.chapter-reader__inner:focus { outline: none; }
.chapter-reader__head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 14px;
  margin-bottom: 22px;
}
.chapter-reader__no {
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--terra-deep);
}
.chapter-reader__title {
  font-family: var(--display);
  font-size: 44px;
  font-style: italic;
  margin: 0 0 24px;
  line-height: 1.0;
  color: var(--ink);
  text-align: center;
  font-weight: 400;
}
.chapter-reader__body {
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  flex: 1;
}
.chapter-reader__body p { margin: 0 0 16px; text-indent: 1.5em; }
.chapter-reader__body p:first-child { text-indent: 0; }
.chapter-reader__body .first::first-letter {
  font-family: var(--display);
  font-size: 64px;
  line-height: 0.85;
  float: left;
  margin: 6px 10px 0 0;
  color: var(--terra-deep);
  font-weight: 400;
}
.chapter-reader__foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.chapter-reader__cont {
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ========= III. Authors ========= */
.authors { background: transparent; }
.authors__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.author-card {
  background: var(--paper-deep);
  border: 1px solid var(--ink);
  display: flex; flex-direction: column;
  transition: transform 0.3s;
  position: relative;
}
.author-card::before {
  content: "";
  position: absolute; top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px solid var(--rule);
  pointer-events: none;
}
.author-card:hover { transform: translateY(-3px); }
.author-card__body { padding: 24px 28px 30px; flex: 1; display: flex; flex-direction: column; position: relative; }
.author-card__name {
  font-family: var(--display);
  font-size: 36px;
  font-style: italic;
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.0;
}
.author-card__role {
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--terra-deep);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 10px;
}
.author-card__bio { font-size: 17px; line-height: 1.6; color: var(--ink); margin: 0; }

.author-note {
  margin: 60px auto 0;
  max-width: 980px;
  padding: 36px 50px;
  background: var(--paper-deep);
  border: 1px solid var(--ink);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 30px;
  align-items: center;
  position: relative;
}
.author-note::before {
  content: "";
  position: absolute; top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px solid var(--rule);
  pointer-events: none;
}
.author-note__mark {
  font-family: var(--display);
  font-size: 100px;
  line-height: 0.8;
  color: var(--terra-deep);
  font-style: italic;
  position: relative;
}
.author-note__text {
  font-family: var(--body);
  font-style: italic;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  position: relative;
}
.author-note__text strong { font-style: normal; color: var(--terra-deep); font-weight: 500; }

/* ========= Footer ========= */
.footer {
  padding: 40px 64px;
  border-top: 3px double var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  flex-wrap: wrap;
  gap: 14px;
}
.footer__brand {
  color: var(--ink);
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
}

/* ========= Reveal on scroll ========= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.06s; }
.reveal.d2 { transition-delay: 0.12s; }
.reveal.d3 { transition-delay: 0.18s; }
.reveal.d4 { transition-delay: 0.24s; }

/* ========= Responsive ========= */

/* Intermediate state: the three-column front page becomes cover-over-columns
   before anything collapses to a single column. */
@media (max-width: 1100px) {
  .hero { padding: 84px 24px 60px; }
  .hero__columns { grid-template-columns: 1fr 1fr; gap: 30px; }
  .hero__center { grid-column: 1 / -1; order: -1; }
  section.frame { padding: 70px 32px; }
  .chapters { grid-template-columns: 260px 1fr; gap: 32px; }
  .nav { padding: 8px 18px; }
  .nav__links { gap: 16px; }
  .nav__meta { display: none; }
}

@media (max-width: 900px) {
  .hero__columns { grid-template-columns: 1fr; }
  .synopsis__body { column-count: 1; }
  .chapters, .authors__grid { grid-template-columns: 1fr; gap: 30px; }
  section.frame { padding: 60px 24px; }
  .footer { padding: 32px 24px; flex-direction: column; gap: 14px; text-align: center; }
  .author-note { grid-template-columns: 1fr; gap: 14px; padding: 28px; }
  .author-note__mark { font-size: 64px; }
  .chapter-reader { padding: 30px 26px; min-height: 0; }
  .synopsis__stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--rule-soft); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-last-child(-n+2) { border-bottom: none; }

  /* The section links go, but Download stays reachable at every width. */
  .nav { grid-template-columns: 1fr auto; padding: 8px 14px; }
  .nav__links { display: none; }
  .dateline { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
}

@media (max-width: 520px) {
  .nav__brand { font-size: 18px; }
  .book { width: min(260px, 100%); }
  .chapter-reader { padding: 24px 18px; }
  .chapter-reader__title { font-size: 34px; }
  .chapter-tab { grid-template-columns: auto 1fr; row-gap: 4px; }
  .chapter-tab__pg { grid-column: 2; }
  .chapter-reader__foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .book, .book:hover, .author-card, .author-card:hover { transition: none; transform: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .nav, .skip-link, .chapters__list { display: none; }
  body { background: #fff; }
  .reveal { opacity: 1; transform: none; }
}
