/* ============================================
   SDG 8 ANIMATED INFOGRAPHIC — STYLES
   Palette: Chlorophyll + Alpine Frost + Volcanic
   Fonts: Bricolage Grotesque + DM Serif Display
   ============================================ */

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

:root {
  --teal:    #0A7B6C;
  --teal-lt: #12A98F;
  --gold:    #F5C842;
  --gold-lt: #FFE082;
  --red:     #C0392B;
  --red-lt:  #E74C3C;
  --green:   #1E8449;
  --green-lt:#27AE60;
  --dark:    #0D1117;
  --dark2:   #161B22;
  --white:   #F8FAFC;
  --gray:    #8B9BB4;
  --font-display: 'DM Serif Display', serif;
  --font-body:    'Bricolage Grotesque', sans-serif;
}

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

/* ── PROGRESS BAR ── */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--teal-lt), var(--gold));
  z-index: 1000;
  transition: width 0.6s ease;
}

/* ── SCENE DOTS ── */
.scene-dots {
  position: fixed; right: 24px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 100;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}
.dot.active {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.3);
}

/* ── SCENE LABEL ── */
.scene-label {
  position: fixed; left: 24px; top: 24px;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.4);
  z-index: 100;
}

/* ── SCENES ── */
.scene {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.7s ease;
  overflow: hidden;
}
.scene.active {
  opacity: 1; pointer-events: all;
}

/* ── ANIMATE-IN ── */
.animate-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.scene.active .animate-in { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.35s; }
.delay-3 { transition-delay: 0.55s; }
.delay-4 { transition-delay: 0.75s; }
.delay-5 { transition-delay: 0.95s; }
.delay-6 { transition-delay: 1.15s; }

/* ── NAV CONTROLS ── */
.nav-controls {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 16px; z-index: 200;
}
.nav-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: white; font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.nav-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
  transform: scale(1.1);
}

/* ── AUTOPLAY BTN ── */
.autoplay-btn {
  position: fixed; bottom: 32px; right: 24px;
  padding: 10px 20px;
  border-radius: 24px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  font-family: var(--font-body);
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  z-index: 200;
}
.autoplay-btn.playing {
  background: var(--teal);
  border-color: var(--teal-lt);
  color: white;
}

/* ============================================
   SCENE 1 — INTRO
   ============================================ */
