/* ============================================================
   claytonvanhook.com — Editorial author site
   Palette derived from the cover: deep navy, gold, ivory.
   ============================================================ */

:root {
  /* Cover-derived palette */
  --ink:       #1A2238;   /* deep navy */
  --ink-soft:  #2A334F;
  --gold:      #B8954A;   /* slightly muted from cover for web contrast */
  --gold-warm: #C4A04A;
  --ivory:     #F5EFE2;
  --ivory-soft:#FAF6EC;
  --paper:     #FFFDF8;
  --rule:      rgba(26, 34, 56, 0.14);
  --rule-soft: rgba(26, 34, 56, 0.08);
  --muted:     #5A6378;

  /* Typography */
  --font-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Scale */
  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1.0625rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.75rem;
  --text-hero: clamp(2.75rem, 6vw + 1rem, 5.75rem);

  /* Spacing */
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --max:       1240px;
  --max-narrow: 760px;
}

/* ----- Base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.container        { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--space-6); }
.container.narrow { max-width: var(--max-narrow); }

.section { padding: clamp(var(--space-16), 9vw, var(--space-32)) 0; }

/* Section labels */
.kicker {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 var(--space-6);
}
.kicker.light { color: var(--gold-warm); }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw + 0.6rem, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 var(--space-8);
  max-width: 22ch;
}
.section-title em { font-style: italic; font-weight: 500; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.85em 1.5em;
  border-radius: 2px;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--ink-soft); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--ink); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--rule);
  background: rgba(255, 253, 248, 0.94);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--ink);
}
.brand-mark { color: var(--ink); }
.brand-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.75rem);
}
.site-nav a {
  font-size: var(--text-sm);
  color: var(--ink);
  font-weight: 400;
  transition: color .2s ease;
}
.site-nav a:not(.nav-cta):hover { color: var(--gold); }
.site-nav a.nav-cta {
  padding: 0.55em 1.1em;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.site-nav a.nav-cta:hover { background: var(--ink-soft); color: var(--paper); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0 clamp(var(--space-16), 8vw, var(--space-24));
  background:
    radial-gradient(60% 80% at 70% 10%, rgba(196, 160, 74, 0.06), transparent 70%),
    linear-gradient(180deg, var(--ivory-soft) 0%, var(--paper) 100%);
  overflow: hidden;
}
.hero::after {
  /* subtle gold rule at bottom */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}
.hero-text { min-width: 0; }
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 var(--space-6);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-hero);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 var(--space-6);
}
.hero-title .line { display: block; }
.hero-title .italic { font-style: italic; font-weight: 500; }
.tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 1.6vw + 0.6rem, 1.55rem);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 28ch;
  margin: 0 0 var(--space-8);
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.hero-meta {
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 0;
}

.hero-cover {
  margin: 0;
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 420px;
  transform: rotate(-1.2deg);
  transition: transform .5s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-cover:hover { transform: rotate(-0.4deg) translateY(-4px); }
.hero-cover img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(26, 34, 56, 0.06),
    0 18px 40px -20px rgba(26, 34, 56, 0.45),
    0 40px 80px -40px rgba(26, 34, 56, 0.35);
}

/* ============================================================
   SYNOPSIS
   ============================================================ */
.synopsis { background: var(--paper); }
.synopsis-body p {
  font-size: var(--text-base);
  line-height: 1.7;
  margin: 0 0 var(--space-6);
  color: var(--ink);
}
.synopsis-body .lede {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1vw + 0.95rem, 1.45rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
}
.synopsis-body em { font-style: italic; }

.meta-grid {
  list-style: none;
  padding: var(--space-8) 0 0;
  margin: var(--space-8) 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.meta-grid li {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}
.meta-label {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.meta-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}

/* ============================================================
   EPIGRAPH
   ============================================================ */
.epigraph {
  background: var(--ink);
  color: var(--ivory);
  padding: clamp(var(--space-16), 10vw, var(--space-24)) 0;
  position: relative;
  text-align: center;
}
.epigraph::before, .epigraph::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 36px;
  height: 1px;
  background: var(--gold-warm);
  transform: translateX(-50%);
}
.epigraph::before { top: 28%; }
.epigraph::after  { bottom: 28%; }
.epigraph blockquote {
  margin: 0;
  max-width: 36ch;
  margin-inline: auto;
}
.epigraph blockquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.4vw + 0.6rem, 2rem);
  line-height: 1.35;
  margin: 0 0 var(--space-4);
  color: var(--ivory);
}
.epigraph blockquote footer {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-warm);
}

