/* ===== Variables & Reset ===== */
:root {
  --bg: #fdf6e3;
  --bg-card: #fffaf0;
  --bg-dark: #2e1f14;
  --text: #2e1f14;
  --text-muted: #7a5c4a;
  --text-on-dark: #f5e6d3;
  --accent: #8b5e3c;
  --accent-hover: #6b4420;
  --green: #4a7a5a;
  --green-hover: #3a6248;
  --warm: #c4733a;
  --border: #e8d5b7;
  --star: #d4a843;
  --shadow: 0 2px 12px rgba(61, 43, 31, 0.12);
  --shadow-lg: 0 8px 32px rgba(61, 43, 31, 0.18);
  --radius: 12px;
  --radius-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

/* ===== Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Navigation ===== */
.nav {
  background: var(--bg-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-on-dark);
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-logo svg { width: 26px; height: 26px; stroke: var(--warm); flex-shrink: 0; }
.nav-logo:hover { color: var(--warm); }

.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; }

.nav-links a {
  color: rgba(245, 230, 211, 0.8);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--warm); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-on-dark);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 5.5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 60%, rgba(196, 115, 58, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 40%, rgba(74, 122, 90, 0.12) 0%, transparent 55%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 680px; margin: 0 auto; }

.hero-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--warm);
  margin-bottom: 1rem;
  font-family: 'Lora', serif;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  color: var(--text-on-dark);
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.hero-tagline {
  font-size: 1.1rem;
  color: rgba(245, 230, 211, 0.78);
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.6rem;
  border-radius: 50px;
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary { background: var(--warm); color: white; border-color: var(--warm); }
.btn-primary:hover {
  background: #a85f2e;
  border-color: #a85f2e;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(196, 115, 58, 0.4);
}

.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent); color: white; transform: translateY(-2px); }

.btn-outline-light {
  background: transparent;
  color: var(--text-on-dark);
  border-color: rgba(245, 230, 211, 0.4);
}
.btn-outline-light:hover {
  background: rgba(245, 230, 211, 0.1);
  border-color: rgba(245, 230, 211, 0.7);
  color: var(--text-on-dark);
}

.btn-amazon { background: #ff9900; color: #111 !important; border-color: #ff9900; font-size: 0.8rem; padding: 0.45rem 0.9rem; }
.btn-amazon:hover { background: #e88800; border-color: #e88800; color: #111 !important; transform: translateY(-1px); }

.btn-substack { background: var(--green); color: white !important; border-color: var(--green); font-size: 0.8rem; padding: 0.45rem 0.9rem; }
.btn-substack:hover { background: var(--green-hover); border-color: var(--green-hover); color: white !important; transform: translateY(-1px); }

/* ===== Section ===== */
.section { padding: 4.5rem 0; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.6rem; }
.section-header p { color: var(--text-muted); max-width: 480px; margin: 0 auto; }

.section-divider {
  width: 55px;
  height: 3px;
  background: var(--warm);
  margin: 0.9rem auto 0;
  border-radius: 2px;
}

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

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s, box-shadow 0.22s;
  display: flex;
  flex-direction: column;
}

.book-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.book-card-cover {
  height: 185px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, #f5e8d0, #ecdcc0);
}

.book-cover-art {
  width: 100px;
  height: 148px;
  border-radius: 2px 8px 8px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  padding: 12px 14px 12px 18px;
  box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.35), inset -4px 0 10px rgba(0, 0, 0, 0.18);
  line-height: 1.35;
  font-style: italic;
  font-weight: 600;
  word-break: break-word;
  position: relative;
}

.book-cover-art::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 2px 0 0 2px;
}

