@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --bg: #14121a;
  --bg-alt: #1c1924;
  --panel: #221e2c;
  --text: #ece6d9;
  --text-dim: #b8b0a6;
  --gold: #c99a4b;
  --gold-soft: #e0bb7a;
  --border: #332e3d;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lora', Georgia, serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header.site-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--gold-soft);
}

.brand svg { flex-shrink: 0; }

nav.main-nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

nav.main-nav a { color: var(--text-dim); }
nav.main-nav a:hover, nav.main-nav a.active { color: var(--gold-soft); text-decoration: none; }

/* Hero */
.hero {
  padding: 5.5rem 0 4.5rem;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(201,154,75,0.10), transparent 60%);
}

.hero .lantern-glow {
  margin: 0 auto 1.75rem;
  width: 64px;
  height: 64px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin: 0 0 0.75rem;
}

.hero p.lede {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.2rem;
  color: var(--text-dim);
  font-style: italic;
}

.hero .cta-row {
  margin-top: 2.25rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 2px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--gold);
}

.btn.primary { background: var(--gold); color: var(--bg); }
.btn.primary:hover { background: var(--gold-soft); text-decoration: none; }
.btn.ghost { color: var(--gold-soft); }
.btn.ghost:hover { background: rgba(201,154,75,0.08); text-decoration: none; }

/* Sections */
section { padding: 3.5rem 0; }
section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
section .section-sub {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  font-style: italic;
}

/* Book grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.75rem;
}

.book-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.book-card:hover { transform: translateY(-3px); border-color: var(--gold); }

.book-cover {
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  color: var(--bg);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

.book-card .book-meta { padding: 1rem 1.1rem 1.25rem; }
.book-card .book-meta h3 { font-size: 1.25rem; margin: 0 0 0.2rem; }
.book-card .book-meta .author { color: var(--gold-soft); font-size: 0.92rem; margin-bottom: 0.5rem; }
.book-card .book-meta .blurb { color: var(--text-dim); font-size: 0.9rem; }
.book-card .book-link { display: block; }

/* Book detail */
.book-detail {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 720px) {
  .book-detail { grid-template-columns: 1fr; }
}

.book-detail .book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 1.4rem;
}

.book-detail h1 { margin-bottom: 0.25rem; }
.book-detail .author { color: var(--gold-soft); font-size: 1.15rem; margin-bottom: 1.25rem; }
.book-detail .meta-line { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 1.5rem; }
.book-detail .meta-line span { display: inline-block; margin-right: 1.25rem; }

.formats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.format-pill {
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.format-pill.available { border-color: var(--gold); color: var(--gold-soft); }

.source-note {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: var(--panel);
  border-left: 3px solid var(--gold);
  font-size: 0.92rem;
  color: var(--text-dim);
}

/* About */
.about-copy { max-width: 700px; margin: 0 auto; }
.about-copy p { margin-bottom: 1.25rem; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
}

footer a { color: var(--text-dim); }

.back-link { display: inline-block; margin-bottom: 2rem; color: var(--text-dim); font-size: 0.9rem; }

/* Purchase box */
.purchase-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 4px;
}

.purchase-box p { margin: 0 0 1rem; color: var(--text-dim); font-size: 0.92rem; }

.purchase-box .payhip-buy-button {
  display: inline-block;
  background: var(--gold);
  color: var(--bg) !important;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.7rem 1.6rem;
  border-radius: 2px;
  text-decoration: none !important;
}

.purchase-box .payhip-buy-button:hover { background: var(--gold-soft); }
