:root {
  --bg: #f6f1e7;
  --bg-alt: #ece4d4;
  --ink: #1f1c18;
  --muted: #5e564b;
  --accent: #9b3b1f;
  --accent-dark: #7a2d16;
  --line: #d8cdb8;
  --dark: #1c1a17;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.8rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.7rem; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; color: var(--ink); text-decoration: none; }
nav a { color: var(--ink); text-decoration: none; margin-left: 22px; font-size: .95rem; font-weight: 500; }
nav a:hover { color: var(--accent); }

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 4px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 2px solid transparent; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: currentColor; color: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero */
.hero { background: var(--dark); color: #f3ead8; padding: 72px 0; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: #d3af77; margin: 0 0 12px; }
.lede { font-size: 1.15rem; color: #d9cfbd; max-width: 34em; }
.hero-cover .cover { max-width: 300px; margin-left: auto; box-shadow: 0 24px 48px rgba(0,0,0,.5); }

/* Covers: typographic stand-ins until real cover images are added to /covers */
.cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 3px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14% 10% 10%;
  color: #f3ead8;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.cover-title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.05; }
.cover-author { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; }
.cover--blood { background: linear-gradient(160deg, #5a1a10, #1d0c08); }
.cover--siege { background: linear-gradient(160deg, #2c3b46, #0f161b); }
.cover--runic { background: linear-gradient(160deg, #23304f, #0d1220); color: #e8cf96; }
.cover--void { background: linear-gradient(160deg, #1b2a2a, #050808); color: #9fe0d0; }
.cover--runes { background: linear-gradient(160deg, #4a3b22, #1a140b); color: #e8cf96; }
.cover--oracle { background: linear-gradient(160deg, #3a2347, #120a17); color: #e8cf96; }
.cover--rest { background: linear-gradient(160deg, #5d7a6a, #26352d); }

/* Sections */
.section { padding: 80px 0; }
.section--alt { background: var(--bg-alt); }
.section-lede { color: var(--muted); margin: 0 0 40px; }

.group-title { font-size: 1.1rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 10px; margin: 56px 0 8px; }
.book-list { display: flex; flex-direction: column; }
.book { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 40px 0; border-bottom: 1px solid var(--line); align-items: start; }
.book:last-child { border-bottom: 0; }
.book h4 { font-family: var(--serif); font-size: 2rem; line-height: 1.1; margin: 0 0 14px; }
.book-body p, .book-body ul { margin: 0 0 12px; max-width: 40em; }
.book-body ul { padding-left: 1.2em; }
.book-body li { margin-bottom: 4px; }
.tagline { font-family: var(--serif); font-size: 1.35rem; font-style: italic; }
.readalike { color: var(--muted); font-style: italic; }
.series { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--muted); margin: 0 0 6px !important; }
.buy { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn-ghost { color: var(--accent); }
.hero .btn-ghost { color: #f3ead8; }
.postage { font-size: .85rem; color: var(--muted); margin-top: 10px !important; }
.stock { color: var(--accent); font-weight: 600; }
.small-print { margin-top: 48px; font-size: .9rem; color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; }
.portrait { position: relative; width: 220px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--dark); color: #d3af77; display: grid; place-items: center; font: 700 5rem var(--serif); }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Contact */
.contact { text-align: center; max-width: 640px; }
.social { list-style: none; padding: 0; margin: 28px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.social a { color: var(--ink); font-weight: 500; }

/* Footer */
.site-footer { background: var(--dark); color: #b8ad99; padding: 28px 0; font-size: .9rem; text-align: center; }
.site-footer p { margin: 0; }

/* Simple pages (thank-you, 404) */
.simple { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.simple p { color: var(--muted); max-width: 34em; margin: 0 auto 24px; }

/* Responsive */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-cover .cover { margin: 0 auto; max-width: 240px; }
  .book { grid-template-columns: 1fr; gap: 24px; }
  .book .cover { max-width: 220px; }
  .about { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .portrait { width: 160px; }
}
@media (max-width: 480px) {
  nav a { margin-left: 14px; }
  .brand { font-size: 1.35rem; }
  .hero { padding: 48px 0; }
  .section { padding: 56px 0; }
}

/* Legal pages */
.legal { max-width: 760px; padding-top: 56px; padding-bottom: 80px; }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); }
.legal h2 { font-size: 1.7rem; margin-top: 2em; }
.legal .updated { color: var(--muted); font-size: .9rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 8px 0 16px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 600; }
.legal .crosslinks { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
@media (max-width: 600px) {
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { display: none; }
  .legal tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .legal td { border: 0; padding: 4px 0; }
  .legal td:first-child { font-weight: 600; }
}
.footer-links { margin-bottom: 8px !important; }
.footer-links a { color: #e8dcc6; }

/* Newsletter */
.newsletter { text-align: center; border-bottom: 1px solid var(--line); }
.newsletter .wrap { max-width: 640px; }
.newsletter iframe { width: 100%; max-width: 480px; height: 150px; border: 1px solid var(--line); border-radius: 6px; background: #fff; margin: 12px auto 0; display: block; }
.newsletter .small-print { margin-top: 16px; }
@media (max-width: 480px) { nav a { margin-left: 10px; font-size: .85rem; } }

section[id] { scroll-margin-top: 72px; }
