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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #faf6f0;
  --bg2: #f2ebe0;
  --bg3: #e8ddd0;
  --bg4: #ded2c4;
  --ink: #2c1f14;
  --ink2: #5c4a3a;
  --ink3: #8c7a6a;
  --ink4: #b0a090;
  --gold: #9a7012;
  --gold-light: #f5e6a3;
  --gold-border: #c8941a;
  --gold-bg: #fef8e7;
  --red: #7a1a1a;
  --red-bg: #fdf0f0;
  --green: #245520;
  --green-bg: #f0f7ee;
  --blue: #1a3a6a;
  --border: rgba(44,31,20,0.13);
  --border2: rgba(44,31,20,0.22);
  --shadow: 0 2px 12px rgba(44,31,20,0.10);
  --shadow2: 0 6px 28px rgba(44,31,20,0.16);
  --serif: 'Playfair Display', Georgia, serif;
  --body: 'Lora', Georgia, serif;
  --garamond: 'EB Garamond', Georgia, serif;
  --radius: 6px;
  --radius2: 10px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── NAV ── */
.site-nav {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid #4a3020;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 8px;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  color: var(--gold-light);
  text-decoration: none;
  margin-right: 20px;
  white-space: nowrap;
}
.nav-logo span {
  display: block;
  font-style: normal;
  font-size: 9.5px;
  color: rgba(245,230,163,0.45);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  color: rgba(250,246,240,0.6);
  text-decoration: none;
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 15px;
  border-radius: 4px;
  transition: all 0.15s;
  display: block;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(250,246,240,0.1);
  color: var(--gold-light);
}
.nav-book-count {
  margin-left: auto;
  font-size: 11px;
  color: rgba(245,230,163,0.4);
  border: 1px solid rgba(245,230,163,0.15);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── WRAPPER ── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}
.page-wrap.narrow {
  max-width: 780px;
}

/* ── SECTION TITLE ── */
.section-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  font-family: var(--body);
}
.section-title {
  font-family: var(--serif);
  font-size: 36px;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 16px;
  color: var(--ink2);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 40px;
}
.divider {
  width: 60px;
  height: 3px;
  background: var(--gold-border);
  margin: 20px 0 40px;
  border-radius: 2px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 13px 26px;
  font-family: var(--body);
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.12s;
  letter-spacing: 0.03em;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-gold { background: var(--gold); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border2);
  color: var(--ink2);
}
.btn-outline:hover { border-color: var(--gold-border); color: var(--gold); }

/* ── CARDS ── */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow2);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--ink);
  color: rgba(250,246,240,0.5);
  padding: 40px 32px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--gold-light);
}
.footer-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.footer-links a {
  color: rgba(250,246,240,0.45);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--gold-light); }
.footer-copy {
  font-size: 11px;
  color: rgba(250,246,240,0.25);
  width: 100%;
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(250,246,240,0.08);
}

/* ── GENRE COLORS ── */
.gc-social    { background: #2d4a6e; }
.gc-history   { background: #5a2d0c; }
.gc-lit       { background: #1a4d2e; }
.gc-phil      { background: #4a1a6e; }
.gc-applied   { background: #0d4d4d; }
.gc-arts      { background: #6e1a4a; }
.gc-religion  { background: #4a3810; }
.gc-science   { background: #1a4a1a; }
.gc-tech      { background: #1a2a5e; }
.gc-lang      { background: #5e2a1a; }
.gc-general   { background: #3a3a3a; }

/* ── UTILITIES ── */
.serif { font-family: var(--serif); }
.garamond { font-family: var(--garamond); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--ink3); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,12,5,0.6);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg);
  border-radius: var(--radius2);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow2);
  position: relative;
}
.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink3);
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  z-index: 2;
}
.modal-close-btn:hover { background: var(--bg3); }

@media (max-width: 700px) {
  .nav-inner { padding: 0 16px; }
  .page-wrap { padding: 28px 16px 60px; }
  .nav-book-count { display: none; }
  .section-title { font-size: 26px; }
}
