/* ==========================================================================
   Charlotte G. McKinnies — site styles
   Palette drawn from the book jacket: forest green title ink, wheat-gold horizon, warm paper.
   ========================================================================== */

/* Fonts (self-hosted, latin subset) ---------------------------------------- */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/Newsreader-normal.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/Newsreader-italic.woff2") format("woff2");
  font-weight: 400 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-normal.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* Tokens -------------------------------------------------------------------- */
:root {
  --paper: #f7f2e8;
  --paper-deep: #efe7d7;
  --paper-edge: #e3d8c3;
  --ink: #1b1e1a;
  --ink-soft: #4b4f48;
  --ink-mute: #5f625a;
  --forest: #1c3428;
  --forest-deep: #142619;
  --forest-mid: #2b4a39;
  --gold: #c9a35a;          /* on forest only (AA for large and body text) */
  --gold-ink: #7d5f22;      /* gold for text on paper (AA) */
  --cream: #f3ecdc;
  --cream-mute: #c9c6b6;
  --rule: rgba(27, 30, 26, 0.16);
  --rule-light: rgba(243, 236, 220, 0.2);
  --error: #9b2c1f;
  --success: #2d5a3d;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.35vw, 1.35rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.85rem);
  --step-3: clamp(1.85rem, 1.55rem + 1.4vw, 2.75rem);
  --step-4: clamp(2.3rem, 1.8rem + 2.4vw, 3.9rem);
  --step-5: clamp(2.9rem, 2rem + 4.4vw, 6.1rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 76rem;
  --section: clamp(4.5rem, 9vw, 8.5rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

em, cite { font-style: italic; }
cite { font-family: var(--serif); }

ul, ol { padding: 0; margin: 0; list-style: none; }

blockquote, figure, dl, dd { margin: 0; }

::selection { background: var(--forest); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--gold-ink);
  outline-offset: 3px;
}
.hero :focus-visible,
.newsletter :focus-visible,
.site-footer :focus-visible,
.theme-dark-header .site-header :focus-visible,
.site-nav.is-open :focus-visible { outline-color: var(--gold); }

main:focus { outline: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--ink);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.icon { width: 1.05em; height: 1.05em; flex: none; }

/* Typography helpers -------------------------------------------------------- */
.eyebrow {
  margin: 0 0 1.1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-ink);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  flex: none;
}
.eyebrow--light { color: var(--gold); }

.section-title { font-size: var(--step-3); }

.lede {
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
}

.ornament { width: 120px; height: 16px; color: var(--rule); }
.ornament--gold { color: var(--gold); }

/* Buttons & links ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 0;
  font: 600 0.8125rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn .icon { width: 1rem; height: 1rem; transition: transform 0.25s var(--ease); }
.btn:hover .icon { transform: translate(2px, -2px); }
.btn--small { min-height: 2.6rem; padding: 0.6rem 1.1rem; font-size: 0.72rem; }

.btn--gold { background: var(--gold); color: var(--forest-deep); }
.btn--gold:hover { background: var(--cream); }

.btn--dark { background: var(--forest); color: var(--cream); }
.btn--dark:hover { background: var(--forest-deep); }
.btn--dark .icon { transform: none; }
.btn--dark:hover .icon { transform: translateX(3px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 0.35rem;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--forest);
  border-bottom: 1px solid currentColor;
}
.link-arrow .icon { transition: transform 0.25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }
.link-arrow:hover { color: var(--gold-ink); }
.link-arrow em { text-transform: none; letter-spacing: 0; font-family: var(--serif); font-size: 1.1em; font-weight: 400; }
.link-arrow--light { color: var(--cream); }
.link-arrow--light:hover { color: var(--gold); }

/* Header -------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 40;
  border-bottom: 1px solid var(--rule);
}
.theme-dark-header .site-header {
  background: var(--forest);
  color: var(--cream);
  border-bottom-color: var(--rule-light);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5.25rem;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}
.wordmark__name {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  letter-spacing: 0.01em;
}
.wordmark__role {
  margin-top: 0.4rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.theme-dark-header .wordmark__role { color: var(--gold); }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav__list { display: flex; gap: 2rem; }
.site-nav__link {
  position: relative;
  display: inline-block;
  padding-block: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.2rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.site-nav__cta { background: var(--forest); color: var(--cream); }
.site-nav__cta:hover { background: var(--forest-deep); }
.theme-dark-header .site-nav__cta { background: transparent; color: var(--cream); border-color: var(--rule-light); }
.theme-dark-header .site-nav__cta:hover { background: var(--gold); border-color: var(--gold); color: var(--forest-deep); }

.site-nav__social { display: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: 600 0.75rem/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle__bars { position: relative; display: grid; gap: 6px; width: 26px; }
.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 900px) {
  .js .nav-toggle { display: inline-flex; position: relative; z-index: 60; }

  .js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 50;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2.5rem;
    padding: 6rem var(--gutter) 3rem;
    background: var(--forest);
    color: var(--cream);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
  }
  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.35s var(--ease);
  }
  .js .nav-open .nav-toggle { color: var(--cream); }
  .js .site-nav__list { flex-direction: column; gap: 0.25rem; }
  .js .site-nav__link { font-family: var(--serif); font-size: clamp(2rem, 8vw, 2.75rem); font-weight: 400; }
  .js .site-nav__link::after { bottom: 0.3rem; }
  .js .site-nav__cta { background: var(--gold); color: var(--forest-deep); border: 0; min-height: 3.25rem; padding-inline: 1.6rem; font-size: 0.8rem; }
  .js .site-nav__social { display: flex; gap: 1.75rem; }
  .js .site-nav__social a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; text-decoration: none; font-size: 0.9rem; color: var(--cream-mute); }
  .js .site-nav__social a:hover { color: var(--gold); }

  /* Without JavaScript the navigation simply wraps below the wordmark. */
  .no-js .site-header__inner { flex-wrap: wrap; padding-block: 1rem; }
  .no-js .site-nav { flex-wrap: wrap; gap: 1rem 1.5rem; }
  .no-js .site-nav__list { flex-wrap: wrap; gap: 0.25rem 1.25rem; }
}

