/* The Burning Tongue — Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Cinzel:wght@400;600&display=swap');

:root {
  --bg-primary: #0a0806;
  --bg-secondary: #110d09;
  --bg-card: #15100c;
  --fire-gold: #c8922a;
  --fire-bright: #e8b84b;
  --fire-dim: #8a5f1a;
  --text-primary: #d4c5a9;
  --text-secondary: #9a8a72;
  --text-dim: #5a4e3e;
  --crimson: #8b1a1a;
  --deep-crimson: #4a0a0a;
  --border: #2a1e12;
  --glow: rgba(200, 146, 42, 0.15);
}

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

html { font-size: 18px; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'EB Garamond', Georgia, serif;
  line-height: 1.8;
  min-height: 100vh;
}

/* Subtle ember texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(139,26,26,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(200,146,42,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 8, 6, 0.95);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(8px);
}

.nav-title {
  font-family: 'Cinzel', serif;
  color: var(--fire-gold);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.nav-chapters {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.nav-chapters a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

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

/* Main layout */
.main {
  max-width: 780px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  position: relative;
  z-index: 1;
}

/* Hero (index page) */
.hero {
  text-align: center;
  padding: 3rem 0 4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}

.hero-cover {
  width: 100%;
  max-width: 360px;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(200,146,42,0.2), 0 20px 60px rgba(0,0,0,0.8);
  margin-bottom: 2.5rem;
  border: 1px solid var(--border);
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.8rem;
  color: var(--fire-bright);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 40px rgba(232,184,75,0.3);
}

.hero .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 0.2em;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-primary);
  font-style: italic;
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* Chapter list */
.chapter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.chapter-list li a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid transparent;
  border-radius: 2px;
  transition: all 0.2s;
}

.chapter-list li a:hover {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--fire-bright);
}

.chapter-num {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--fire-dim);
  min-width: 2.5rem;
  letter-spacing: 0.1em;
}

.chapter-title {
  font-size: 1rem;
  flex: 1;
}

/* Chapter content */
.chapter-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.chapter-label {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--fire-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.chapter-header h1 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: var(--fire-bright);
  letter-spacing: 0.05em;
  line-height: 1.3;
  text-shadow: 0 0 30px rgba(232,184,75,0.2);
}

/* Image panels */
.chapter-image {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  margin: 2.5rem 0;
}

.image-caption {
  text-align: center;
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: -1.5rem;
  margin-bottom: 2rem;
}

/* Prose */
.chapter-content h1, .chapter-content h2, .chapter-content h3 {
  font-family: 'Cinzel', serif;
  color: var(--fire-gold);
  margin: 2rem 0 1rem;
}

.chapter-content h1 { font-size: 1.8rem; display: none; }
.chapter-content h2 { font-size: 1.3rem; }
.chapter-content h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
}

.chapter-content p {
  margin-bottom: 1.4rem;
}

.chapter-content em { color: var(--fire-bright); font-style: italic; }

.chapter-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Section break ornament */
.chapter-content hr::before {
  content: '✦';
  display: block;
  text-align: center;
  color: var(--fire-dim);
  font-size: 0.8rem;
  position: relative;
  top: -0.6rem;
  background: var(--bg-primary);
  width: 2rem;
  margin: 0 auto;
}

/* First letter drop cap */
.chapter-content > p:first-of-type::first-letter {
  font-family: 'Cinzel', serif;
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--fire-gold);
  float: left;
  line-height: 0.85;
  margin-right: 0.1em;
  margin-top: 0.1em;
  text-shadow: 0 0 20px rgba(200,146,42,0.4);
}

/* Navigation between chapters */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.chapter-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  flex: 1;
}

.chapter-nav a:hover { color: var(--fire-gold); }
.chapter-nav .prev { text-align: left; }
.chapter-nav .next { text-align: right; }
.chapter-nav .home { text-align: center; color: var(--text-dim); }

/* Fire divider */
.fire-divider {
  text-align: center;
  color: var(--fire-dim);
  font-size: 1.2rem;
  margin: 3rem 0;
  letter-spacing: 0.3em;
}

/* Epigraph */
.epigraph {
  border-left: 2px solid var(--fire-dim);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--bg-card);
  font-style: italic;
  color: var(--text-secondary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Mobile */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 2rem; }
  .nav-chapters { display: none; }
  .main { padding: 5rem 1.2rem 3rem; }
}
