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

:root {
  --ink: #0d0d0d;
  --paper: #f5f0e8;
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --rust: #8b3a2a;
  --cream: #faf7f2;
  --muted: #6b6355;
  --border: #d9d0be;
  --card-bg: #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 300;
}

/* ── NAV ── */
nav {
  background: var(--ink);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--gold);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar { display: none; }

.nav-logo {
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 24px 14px 0;
  white-space: nowrap;
  letter-spacing: 0.02em;
  border-right: 1px solid #2a2a2a;
  margin-right: 8px;
}

.nav-inner a:not(.nav-logo) {
  color: #b0a898;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 16px 14px;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-inner a:not(.nav-logo):hover,
.nav-inner a:not(.nav-logo).active { color: var(--gold); }

/* ── HERO ── */
.hero {
  background: var(--ink);
  color: var(--cream);
  padding: 80px 24px 70px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--cream);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: 1.05rem;
  color: #a09888;
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 32px;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }

/* ── CHAPTER BADGE (inner pages) ── */
.chapter-hero {
  background: var(--ink);
  color: var(--cream);
  padding: 60px 24px 50px;
  position: relative;
  overflow: hidden;
}

.chapter-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
}

.chapter-badge {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 500;
}

.chapter-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 16px;
  max-width: 700px;
}

.chapter-hero p {
  color: #9a9080;
  font-size: 1rem;
  max-width: 580px;
}

/* ── MAIN CONTENT ── */
.content-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.content-wrap h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 700;
  margin: 52px 0 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.content-wrap h2:first-child { margin-top: 0; }

.content-wrap h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 32px 0 10px;
  color: var(--ink);
}

.content-wrap p { margin-bottom: 20px; color: #2a2520; }

.content-wrap p:last-child { margin-bottom: 0; }

.content-wrap strong { font-weight: 500; color: var(--ink); }

/* ── PULL QUOTE ── */
.pull-quote {
  border-left: 3px solid var(--gold);
  margin: 40px 0;
  padding: 20px 28px;
  background: #f0ebe0;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.6;
}

/* ── CALLOUT BOX ── */
.callout {
  background: var(--ink);
  color: var(--cream);
  padding: 28px 32px;
  margin: 36px 0;
}

.callout-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 10px;
}

.callout p { color: #c8c0b0; margin-bottom: 0; }

/* ── STAT GRID ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2px;
  margin: 36px 0;
  background: var(--border);
}

.stat-cell {
  background: var(--cream);
  padding: 24px 20px;
  text-align: center;
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 500;
}

/* ── TWO-COL ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 32px 0;
  background: var(--border);
}

.two-col-cell {
  background: var(--cream);
  padding: 24px;
}

.two-col-cell h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink);
}

.two-col-cell p { font-size: 0.9rem; color: var(--muted); margin: 0; }

@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }

/* ── CHAPTER NAV (bottom of inner pages) ── */
.chapter-nav {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.chapter-nav a {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.chapter-nav a:hover { color: var(--rust); }

/* ── INDEX CHAPTER LIST ── */
.chapter-list { margin: 48px 0; }

.chapter-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0;
  margin-bottom: 2px;
  background: var(--border);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s;
}

.chapter-item:hover { transform: translateX(4px); }

.chapter-num {
  background: var(--ink);
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
}

.chapter-text {
  background: var(--cream);
  padding: 18px 22px;
}

.chapter-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--ink);
}

.chapter-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── FEATURE CARDS (homepage) ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2px;
  background: var(--border);
  margin: 48px 0;
}

.feature-card {
  background: var(--cream);
  padding: 28px 24px;
}

.feature-icon {
  font-size: 1.4rem;
  margin-bottom: 12px;
  display: block;
}

.feature-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.feature-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin: 0; }

/* ── GLOSSARY ── */
.glossary-term {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.glossary-term:last-child { border-bottom: none; }

.term-word {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.term-def { font-size: 0.9rem; color: #3a342c; line-height: 1.65; }

/* ── UL CTA ── */
.ul-cta {
  background: var(--ink);
  border-top: 3px solid var(--gold);
  padding: 48px 24px;
  text-align: center;
  margin-top: 0;
}

.ul-cta-inner { max-width: 560px; margin: 0 auto; }

.ul-cta h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 12px;
}

.ul-cta p { color: #9a9080; font-size: 0.95rem; margin-bottom: 24px; }

/* ── FOOTER ── */
footer {
  background: #080808;
  color: #5a5248;
  padding: 36px 24px;
  border-top: 1px solid #1a1a1a;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

.footer-links a {
  color: #5a5248;
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  width: 100%;
  font-size: 0.75rem;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #1a1a1a;
}

/* ── DIVIDER ── */
.gold-rule {
  border: none;
  border-top: 1px solid var(--gold);
  opacity: 0.3;
  margin: 48px 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .hero { padding: 56px 20px 48px; }
  .content-wrap { padding: 48px 20px 64px; }
  .nav-logo { font-size: 0.85rem; }
}