body.nav-locked { overflow: hidden; }

/* Hero ---------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--forest);
  color: var(--cream);
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  isolation: isolate;
}
/* Fine horizon line echoing the landscape on the jacket */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(4rem, 9vw, 7.5rem);
  background: var(--paper);
  z-index: -1;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}

.hero__copy { padding-bottom: clamp(6rem, 12vw, 10rem); }

.hero__title {
  font-size: var(--step-5);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}
.hero__title-line { display: block; }
.hero__title em {
  font-style: italic;
  color: var(--gold);
  padding-left: clamp(1.5rem, 6vw, 5.5rem);
}

.hero__subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1.3;
  color: var(--cream);
  margin-bottom: 0.5rem;
}
.hero__byline {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-mute);
  margin-bottom: 2.25rem;
}
.hero__lead {
  max-width: 34rem;
  font-size: var(--step-1);
  font-family: var(--serif);
  line-height: 1.55;
  color: var(--cream-mute);
  padding-left: 1.25rem;
  border-left: 1px solid var(--gold);
  margin-bottom: 2.5rem;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.25rem; }

.hero__book { align-self: end; justify-self: center; width: 100%; max-width: 22.5rem; }

/* Book cover presentation --------------------------------------------------- */
.book-cover {
  position: relative;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.12),
    0 10px 20px -6px rgba(20, 38, 25, 0.35),
    0 32px 60px -18px rgba(20, 38, 25, 0.5);
  background: var(--paper-deep);
}
.book-cover img { width: 100%; aspect-ratio: 1000 / 1499; object-fit: cover; }
/* Spine crease and page-edge light: makes the flat cover read as a bound book */
.book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0, rgba(255, 255, 255, 0.18) 1.4%, rgba(0, 0, 0, 0.12) 3.2%, rgba(255, 255, 255, 0.06) 5%, transparent 9%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.06), transparent 30%);
}
.book-cover--hero { transform: translateY(1px); }
.book-cover--small { width: 9.5rem; }
.book-cover--mini { width: 5.5rem; flex: none; }