/* Book cover color themes */
.cover-terracotta { background: linear-gradient(145deg, #7a4a2a, #c4733a); }
.cover-forest     { background: linear-gradient(145deg, #1f4a30, #4a7a5a); }
.cover-navy       { background: linear-gradient(145deg, #142240, #2e4a7a); }
.cover-burgundy   { background: linear-gradient(145deg, #4a1020, #8b2a3d); }
.cover-plum       { background: linear-gradient(145deg, #38104a, #6a2a8b); }
.cover-slate      { background: linear-gradient(145deg, #1e2e3e, #3a5068); }
.cover-olive      { background: linear-gradient(145deg, #2a380e, #506a1a); }
.cover-rose       { background: linear-gradient(145deg, #5a1828, #9a4055); }

.book-card-body {
  padding: 1.2rem 1.4rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.book-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tag {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tag-fiction    { background: #f0e0c8; color: #6b3a18; }
.tag-history    { background: #d5e8d5; color: #1f4a1f; }
.tag-scifi      { background: #d5d8e8; color: #22286a; }
.tag-mystery    { background: #e8d5e8; color: #4a1a4a; }
.tag-memoir     { background: #ffe8d0; color: #7a3a10; }
.tag-romance    { background: #f5d5d8; color: #7a1a28; }
.tag-nonfiction { background: #d0e8e8; color: #0f4848; }

.book-card-title { font-size: 1.05rem; color: var(--text); margin-top: 0.1rem; }
.book-card-author { font-size: 0.83rem; color: var(--text-muted); font-style: italic; }

.book-rating { display: flex; gap: 1px; align-items: center; }
.star       { color: var(--star); font-size: 0.95rem; }
.star-empty { color: var(--border); font-size: 0.95rem; }

.book-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-card-actions { display: flex; gap: 0.55rem; margin-top: 0.85rem; flex-wrap: wrap; }

/* ===== Featured Book (Spotlight) ===== */
.featured-book {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  padding: 2.5rem;
  align-items: start;
  max-width: 820px;
  margin: 0 auto;
}

.featured-book .book-cover-art {
  width: 130px;
  height: 190px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.featured-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--warm);
  font-weight: 700;
  margin-bottom: 0.6rem;
  font-family: 'Lora', serif;
}

.featured-book h3 { font-size: 1.8rem; margin-bottom: 0.35rem; }
.featured-book .book-card-author { font-size: 1rem; margin-bottom: 0.6rem; }
.featured-book .book-rating { margin-bottom: 0.2rem; }

.featured-book .book-excerpt {
  -webkit-line-clamp: 5;
  font-size: 0.95rem;
  margin: 0.75rem 0 1.25rem;
}

/* ===== CTA Section ===== */
.cta-section {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 5rem 1.5rem;
  text-align: center;
}

.cta-section h2 {
  color: var(--text-on-dark);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(245, 230, 211, 0.72);
  max-width: 460px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}

.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== Page Header ===== */
.page-header {
  background: linear-gradient(160deg, var(--bg-dark) 0%, #4a2e1a 100%);
  color: var(--text-on-dark);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}

.page-header h1 { color: var(--text-on-dark); font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.6rem; }
.page-header p { color: rgba(245, 230, 211, 0.72); max-width: 480px; margin: 0 auto; }

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 2rem 1.5rem 0;
}

.filter-btn {
  padding: 0.38rem 1rem;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

/* ===== About Page ===== */
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 4rem;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 0;
}

.about-photo-placeholder {
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, #e8d5b7, #c8a87a);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  color: var(--accent);
  gap: 0.75rem;
  font-size: 0.82rem;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

.about-photo-placeholder svg { width: 56px; height: 56px; opacity: 0.45; stroke: var(--accent); }

.about-content h1 { font-size: 2.4rem; margin-bottom: 0.4rem; }
.about-content .subtitle { color: var(--warm); font-size: 1.05rem; font-style: italic; margin-bottom: 1.5rem; }
.about-content p { color: var(--text-muted); margin-bottom: 1.2rem; line-height: 1.8; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 0.75rem;
  text-align: center;
}

.stat-number { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 700; color: var(--warm); display: block; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

.fav-genres h3 { margin-bottom: 0.75rem; font-size: 1.05rem; }
.genre-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* ===== Newsletter Page ===== */
.newsletter-hero {
  background: linear-gradient(160deg, var(--bg-dark) 0%, #4a2e1a 100%);
  color: var(--text-on-dark);
  padding: 4.5rem 1.5rem;
  text-align: center;
}

.newsletter-hero h1 { color: var(--text-on-dark); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.newsletter-hero p { color: rgba(245, 230, 211, 0.78); max-width: 480px; margin: 0 auto 2rem; font-size: 1.05rem; }

.substack-embed-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.substack-logo {
  width: 56px;
  height: 56px;
  background: #ff6719;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 900;
}

.substack-embed-box h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.substack-embed-box p { color: var(--text-muted); margin-bottom: 1.75rem; font-size: 0.95rem; }

.post-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }

.post-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
}

.post-item:hover { background: #fff3e0; border-color: var(--warm); color: inherit; }

.post-item-title { font-family: 'Playfair Display', serif; font-size: 0.97rem; color: var(--text); font-weight: 600; }
.post-item-meta { font-size: 0.77rem; color: var(--text-muted); margin-top: 0.2rem; }
.post-item-arrow { color: var(--accent); flex-shrink: 0; font-size: 1.1rem; }

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(245, 230, 211, 0.65);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  margin-top: auto;
}

.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.35rem; color: var(--text-on-dark); margin-bottom: 0.5rem; }
.footer-tagline { font-size: 0.88rem; margin-bottom: 1.5rem; font-style: italic; }

.footer-links { display: flex; gap: 2rem; justify-content: center; list-style: none; margin-bottom: 2rem; flex-wrap: wrap; }
.footer-links a { color: rgba(245, 230, 211, 0.65); font-size: 0.83rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--warm); }

.footer-bottom {
  font-size: 0.77rem;
  border-top: 1px solid rgba(245, 230, 211, 0.12);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.2rem;
    border-top: 1px solid rgba(245, 230, 211, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  }

  .nav-links.open { display: flex; }

  .featured-book { grid-template-columns: 1fr; text-align: center; padding: 1.75rem; gap: 1.5rem; }
  .featured-book .book-cover-art { margin: 0 auto; }

  .about-grid { grid-template-columns: 1fr; padding: 3rem 0; gap: 2.5rem; }
  .about-photo-placeholder { max-height: 260px; aspect-ratio: auto; }

  .books-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 480px) {
  .hero { padding: 3.5rem 1.5rem; }
  .section { padding: 3rem 0; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .books-grid { grid-template-columns: 1fr; }
  .cta-section { padding: 3.5rem 1.5rem; }
}
