/* ============================================
   ANIMAL FARM PRESENTATION — STYLES
   Palette: Parchment & Ink + Revolutionary Red
   Fonts: EB Garamond + Atkinson Hyperlegible
   ============================================ */

:root {
  --parchment:    #F4ECD8;
  --parchment-dk: #D4C5A9;
  --ink:          #2C2C2C;
  --ink-light:    #5A4A3A;
  --brown:        #8B4513;
  --red:          #C0392B;
  --red-dk:       #922B21;
  --gold:         #B8860B;
  --cream:        #FAF6EE;
  --white:        #FFFFFF;

  --font-display: 'EB Garamond', Georgia, serif;
  --font-body:    'Atkinson Hyperlegible', sans-serif;

  --slide-w: 100vw;
  --slide-h: 100vh;
  --transition: 0.65s cubic-bezier(0.77, 0, 0.175, 1);
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--ink);
  font-family: var(--font-body);
  color: var(--ink);
}

/* ── TEXTURE OVERLAY ── */
.texture-overlay {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ── PROGRESS BAR ── */
.progress-bar {
  position: fixed; top: 0; left: 0; z-index: 100;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  width: 10%;
  transition: width 0.5s ease;
}

/* ── SLIDE COUNTER ── */
.slide-counter {
  position: fixed; bottom: 24px; right: 32px; z-index: 100;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--ink-light);
  letter-spacing: 0.1em;
  opacity: 0.7;
}

/* ── NAV BUTTONS ── */
.nav-btn {
  position: fixed; top: 50%; z-index: 100;
  transform: translateY(-50%);
  background: rgba(44,44,44,0.08);
  border: 1.5px solid rgba(44,44,44,0.2);
  color: var(--ink);
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.nav-btn:hover { background: var(--red); color: var(--white); border-color: var(--red); }
.nav-prev { left: 20px; }
.nav-next { right: 20px; }
.nav-btn:disabled { opacity: 0.2; pointer-events: none; }

/* ── DOT NAVIGATION ── */
.dot-nav {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex; gap: 8px; align-items: center;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--parchment-dk);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1.5px solid var(--ink-light);
}
.dot.active { background: var(--red); border-color: var(--red); transform: scale(1.3); }

/* ── SLIDES CONTAINER ── */
.slides-container {
  width: 100vw; height: 100vh;
  position: relative;
}

/* ── BASE SLIDE ── */
.slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateX(60px);
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
  overflow: hidden;
}
.slide.active {
  opacity: 1; transform: translateX(0);
  pointer-events: all;
}
.slide.exit {
  opacity: 0; transform: translateX(-60px);
}

.slide-content {
  position: relative; z-index: 2;
  width: 90%; max-width: 1100px;
  padding: 48px 56px;
}

/* ── DECORATIVE SIDE TEXT ── */
.slide-deco {
  position: absolute; z-index: 2;
  font-family: var(--font-display);
  font-size: 7rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  opacity: 0.04;
  color: var(--ink);
  writing-mode: vertical-rl;
  user-select: none;
}
.deco-left  { left: -20px; top: 50%; transform: translateY(-50%); }
.deco-right { right: -20px; top: 50%; transform: translateY(-50%) rotate(180deg); }

/* ── SLIDE LABEL ── */
.slide-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

/* ── SLIDE HEADING ── */
.slide-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 28px;
}
.slide-heading em { color: var(--brown); font-style: italic; }

/* ── BODY TEXT ── */
.body-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-light);
  margin-bottom: 14px;
}
.body-text strong { color: var(--ink); }

/* ============================================
   SLIDE 1 — TITLE
   ============================================ */
.slide-title {
  background: var(--parchment);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(139,69,19,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(192,57,43,0.06) 0%, transparent 50%);
}

.title-content {
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 16px;
}

.title-badge {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brown);
  border: 1.5px solid var(--brown);
  padding: 6px 18px;
  border-radius: 2px;
}