/* Epigraph ------------------------------------------------------------------ */
.epigraph { padding: clamp(3rem, 7vw, 5.5rem) 0 var(--section); text-align: center; }
.epigraph__inner { display: grid; justify-items: center; gap: 1.75rem; }
.epigraph__quote p {
  max-width: 52rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-4);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--forest);
}
.epigraph__source {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.epigraph__source cite { text-transform: none; letter-spacing: 0; font-size: 1.15rem; }

/* Chapters (home) ----------------------------------------------------------- */
.chapter { padding-block: var(--section); border-top: 1px solid var(--rule); }
.chapter__numeral {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-size: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  line-height: 1;
  color: var(--paper-edge);
  font-weight: 400;
}
.chapter__title { font-size: var(--step-3); max-width: 18ch; }

.chapter__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 7rem);
}
.chapter__head { align-self: start; position: sticky; top: 2rem; }
.chapter__body .lede { margin-bottom: 2.5rem; }

.ideal-for { margin-bottom: 2.5rem; padding: 1.75rem 0; border-block: 1px solid var(--rule); }
.ideal-for__title {
  margin-bottom: 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.ideal-for__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem 2rem; }
.ideal-for__list li {
  position: relative;
  padding-left: 1.5rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.4;
}
.ideal-for__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 0.55rem; height: 0.55rem;
  border: 1px solid var(--gold-ink);
  transform: rotate(45deg);
}

.facts { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; margin-bottom: 2.5rem; }
.facts dt {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.facts dd { font-family: var(--serif); font-size: 1.15rem; }

/* Author feature (home) */
.chapter--author { background: var(--paper-deep); border-top: 0; }
.author-feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
}
.author-feature__copy .lede { color: var(--ink); margin-bottom: 2rem; }
.author-feature__links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem; }

.framed-photo { position: relative; margin: 0 1.5rem 1.5rem 0; }
.framed-photo::before {
  content: "";
  position: absolute;
  inset: 1.5rem -1.5rem -1.5rem 1.5rem;
  border: 1px solid var(--gold-ink);
  z-index: 0;
}
.framed-photo picture { position: relative; z-index: 1; }
.framed-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.social-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-size: 0.9rem;
  text-decoration: none;
}
.social-links a:hover { color: var(--gold-ink); }
.social-links--stacked { flex-direction: column; gap: 0; }

/* Reviews ------------------------------------------------------------------- */
.reviews { padding-block: var(--section); background: var(--paper); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .eyebrow::after { content: ""; width: 2rem; height: 1px; background: currentColor; }

.reviews__featured {
  max-width: 54rem;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  text-align: center;
}
.reviews__featured blockquote p {
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 1.25;
  color: var(--forest);
}
.reviews__featured blockquote p::before { content: "“"; }
.reviews__featured blockquote p::after { content: "”"; }
.reviews__featured figcaption,
.review figcaption {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.review {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.75rem, 3.5vw, 2.75rem) clamp(0rem, 3.5vw, 3rem);
  border-bottom: 1px solid var(--rule);
}
.review:nth-child(odd) { border-right: 1px solid var(--rule); padding-left: 0; }
.review:nth-child(even) { padding-right: 0; }
.review blockquote p {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink);
}
.review blockquote p::before { content: "“"; }
.review blockquote p::after { content: "”"; }
.review figcaption { margin-top: 1.25rem; }

