/* ─────────────────────────────────────────────
   Pretentious Apes — Shared Stylesheet
   style.css
   Template: chapter_2.html
   ───────────────────────────────────────────── */

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

/* ── TOKENS ── */
:root {
  --ink:           #1c1a16;
  --ink-light:     #3d3830;
  --ink-faint:     #7a7268;
  --paper:         #f5f0e8;
  --paper-dark:    #ede7d9;
  --accent:        #8b3a2a;
  --rule:          #c8bfad;
  --drop-cap-size: 5.2rem;
}

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

/* ── PAGE SHELL ── */
html {
  background: #2a2520;
  min-height: 100%;
}

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--ink);
  background: var(--paper);
  max-width: 680px;
  margin: 0 auto;
  padding: 0;
  position: relative;
}

/* Aged paper texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
  opacity: 0.6;
}

/* ── PAGE WRAPPER ── */
.page {
  padding: 5rem 4rem 7rem;
  min-height: 100vh;
  border-left:  1px solid var(--rule);
  border-right: 1px solid var(--rule);
  position: relative;
}

/* Decorative inner margin lines */
.page::before,
.page::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--rule);
  opacity: 0.5;
}
.page::before { left: 3rem; }
.page::after  { right: 3rem; }

/* ── CHAPTER HEADER ── */
.chapter-header {
  text-align: center;
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.book-title {
  font-family: 'Cormorant SC', serif;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 2.2rem;
}

.chapter-label {
  font-family: 'Cormorant SC', serif;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.chapter-numeral {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 2rem;
}

/* Decorative ornament rule with diamond */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.2rem 0;
  color: var(--accent);
  font-size: 0.6rem;
  letter-spacing: 0.4em;
}
.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.ornament-diamond {
  width: 5px; height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── EPIGRAPH ── */
.epigraph {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-light);
  text-align: center;
  max-width: 420px;
  margin: 0 auto 0.5rem;
  line-height: 1.6;
}

/* ── CHAPTER TEASER ── */
.teaser {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-faint);
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.1rem 1.5rem;
}

/* ── BODY TEXT ── */
.chapter-body {
  margin-top: 2.8rem;
}

p {
  margin-bottom: 0;
  text-indent: 1.8em;
}

p + p {
  margin-top: 0.55em;
}

/* First paragraph after header, scene break, or day header: no indent */
p.no-indent {
  text-indent: 0;
}

/* Drop cap — first paragraph only */
p.drop-cap::first-letter {
  font-family: 'Cormorant SC', serif;
  font-size: var(--drop-cap-size);
  font-weight: 600;
  float: left;
  line-height: 0.78;
  margin-right: 0.08em;
  margin-top: 0.12em;
  color: var(--accent);
}

/* ── NARRATOR ASIDE (inline) ── */
.narrator-aside {
  font-style: italic;
  color: var(--ink-light);
}

/* ── ATTRIBUTED QUOTE ── */
.attributed-quote {
  text-indent: 0 !important;
  text-align: center;
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-light);
  margin: 1.6rem 2rem;
  line-height: 1.6;
}
.attributed-quote .attribution {
  display: block;
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-top: 0.4rem;
}

/* ── SCENE BREAK ── */
.scene-break {
  text-align: center;
  margin: 2.4rem 0;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.scene-break::before,
.scene-break::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ── DAY HEADER (chapter 3) ── */
.day-header {
  font-family: 'Cormorant SC', serif;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--accent);
  text-transform: uppercase;
  text-align: center;
  margin: 2.6rem 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.day-header::before,
.day-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ── GRAPHIC PLACEHOLDER ── */
.graphic-placeholder {
  margin: 1.6rem 0;
  border: 1px dashed var(--rule);
  background: var(--paper-dark);
  padding: 1rem 1.4rem;
  text-align: center;
  font-family: 'Cormorant SC', serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ── FIELD GUIDE QUOTE ── */
.field-guide {
  margin: 1.2rem 2rem;
  padding: 0.9rem 1.2rem;
  border-left: 2px solid var(--rule);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-light);
  line-height: 1.75;
  text-indent: 0;
}

/* ── SONG / LYRIC REFERENCE ── */
.song-reference {
  margin: 1.8rem 2rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.song-reference p {
  text-indent: 0;
  font-style: italic;
  color: var(--ink-light);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.3rem;
}

/* ── NARRATOR BLOCK (closing) ── */
.narrator-block {
  margin: 2rem 0 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--rule);
}
.narrator-label {
  font-family: 'Cormorant SC', serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 0.3rem;
  text-indent: 0;
}
.narrator-block p {
  text-indent: 0;
  font-style: italic;
  color: var(--ink-light);
  margin-bottom: 0.4rem;
}

/* ── FOOTER ── */
.chapter-footer {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-book {
  font-family: 'Cormorant SC', serif;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}
.footer-page {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ── PAGE LOAD ANIMATION ── */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page { animation: pageIn 0.7s ease both; }