/* ============================================================
   EXCERPT
   ============================================================ */
.excerpt { background: var(--ivory-soft); }
.excerpt-body p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.65;
  margin: 0 0 var(--space-6);
  color: var(--ink);
}
.dropcap { margin-top: 0; }
.dropcap .dc {
  float: left;
  font-family: var(--font-display);
  font-size: 4.6rem;
  line-height: 0.85;
  padding: 0.08em 0.12em 0 0;
  color: var(--gold);
  font-weight: 500;
}
.excerpt-end {
  text-align: center;
  color: var(--ink-soft);
  margin-top: var(--space-8) !important;
}
.excerpt-cta { text-align: center; margin-top: var(--space-12); }

/* ============================================================
   PRAISE
   ============================================================ */
.praise { background: var(--paper); }
.praise-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-12);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.praise-card {
  background: var(--ivory-soft);
  padding: var(--space-8);
  border-radius: 2px;
  position: relative;
  border-left: 2px solid var(--gold);
}
.praise-card blockquote {
  margin: 0 0 var(--space-6);
}
.praise-card blockquote p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.55;
  margin: 0;
  color: var(--ink);
}
.praise-card .attrib {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.praise-note {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--muted);
  font-style: italic;
  margin-top: var(--space-8);
  max-width: 52ch;
  margin-inline: auto;
}

/* ============================================================
   AUTHOR
   ============================================================ */
.author { background: var(--paper); border-top: 1px solid var(--rule-soft); }
.author-body p {
  font-size: var(--text-base);
  line-height: 1.75;
  margin: 0 0 var(--space-4);
  color: var(--ink);
  max-width: 60ch;
}

/* ============================================================
   NEXT EDITION
   ============================================================ */
.next-edition {
  background: var(--ink);
  color: var(--ivory);
  padding: clamp(var(--space-16), 9vw, var(--space-24)) 0;
}
.next-inner {
  text-align: center;
}
.next-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw + 0.6rem, 2.5rem);
  font-weight: 500;
  line-height: 1.18;
  margin: 0 0 var(--space-6);
  color: var(--ivory);
}
.next-body {
  font-size: var(--text-base);
  line-height: 1.7;
  color: rgba(245, 239, 226, 0.85);
  max-width: 56ch;
  margin: 0 auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: var(--space-16) 0 var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-8);
  align-items: end;
}
.footer-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0 0 0.2em;
  color: var(--ink);
}
.footer-sub {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 0;
  font-style: italic;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  justify-content: flex-end;
}
.footer-nav a {
  font-size: var(--text-sm);
  color: var(--ink);
  transition: color .2s;
}
.footer-nav a:hover { color: var(--gold); }
.footer-legal {
  grid-column: 1 / -1;
  margin: var(--space-12) 0 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule-soft);
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .praise-grid { grid-template-columns: 1fr; }
  .meta-grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  .hero-cover { order: -1; max-width: 280px; }
  .tagline { margin-left: auto; margin-right: auto; }
  .hero-cta-row { justify-content: center; }
  .section-title { max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav  { justify-content: flex-start; }

  .site-nav a:not(.nav-cta) { display: none; }
}

@media (max-width: 480px) {
  :root { --text-base: 1rem; }
  .container { padding: 0 var(--space-4); }
  .hero-title { font-size: clamp(2.5rem, 12vw, 3.5rem); }
  .meta-grid { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .dropcap .dc { font-size: 3.6rem; }
  .excerpt-body p { font-size: 1.1rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-cover { transform: none; }
  .hero-cover:hover { transform: none; }
}