/* Closing CTA (home) -------------------------------------------------------- */
.closing { padding-bottom: var(--section); }
.closing__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}
.closing__title { font-size: var(--step-3); margin-bottom: 0.75rem; }
.closing__copy > p { color: var(--ink-soft); margin-bottom: 1.75rem; }

.buy-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.buy-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  min-height: 4.75rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--forest);
  color: var(--forest);
  text-decoration: none;
  background: var(--paper);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.buy-link__format { font-family: var(--serif); font-size: 1.2rem; line-height: 1.2; }
.buy-link__store {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
}
.buy-link__store .icon { width: 0.9rem; height: 0.9rem; }
.buy-link:hover { background: var(--forest); color: var(--cream); }

/* Newsletter ---------------------------------------------------------------- */
.newsletter { background: var(--forest); color: var(--cream); padding-block: clamp(4rem, 8vw, 6.5rem); }
.newsletter__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.newsletter__title { font-size: var(--step-3); margin-bottom: 1rem; }
.newsletter__copy p:not(.eyebrow) { color: var(--cream-mute); max-width: 32rem; }
.newsletter .field__label { color: var(--cream); }
.newsletter .field__input {
  background: transparent;
  color: var(--cream);
  border-color: rgba(243, 236, 220, 0.45);
}
.newsletter .field__input::placeholder { color: rgba(243, 236, 220, 0.5); }
.newsletter .field__input:focus { border-color: var(--gold); }
.newsletter .check label { color: var(--cream-mute); }
.newsletter .check a { color: var(--cream); }
.newsletter .field__error { color: #f2b8a8; }
.newsletter .form-status--success { background: rgba(243, 236, 220, 0.08); color: var(--cream); border-color: var(--gold); }
.newsletter .form-status--error { background: rgba(155, 44, 31, 0.18); color: #fbd9cf; border-color: #e0937e; }

/* Forms --------------------------------------------------------------------- */
.field { margin-bottom: 1.4rem; }
.field__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.field__optional { font-weight: 400; letter-spacing: 0.04em; text-transform: none; color: var(--ink-mute); }
.field__row { display: flex; gap: 0; }
.field__row .field__input { flex: 1 1 auto; min-width: 0; border-right: 0; }
.field__row .btn { flex: none; }
.field__input {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(27, 30, 26, 0.35);
  border-radius: 0;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field__input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(28, 52, 40, 0.18); }
.field__input[aria-invalid="true"] { border-color: var(--error); }
.field__input--area { min-height: 11rem; resize: vertical; line-height: 1.6; }
.field__error { margin: 0.45rem 0 0; font-size: 0.875rem; color: var(--error); }
.field__error[hidden] { display: none; }

.check { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.9rem; line-height: 1.5; }
.check input {
  flex: none;
  width: 1.5rem; height: 1.5rem;
  margin: 0;
  accent-color: var(--gold);
}

.form-status {
  margin-bottom: 1.5rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid;
  font-size: 0.95rem;
}
.form-status:focus { outline: none; }
.form-status--error { background: #f6e3dd; color: var(--error); border-color: var(--error); }
.form-status--success { background: #e3ece2; color: var(--success); border-color: var(--success); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Breadcrumb ---------------------------------------------------------------- */
.breadcrumb { padding-top: 1.5rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; color: var(--ink-mute); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--paper-edge); }
.breadcrumb a { display: inline-block; padding-block: 0.3rem; text-decoration: none; }
.breadcrumb a:hover { color: var(--forest); text-decoration: underline; }

/* Book page ----------------------------------------------------------------- */
.book-hero { padding: clamp(2.5rem, 5vw, 4.5rem) 0 var(--section); }
.book-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}
.book-hero__media { position: sticky; top: 2rem; display: grid; justify-items: center; gap: 1.5rem; }
.book-cover--detail { width: 100%; max-width: 23.75rem; }
.jacket-trigger {
  min-height: 2.75rem;
  padding: 0.5rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: var(--forest);
  font: 600 0.8rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.jacket-trigger:hover { color: var(--gold-ink); }
.no-js .jacket-trigger { display: none; }

.book-hero__title { font-size: var(--step-5); line-height: 1; letter-spacing: -0.025em; margin-bottom: 1rem; }
.book-hero__subtitle { font-family: var(--serif); font-style: italic; font-size: var(--step-2); line-height: 1.3; color: var(--forest-mid); margin-bottom: 0.75rem; }
.book-hero__byline { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 2rem; }
.book-hero__byline a { color: var(--ink); text-decoration-color: var(--gold-ink); }
.book-hero__copy .lede { color: var(--ink); max-width: 40rem; margin-bottom: 2.75rem; padding-top: 2rem; border-top: 1px solid var(--rule); }

.buy-block__title {
  margin-bottom: 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.book-body { padding-block: var(--section); background: var(--paper-deep); }
.book-body__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}

.details-card { position: sticky; top: 2rem; padding: 2rem; background: var(--paper); border-top: 3px solid var(--forest); }
.details-card__title { font-size: 1.5rem; margin-bottom: 1.25rem; }
.details div { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.details div:last-child { border-bottom: 0; }
.details dt { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); }
.details dd { font-size: 0.98rem; }

/* Long-form prose */
.prose { max-width: 40rem; font-family: var(--serif); font-size: clamp(1.13rem, 1.05rem + 0.3vw, 1.27rem); line-height: 1.72; }
.prose .eyebrow { font-family: var(--sans); }
.prose .section-title { margin-bottom: 1.75rem; }
.prose h2:not(.section-title) { font-size: var(--step-2); margin: 3rem 0 1.25rem; }
.prose h3 { font-size: 1.4rem; margin: 2.75rem 0 1.1rem; }
.prose p { margin-bottom: 1.35em; }
.prose a { color: var(--forest); text-decoration-color: var(--gold-ink); }
.prose a:hover { color: var(--gold-ink); }
.prose__epigraph {
  font-style: italic;
  font-size: 1.35em;
  line-height: 1.4;
  color: var(--forest);
  padding-left: 1.25rem;
  border-left: 2px solid var(--gold-ink);
}
.prose__list li { position: relative; padding-left: 1.75rem; margin-bottom: 0.6rem; }
.prose__list li::before { content: "—"; position: absolute; left: 0; color: var(--gold-ink); }
.has-dropcap::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  font-size: 4.6em;
  line-height: 0.8;
  color: var(--forest);
}

/* Author strip (book page) */
.author-strip { padding-bottom: var(--section); }
.author-strip__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  max-width: 54rem;
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--rule);
}
.author-strip__photo { width: clamp(8rem, 18vw, 13.75rem); }
.author-strip__photo img { aspect-ratio: 4 / 5; object-fit: cover; }
.author-strip__title { font-size: var(--step-2); margin-bottom: 0.75rem; }
.author-strip p:not(.eyebrow) { color: var(--ink-soft); margin-bottom: 1.25rem; }