.scene-1 { background: linear-gradient(135deg, #0D1117 0%, #0A2A2A 50%, #0D1117 100%); }

.scene1-bg { position: absolute; inset: 0; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.35;
  animation: float 8s ease-in-out infinite;
}
.orb1 { width: 500px; height: 500px; background: var(--teal); top: -150px; left: -100px; animation-delay: 0s; }
.orb2 { width: 400px; height: 400px; background: #1B4F8A; bottom: -100px; right: -80px; animation-delay: 3s; }
.orb3 { width: 300px; height: 300px; background: var(--gold); top: 40%; left: 40%; animation-delay: 5s; opacity: 0.15; }

.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
}

.scene1-content {
  position: relative; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 20px; padding: 20px;
  max-width: 900px;
}

.sdg-badge {
  display: flex; align-items: center; gap: 12px;
  background: rgba(245,200,66,0.1);
  border: 1px solid rgba(245,200,66,0.3);
  border-radius: 40px;
  padding: 8px 20px 8px 8px;
}
.sdg-icon svg { width: 44px; height: 44px; }
.sdg-badge span {
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; color: var(--gold);
}

.scene1-title {
  font-family: var(--font-display);
  line-height: 1.05;
  display: flex; flex-direction: column;
}
.title-line1 {
  font-size: clamp(52px, 8vw, 96px);
  color: var(--white);
}
.title-line2 {
  font-size: clamp(52px, 8vw, 96px);
  color: var(--teal-lt);
}
.title-line3 {
  font-size: clamp(52px, 8vw, 96px);
  color: var(--gold);
  font-style: italic;
}

.subtitle-tag {
  display: inline-block;
  background: linear-gradient(90deg, var(--teal), var(--teal-lt));
  color: white;
  font-size: 13px; font-weight: 800;
  letter-spacing: 3px;
  padding: 8px 24px;
  border-radius: 4px;
}

.scene1-desc {
  font-size: clamp(14px, 1.8vw, 18px);
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 600px;
}
.scene1-desc em { color: var(--gold); font-style: normal; font-weight: 700; }
.scene1-desc strong { color: var(--white); }

.scene1-pillars {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
}
.pillar {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 16px 24px;
  min-width: 110px;
  transition: all 0.3s ease;
}
.pillar:hover {
  background: rgba(245,200,66,0.1);
  border-color: var(--gold);
  transform: translateY(-4px);
}
.pillar-icon { font-size: 28px; }
.pillar span { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: rgba(255,255,255,0.8); }

.deadline-badge {
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(135deg, var(--gold), #E6A817);
  border-radius: 16px;
  padding: 12px 32px;
  color: var(--dark);
}
.deadline-year { font-size: 36px; font-weight: 800; line-height: 1; }
.deadline-text { font-size: 10px; font-weight: 700; letter-spacing: 3px; }

/* ============================================
   SCENE 2 — THE PROBLEM
   ============================================ */
.scene-2 { background: linear-gradient(135deg, #1A0A0A 0%, #2D0D0D 50%, #1A0A0A 100%); }

.scene2-bg { position: absolute; inset: 0; overflow: hidden; }
.warning-stripe {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 40px,
    rgba(192,57,43,0.04) 40px, rgba(192,57,43,0.04) 80px
  );
}

.scene2-content {
  position: relative; z-index: 10;
  width: 100%; max-width: 1100px;
  padding: 20px 40px;
  display: flex; flex-direction: column; gap: 20px;
}

.alert-tag {
  display: inline-block;
  background: rgba(192,57,43,0.2);
  border: 1px solid rgba(192,57,43,0.5);
  color: #FF6B6B;
  font-size: 11px; font-weight: 800;
  letter-spacing: 3px;
  padding: 6px 16px;
  border-radius: 4px;
  width: fit-content;
}

.problem-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  color: var(--white);
  line-height: 1.1;
}
.highlight-red { color: var(--red-lt); font-style: italic; }

.problem-intro {
  font-size: 15px; color: rgba(255,255,255,0.6);
}

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

.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red-lt));
}
.stat-card:hover {
  background: rgba(192,57,43,0.1);
  border-color: rgba(192,57,43,0.3);
  transform: translateY(-3px);
}
.stat-card.big-stat {
  grid-column: span 1;
  background: rgba(192,57,43,0.08);
  border-color: rgba(192,57,43,0.25);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.5vw, 48px);
  color: var(--red-lt);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 13px; color: rgba(255,255,255,0.7);
  line-height: 1.5;
}
.stat-label strong { color: var(--white); }
.stat-source {
  margin-top: 8px;
  font-size: 10px; color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
}