.main-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 800;
  line-height: 0.9;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.title-animal { font-size: 0.5em; display: block; margin-bottom: 8px; }

.title-subtitle {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-style: italic;
  color: var(--ink-light);
  max-width: 480px;
  line-height: 1.5;
}

.title-divider {
  display: flex; align-items: center; gap: 16px;
  width: 280px;
}
.divider-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brown), transparent);
}
.divider-icon { color: var(--brown); font-size: 0.8rem; }

.title-meta {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-light);
  opacity: 0.7;
}

.commandment-preview {
  background: rgba(139,69,19,0.08);
  border-left: 3px solid var(--red);
  padding: 14px 20px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-light);
  max-width: 520px;
  border-radius: 0 4px 4px 0;
}

/* ============================================
   SLIDE 2 — OVERVIEW
   ============================================ */
.slide-overview {
  background: var(--cream);
  background-image: radial-gradient(ellipse at 70% 30%, rgba(184,134,11,0.06) 0%, transparent 60%);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

.fact-box {
  display: flex; gap: 12px; align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--parchment-dk);
}
.fact-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  min-width: 70px;
}
.fact-value {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink);
}

/* Book Card */
.book-card {
  display: flex; gap: 0;
  filter: drop-shadow(4px 8px 20px rgba(44,44,44,0.25));
}
.book-spine {
  width: 28px;
  background: linear-gradient(180deg, var(--red-dk), var(--red));
  border-radius: 3px 0 0 3px;
}
.book-cover {
  width: 180px; height: 260px;
  background: linear-gradient(160deg, var(--red) 0%, var(--red-dk) 100%);
  border-radius: 0 4px 4px 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; padding: 20px;
  position: relative;
  overflow: hidden;
}
.book-cover::before {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 2px;
}
.book-title-art {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 800;
  color: var(--white);
  text-align: center; line-height: 1.1;
  letter-spacing: 0.05em;
}
.book-author-art {
  font-family: var(--font-body);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}
.book-pig { font-size: 2.5rem; }
.book-year {
  font-family: var(--font-display);
  font-size: 0.8rem; font-style: italic;
  color: rgba(255,255,255,0.6);
}

/* ============================================
   SLIDE 3 — AUTHOR
   ============================================ */
.slide-author {
  background: var(--parchment);
  background-image: radial-gradient(ellipse at 10% 80%, rgba(192,57,43,0.07) 0%, transparent 50%);
}

.author-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}

.portrait-frame {
  width: 180px; height: 220px;
  background: linear-gradient(160deg, var(--ink) 0%, #3d3d3d 100%);
  border-radius: 4px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  border: 3px solid var(--parchment-dk);
  box-shadow: 6px 6px 0 var(--brown);
}
.portrait-initials {
  font-family: var(--font-display);
  font-size: 3.5rem; font-weight: 700;
  color: var(--parchment);
  letter-spacing: 0.05em;
}
.portrait-years {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--parchment-dk);
  letter-spacing: 0.1em;
}

.timeline { margin: 16px 0; }
.timeline-item {
  display: flex; gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--parchment-dk);
  align-items: baseline;
}
.t-year {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--red);
  min-width: 44px;
}
.t-event {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-light);
  line-height: 1.4;
}
.t-event em { color: var(--brown); }

.author-quote {
  font-family: var(--font-display);
  font-size: 1rem; font-style: italic;
  color: var(--ink);
  border-left: 3px solid var(--red);
  padding: 10px 16px;
  margin-top: 16px;
  background: rgba(139,69,19,0.05);
  line-height: 1.6;
}

/* ============================================
   SLIDE 4 — PLOT
   ============================================ */
.slide-plot {
  background: var(--cream);
  background-image: radial-gradient(ellipse at 90% 10%, rgba(139,69,19,0.07) 0%, transparent 50%);
}