/* Jacket dialog */
.jacket-dialog {
  width: min(64rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.jacket-dialog::backdrop { background: rgba(20, 38, 25, 0.82); }
.jacket-dialog__inner { padding: clamp(1rem, 3vw, 2rem); }
.jacket-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.jacket-dialog__head h2 { font-size: var(--step-1); }
.jacket-dialog__close {
  display: inline-grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--rule);
  background: none;
  color: inherit;
  cursor: pointer;
}
.jacket-dialog__close:hover { background: var(--forest); color: var(--cream); }
.jacket-dialog img { width: 100%; }

/* About page ---------------------------------------------------------------- */
.about__head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem); }
.about__title { font-size: var(--step-5); line-height: 0.98; letter-spacing: -0.025em; }
.about__initial { font-style: italic; color: var(--gold-ink); }
.about__kicker { margin-top: 1.25rem; font-family: var(--serif); font-size: var(--step-1); color: var(--ink-soft); }
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
  padding-bottom: var(--section);
}
.about__media { position: sticky; top: 2rem; }
.pullquote {
  margin: 2.5rem 0;
  padding: 2rem 0;
  border-block: 1px solid var(--rule);
}
.pullquote p {
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.2;
  color: var(--forest);
}
.about__book {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--paper-deep);
  font-family: var(--sans);
}
.about__book-title { font-family: var(--serif); font-size: 1.35rem; margin-bottom: 0.15rem; }
.about__book-meta { font-size: 0.85rem; color: var(--ink-mute); margin-bottom: 0.6rem !important; }
.prose .about__book .link-arrow { color: var(--forest); text-decoration: none; }

