/* ============================================
   INDIA HISTORY PPT — Editorial Design System
   Palette: Parchment & Ink + Saffron accents
   Fonts: Cormorant Garamond + Manrope
   ============================================ */

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

:root {
  --parchment:    #F4ECD8;
  --parchment-dk: #E8D9BC;
  --ink:          #1C1410;
  --ink-soft:     #3D2B1F;
  --saffron:      #E8821A;
  --saffron-lt:   #F5A94E;
  --terracotta:   #B5563E;
  --gold:         #C9A84C;
  --emerald:      #2D6A4F;
  --indigo:       #2C3E7A;
  --maroon:       #6B1A2A;
  --steel:        #3A4A5C;
  --white:        #FDFAF5;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Manrope', system-ui, sans-serif;

  --slide-w: 100vw;
  --slide-h: 100vh;
  --ease:    cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ── Progress Bar ── */
.progress-bar {
  position: fixed; top: 0; left: 0; z-index: 100;
  height: 3px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  width: 0%;
  transition: width 0.5s var(--ease);
  box-shadow: 0 0 12px rgba(232,130,26,0.6);
}

/* ── Slide Counter ── */
.slide-counter {
  position: fixed; top: 24px; right: 80px; z-index: 100;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* ── Navigation Buttons ── */
.nav-controls {
  position: fixed; bottom: 36px; right: 36px; z-index: 100;
  display: flex; gap: 10px;
}
.nav-btn {
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s var(--ease);
}
.nav-btn svg { width: 18px; height: 18px; }
.nav-btn:hover {
  background: var(--saffron);
  border-color: var(--saffron);
  color: white;
  transform: scale(1.08);
}
.nav-btn:disabled { opacity: 0.25; pointer-events: none; }

/* ── Slide Dots ── */
.slide-dots {
  position: fixed; bottom: 44px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; gap: 8px; align-items: center;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.dot.active {
  background: var(--saffron);
  width: 20px; border-radius: 3px;
}
.dot:hover { background: rgba(255,255,255,0.6); }

/* ── Presentation Container ── */
.presentation {
  width: var(--slide-w); height: var(--slide-h);
  position: relative; overflow: hidden;
}

/* ── 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 0.6s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
  overflow: hidden;
}
.slide.active {
  opacity: 1; transform: translateX(0);
  pointer-events: all;
}
.slide.exit {
  opacity: 0; transform: translateX(-60px);
}

/* ══════════════════════════════════════
   SLIDE 1 — TITLE
══════════════════════════════════════ */
.slide-title {
  background: var(--ink);
  flex-direction: column;
}

.slide-bg-pattern {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(232,130,26,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(201,168,76,0.06) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(181,86,62,0.05) 0%, transparent 40%);
}
.slide-bg-pattern::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23E8821A' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.title-content {
  position: relative; z-index: 1;
  text-align: center;
  max-width: 800px; padding: 0 40px;
}
.title-eyebrow {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 28px;
  animation: fadeUp 0.8s var(--ease) 0.2s both;
}
.main-title {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.0;
  margin-bottom: 32px;
}
.title-line {
  display: block;
  font-size: clamp(56px, 8vw, 96px);
  color: var(--parchment);
  animation: fadeUp 0.8s var(--ease) 0.35s both;
}
.title-line.accent {
  font-size: clamp(72px, 11vw, 128px);
  font-style: italic;
  color: var(--saffron);
  animation-delay: 0.5s;
}
.title-divider {
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 28px;
  animation: scaleX 0.8s var(--ease) 0.65s both;
}
.title-subtitle {
  font-family: var(--font-body);
  font-size: 15px; font-weight: 300;
  line-height: 1.7;
  color: rgba(244,236,216,0.6);
  max-width: 560px; margin: 0 auto 24px;
  animation: fadeUp 0.8s var(--ease) 0.75s both;
}
.title-meta {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(244,236,216,0.35);
  animation: fadeUp 0.8s var(--ease) 0.9s both;
}
.dot-sep { margin: 0 12px; color: var(--saffron); }

.title-ornament {
  position: absolute; z-index: 1;
  right: 8%; top: 50%; transform: translateY(-50%);
  animation: fadeIn 1.2s var(--ease) 1s both;
}
.om-symbol {
  font-size: clamp(120px, 15vw, 200px);
  color: rgba(232,130,26,0.06);
  font-family: serif;
  line-height: 1;
  user-select: none;
}

/* ══════════════════════════════════════
   ERA SLIDES — SPLIT LAYOUT
══════════════════════════════════════ */
.slide-era {
  background: var(--parchment);
  align-items: stretch;
}

/* Color themes per era */
.slide-era[data-color="terracotta"] { --era-accent: #B5563E; --era-bg: #F9EDE8; }
.slide-era[data-color="saffron"]    { --era-accent: #D4780A; --era-bg: #FDF3E3; }
.slide-era[data-color="gold"]       { --era-accent: #9A7B2A; --era-bg: #FBF5E0; }
.slide-era[data-color="emerald"]    { --era-accent: #2D6A4F; --era-bg: #E8F5EE; }
.slide-era[data-color="indigo"]     { --era-accent: #2C3E7A; --era-bg: #EAF0FB; }
.slide-era[data-color="maroon"]     { --era-accent: #6B1A2A; --era-bg: #F5E8EA; }
.slide-era[data-color="orange"]     { --era-accent: #C05A10; --era-bg: #FDF0E5; }
.slide-era[data-color="steel"]      { --era-accent: #3A4A5C; --era-bg: #EBF0F5; }
.slide-era[data-color="tricolor"]   { --era-accent: #138808; --era-bg: #EDF7EE; }
.slide-era[data-color="saffron-green"] { --era-accent: #E8821A; --era-bg: #FDF3E3; }

.slide-era { background: var(--era-bg, var(--parchment)); }

.era-label {
  position: absolute; top: 32px; left: 48px;
  font-family: var(--font-body);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--era-accent, var(--saffron));
  opacity: 0.7;
}

.slide-layout-split {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  width: 100%; height: 100%;
  align-items: center;
}

.split-text {
  padding: 80px 56px 80px 80px;
  display: flex; flex-direction: column; gap: 20px;
  animation: fadeUp 0.7s var(--ease) 0.1s both;
}

.era-period {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--era-accent, var(--saffron));
}

.slide-heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
}
.slide-heading em {
  font-style: italic;
  color: var(--era-accent, var(--saffron));
}

.slide-body {
  font-family: var(--font-body);
  font-size: 15px; font-weight: 300;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 520px;
}
.slide-body strong { font-weight: 600; color: var(--ink); }

.fact-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 4px;
}
.fact-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-family: var(--font-body);
  font-size: 13.5px; font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
}
.fact-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── Visual Card (right panel) ── */
.split-visual {
  height: 100%;
  background: var(--era-accent, var(--saffron));
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px;
  animation: fadeIn 0.7s var(--ease) 0.3s both;
}

.visual-card {
  display: flex; flex-direction: column;
  align-items: center; gap: 28px;
  text-align: center;
}
.visual-icon.large { font-size: 64px; filter: drop-shadow(0 4px 16px rgba(0,0,0,0.2)); }

.visual-stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 24px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.15);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 600;
  color: white;
  line-height: 1;
}
.stat-label {
  font-family: var(--font-body);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}

/* ══════════════════════════════════════
   SLIDE 12 — CONCLUSION
══════════════════════════════════════ */
.slide-conclusion {
  background: var(--ink);
  flex-direction: column;
}

.conclusion-content {
  position: relative; z-index: 1;
  text-align: center;
  max-width: 900px; padding: 40px;
  display: flex; flex-direction: column; gap: 32px;
  align-items: center;
}

.conclusion-eyebrow {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--saffron);
  animation: fadeUp 0.7s var(--ease) 0.1s both;
}

.conclusion-heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  color: var(--parchment);
  line-height: 1.15;
  animation: fadeUp 0.7s var(--ease) 0.25s both;
}
.conclusion-heading em {
  font-style: italic;
  color: var(--saffron);
}

/* Timeline Strip */
.timeline-strip {
  display: flex; align-items: center; gap: 0;
  flex-wrap: nowrap;
  animation: fadeUp 0.7s var(--ease) 0.4s both;
}
.timeline-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.tl-year {
  font-family: var(--font-body);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--saffron);
}
.tl-event {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 400;
  color: rgba(244,236,216,0.55);
  white-space: nowrap;
}
.timeline-item.highlight .tl-year { color: var(--gold); }
.timeline-item.highlight .tl-event { color: var(--parchment); font-weight: 600; }
.tl-line {
  flex: 1; min-width: 20px; max-width: 48px;
  height: 1px;
  background: linear-gradient(90deg, rgba(232,130,26,0.3), rgba(201,168,76,0.3));
  margin-bottom: 14px;
}

.conclusion-quote {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 22px);
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(244,236,216,0.55);
  max-width: 680px;
  border-left: 2px solid var(--saffron);
  padding-left: 24px;
  text-align: left;
  animation: fadeUp 0.7s var(--ease) 0.55s both;
}

.conclusion-footer {
  display: flex; gap: 40px; flex-wrap: wrap; justify-content: center;
  padding-top: 8px;
  border-top: 1px solid rgba(244,236,216,0.1);
  width: 100%;
  animation: fadeUp 0.7s var(--ease) 0.7s both;
}
.footer-stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.fs-num {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 600;
  color: var(--gold);
}
.fs-label {
  font-family: var(--font-body);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(244,236,216,0.4);
}

/* ══════════════════════════════════════
   KEYFRAME ANIMATIONS
══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleX {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ══════════════════════════════════════
   KEYBOARD HINT
══════════════════════════════════════ */
.keyboard-hint {
  position: fixed; bottom: 44px; left: 36px; z-index: 100;
  font-family: var(--font-body);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.2);
}
.keyboard-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  font-size: 9px;
  margin: 0 2px;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .slide-layout-split {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  .split-text { padding: 60px 32px 24px; }
  .split-visual { height: 200px; }
  .title-ornament { display: none; }
  .timeline-strip { overflow-x: auto; padding-bottom: 8px; }
  .conclusion-footer { gap: 24px; }
}

@media (max-width: 600px) {
  .split-text { padding: 48px 24px 20px; }
  .era-label { left: 24px; }
  .slide-heading { font-size: 28px; }
  .slide-body { font-size: 13px; }
  .fact-list li { font-size: 12px; }
}