.inequality-bar {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px 20px;
}
.bar-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 2px; color: rgba(255,255,255,0.4);
  margin-bottom: 10px;
}
.bar-track {
  display: flex; height: 36px; border-radius: 8px; overflow: hidden;
}
.bar-rich {
  background: linear-gradient(90deg, #8B1A1A, var(--red-lt));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white;
  transition: width 1.5s ease;
}
.bar-poor {
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: rgba(255,255,255,0.5);
  transition: width 1.5s ease;
}

/* ============================================
   SCENE 3 — SOLUTIONS
   ============================================ */
.scene-3 { background: linear-gradient(135deg, #071A0F 0%, #0A2A1A 50%, #071A0F 100%); }

.scene3-bg { position: absolute; inset: 0; overflow: hidden; }
.solution-orb {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: 0.25;
  animation: float 10s ease-in-out infinite;
}
.s-orb1 { width: 600px; height: 600px; background: var(--green); top: -200px; right: -200px; }
.s-orb2 { width: 400px; height: 400px; background: #1B4F8A; bottom: -100px; left: -100px; animation-delay: 4s; }

.scene3-content {
  position: relative; z-index: 10;
  width: 100%; max-width: 1100px;
  padding: 20px 40px;
  display: flex; flex-direction: column; gap: 18px;
}

.solution-tag {
  display: inline-block;
  background: rgba(30,132,73,0.2);
  border: 1px solid rgba(30,132,73,0.5);
  color: #6BCB8B;
  font-size: 11px; font-weight: 800;
  letter-spacing: 3px;
  padding: 6px 16px;
  border-radius: 4px;
  width: fit-content;
}

.solution-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  color: var(--white); line-height: 1.1;
}
.highlight-green { color: #6BCB8B; font-style: italic; }

.solution-intro { font-size: 15px; color: rgba(255,255,255,0.6); }

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

.solution-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px;
  transition: all 0.3s ease;
  position: relative; overflow: hidden;
}
.solution-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-color), color-mix(in srgb, var(--card-color) 60%, white));
}
.solution-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
}
.solution-card.highlight-card {
  background: rgba(245,200,66,0.06);
  border-color: rgba(245,200,66,0.2);
}
.solution-icon { font-size: 28px; margin-bottom: 10px; }
.solution-card h3 {
  font-size: 14px; font-weight: 800;
  color: var(--white); margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.solution-card p {
  font-size: 12px; color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

.success-story {
  display: flex; align-items: center; gap: 16px;
  background: rgba(245,200,66,0.08);
  border: 1px solid rgba(245,200,66,0.25);
  border-radius: 12px;
  padding: 14px 20px;
}
.story-icon { font-size: 28px; }
.story-text { font-size: 13px; color: rgba(255,255,255,0.75); line-height: 1.5; }
.story-text strong { color: var(--gold); }
.story-num { color: var(--gold); font-weight: 800; font-size: 15px; }

/* ============================================
   SCENE 4 — CALL TO ACTION
   ============================================ */
.scene-4 { background: linear-gradient(135deg, #0A0A1A 0%, #0D1B2A 50%, #0A0A1A 100%); }

.scene4-bg { position: absolute; inset: 0; overflow: hidden; }
.cta-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.3;
  animation: float 12s ease-in-out infinite;
}
.cta-orb1 { width: 500px; height: 500px; background: #1B4F8A; top: -150px; left: -100px; }
.cta-orb2 { width: 400px; height: 400px; background: var(--teal); bottom: -100px; right: -100px; animation-delay: 4s; }
.cta-orb3 { width: 300px; height: 300px; background: var(--gold); top: 30%; left: 50%; opacity: 0.15; animation-delay: 7s; }

.scene4-content {
  position: relative; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 22px; padding: 20px;
  max-width: 800px;
}

.countdown-section { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.countdown-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 3px; color: rgba(255,255,255,0.4);
}
.countdown-display {
  display: flex; align-items: center; gap: 8px;
}
.count-unit {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 20px;
  min-width: 80px;
}
.count-unit span {
  font-family: var(--font-display);
  font-size: 40px; color: var(--gold);
  line-height: 1;
}
.count-unit small {
  font-size: 9px; font-weight: 700;
  letter-spacing: 2px; color: rgba(255,255,255,0.4);
  margin-top: 4px;
}
.count-sep {
  font-size: 32px; color: rgba(255,255,255,0.3);
  font-weight: 300; margin-bottom: 16px;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  color: var(--white); line-height: 1.1;
}
.highlight-gold { color: var(--gold); font-style: italic; }

.cta-body {
  font-size: clamp(15px, 1.8vw, 18px);
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
}
.cta-body strong { color: var(--white); }

.action-list {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; max-width: 560px;
}
.action-item {
  display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 20px;
  text-align: left;
  font-size: 14px; color: rgba(255,255,255,0.8);
  transition: all 0.3s ease;
}
.action-item:hover {
  background: rgba(245,200,66,0.08);
  border-color: rgba(245,200,66,0.25);
}
.action-num {
  font-family: var(--font-display);
  font-size: 20px; color: var(--gold);
  min-width: 32px;
}

.final-message {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.final-line1 {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 800; letter-spacing: 4px;
  color: var(--teal-lt);
}
.final-line2 {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 800; letter-spacing: 4px;
  color: var(--white);
}
.final-sdg {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  color: var(--gold);
  font-style: italic;
  margin-top: 6px;
}

.un-footer {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
}
.un-logo { font-size: 20px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .scene1-pillars { gap: 10px; }
  .pillar { min-width: 80px; padding: 12px 16px; }
  .scene2-content, .scene3-content { padding: 16px 20px; }
  .count-unit { min-width: 64px; padding: 10px 14px; }
  .count-unit span { font-size: 30px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .solutions-grid { grid-template-columns: 1fr 1fr; }
  .scene-dots { display: none; }
}