.connect-list { font-family: var(--sans); font-size: 1rem; border-top: 1px solid var(--rule); }
.connect-list li { border-bottom: 1px solid var(--rule); }
.prose .connect-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.75rem;
  padding: 0.5rem 0;
  color: var(--ink);
  text-decoration: none;
}
.connect-list a span { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }
.connect-list strong { font-weight: 600; min-width: 6.5rem; }
.connect-list .icon { width: 1.25rem; height: 1.25rem; color: var(--gold-ink); }
.prose .connect-list a:hover { color: var(--gold-ink); }

/* Contact page -------------------------------------------------------------- */
.contact { padding: clamp(2.5rem, 6vw, 5rem) 0 var(--section); }
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}
.contact__title { font-size: var(--step-5); line-height: 1; letter-spacing: -0.025em; margin-bottom: 1.5rem; }
.contact__title em { color: var(--gold-ink); }
.contact__intro .lede { margin-bottom: 2.5rem; }
.contact__details > div { padding: 1.1rem 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; }
.contact__details dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); padding-top: 0.25rem; }
.contact__details dd a { overflow-wrap: anywhere; }
.contact__details .social-links a { min-height: 2.25rem; }

.contact__form-wrap { background: var(--paper-deep); padding: clamp(1.5rem, 4vw, 3rem); border-top: 3px solid var(--forest); }
.contact-form__title { font-size: var(--step-2); margin-bottom: 0.4rem; }
.contact-form__note { font-size: 0.875rem; color: var(--ink-mute); margin-bottom: 1.75rem; }
.contact-form__privacy { font-size: 0.875rem; color: var(--ink-soft); margin: 0.5rem 0 1.5rem; }
.contact-form .btn { width: 100%; }
.form-success { display: grid; justify-items: start; gap: 1.25rem; padding-block: 1rem; }
.form-success:focus { outline: none; }
.form-success h2 { font-size: var(--step-2); }

/* Legal page ---------------------------------------------------------------- */
.legal { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section); }
.legal__head { max-width: 40rem; margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--rule); }
.legal__title { font-size: var(--step-4); }
.legal__updated { margin-top: 0.75rem; font-size: 0.875rem; color: var(--ink-mute); }

/* Error page ---------------------------------------------------------------- */
.error-page { padding-block: clamp(3rem, 8vw, 7rem) var(--section); }
.error-page__inner { max-width: 44rem; }
.error-page__code { font-family: var(--serif); font-size: clamp(5rem, 4rem + 6vw, 9rem); line-height: 1; color: var(--paper-edge); margin-bottom: 0.5rem; }
.error-page__title { font-size: var(--step-4); margin-bottom: 1rem; }
.error-page .ornament { margin: 2.5rem 0 1.5rem; }
.error-page__links { display: grid; gap: 0.75rem; justify-items: start; margin-top: 1rem; }

