/* ============================================================
   Ribbon & Flint — plain CSS, no frameworks, no JavaScript
   Palette: midnight plum background, crimson rose, antique gold
   ============================================================ */

:root {
  --ink: #f0e6e6;          /* primary text */
  --coal: #b5a0aa;         /* secondary text */
  --cream: #150f14;        /* page background */
  --paper: #241b23;        /* card background */
  --midnight: #0d080c;     /* darkest surface */
  --rose: #d4526e;
  --rose-dark: #b23a55;
  --rose-light: #e88ca2;
  --gold: #c9a25f;
  --gold-light: #e3c78f;
  --line: rgba(201, 162, 95, 0.2);
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "EB Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.06rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--rose); color: #fffdf8; }

img { max-width: 100%; display: block; }

a { color: var(--rose); text-decoration: none; }
a:hover { color: var(--rose-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

/* ---------- layout ---------- */
.wrap { max-width: 72rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.wrap-narrow { max-width: 46rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.section { padding-top: 3.5rem; }
.center { text-align: center; }
.center-lede { max-width: 38rem; margin-left: auto; margin-right: auto; }
.page-head { padding-top: 2.5rem; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(21, 15, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand {
  font-family: var(--font-display);
  font-size: 1.65rem; font-weight: 600; letter-spacing: 0.03em;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.amp { color: var(--rose); }
.main-nav { display: flex; gap: 1.8rem; }
.main-nav a {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--coal);
}
.main-nav a:hover { color: var(--ink); }

/* ---------- breadcrumbs ---------- */
.crumbs { padding-top: 1.6rem; font-size: 0.9rem; color: var(--coal); }
.crumbs a { color: var(--coal); }
.crumbs a:hover { color: var(--rose); }
.crumbs span { margin: 0 0.4rem; }

/* ---------- typography helpers ---------- */
.eyebrow {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.22em;
  margin-bottom: 0.4em;
}
.gold { color: var(--gold); }
.gold-light { color: var(--gold-light); }
.rose { color: var(--rose-light); }
.dim { color: var(--coal); }
.italic { font-style: italic; }
.lede { font-size: 1.15rem; color: var(--coal); }
.byline { font-family: var(--font-display); font-size: 1.35rem; font-style: italic; color: var(--rose-light); }
.byline a { color: var(--rose-light); }
.tagline {
  font-size: 1.2rem; font-style: italic; color: var(--ink);
  border-left: 2px solid var(--gold); padding-left: 1.1rem; margin: 1.4rem 0;
}
.ornament {
  display: flex; align-items: center; justify-content: center; gap: 0.9rem;
  margin: 1.6rem 0 2.4rem; color: var(--gold);
}
.ornament .rule { height: 1px; width: 5rem; background: rgba(201, 162, 95, 0.4); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 0.8rem 1.7rem;
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.16em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-rose { background: var(--rose); color: #fff; }
.btn-rose:hover { background: var(--rose-dark); color: #fff; }
.btn-outline { border: 1px solid rgba(240, 230, 230, 0.3); color: var(--ink); }
.btn-outline:hover { border-color: var(--gold-light); color: var(--gold-light); }
.btn-ghost { border: 1px solid rgba(240, 230, 230, 0.2); background: var(--paper); color: var(--ink); }
.btn-ghost:hover { border-color: var(--rose); color: var(--rose); }
.btn-block { display: block; text-align: center; margin-top: 1.4rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.8rem; }
.btn-row + .chip-row { margin-top: 1.3rem; }

/* ---------- cards / grids ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  padding: 2rem; border-radius: 2px;
}
.grid { display: grid; gap: 1.6rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(38rem 38rem at 110% -20%, rgba(212, 82, 110, 0.18), transparent 60%),
    radial-gradient(30rem 30rem at -10% 120%, rgba(201, 162, 95, 0.12), transparent 60%),
    linear-gradient(135deg, #2a0e1c 0%, var(--midnight) 55%, #1b0f1a 100%);
  padding: 5rem 0;
}
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero h1 em.rose { font-style: italic; color: var(--rose-light); }
.hero-covers { display: none; }
@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: 1.2fr 1fr; }
  .hero-covers { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 24rem; margin-left: auto; }
  .hero-covers img { border: 4px solid rgba(255, 255, 255, 0.1); border-radius: 2px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
  .hero-covers img:first-child { transform: rotate(-3deg); }
  .hero-covers img:last-child { transform: rotate(3deg); margin-top: 2.5rem; }
}

/* ---------- stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(36, 27, 35, 0.5); }
.stats-grid { display: grid; gap: 2rem; padding-top: 2.4rem; padding-bottom: 2.4rem; text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; margin: 0; }
.stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--coal); margin: 0.3rem 0 0; }
@media (min-width: 44rem) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- book cards ---------- */
.books-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 56rem) { .books-grid { grid-template-columns: repeat(4, 1fr); } }
.books-grid-4 { max-width: 56rem; margin: 0 auto; }
.month-group .reading-order-head { margin-top: 2.8rem; }
.month-group:first-of-type .reading-order-head { margin-top: 0.8rem; }
.month-group .books-grid { margin-top: 1.6rem; }
.book-card {
  position: relative;
  background: var(--paper); border: 1px solid rgba(201, 162, 95, 0.15);
  border-radius: 2px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}
.book-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.book-card img { aspect-ratio: 5 / 8; object-fit: cover; width: 100%; }
.book-card-main { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.book-card-main::after { content: ""; position: absolute; inset: 0; }
.book-card-body { padding: 1.1rem 1.2rem 0.6rem; }
.book-card-body h3 { font-size: 1.2rem; margin: 0.2rem 0 0.3rem; color: var(--ink); }
.book-card:hover h3 { color: var(--rose-light); }
.author-line { font-style: italic; color: var(--coal); font-size: 0.95rem; margin: 0; }
.book-card-author { padding: 0 1.2rem 1.3rem; position: relative; z-index: 1; }
.book-card-author a.author-link { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.book-card-author a.author-link:hover { color: var(--rose-light); border-bottom-color: currentColor; }

/* ---------- category chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 1.8rem 0 2.4rem; }
.chip-row-left { justify-content: flex-start; margin: 0.4rem 0 1.6rem; }
.chip {
  display: inline-block; padding: 0.35rem 0.9rem; border-radius: 999px;
  border: 1px solid rgba(201, 162, 95, 0.35); color: var(--gold);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em;
  text-decoration: none; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.chip:hover { border-color: var(--rose); color: var(--rose-light); }
.chip.active { background: var(--rose); border-color: var(--rose); color: #fff; }
.chip.active .chip-count { color: rgba(255, 255, 255, 0.75); }
.chip-count { color: var(--coal); font-size: 0.72rem; }
.heading-link { color: inherit; text-decoration: none; }
.heading-link:hover { color: var(--rose-light); }
.more-link { margin-top: 2.2rem; }
.more-link a { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.18em; }
.more-link a::after { content: " →"; }

/* ---------- quote band ---------- */
.quote-band { margin-top: 5rem; background: rgba(212, 82, 110, 0.08); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quote-band .wrap { max-width: 46rem; text-align: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.quote-band blockquote {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-style: italic; margin: 0; line-height: 1.35;
}
.quote-cite { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--coal); margin-top: 1.2rem; }

/* ---------- series strip (home) ---------- */
.series-strip { grid-template-columns: 1fr; }
@media (min-width: 56rem) { .series-strip { grid-template-columns: repeat(3, 1fr); } }
.series-tile {
  position: relative; border-radius: 2px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 3 / 4; display: block;
}
.series-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.series-tile:hover img { transform: scale(1.04); }
.series-tile-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem; background: linear-gradient(to top, var(--midnight) 8%, rgba(13, 8, 12, 0.45) 55%, transparent);
}
.series-tile-overlay h3 { font-size: 1.7rem; margin: 0.3rem 0; color: var(--ink); }
.tile-tag { font-style: italic; color: rgba(240, 230, 230, 0.75); font-size: 0.95rem; margin: 0; }

/* ---------- authors ---------- */
.authors-grid { grid-template-columns: repeat(2, 1fr); text-align: center; }
@media (min-width: 56rem) { .authors-grid { grid-template-columns: repeat(5, 1fr); } }
.author-tile img {
  width: 9rem; height: 9rem; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem;
  border: 2px solid rgba(201, 162, 95, 0.3); transition: border-color 0.25s, transform 0.3s;
}
.author-tile:hover img { border-color: var(--rose); transform: scale(1.03); }
.author-tile h3 { font-size: 1.15rem; margin: 0 0 0.2rem; color: var(--ink); }

.authors-list { grid-template-columns: 1fr; }
@media (min-width: 56rem) { .authors-list { grid-template-columns: 1fr 1fr; } }
.author-row {
  display: grid; grid-template-columns: 7rem 1fr; gap: 1.4rem; align-items: start;
  background: var(--paper); border: 1px solid rgba(201, 162, 95, 0.15);
  border-radius: 2px; padding: 1.6rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.author-row:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.author-row img { width: 7rem; height: 7rem; border-radius: 50%; object-fit: cover; border: 2px solid rgba(201, 162, 95, 0.3); }
.author-row h2 { font-size: 1.7rem; margin: 0.1rem 0 0.3rem; color: var(--ink); }
.author-row:hover h2 { color: var(--rose-light); }
.author-row p { font-size: 0.95rem; margin-bottom: 0.5em; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.author-layout { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 56rem) { .author-layout { grid-template-columns: 19rem 1fr; } }
.author-portrait { width: 100%; border: 4px solid rgba(255,255,255,0.1); border-radius: 2px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.author-side { margin-top: 1.4rem; }
.side-quote { border-left: 2px solid rgba(212, 82, 110, 0.4); padding-left: 1rem; font-style: italic; color: var(--ink); margin: 1rem 0 0; font-size: 0.98rem; }
.author-series-grid { grid-template-columns: 1fr; }
@media (min-width: 56rem) { .author-series-grid { grid-template-columns: 1fr 1fr; } }
.series-mini h3 { color: var(--ink); margin: 0.3rem 0 0.5rem; }
.series-mini:hover h3 { color: var(--rose-light); }

/* ---------- book detail ---------- */
.book-layout { display: grid; gap: 2.5rem; margin-top: 2rem; }
@media (min-width: 56rem) { .book-layout { grid-template-columns: 21rem 1fr; } }
.book-cover { width: 100%; border: 4px solid rgba(255,255,255,0.1); border-radius: 2px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.book-info .eyebrow a { color: var(--gold); }
.book-info .eyebrow a:hover { color: var(--rose); }
.meta-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.3rem 0; margin: 1.8rem 0;
}
@media (min-width: 44rem) { .meta-grid { grid-template-columns: repeat(4, 1fr); } }
.meta-grid dt { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--coal); }
.meta-grid dd { margin: 0.3rem 0 0; font-weight: 500; }
.meta-grid dd.rose { color: var(--rose-light); }

/* ---------- sample page ---------- */
.sample { padding: 2.5rem; }
@media (min-width: 44rem) { .sample { padding: 3.5rem 4rem; } }
.sample h1 { font-size: clamp(2rem, 4vw, 3rem); }
.chapter-label { text-align: center; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.25em; color: var(--coal); }
.sample p { font-size: 1.12rem; line-height: 1.9; }
.dropcap::first-letter {
  font-family: var(--font-display); font-size: 3.1rem; color: var(--rose);
  float: left; line-height: 0.85; margin: 0.1rem 0.6rem 0 0;
}

/* ---------- series index ---------- */
.series-list { display: grid; gap: 2rem; }
.series-row {
  position: relative;
  display: grid; gap: 1.5rem;
  background: var(--paper); border: 1px solid rgba(201, 162, 95, 0.15);
  border-radius: 2px; padding: 2rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.row-stretch { position: absolute; inset: 0; border-radius: 2px; }
.series-row-text a:not(.row-stretch) { position: relative; z-index: 1; }
@media (min-width: 56rem) { .series-row { grid-template-columns: 1fr 18rem; align-items: center; } }
.series-row:hover { transform: translateY(-3px); box-shadow: 0 16px 44px rgba(0,0,0,0.45); }
.series-row h2 { font-size: 2rem; margin: 0.3rem 0 0.2rem; color: var(--ink); }
.series-row:hover h2 { color: var(--rose-light); }
.series-row p { margin-bottom: 0.6em; }
.cover-fan { display: none; position: relative; height: 12rem; }
@media (min-width: 56rem) { .cover-fan { display: block; } }
.cover-fan img {
  position: absolute; top: 0; width: 8rem;
  border-radius: 2px;
  box-shadow: 4px 6px 10px rgba(5, 3, 4, 0.5), 0 10px 24px rgba(0,0,0,0.45);
}
.cover-fan img:nth-child(1) { left: 0; transform: rotate(-4deg); z-index: 3; }
.cover-fan img:nth-child(2) { left: 4rem; z-index: 2; }
.cover-fan img:nth-child(3) { left: 8rem; transform: rotate(4deg); z-index: 1; }

/* ---------- series detail / reading order ---------- */
.series-head h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.reading-order-head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 0.8rem; margin-top: 3.5rem;
}
.reading-order-head h2 { margin: 0; }
.reading-order { list-style: none; margin: 0; padding: 0; }
.reading-order li + li { border-top: 1px solid rgba(201, 162, 95, 0.1); }
.reading-row {
  display: grid; grid-template-columns: 3.2rem 4.5rem 1fr; gap: 1.1rem;
  align-items: center; padding: 1.2rem 0.6rem; border-radius: 2px;
  transition: background 0.2s;
}
.reading-row:hover { background: rgba(36, 27, 35, 0.6); }
@media (min-width: 44rem) { .reading-row { grid-template-columns: 4.5rem 5.5rem 1fr; gap: 1.6rem; } }
.reading-row.no-num { grid-template-columns: 4.5rem 1fr; }
@media (min-width: 44rem) { .reading-row.no-num { grid-template-columns: 5.5rem 1fr; } }
.reading-num {
  font-family: var(--font-display); font-size: 2rem; font-weight: 600;
  color: rgba(201, 162, 95, 0.55);
}
.reading-row:hover .reading-num { color: var(--rose); }
.reading-row img {
  width: 100%; aspect-ratio: 5 / 8; object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 2px;
}
.reading-info { display: block; min-width: 0; }
.reading-info .eyebrow { display: block; }
.reading-title { display: block; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.reading-row:hover .reading-title { color: var(--rose-light); }
.reading-tag {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-style: italic; color: var(--coal); font-size: 0.95rem; margin-top: 0.3rem;
}
.reading-meta { display: block; font-size: 0.82rem; color: var(--coal); margin-top: 0.3rem; }
.start-cta { margin-top: 3.5rem; }
.start-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; margin-bottom: 0.3rem; }

/* ---------- about / values ---------- */
.values-grid { grid-template-columns: 1fr; margin: 3rem 0; }
@media (min-width: 44rem) { .values-grid { grid-template-columns: repeat(3, 1fr); } }
.values-grid h3 { color: var(--rose-light); font-size: 1.2rem; }
.about-cta { background: var(--midnight); }
.about-teaser { margin-bottom: 4rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--midnight); color: var(--coal); margin-top: 5rem; }
.footer-grid {
  display: grid; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 2.5rem;
}
@media (min-width: 56rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { font-size: 1.5rem; color: var(--ink); margin-bottom: 0.6rem; }
.footer-brand .amp { color: var(--rose-light); }
.footer-tag { font-size: 0.9rem; max-width: 20rem; }
.footer-head { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold-light); margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--coal); }
.site-footer a:hover { color: var(--ink); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  border-top: 1px solid rgba(240, 230, 230, 0.08);
  padding-top: 1.4rem; padding-bottom: 1.6rem; font-size: 0.78rem;
}
.footer-base p { margin: 0; }

/* ---------- responsive nav ---------- */
@media (max-width: 40rem) {
  .header-inner { height: auto; flex-direction: column; padding: 0.7rem 1.25rem; gap: 0.5rem; }
  .main-nav { gap: 1.1rem; }
  .main-nav a { font-size: 0.72rem; }
}
