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

:root {
  --deep: #0a0c10;
  --void: #060810;
  --gold: #c9a84c;
  --gold-dim: #8a6f2e;
  --gold-glow: rgba(201,168,76,0.18);
  --cream: #f0e8d5;
  --mist: #9ba8b8;
  --section-bg: rgba(255,255,255,0.03);
  --border: rgba(201,168,76,0.2);
  --radius: 2px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--cream);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── STARFIELD ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 55% 25%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 85%, rgba(255,255,255,0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 40%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 20% 90%, rgba(255,255,255,0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 55%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 10%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 82% 20%, rgba(255,255,255,0.18) 0%, transparent 100%),
    radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,0.22) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(6,8,16,0.95), transparent);
  backdrop-filter: blur(4px);
}

.nav-brand {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
}

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

.nav-links a {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.3s;
}

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

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  z-index: 1;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.3s forwards;
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.5s forwards;
}

.hero h1 span { color: var(--gold); }

.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--mist);
  max-width: 600px;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.7s forwards;
}

.hero-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-dim);
  max-width: 500px;
  margin-bottom: 3rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 2rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 1rem 2.5rem;
  transition: all 0.3s;
  opacity: 0;
  animation: fadeUp 1s ease 1.1s forwards;
}

.hero-cta:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  letter-spacing: 0.4em;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 2s ease 1.5s forwards;
}

.scroll-indicator span {
  font-family: 'Raleway', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mist);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold-dim), transparent);
  animation: pulse 2s ease infinite;
}

/* ─── DIVIDER ─── */
.divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 400px;
  margin: 0 auto 4rem;
  opacity: 0.5;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold-dim);
}
.divider-symbol {
  color: var(--gold);
  font-size: 1.2rem;
}

/* ─── SECTION TITLES ─── */
.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--cream);
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--mist);
  text-align: center;
  margin-bottom: 3rem;
}

/* ─── PREFACE SECTION ─── */
.preface-section {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.preface-section blockquote {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-style: italic;
  color: var(--cream);
  line-height: 2;
  text-align: center;
  position: relative;
  padding: 2rem 3rem;
  border-left: 2px solid var(--gold);
  background: var(--section-bg);
}

.preface-text {
  font-size: 1.05rem;
  color: var(--mist);
  line-height: 2;
  margin-top: 2rem;
}

.answer-box {
  background: linear-gradient(135deg, rgba(201,168,76,0.05), rgba(201,168,76,0.02));
  border: 1px solid var(--border);
  padding: 2.5rem 3rem;
  margin: 3rem 0;
  text-align: center;
}

.answer-box .answer-label {
  font-family: 'Raleway', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 1rem;
}

.answer-box p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-style: italic;
  color: var(--gold);
  line-height: 2.2;
}

/* ─── CHAPTER GRID ─── */
.chapters-section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.part-label {
  font-family: 'Raleway', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-align: center;
  margin-bottom: 2.5rem;
  margin-top: 4rem;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
}

.chapter-card {
  background: var(--void);
  padding: 2.2rem 2rem;
  text-decoration: none;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.chapter-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-glow), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.chapter-card:hover::before { opacity: 1; }
.chapter-card:hover { background: #0c0f18; }

.chapter-number {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--gold-dim);
  text-transform: uppercase;
}

.chapter-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.4;
  transition: color 0.3s;
}

.chapter-card:hover .chapter-title { color: var(--gold); }

.chapter-excerpt {
  font-size: 0.9rem;
  color: var(--mist);
  line-height: 1.7;
  font-style: italic;
}

.chapter-arrow {
  font-size: 0.9rem;
  color: var(--gold-dim);
  margin-top: auto;
  transition: transform 0.3s, color 0.3s;
  align-self: flex-start;
}

.chapter-card:hover .chapter-arrow {
  transform: translateX(6px);
  color: var(--gold);
}

/* ─── THEMES SECTION ─── */
.themes-section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.theme-card {
  border: 1px solid var(--border);
  padding: 2rem 1.7rem;
  background: var(--section-bg);
  text-align: center;
  transition: border-color 0.3s;
}

.theme-card:hover { border-color: var(--gold-dim); }

.theme-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.theme-name {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.theme-desc {
  font-size: 0.9rem;
  color: var(--mist);
  line-height: 1.7;
  font-style: italic;
}

/* ─── FOOTER ─── */
footer {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 5rem;
}

footer .footer-title {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}

footer p {
  font-size: 0.85rem;
  color: var(--mist);
  font-style: italic;
}

/* ─── CHAPTER PAGE ─── */
.chapter-hero {
  position: relative;
  z-index: 1;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 8rem 2rem 4rem;
}

.chapter-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at 50% 30%, rgba(201,168,76,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.chapter-num-large {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.chapter-hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--cream);
  max-width: 800px;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.chapter-intro-quote {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--mist);
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ─── CHAPTER CONTENT ─── */
.chapter-content {
  position: relative;
  z-index: 1;
  max-width: 750px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.chapter-content p {
  margin-bottom: 1.4rem;
  font-size: 1.05rem;
  color: #d4cab5;
  line-height: 1.95;
}

.chapter-content h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin: 3.5rem 0 1.5rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.chapter-content h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--cream);
  margin: 2.5rem 0 1rem;
}

.chapter-content blockquote {
  border-left: 2px solid var(--gold);
  padding: 1rem 1.5rem 1rem 2rem;
  margin: 2rem 0;
  background: rgba(201,168,76,0.04);
  font-style: italic;
  color: var(--cream);
  font-size: 1.05rem;
  line-height: 1.9;
}

.chapter-content blockquote cite {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--gold-dim);
  font-style: normal;
  letter-spacing: 0.1em;
}

.chapter-content ul, .chapter-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}

.chapter-content li {
  font-size: 1.05rem;
  color: #d4cab5;
  line-height: 1.9;
  margin-bottom: 0.4rem;
}

.pull-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  color: var(--gold);
  text-align: center;
  padding: 2.5rem 2rem;
  margin: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  line-height: 1.7;
}

/* ─── NAV BETWEEN CHAPTERS ─── */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  max-width: 750px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  z-index: 1;
  position: relative;
}

.chapter-nav-link {
  font-family: 'Raleway', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
}

.chapter-nav-link:hover { color: var(--gold); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ─── FADE-IN ON SCROLL ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .chapter-grid { grid-template-columns: 1fr; }
  .themes-grid { grid-template-columns: 1fr 1fr; }
  .preface-section blockquote { padding: 1.5rem; }
  .chapter-nav { flex-direction: column; gap: 1rem; text-align: center; }
}