/* Footer -------------------------------------------------------------------- */
.site-footer { background: var(--forest-deep); color: var(--cream-mute); font-size: 0.925rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.wordmark--footer .wordmark__name { font-size: 1.75rem; color: var(--cream); }
.site-footer__tagline { margin-top: 1rem; max-width: 22rem; font-family: var(--serif); font-size: 1.05rem; line-height: 1.5; }
.site-footer__heading {
  margin-bottom: 1rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.site-footer__col li a { display: inline-block; padding-block: 0.3rem; overflow-wrap: anywhere; }
.site-footer__col li { line-height: 1.5; padding-block: 0.15rem; }
.site-footer .social-links { margin-top: 0.75rem; }
.site-footer .social-links a { display: inline-flex; min-height: 2.5rem; padding: 0; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--rule-light);
  font-size: 0.82rem;
}
.site-footer__bottom a { display: inline-block; padding-block: 0.35rem; text-decoration: underline; text-decoration-color: rgba(201, 198, 182, 0.4); }

/* Reveal motion (enhancement only) ----------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .hero .reveal:nth-child(2) { transition-delay: 0.08s; }
  .js .hero .reveal:nth-child(3) { transition-delay: 0.16s; }
  .js .hero .reveal:nth-child(4) { transition-delay: 0.22s; }
  .js .hero .reveal:nth-child(5) { transition-delay: 0.28s; }
  .js .hero .reveal:nth-child(6) { transition-delay: 0.34s; }

  .js .book-cover--hero { animation: rise 1.2s var(--ease) both 0.2s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(1px); }
  }
}

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

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1100px) {
  .site-nav__list { gap: 1.5rem; }
  .site-nav { gap: 1.5rem; }
  .site-footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .chapter__grid,
  .author-feature,
  .about__grid,
  .contact__grid,
  .book-body__grid,
  .newsletter__inner { grid-template-columns: minmax(0, 1fr); }

  .chapter__head,
  .about__media,
  .details-card { position: static; }

  .author-feature__media { max-width: 26rem; }
  .about__media { max-width: 30rem; }
  .book-body__grid .details-card { max-width: 40rem; }
}

@media (max-width: 759px) {
  .hero { padding-top: 2.75rem; }
  .hero::after { height: 7rem; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero__copy { padding-bottom: 0; }
  .hero__title em { padding-left: 1.25rem; }
  .hero__book { max-width: 15rem; justify-self: start; margin-left: 1.25rem; }
  .hero__actions .btn { width: 100%; }

  .epigraph { text-align: left; }
  .epigraph__inner { justify-items: start; }
  .br-wide { display: none; }

  .book-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .book-hero__media { position: static; justify-items: start; }
  .book-cover--detail { max-width: 15.5rem; }

  .buy-links { grid-template-columns: minmax(0, 1fr); }
  .buy-link { flex-direction: row; align-items: center; justify-content: space-between; min-height: 3.75rem; }

  .closing__inner { grid-template-columns: minmax(0, 1fr); }
  .book-cover--small { width: 7.5rem; }

  .reviews__grid { grid-template-columns: minmax(0, 1fr); }
  .review,
  .review:nth-child(odd),
  .review:nth-child(even) { padding-inline: 0; border-right: 0; }
  .reviews__featured { text-align: left; }

  .ideal-for__list { grid-template-columns: minmax(0, 1fr); }

  .field__row { flex-direction: column; gap: 0.75rem; }
  .field__row .field__input { border-right: 1px solid rgba(243, 236, 220, 0.45); }
  .field__row .btn { width: 100%; }

  .author-strip__inner { grid-template-columns: minmax(0, 1fr); }

  .site-footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .contact__details > div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}

@media (max-width: 420px) {
  .site-footer__top { grid-template-columns: minmax(0, 1fr); }
  .about__book { flex-direction: column; align-items: flex-start; }
  .framed-photo { margin: 0 1rem 1rem 0; }
  .framed-photo::before { inset: 1rem -1rem -1rem 1rem; }
}

@media print {
  .site-header, .newsletter, .site-footer, .hero__actions, .buy-links, .jacket-trigger { display: none !important; }
  body { background: #fff; }
  .hero { background: #fff; color: #000; }
}
