:root {
  --bg: #0a0a0e;
  --bg-2: #14141b;
  --line: #23232d;
  --text: #ecedf2;
  --muted: #9a9cab;
  --accent: #c9cfdb;
  --radius: 4px;
  --max: 1160px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --serif-light: Georgia, "Times New Roman", serif; /* landing pages: no extra font download */
}

/* Self-hosted (SIL Open Font License); nothing is fetched from Google. */
@font-face {
  font-family: "Bebas Neue";
  src: url("fonts/BebasNeue-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-Italic.ttf") format("truetype");
  font-weight: 300 700; font-style: italic; font-display: swap;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
.cover-img { width: 100%; height: auto; aspect-ratio: 5 / 8; object-fit: cover; }
.cover-img.tall { object-fit: contain; background: var(--bg); }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; position: relative; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 14, 0.9);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(8px);
}
.site-header .wrap { max-width: 1320px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; padding-bottom: 14px; }
.wordmark {
  text-decoration: none;
  font-weight: 300;
  letter-spacing: 0.34em;
  padding-left: 0.34em; /* balances the trailing letter-space so it centres */
  text-transform: uppercase;
  font-size: 19px;
  white-space: nowrap;
}
.nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.nav a { text-decoration: none; color: #b9bbc8; white-space: nowrap; padding: 4px 0; border-bottom: 1px solid transparent; transition: color 0.15s, border-color 0.15s; }
.nav a:hover { color: var(--text); border-bottom-color: currentColor; }

/* ---------- Shared type ---------- */
.kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.kicker a { text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.tagline { font-family: var(--serif); font-style: italic; font-weight: 500; color: #cfd1dc; font-size: 22px; line-height: 1.35; margin: 6px 0 0; max-width: 640px; }
.coauthor { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 60% 80% at 75% 50%, rgba(120, 130, 170, 0.14), transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 40px; min-height: 580px; padding-top: 48px; padding-bottom: 48px; }
.hero-text { position: relative; z-index: 2; }
.hero h1 {
  margin: 0;
  font-weight: 200;
  font-size: clamp(56px, 8vw, 100px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
}
.hero h1 span { display: block; }
.hero p { margin: 22px 0 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3; color: #d6d8e2; }
.hero-btns { margin-top: 32px; }
.hero-fan { position: relative; height: 460px; pointer-events: none; }
.hero-fan .fan {
  position: absolute; top: 50%; left: 50%;
  width: 210px;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.75);
}
.hero-fan .fan-1 { transform: translate(-50%, -50%) translateX(-210px) translateY(20px) rotate(-10deg); z-index: 4; } /* first heroBooks cover sits on top */
.hero-fan .fan-2 { transform: translate(-50%, -50%) translateX(-72px) translateY(-14px) rotate(-3deg); z-index: 3; }
.hero-fan .fan-3 { transform: translate(-50%, -50%) translateX(72px) translateY(-14px) rotate(3deg); z-index: 2; }
.hero-fan .fan-4 { transform: translate(-50%, -50%) translateX(210px) translateY(20px) rotate(10deg); z-index: 1; }

/* ---------- Series blocks ---------- */
.series {
  padding: 64px 0;
  border-top: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background:
    radial-gradient(ellipse 70% 70% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    linear-gradient(to bottom, color-mix(in srgb, var(--accent) 7%, transparent), transparent 85%);
}
.series .kicker { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.series-head h2 a:hover { color: var(--accent); }

/* Short sections: heading on the left, bigger covers on the right */
.series.short .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px 56px; align-items: center; }
.series.short .series-head { flex-direction: column; align-items: flex-start; margin-bottom: 0; }
.series.short .grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 210px; }
.series.flush { border-top: 0; background: none; padding-top: 24px; }
.series-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.series-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 0.95;
}
.series-head h2 a { text-decoration: none; }
.series-head a.more {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent);
  text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 30px 22px;
  align-items: start;
}
.book { display: block; text-decoration: none; }
.book .cover {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.book .cover img { width: 100%; height: auto; }
.book:hover .cover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--accent); }
.book .label { display: block; margin-top: 12px; font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.book .title { display: block; font-size: 15px; line-height: 1.35; margin-top: 2px; }

.subhead { margin: 44px 0 20px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.subhead:first-child { margin-top: 8px; }

/* ---------- Series page ---------- */
.series-hero {
  padding: 84px 0 40px;
  background: radial-gradient(ellipse 80% 100% at 10% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.series-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(60px, 11vw, 128px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 0.92;
}
.series-hero .tagline { font-size: 26px; margin-top: 12px; }

/* ---------- Book page ---------- */
.book-hero {
  padding: 64px 0 24px;
  background: radial-gradient(ellipse 70% 90% at 15% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.book-layout { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: 56px; align-items: start; }
.book-cover { border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.75); }
.book-cover img { width: 100%; }
.book-details { padding-top: 10px; }
.book-details h1 {
  margin: 4px 0 8px;
  font-family: var(--display);
  font-size: clamp(56px, 9vw, 104px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.92;
}
h1 .sub { display: block; font-size: 0.5em; line-height: 1.05; letter-spacing: 0.04em; color: var(--accent); margin-top: 0.12em; }
.book-details .genre { color: var(--muted); font-size: 15px; letter-spacing: 0.06em; margin-bottom: 22px; }
.book-details .btns.top { margin-bottom: 30px; }
.blurb { font-size: 17px; color: #d6d8e2; margin: 0 0 28px; max-width: 620px; }
.blurb p { margin: 0 0 14px; }
.blurb p:first-child { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 25px; line-height: 1.3; color: var(--text); }
.blurb p:first-child strong { font-weight: 600; }
.blurb p.note { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.blurb p.note em { font-style: normal; }
.blurb .tropes { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.blurb .tropes h2 { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.blurb .tropes ul { margin: 0; padding-left: 20px; }
.blurb .tropes li { margin: 0 0 4px; }
.blurb p.note strong { color: #d3d5de; }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block;
  padding: 15px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  transition: filter 0.15s, background 0.15s;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0a0a0e; }
.btn:hover { filter: brightness(1.15); background-color: color-mix(in srgb, var(--accent) 14%, transparent); }
.btn.primary:hover { background: var(--accent); }

/* ---------- Landing page ---------- */
.landing { padding: 40px 0 64px; }
.landing .ad-image { border-radius: var(--radius); overflow: hidden; margin: 0 auto 36px; max-width: 720px; }
.landing .quote {
  max-width: 720px; margin: 56px auto 0; text-align: center;
  font-family: var(--serif-light);
  font-size: clamp(21px, 3.4vw, 28px); line-height: 1.45; font-style: italic;
}
.landing .quote cite { display: block; margin-top: 12px; font-family: var(--sans); font-size: 12.5px; font-style: normal; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; }
.landing .offer { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; max-width: 880px; margin: 0 auto; }
.landing .offer .cover { border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7); }
.landing h1 { margin: 0 0 6px; font-family: var(--display); font-size: clamp(44px, 7vw, 68px); font-weight: 400; letter-spacing: 0.02em; text-transform: uppercase; line-height: 0.95; }
.landing .hook { margin: 18px 0; }
.landing .hook p { margin: 0 0 6px; }
.landing .rating { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.landing .rating .stars { color: var(--accent); letter-spacing: 0.1em; margin-right: 8px; }
.landing .reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 880px; margin: 44px auto 0; }
.landing .reviews blockquote { margin: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--serif-light); font-style: italic; font-size: 17px; line-height: 1.5; }
.landing .reviews cite { display: block; margin-top: 10px; font-family: var(--sans); font-size: 11.5px; font-style: normal; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; }

/* ---------- Prose pages ---------- */
.prose { max-width: 760px; padding: 64px 0 80px; }
.prose h1 { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 7vw, 72px); text-transform: uppercase; letter-spacing: 0.03em; line-height: 0.95; margin: 0 0 12px; }

/* ---------- About ---------- */
.about { padding: 72px 0 80px; border-top: 1px solid var(--line); }
.about .wrap { max-width: 760px; text-align: center; }
.about h2 { margin: 0 0 18px; font-family: var(--display); font-weight: 400; font-size: clamp(44px, 7vw, 72px); letter-spacing: 0.03em; line-height: 0.95; }
.about p { margin: 0 0 14px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 25px; line-height: 1.4; color: var(--text); }
.about .btns { justify-content: center; margin-top: 26px; }
.prose h2 { font-size: 19px; margin: 36px 0 8px; }
.prose p, .prose li { color: #d3d5de; }
.prose .updated { color: var(--muted); margin: 0 0 24px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.landing-page .site-footer .wrap { justify-content: center; text-align: center; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; gap: 8px; padding-top: 40px; padding-bottom: 32px; }
  .hero-text { text-align: center; }
  .hero h1 { letter-spacing: 0.2em; padding-left: 0.2em; }
  .hero-btns { justify-content: center; }
  .hero-fan { height: 270px; }
  .hero-fan .fan { width: 118px; }
  .hero-fan .fan-1 { transform: translate(-50%, -50%) translateX(-104px) translateY(12px) rotate(-9deg); }
  .hero-fan .fan-2 { transform: translate(-50%, -50%) translateX(-35px) translateY(-8px) rotate(-3deg); }
  .hero-fan .fan-3 { transform: translate(-50%, -50%) translateX(35px) translateY(-8px) rotate(3deg); }
  .hero-fan .fan-4 { transform: translate(-50%, -50%) translateX(104px) translateY(12px) rotate(9deg); }
  .series.short .wrap { grid-template-columns: 1fr; }
  .series.short .grid { grid-auto-columns: minmax(0, 210px); }
  .book-layout { grid-template-columns: 1fr; gap: 32px; }
  .book-cover { max-width: 300px; margin: 0 auto; }
  .book-details { text-align: center; }
  .book-details .btns { justify-content: center; }
  .blurb { margin-left: auto; margin-right: auto; text-align: left; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { position: static; }
  .nav { gap: 4px 18px; font-size: 12px; }
  .series { padding: 48px 0; }
  .grid, .series.short .grid { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .landing { padding-top: 24px; }
  .landing .offer { grid-template-columns: 1fr; gap: 20px; }
  .landing .offer .cover { max-width: 190px; margin: 0 auto; }
  .landing .offer .details { text-align: center; }
  .landing .btns { justify-content: center; }
  .btn { width: 100%; }
  .hero-btns .btn { width: auto; }
}