.plot-steps {
  display: flex; flex-direction: column; gap: 0;
}
.plot-step {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--parchment-dk);
  position: relative;
}
.plot-step:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700;
  color: var(--red);
  min-width: 36px;
  line-height: 1;
  padding-top: 2px;
}
.step-body strong {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600;
  color: var(--ink);
  display: block; margin-bottom: 4px;
}
.step-body p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-light);
  line-height: 1.55;
}

/* ============================================
   SLIDE 5 — CHARACTERS
   ============================================ */
.slide-characters {
  background: var(--parchment);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(192,57,43,0.08) 0%, transparent 60%);
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.char-card {
  background: var(--white);
  border: 1.5px solid var(--parchment-dk);
  border-radius: 4px;
  padding: 18px 16px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.char-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(44,44,44,0.12);
}
.char-icon { font-size: 1.8rem; margin-bottom: 8px; }
.char-name {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  color: var(--ink);
}
.char-role {
  font-family: var(--font-body);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-light);
  margin: 2px 0 6px;
}
.char-allegory {
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 700;
  color: var(--red);
  background: rgba(192,57,43,0.08);
  padding: 3px 8px;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 8px;
}
.char-desc {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink-light);
  line-height: 1.5;
}

/* ============================================
   SLIDE 6 — COMMANDMENTS
   ============================================ */
.slide-commandments {
  background: var(--ink);
  color: var(--parchment);
}
.slide-commandments .slide-heading { color: var(--parchment); }
.slide-commandments .slide-label { color: var(--gold); }

.commandments-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.commandment {
  display: flex; gap: 14px; align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid rgba(244,236,216,0.1);
}
.commandment.highlight-cmd { border-bottom: none; }
.cmd-num {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--gold);
  min-width: 20px;
}
.cmd-text {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--parchment);
  line-height: 1.4;
}
.highlight-cmd .cmd-text {
  color: var(--gold);
  font-weight: 600;
}

.commandments-corruption {
  background: rgba(192,57,43,0.12);
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: 4px;
  padding: 20px;
}
.corruption-title {
  font-family: var(--font-body);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.corrupted-cmd {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: rgba(244,236,216,0.7);
  padding: 8px 0;
  border-bottom: 1px dashed rgba(244,236,216,0.1);
  line-height: 1.4;
}
.corrupted-cmd strong { color: var(--red); }
.final-cmd {
  color: var(--parchment);
  font-size: 0.95rem;
  font-weight: 600;
  border-bottom: none;
  margin-top: 6px;
}
.corruption-note {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(244,236,216,0.5);
  margin-top: 14px;
  line-height: 1.5;
  font-style: italic;
}

/* ============================================
   SLIDE 7 — THEMES
   ============================================ */
.slide-themes {
  background: var(--cream);
  background-image: radial-gradient(ellipse at 30% 70%, rgba(184,134,11,0.07) 0%, transparent 50%);
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.theme-card {
  padding: 20px 18px;
  border-radius: 4px;
  border-top: 3px solid transparent;
  background: var(--white);
  border: 1.5px solid var(--parchment-dk);
  transition: transform 0.2s ease;
}
.theme-card:hover { transform: translateY(-2px); }
.theme-1 { border-top-color: var(--red); }
.theme-2 { border-top-color: var(--brown); }
.theme-3 { border-top-color: var(--gold); }
.theme-4 { border-top-color: #2E5090; }
.theme-5 { border-top-color: var(--red-dk); }
.theme-6 { border-top-color: #2D6A1E; }

.theme-icon { font-size: 1.5rem; margin-bottom: 10px; }
.theme-card h3 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.theme-card p {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-light);
  line-height: 1.55;
}

/* ============================================
   SLIDE 8 — ALLEGORY TABLE
   ============================================ */
.slide-allegory {
  background: var(--parchment);
  background-image: radial-gradient(ellipse at 80% 80%, rgba(192,57,43,0.07) 0%, transparent 50%);
}

.allegory-table-wrap {
  overflow-x: auto;
  border-radius: 4px;
  border: 1.5px solid var(--parchment-dk);
  box-shadow: 0 4px 20px rgba(44,44,44,0.08);
}

.allegory-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: var(--white);
}
.allegory-table thead tr {
  background: var(--ink);
  color: var(--parchment);
}
.allegory-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.allegory-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--parchment-dk);
  color: var(--ink-light);
  line-height: 1.4;
}
.allegory-table td strong { color: var(--ink); }
.allegory-table tbody tr:nth-child(even) { background: var(--cream); }
.allegory-table tbody tr:hover { background: rgba(192,57,43,0.05); }
.allegory-table tbody tr:last-child td { border-bottom: none; }

/* ============================================
   SLIDE 9 — LITERARY DEVICES
   ============================================ */
.slide-literary {
  background: var(--cream);
  background-image: radial-gradient(ellipse at 20% 20%, rgba(139,69,19,0.07) 0%, transparent 50%);
}

.literary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.literary-item {
  padding: 18px 16px;
  background: var(--white);
  border: 1.5px solid var(--parchment-dk);
  border-radius: 4px;
  position: relative;
}
.lit-term {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  color: var(--brown);
  margin-bottom: 8px;
}
.lit-def {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-light);
  line-height: 1.55;
  margin-bottom: 10px;
}
.lit-example {
  font-family: var(--font-display);
  font-size: 0.8rem; font-style: italic;
  color: var(--red);
  background: rgba(192,57,43,0.06);
  padding: 6px 10px;
  border-radius: 2px;
  border-left: 2px solid var(--red);
}

/* ============================================
   SLIDE 10 — CONCLUSION
   ============================================ */
.slide-conclusion {
  background: var(--ink);
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(192,57,43,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(184,134,11,0.08) 0%, transparent 50%);
  color: var(--parchment);
}
.slide-conclusion .slide-heading { color: var(--parchment); }
.slide-conclusion .slide-label { color: var(--gold); }
.slide-conclusion .body-text { color: rgba(244,236,216,0.8); }
.slide-conclusion .body-text strong { color: var(--parchment); }

.conclusion-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.large-text { font-size: 1rem; line-height: 1.8; }

.key-takeaways {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.takeaway {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(244,236,216,0.85);
  padding: 8px 12px;
  background: rgba(244,236,216,0.06);
  border-radius: 3px;
  border-left: 2px solid var(--gold);
}

.final-quote-block {
  background: rgba(192,57,43,0.12);
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: 6px;
  padding: 32px 28px;
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
}
.fq-decoration {
  font-family: var(--font-display);
  font-size: 4rem; font-weight: 800;
  color: var(--red);
  line-height: 0.5;
  opacity: 0.6;
}
.final-quote {
  font-family: var(--font-display);
  font-size: 1.15rem; font-style: italic;
  color: var(--parchment);
  line-height: 1.6;
  list-style: none;
}
.final-quote-block cite {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(244,236,216,0.55);
  font-style: normal;
}
.final-quote-block cite em { color: rgba(244,236,216,0.7); }
.group-credit {
  font-family: var(--font-body);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold);
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(244,236,216,0.1);
  width: 100%;
  text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .slide-content { padding: 32px 24px; }
  .two-col, .author-layout, .conclusion-body { grid-template-columns: 1fr; }
  .col-visual, .author-portrait { display: none; }
  .char-grid, .themes-grid, .literary-grid { grid-template-columns: repeat(2, 1fr); }
  .commandments-layout { grid-template-columns: 1fr; }
  .main-title { font-size: 4rem; }
}

@media (max-width: 600px) {
  .char-grid, .themes-grid, .literary-grid { grid-template-columns: 1fr; }
  .slide-heading { font-size: 1.8rem; }
  .nav-btn { width: 36px; height: 36px; font-size: 1rem; }
}