:root {
  --midnight: #08162B;
  --red: #FE3A1F;
  --blue: #80C1C7;
  --grey: #E0E1E5;
  --white: #FFFFFF;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--midnight); color: var(--white);
  overflow: hidden; height: 100vh;
  /* Subtle grid pattern - very faint */
  background-image: 
    linear-gradient(rgba(128,193,199,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128,193,199,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Allow scrolling on pages that need it */
body.scrollable {
  overflow: auto;
  height: auto;
  min-height: 100vh;
}

/* ===== SITE HEADER ===== */
.site-header { border-bottom: 1px solid rgba(255,255,255,0.08); padding: 0 24px; }
.site-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px; height: 56px;
}
.site-brand {
  font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 18px;
  text-transform: uppercase; color: #fff; text-decoration: none;
  letter-spacing: -0.01em; flex-shrink: 0;
}
.site-brand span { color: var(--red); }
.site-nav { display: flex; gap: 4px; flex: 1; }
.site-nav-link {
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.55); text-decoration: none;
  border-radius: 6px; border: 1px solid transparent; transition: all 0.2s;
}
.site-nav-link:hover { color: var(--blue); background: rgba(128,193,199,0.1); border-color: rgba(128,193,199,0.3); }
.site-nav-link.active { color: var(--blue); background: rgba(128,193,199,0.08); border-color: rgba(128,193,199,0.2); }
@media (max-width: 600px) {
  .site-header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
  .site-nav { order: 3; width: 100%; }
}

/* ===== SLIDE PREVIEW MODAL ===== */
.slide-preview-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.preview-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.8); cursor: pointer;
}
.preview-body {
  position: relative; z-index: 1;
  width: 90vw; max-width: 960px;
}
.preview-close {
  position: absolute; top: -40px; right: 0;
  background: none; border: none; color: rgba(255,255,255,0.6);
  font-size: 28px; cursor: pointer; padding: 4px 10px; line-height: 1;
  transition: color 0.2s;
}
.preview-close:hover { color: #fff; }
.preview-deck {
  position: relative; width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 8px; overflow: hidden;
  background: var(--midnight);
  box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}
.preview-deck .slide {
  position: absolute; inset: 0;
}
.preview-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 16px;
}
.preview-nav-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6); font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.preview-nav-btn:hover { border-color: var(--red); color: #fff; background: rgba(254,58,31,0.1); }
.preview-counter {
  font-size: 13px; color: rgba(255,255,255,0.4); min-width: 50px; text-align: center;
}
@media (max-width: 600px) {
  .preview-body { width: 96vw; }
  .preview-close { top: -36px; font-size: 24px; }
}

/* ===== SIDE-BY-SIDE EDIT LAYOUT ===== */
.edit-layout {
  display: flex; height: calc(100vh - 56px - 49px); /* header + footer */
}
.edit-panel {
  width: 36%; min-width: 260px; overflow: hidden; padding: 32px 24px 16px;
  flex-shrink: 0;
}
.edit-divider {
  width: 6px; cursor: col-resize; flex-shrink: 0;
  background: rgba(255,255,255,0.06); position: relative;
  transition: background 0.15s;
}
.edit-divider:hover,
.edit-divider.dragging {
  background: var(--red);
}
.edit-divider::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 2px; height: 32px; border-radius: 1px;
  background: rgba(255,255,255,0.2);
}
.edit-divider:hover::after,
.edit-divider.dragging::after {
  background: rgba(255,255,255,0.5);
}
.preview-panel {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px; min-width: 280px;
  background: rgba(0,0,0,0.2);
}
.preview-panel .preview-deck {
  position: relative; width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 8px; overflow: hidden;
  background: var(--midnight);
  box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}
.preview-panel .preview-deck .slide {
  position: absolute; inset: 0;
}
.preview-panel .preview-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 16px;
}
@media (max-width: 768px) {
  .edit-layout { flex-direction: column; height: auto; min-height: calc(100vh - 56px); }
  .edit-panel { width: 100% !important; min-width: 0; flex-shrink: 1; padding: 20px 16px; }
  .edit-divider { display: none; }
  .preview-panel { flex: none; height: 50vh; min-width: 0; padding: 16px; }
}

/* ===== EDITOR ===== */
#editor-panel {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--midnight); z-index: 100; padding: 40px;
  transition: opacity 0.4s, transform 0.4s;
}
#editor-panel.hidden { opacity: 0; pointer-events: none; transform: scale(0.98); }
.editor-header { text-align: center; margin-bottom: 28px; }
.editor-header h1 { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 28px; text-transform: uppercase; letter-spacing: -0.01em; }
.editor-header h1 span { color: var(--red); }
.editor-header p { font-size: 13px; font-weight: 300; color: rgba(255,255,255,0.45); margin-top: 6px; }
.editor-actions { display: flex; gap: 12px; margin-bottom: 16px; }
.btn { padding: 10px 24px; border: none; border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: var(--red); color: white; }
.btn-primary:hover { background: #e63219; transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.1); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); color: white; }
#file-input { display: none; }
textarea#md-input {
  width: 700px; max-width: 90vw; height: 420px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 20px; color: rgba(255,255,255,0.85);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
  font-size: 13px; line-height: 1.6; resize: none; outline: none;
}
textarea#md-input:focus { border-color: var(--red); }
textarea#md-input::placeholder { color: rgba(255,255,255,0.2); }
.editor-help { margin-top: 16px; font-size: 11px; color: rgba(255,255,255,0.25); text-align: center; max-width: 640px; line-height: 1.8; }
.editor-help code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 3px; font-size: 10px; }

/* ===== PRESENTATION ===== */
#presentation { display: none; width: 100vw; height: 100vh; align-items: center; justify-content: center; flex-direction: column; }
#presentation.active { display: flex; }

.deck-container {
  position: relative;
  width: 94vw; height: calc(94vw * 9 / 16);
  max-height: 82vh; max-width: calc(82vh * 16 / 9);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}

/* ===== SLIDE BASE ===== */
.slide {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none; overflow: hidden;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide.active {
  opacity: 1; pointer-events: auto;
}
.slide.theme-dark { background: var(--midnight); }
.slide.theme-light { background: var(--white); }

/* Stagger-in: children animate when slide becomes active */
.slide.active .stagger { animation: staggerIn 0.5s ease both; }
.slide.active .stagger:nth-child(1) { animation-delay: 0.1s; }
.slide.active .stagger:nth-child(2) { animation-delay: 0.2s; }
.slide.active .stagger:nth-child(3) { animation-delay: 0.3s; }
.slide.active .stagger:nth-child(4) { animation-delay: 0.4s; }
.slide.active .stagger:nth-child(5) { animation-delay: 0.5s; }
.slide.active .stagger:nth-child(6) { animation-delay: 0.55s; }
.slide.active .stagger:nth-child(7) { animation-delay: 0.6s; }
.slide.active .stagger:nth-child(8) { animation-delay: 0.65s; }

@keyframes staggerIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === VARIED CONTENT ENTRANCE ANIMATIONS (Category 4) === */
/* Overline: letter-spacing expands from wide to normal + upward drift */
@keyframes overlineReveal {
  from { opacity: 0; letter-spacing: 12px; transform: translateY(8px); }
  to { opacity: 1; letter-spacing: 3px; transform: translateY(0); }
}
.slide.active .sl-overline.stagger {
  animation: overlineReveal 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Heading: scale from 0.92 with overshoot easing */
@keyframes headingReveal {
  0% { opacity: 0; transform: scale(0.92) translateY(12px); }
  70% { opacity: 1; transform: scale(1.01) translateY(-1px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.slide.active .sl-heading.stagger {
  animation: headingReveal 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Divider: scaleX expand from left */
@keyframes dividerGrow {
  from { opacity: 0; transform: scaleX(0); transform-origin: left; }
  to { opacity: 1; transform: scaleX(1); transform-origin: left; }
}
.slide.active .sl-divider.stagger {
  animation: dividerGrow 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  transform-origin: left;
}

/* Body: fade + slight slide from left */
@keyframes bodySlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
.slide.active .sl-body.stagger {
  animation: bodySlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Quote: translateX + clip-path reveal from top */
@keyframes quoteReveal {
  from { opacity: 0; transform: translateX(-8px); clip-path: inset(0 0 100% 0); }
  to { opacity: 1; transform: translateX(0); clip-path: inset(0 0 0 0); }
}
.slide.active .sl-quote.stagger {
  animation: quoteReveal 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Icon card: scale pop-in with spring bounce */
@keyframes iconCardPopIn {
  0% { opacity: 0; transform: scale(0.85); }
  60% { opacity: 1; transform: scale(1.04); }
  80% { transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1); }
}
.slide.active .icon-card.stagger {
  animation: iconCardPopIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* CTA: translateY + glow entrance */
@keyframes ctaReveal {
  0% { opacity: 0; transform: translateY(10px); box-shadow: 0 0 0 0 rgba(254,58,31,0); }
  50% { opacity: 1; box-shadow: 0 0 24px 4px rgba(254,58,31,0.25); }
  100% { opacity: 1; transform: translateY(0); box-shadow: 0 0 0 0 rgba(254,58,31,0); }
}
.slide.active .sl-cta.stagger,
.slide.active .sl-body .sl-cta {
  animation: ctaReveal 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.6s;
}
@keyframes countUp { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes growWidth { from { width: 0; } }
@keyframes pulse-node { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes dash-flow { 0% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -20; } }
@keyframes signal-pulse { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.6; } }
@keyframes rotate-slow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(254,58,31,0); } 50% { box-shadow: 0 0 20px 4px rgba(254,58,31,0.15); } }

.anim-pulse { animation: pulse-node 2.5s ease-in-out infinite; }
.anim-pulse-d1 { animation: pulse-node 2.5s ease-in-out infinite 0.8s; }
.anim-pulse-d2 { animation: pulse-node 2.5s ease-in-out infinite 1.6s; }
.anim-dash { animation: dash-flow 3s linear infinite; }
.anim-signal { animation: signal-pulse 2s ease-in-out infinite; }
.anim-signal-d1 { animation: signal-pulse 2s ease-in-out infinite 0.5s; }
.anim-signal-d2 { animation: signal-pulse 2s ease-in-out infinite 1s; }
.anim-rotate { animation: rotate-slow 20s linear infinite; }

.slide .top-bar { position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--red); }
.slide .left-bar { position: absolute; top: 0; left: 0; width: 5px; height: 100%; background: var(--red); }

/* ===== LAYOUTS ===== */
.slide.layout-illust-right { display: flex; }
.slide.layout-illust-right .sl-content { flex: 0 0 56%; display: flex; flex-direction: column; justify-content: center; padding: 5% 3% 5% 5.5%; }
.slide.layout-illust-right .sl-illust { flex: 1; display: flex; align-items: center; justify-content: center; padding: 4%; }

.slide.layout-illust-left { display: flex; flex-direction: row-reverse; }
.slide.layout-illust-left .sl-content { flex: 0 0 56%; display: flex; flex-direction: column; justify-content: center; padding: 5% 5.5% 5% 3%; }
.slide.layout-illust-left .sl-illust { flex: 1; display: flex; align-items: center; justify-content: center; padding: 4%; }

.slide.layout-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.slide.layout-center .sl-content { padding: 5%; max-width: 78%; display: flex; flex-direction: column; align-items: center; }

.slide.layout-bg-illust { display: flex; }
.slide.layout-bg-illust .sl-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 5% 5.5%; z-index: 2; position: relative; }
.slide.layout-bg-illust .sl-illust { position: absolute; right: -4%; top: 50%; transform: translateY(-50%); width: 55%; height: 80%; display: flex; align-items: center; justify-content: center; opacity: 0.07; z-index: 1; }
.slide.layout-bg-illust.theme-light .sl-illust { opacity: 0.04; }

.slide.layout-split { display: flex; }
.slide.layout-split .sl-accent-panel { flex: 0 0 38%; display: flex; align-items: center; justify-content: center; padding: 5%; position: relative; }
.slide.layout-split.theme-dark .sl-accent-panel { background: rgba(128,193,199,0.06); }
.slide.layout-split.theme-light .sl-accent-panel { background: #f4f5f7; }
.slide.layout-split .sl-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 5% 5.5%; }

.slide.layout-top-illust { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.slide.layout-top-illust .sl-illust { width: 18%; max-width: 160px; margin-bottom: 2%; display: flex; align-items: center; justify-content: center; }
.slide.layout-top-illust .sl-content { padding: 0 8%; max-width: 78%; display: flex; flex-direction: column; align-items: center; }

/* === LAYOUT: FULL-VISUAL (big SVG background, content overlay at bottom) === */
.slide.layout-full-visual { display: flex; flex-direction: column; justify-content: flex-end; }
.slide.layout-full-visual .sl-illust { position: absolute; top: 5%; left: 50%; transform: translateX(-50%); width: 50%; height: 55%; display: flex; align-items: center; justify-content: center; opacity: 0.12; z-index: 1; }
.slide.layout-full-visual .sl-content { z-index: 2; padding: 0 5.5% 7%; }

/* === LAYOUT: HERO (title slide with giant text + animated particles) === */
.slide.layout-hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.slide.layout-hero .sl-content {
  z-index: 2; padding: 5%; display: flex; flex-direction: column; align-items: center;
}
.slide.layout-hero .sl-overline {
  font-size: clamp(11px, 1.1vw, 18px); letter-spacing: 5px; margin-bottom: clamp(10px, 1.5vw, 24px);
}
.slide.layout-hero .sl-heading {
  font-size: clamp(48px, 6.5vw, 110px); line-height: 1.0; letter-spacing: -0.02em;
  margin-bottom: clamp(14px, 2vw, 32px);
}
.slide.layout-hero .sl-body {
  font-size: clamp(14px, 1.4vw, 24px); max-width: 600px; opacity: 0.6;
}
.slide.layout-hero .sl-date {
  position: absolute; bottom: clamp(40px, 5%, 64px); right: auto; left: 50%;
  transform: translateX(-50%);
}
/* Hero floating particles — soft glowing dots */
.hero-particles {
  position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none;
}
.hero-particle {
  position: absolute; border-radius: 50%; opacity: 0;
}
@keyframes particleFade {
  0%, 100% { opacity: 0; transform: scale(0.7) translateY(0); }
  30% { opacity: 1; transform: scale(1.1) translateY(-6px); }
  70% { opacity: 0.8; transform: scale(1.0) translateY(4px); }
}
.slide.active .hero-particle {
  animation-name: particleFade;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}

/* Hero connected node network */
.hero-network {
  position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none;
}
.hero-network svg { width: 100%; height: 100%; }

/* Nodes: fade in from nothing, settle at faint resting opacity */
@keyframes nodeAppear {
  0% { opacity: 0; r: 0; }
  50% { opacity: 0.4; r: calc(var(--node-r, 3) * 1.15); }
  100% { opacity: 0.2; r: var(--node-r, 3); }
}
/* Regular nodes: entrance then periodic ping when "receiving" data */
.slide.active .hero-network .hero-node {
  animation: nodeAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             nodePing var(--ping-dur, 5s) ease-in-out infinite var(--ping-del, 2s);
  --node-rest: 0.2;
  color: rgba(128,193,199,0.6);
}

/* Accent nodes: red glow ping (fires in first ~25%, rests remaining 75%) */
@keyframes nodeGlow {
  0% { opacity: 0.25; filter: drop-shadow(0 0 2px rgba(254,58,31,0.1)); }
  6% { opacity: 0.6; filter: drop-shadow(0 0 8px rgba(254,58,31,0.4)); }
  15% { opacity: 0.35; filter: drop-shadow(0 0 3px rgba(254,58,31,0.15)); }
  25%, 100% { opacity: 0.25; filter: drop-shadow(0 0 2px rgba(254,58,31,0.1)); }
}
.slide.active .hero-network .hero-node-accent {
  animation: nodeAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             nodeGlow var(--ping-dur, 4s) ease-in-out infinite var(--ping-del, 1.5s);
  color: rgba(254,58,31,0.5);
}

/* Edges: very subtle dashed line */
.slide.active .hero-network .hero-edge {
  opacity: 0.05;
  transition: opacity 0.3s;
}
.slide.active .hero-network .hero-edge-accent {
  opacity: 0.08;
}

/* Traveling signal dot */
@keyframes signalTravelFixed {
  0% { transform: translate(0, 0); opacity: 0; }
  5% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% { transform: translate(var(--tx), var(--ty)); opacity: 0; }
}
.hero-signal {
  opacity: 0;
}
.slide.active .hero-network .hero-signal {
  animation: signalTravelFixed var(--sig-dur, 1.5s) cubic-bezier(0.3, 0, 0.7, 1) infinite;
  animation-delay: var(--sig-del, 0s);
  filter: drop-shadow(0 0 2px currentColor);
}
/* Accent signals glow slightly brighter */
.slide.active .hero-network .hero-signal-accent {
  filter: drop-shadow(0 0 4px rgba(254,58,31,0.3));
}

/* Node receive ripple — faint expanding ring */
@keyframes nodeReceive {
  0% { r: var(--node-r, 3); opacity: 0; stroke-width: 1.5; }
  4% { opacity: 0.25; stroke-width: 1; }
  14% { r: calc(var(--node-r, 3) * 3.5); opacity: 0.05; stroke-width: 0.4; }
  20% { r: calc(var(--node-r, 3) * 4.5); opacity: 0; stroke-width: 0.2; }
  100% { opacity: 0; }
}
.hero-ripple {
  opacity: 0;
  fill: none;
}
.slide.active .hero-network .hero-ripple {
  animation: nodeReceive 14s ease-out infinite;
  animation-delay: var(--rip-del, 0s);
}

/* Node "ping" flash — subtle bright flash when receiving info */
@keyframes nodePing {
  0% { opacity: var(--node-rest, 0.2); r: var(--node-r, 3); filter: none; }
  5% { opacity: 0.5; r: calc(var(--node-r, 3) * 1.3); filter: drop-shadow(0 0 4px currentColor); }
  12% { opacity: 0.3; r: calc(var(--node-r, 3) * 1.1); filter: drop-shadow(0 0 1px currentColor); }
  20%, 100% { opacity: var(--node-rest, 0.2); r: var(--node-r, 3); filter: none; }
}

/* Concentric hexagonal rings — expanding outward with fade */
.hero-hex-rings {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.hero-hex-rings svg { width: 100%; height: 100%; }
@keyframes concentricExpand {
  0% { opacity: 0; transform: scale(0.5); }
  20% { opacity: 0.15; }
  70% { opacity: 0.06; }
  100% { opacity: 0; transform: scale(1.4); }
}
.slide.active .hero-hex-rings .hex-ring {
  animation: concentricExpand 7s ease-out infinite;
  transform-origin: center;
}

/* Center glow — radial halo behind hero content */
.hero-glow {
  position: absolute; z-index: 1; pointer-events: none;
  width: 60%; height: 60%; top: 20%; left: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254,58,31,0.04) 0%, rgba(128,193,199,0.03) 40%, transparent 70%);
  animation: heroGlowPulse 6s ease-in-out infinite;
}
.slide.theme-light .hero-glow {
  background: radial-gradient(circle, rgba(254,58,31,0.03) 0%, rgba(128,193,199,0.02) 40%, transparent 70%);
}
@keyframes heroGlowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* === HERO CONTENT ENTRANCE — more dramatic, slower stagger === */
.slide.layout-hero.active .sl-overline.stagger {
  animation: heroOverlineIn 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.3s;
}
@keyframes heroOverlineIn {
  0% { opacity: 0; letter-spacing: 16px; transform: translateY(10px); filter: blur(2px); }
  60% { filter: blur(0); }
  100% { opacity: 1; letter-spacing: 5px; transform: translateY(0); filter: blur(0); }
}

.slide.layout-hero.active .sl-heading.stagger {
  animation: heroHeadingIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.6s;
}
@keyframes heroHeadingIn {
  0% { opacity: 0; transform: scale(0.88) translateY(20px); filter: blur(3px); }
  50% { filter: blur(0); }
  70% { transform: scale(1.02) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.slide.layout-hero.active .sl-body.stagger {
  animation: heroBodyIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 1.0s;
}
@keyframes heroBodyIn {
  0% { opacity: 0; transform: translateY(14px); filter: blur(2px); }
  50% { filter: blur(0); }
  100% { opacity: 0.6; transform: translateY(0); filter: blur(0); }
}

.slide.layout-hero.active .sl-date {
  animation: heroDateIn 0.5s ease both;
  animation-delay: 1.3s;
  opacity: 0;
}
@keyframes heroDateIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === LAYOUT: ROADMAP (horizontal timeline) === */
/* === LAYOUT: ROADMAP (horizontal timeline with spotlight) === */
.slide.layout-roadmap { display: flex; flex-direction: column; }
.slide.layout-roadmap .sl-content { padding: 4% 5.5% 0; }
.roadmap-track {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 0 5.5%; position: relative; overflow: hidden;
}

/* Horizontal rail */
.roadmap-rail {
  position: relative; width: 100%; height: 4px; border-radius: 2px;
  background: rgba(128,193,199,0.1); margin-bottom: clamp(24px, 3vw, 48px);
}
.theme-light .roadmap-rail { background: rgba(0,0,0,0.05); }
.roadmap-rail-fill {
  position: absolute; top: 0; left: 0; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 60%, var(--blue) 100%);
}
/* Rail fill animation is in the Enhanced Component Animations section below */

/* Items row */
.roadmap-items {
  display: flex; width: 100%; position: relative;
}
.roadmap-item {
  flex: 1; display: flex; flex-direction: column; position: relative;
  padding: 0 clamp(4px, 0.8vw, 16px);
}

/* Dot on the rail */
.rm-dot-wrap {
  position: absolute; top: calc(-4px - clamp(24px, 3vw, 48px) - clamp(7px, 0.9vw, 13px));
  left: 50%; transform: translateX(-50%);
}
.rm-dot {
  width: clamp(16px, 1.8vw, 28px); height: clamp(16px, 1.8vw, 28px);
  border-radius: 50%; border: 3px solid rgba(128,193,199,0.3);
  position: relative; transition: all 0.5s;
}
.theme-dark .rm-dot { background: var(--midnight); }
.theme-light .rm-dot { background: var(--white); }
.roadmap-item.rm-active .rm-dot {
  background: var(--red); border-color: var(--red);
  box-shadow: 0 0 0 6px rgba(254,58,31,0.12), 0 0 24px rgba(254,58,31,0.2);
}
.rm-dot-ping {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--red); opacity: 0;
}
.slide.active .roadmap-item.rm-active .rm-dot-ping { animation: dotPing 2s ease-out infinite 1s; }
@keyframes dotPing {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Quarter label */
.rm-quarter {
  font-family: 'Oswald', sans-serif; font-weight: 700;
  font-size: clamp(22px, 2.8vw, 48px); text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 1;
  margin-bottom: clamp(4px, 0.5vw, 10px);
  transition: all 0.4s;
}
.theme-dark .rm-quarter { color: rgba(255,255,255,0.2); }
.theme-light .rm-quarter { color: rgba(0,0,0,0.12); }
.roadmap-item.rm-active .rm-quarter { color: var(--red); }
.theme-dark .roadmap-item.rm-past .rm-quarter { color: rgba(255,255,255,0.5); }
.theme-light .roadmap-item.rm-past .rm-quarter { color: var(--midnight); }

/* Description */
.rm-desc {
  font-family: 'Inter', sans-serif; font-weight: 400;
  font-size: clamp(10px, 1.05vw, 17px); line-height: 1.55;
  transition: all 0.4s;
}
.theme-dark .rm-desc { color: rgba(255,255,255,0.2); }
.theme-light .rm-desc { color: rgba(0,0,0,0.15); }
.roadmap-item.rm-active .rm-desc { font-weight: 500; }
.theme-dark .roadmap-item.rm-active .rm-desc { color: rgba(255,255,255,0.7); }
.theme-light .roadmap-item.rm-active .rm-desc { color: #374151; }
.theme-dark .roadmap-item.rm-past .rm-desc { color: rgba(255,255,255,0.4); }
.theme-light .roadmap-item.rm-past .rm-desc { color: #6b7280; }

/* Badge */
.rm-badge {
  display: inline-block; margin-top: clamp(6px, 0.6vw, 12px);
  padding: clamp(2px, 0.3vw, 4px) clamp(8px, 0.9vw, 16px); border-radius: 4px;
  font-family: 'Inter', sans-serif; font-size: clamp(8px, 0.7vw, 12px);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.rm-badge.badge-now { background: rgba(254,58,31,0.12); color: var(--red); }

/* Stagger entrance for roadmap items */
.slide.active .roadmap-item { animation: rmSlideIn 0.6s ease both; }
.slide.active .roadmap-item:nth-child(1) { animation-delay: 0.3s; }
.slide.active .roadmap-item:nth-child(2) { animation-delay: 0.5s; }
.slide.active .roadmap-item:nth-child(3) { animation-delay: 0.7s; }
.slide.active .roadmap-item:nth-child(4) { animation-delay: 0.9s; }
@keyframes rmSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === SVG DRAW-IN EFFECT (Category 5) === */
@keyframes svgDrawIn {
  from { stroke-dashoffset: var(--dash-length); opacity: 0.3; }
  to { stroke-dashoffset: 0; opacity: 1; }
}
/* Draw-in for illustration SVGs when slide becomes active */
.slide.active .sl-illust svg .draw-in {
  animation: svgDrawIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.slide.active .sl-illust svg .draw-in:nth-child(1) { animation-delay: 0.2s; }
.slide.active .sl-illust svg .draw-in:nth-child(2) { animation-delay: 0.3s; }
.slide.active .sl-illust svg .draw-in:nth-child(3) { animation-delay: 0.4s; }
.slide.active .sl-illust svg .draw-in:nth-child(4) { animation-delay: 0.5s; }
.slide.active .sl-illust svg .draw-in:nth-child(5) { animation-delay: 0.55s; }
.slide.active .sl-illust svg .draw-in:nth-child(6) { animation-delay: 0.6s; }
.slide.active .sl-illust svg .draw-in:nth-child(7) { animation-delay: 0.65s; }
.slide.active .sl-illust svg .draw-in:nth-child(8) { animation-delay: 0.7s; }
/* Also apply to split layout accent panel SVGs */
.slide.active .sl-accent-panel svg .draw-in {
  animation: svgDrawIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.slide.active .sl-accent-panel svg .draw-in:nth-child(n+1) { animation-delay: 0.2s; }
.slide.active .sl-accent-panel svg .draw-in:nth-child(n+3) { animation-delay: 0.4s; }
.slide.active .sl-accent-panel svg .draw-in:nth-child(n+5) { animation-delay: 0.6s; }

.sl-illust svg { width: 100%; height: 100%; max-width: 100%; max-height: 100%; }

/* ===== TYPOGRAPHY ===== */
.sl-overline {
  font-family: 'Inter', sans-serif; font-size: clamp(9px, 0.9vw, 14px);
  font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: clamp(6px, 0.8vw, 14px);
}
.theme-dark .sl-overline { color: var(--blue); }
.theme-light .sl-overline { color: var(--red); }

.sl-heading {
  font-family: 'Oswald', sans-serif; font-weight: 500;
  text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.1;
  margin-bottom: clamp(10px, 1.2vw, 22px);
}
.sl-heading.sz-lg { font-size: clamp(34px, 4.5vw, 76px); }
.sl-heading.sz-md { font-size: clamp(26px, 3vw, 52px); }
.sl-heading.sz-sm { font-size: clamp(20px, 2.2vw, 38px); }
.theme-dark .sl-heading { color: var(--white); }
.theme-light .sl-heading { color: var(--midnight); }
.sl-heading .accent { color: var(--red); }

.sl-body {
  font-family: 'Inter', sans-serif; font-weight: 300;
  font-size: clamp(12px, 1.2vw, 20px); line-height: 1.65; max-width: 560px;
}
.theme-dark .sl-body { color: rgba(255,255,255,0.55); }
.theme-light .sl-body { color: #6b7280; }
.sl-body strong { font-weight: 600; }
.theme-dark .sl-body strong { color: rgba(255,255,255,0.9); }
.theme-light .sl-body strong { color: var(--midnight); }

/* Bullet list styling */
.sl-body .sl-list {
  list-style: none; padding: 0; margin: 0;
}
.sl-body .sl-list li {
  position: relative; padding-left: 1.5em; margin-bottom: 0.6em;
}
.sl-body .sl-list li::before {
  content: ''; position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}
.sl-body .sl-list li:last-child { margin-bottom: 0; }

.sl-divider { width: 48px; height: 3px; background: var(--red); border-radius: 2px; margin: clamp(6px, 0.8vw, 14px) 0; }

/* ===== STATS ===== */
.stats-grid { display: grid; gap: clamp(8px, 1.2vw, 20px); margin-top: clamp(4px, 0.6vw, 12px); }
.stats-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.stats-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-card { border-radius: 10px; padding: clamp(12px, 1.6vw, 26px) clamp(10px, 1.2vw, 22px); }
.theme-dark .stat-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); }
.theme-light .stat-card { background: #f8f9fa; border: 1px solid var(--grey); }
.stat-number { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: clamp(24px, 2.8vw, 48px); color: var(--red); margin-bottom: 4px; }
.stat-label { font-family: 'Inter', sans-serif; font-size: clamp(10px, 0.85vw, 14px); font-weight: 400; line-height: 1.4; }
.theme-dark .stat-label { color: rgba(255,255,255,0.45); }
.theme-light .stat-label { color: #6b7280; }
/* Stat number animation is in the Enhanced Component Animations section below */

/* ===== ICON CARDS (theme boxes with emoji/icon) ===== */
.icon-cards { display: grid; gap: clamp(8px, 1vw, 16px); margin-top: clamp(8px, 1vw, 16px); }
.icon-cards.cols-2 { grid-template-columns: repeat(2, 1fr); }
.icon-cards.cols-4 { grid-template-columns: repeat(4, 1fr); }
.icon-card {
  border-radius: 10px; padding: clamp(14px, 1.6vw, 28px) clamp(12px, 1.4vw, 22px);
  position: relative; overflow: hidden;
}
.theme-dark .icon-card { background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06); }
.theme-light .icon-card { background: #f8f9fa; border: 1px solid rgba(0,0,0,0.06); }
.icon-card .ic-icon { font-size: clamp(20px, 2.2vw, 36px); margin-bottom: clamp(6px, 0.6vw, 12px); }
.icon-card .ic-title { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: clamp(13px, 1.2vw, 20px); text-transform: uppercase; margin-bottom: 4px; }
.theme-dark .icon-card .ic-title { color: var(--white); }
.theme-light .icon-card .ic-title { color: var(--midnight); }
.icon-card .ic-desc { font-size: clamp(10px, 0.85vw, 14px); font-weight: 300; line-height: 1.5; }
.theme-dark .icon-card .ic-desc { color: rgba(255,255,255,0.4); }
.theme-light .icon-card .ic-desc { color: #6b7280; }
.icon-card .ic-accent-line { position: absolute; top: 0; left: 0; width: 100%; height: 3px; border-radius: 10px 10px 0 0; }

/* ===== TIMELINE ===== */
.timeline { position: relative; margin-top: clamp(8px, 1vw, 16px); padding-left: clamp(24px, 2.5vw, 42px); }
.timeline::before {
  content: ''; position: absolute; left: clamp(6px, 0.7vw, 10px); top: 4px; bottom: 4px;
  width: 2px; background: rgba(128,193,199,0.2); border-radius: 1px;
}
.tl-item { position: relative; margin-bottom: clamp(10px, 1.4vw, 22px); }
.tl-item::before {
  content: ''; position: absolute; left: calc(-1 * clamp(24px, 2.5vw, 42px) + clamp(3px, 0.4vw, 7px));
  top: 6px; width: clamp(8px, 0.8vw, 12px); height: clamp(8px, 0.8vw, 12px);
  border-radius: 50%; border: 2px solid var(--blue); background: var(--midnight);
}
.tl-item.tl-active::before { background: var(--red); border-color: var(--red); animation: glowPulse 2s infinite; }
.tl-item .tl-label {
  font-family: 'Oswald', sans-serif; font-weight: 500;
  font-size: clamp(13px, 1.3vw, 22px); text-transform: uppercase; color: var(--white);
}
.tl-item.tl-active .tl-label { color: var(--red); }
.theme-light .tl-item .tl-label { color: var(--midnight); }
.theme-light .tl-item.tl-active .tl-label { color: var(--red); }
.tl-item .tl-desc { font-size: clamp(10px, 0.85vw, 14px); font-weight: 300; line-height: 1.5; margin-top: 2px; }
.theme-dark .tl-item .tl-desc { color: rgba(255,255,255,0.4); }
.theme-light .tl-item .tl-desc { color: #6b7280; }
.theme-light .timeline::before { background: rgba(0,0,0,0.08); }
.theme-light .tl-item::before { background: var(--white); border-color: var(--grey); }
.theme-light .tl-item.tl-active::before { background: var(--red); border-color: var(--red); }

/* ===== PROGRESS BARS ===== */
.progress-list { margin-top: clamp(8px, 1vw, 16px); display: flex; flex-direction: column; gap: clamp(8px, 1vw, 14px); width: 100%; }
.progress-item { display: flex; align-items: center; gap: clamp(8px, 1vw, 16px); }
.progress-label { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: clamp(11px, 1vw, 16px); text-transform: uppercase; min-width: clamp(80px, 10vw, 160px); }
.theme-dark .progress-label { color: rgba(255,255,255,0.7); }
.theme-light .progress-label { color: var(--midnight); }
.progress-bar-bg { flex: 1; height: clamp(6px, 0.6vw, 10px); border-radius: 5px; overflow: hidden; }
.theme-dark .progress-bar-bg { background: rgba(255,255,255,0.06); }
.theme-light .progress-bar-bg { background: var(--grey); }
.progress-bar-fill { height: 100%; border-radius: 5px; background: var(--red); }
.slide.active .progress-bar-fill { animation: growWidth 1s ease both; }
.slide.active .progress-item:nth-child(1) .progress-bar-fill { animation-delay: 0.2s; }
.slide.active .progress-item:nth-child(2) .progress-bar-fill { animation-delay: 0.35s; }
.slide.active .progress-item:nth-child(3) .progress-bar-fill { animation-delay: 0.5s; }
.slide.active .progress-item:nth-child(4) .progress-bar-fill { animation-delay: 0.65s; }
.progress-pct { font-family: 'Oswald', sans-serif; font-size: clamp(11px, 1vw, 16px); font-weight: 500; min-width: 36px; text-align: right; }
.theme-dark .progress-pct { color: rgba(255,255,255,0.4); }
.theme-light .progress-pct { color: #6b7280; }

/* ===== QUOTE / HIGHLIGHT BOX ===== */
.sl-quote {
  border-left: 3px solid var(--red); padding: clamp(10px, 1.2vw, 20px) clamp(14px, 1.6vw, 28px);
  margin-top: clamp(8px, 1vw, 16px); border-radius: 0 8px 8px 0;
  font-size: clamp(13px, 1.3vw, 22px); font-weight: 300; font-style: italic; line-height: 1.5;
}
.theme-dark .sl-quote { background: rgba(254,58,31,0.04); color: rgba(255,255,255,0.65); }
.theme-light .sl-quote { background: rgba(254,58,31,0.03); color: #4b5563; }

/* ===== CTA ===== */
.sl-cta {
  display: inline-block; margin-top: clamp(8px, 1vw, 18px);
  padding: clamp(8px, 1vw, 16px) clamp(18px, 2.5vw, 40px);
  background: var(--red); color: white;
  font-family: 'Oswald', sans-serif; font-size: clamp(12px, 1.1vw, 18px);
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
  border-radius: 8px; text-decoration: none;
}

/* ===== DATE ===== */
.sl-date {
  position: absolute; bottom: clamp(32px, 4%, 52px); right: 5.5%;
  font-size: clamp(10px, 0.8vw, 14px); font-weight: 400; padding: 6px 14px; border-radius: 5px;
}
.theme-dark .sl-date { color: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.08); }
.theme-light .sl-date { color: rgba(0,0,0,0.25); border: 1px solid rgba(0,0,0,0.06); }

/* ===== FOOTER ===== */
.sl-footer {
  position: absolute; bottom: 0; left: 0; right: 0; height: 28px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  font-size: clamp(6px, 0.5vw, 8px); font-weight: 300; text-transform: uppercase; letter-spacing: 0.5px;
}
.theme-dark .sl-footer { color: rgba(255,255,255,0.15); }
.theme-light .sl-footer { color: rgba(0,0,0,0.12); }

/* ===== NAV ===== */
.nav-bar { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.nav-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.4); font-size: 15px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.nav-btn:hover { border-color: var(--red); color: white; background: rgba(254,58,31,0.1); }
.slide-dots { display: flex; gap: 5px; max-width: 400px; flex-wrap: wrap; justify-content: center; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.15); cursor: pointer; transition: all 0.3s; }
.dot.active { background: var(--red); width: 18px; border-radius: 4px; }
.slide-counter { font-size: 11px; color: rgba(255,255,255,0.3); min-width: 44px; text-align: center; }
.nav-extra { display: flex; gap: 8px; margin-left: 10px; }
.nav-extra .btn { padding: 7px 14px; font-size: 11px; }
.key-hint { position: fixed; bottom: 8px; right: 16px; font-size: 9px; color: rgba(255,255,255,0.1); }

/* === GEOMETRIC SLIDE BACKGROUNDS (Category 1) === */
.slide-geo-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  opacity: 0.03;
}
.slide.theme-light .slide-geo-bg { opacity: 0.02; }
.slide-geo-bg svg { width: 100%; height: 100%; }
@keyframes geoRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes geoPulse {
  0%, 100% { opacity: 0.3; r: 2; }
  50% { opacity: 1; r: 3.5; }
}
.slide-geo-bg .geo-rotate {
  animation: geoRotate 120s linear infinite;
  transform-origin: center;
}
.slide.active .slide-geo-bg .geo-pulse {
  animation: geoPulse 8s ease-in-out infinite;
}
/* Ensure slide content stays above geo bg */
.slide .sl-content { position: relative; z-index: 2; }
.slide .sl-illust { position: relative; z-index: 2; }
.slide .sl-accent-panel { z-index: 2; }
.slide .top-bar { z-index: 3; }
.slide .left-bar { z-index: 3; }
.slide .sl-footer { z-index: 3; }
.slide .sl-date { z-index: 3; }

/* === AMBIENT EFFECTS (Category 6) === */
.slide-ambient-gradient {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
.slide-ambient-gradient::before,
.slide-ambient-gradient::after {
  content: '';
  position: absolute; border-radius: 50%;
}
.slide-ambient-gradient::before {
  width: 60%; height: 60%; top: -10%; left: -15%;
  background: radial-gradient(circle, rgba(128,193,199,0.04) 0%, transparent 70%);
  animation: ambientShift 12s ease-in-out infinite alternate;
}
.slide-ambient-gradient::after {
  width: 50%; height: 50%; bottom: -10%; right: -10%;
  background: radial-gradient(circle, rgba(254,58,31,0.03) 0%, transparent 70%);
  animation: ambientShift 12s ease-in-out infinite alternate-reverse;
}
.slide.theme-light .slide-ambient-gradient::before {
  background: radial-gradient(circle, rgba(128,193,199,0.03) 0%, transparent 70%);
}
.slide.theme-light .slide-ambient-gradient::after {
  background: radial-gradient(circle, rgba(254,58,31,0.02) 0%, transparent 70%);
}
@keyframes ambientShift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4%, 3%) scale(1.08); }
}

/* Floating geometric shapes */
.ambient-shape {
  position: absolute; z-index: 1; pointer-events: none;
  opacity: 0.04;
}
.slide.theme-light .ambient-shape { opacity: 0.025; }
@keyframes floatShape1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(8px, -12px) rotate(15deg); }
  66% { transform: translate(-5px, 6px) rotate(-8deg); }
}
@keyframes floatShape2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-10px, -8px) rotate(-20deg); }
}
@keyframes floatShape3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(6px, 10px) rotate(12deg); }
  75% { transform: translate(-8px, -4px) rotate(-10deg); }
}

/* === ENHANCED COMPONENT ANIMATIONS (Category 7) === */

/* Stat numbers: scale from small + blur clearing + bounce */
@keyframes statReveal {
  0% { opacity: 0; transform: scale(0.6); filter: blur(4px); }
  60% { opacity: 1; transform: scale(1.05); filter: blur(0px); }
  80% { transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); filter: blur(0px); }
}
.slide.active .stat-number {
  animation: statReveal 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Stat card: border glows red during entrance, then settles */
@keyframes statCardEntrance {
  0% { opacity: 0; transform: translateY(14px); border-color: rgba(254,58,31,0); }
  40% { opacity: 1; border-color: rgba(254,58,31,0.4); box-shadow: 0 0 12px 0 rgba(254,58,31,0.1); }
  100% { opacity: 1; transform: translateY(0); border-color: rgba(255,255,255,0.06); box-shadow: none; }
}
.slide.active .stat-card {
  animation: statCardEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.slide.active .stat-card:nth-child(1) { animation-delay: 0.15s; }
.slide.active .stat-card:nth-child(2) { animation-delay: 0.25s; }
.slide.active .stat-card:nth-child(3) { animation-delay: 0.35s; }
.slide.active .stat-card:nth-child(4) { animation-delay: 0.45s; }

/* Progress bar shimmer sweep after fill */
@keyframes progressShimmer {
  0% { left: -40%; }
  100% { left: 140%; }
}
.progress-bar-fill { position: relative; overflow: hidden; }
.slide.active .progress-bar-fill::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 40%; left: -40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: progressShimmer 0.8s ease 1.2s both;
}

/* Icon card accent line: scaleX grow from left */
@keyframes accentLineGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.slide.active .icon-card .ic-accent-line {
  transform-origin: left;
  animation: accentLineGrow 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.slide.active .icon-card:nth-child(1) .ic-accent-line { animation-delay: 0.2s; }
.slide.active .icon-card:nth-child(2) .ic-accent-line { animation-delay: 0.3s; }
.slide.active .icon-card:nth-child(3) .ic-accent-line { animation-delay: 0.4s; }
.slide.active .icon-card:nth-child(4) .ic-accent-line { animation-delay: 0.5s; }

/* Icon card emoji: bounce-in with spring */
@keyframes iconBounce {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.15); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}
.slide.active .icon-card .ic-icon {
  animation: iconBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.slide.active .icon-card:nth-child(1) .ic-icon { animation-delay: 0.25s; }
.slide.active .icon-card:nth-child(2) .ic-icon { animation-delay: 0.35s; }
.slide.active .icon-card:nth-child(3) .ic-icon { animation-delay: 0.45s; }
.slide.active .icon-card:nth-child(4) .ic-icon { animation-delay: 0.55s; }

/* Roadmap rail: glow pulse after fill */
@keyframes railGlow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 16px 2px rgba(254,58,31,0.2), 0 0 4px 1px rgba(128,193,199,0.15); }
}
.slide.active .roadmap-rail-fill {
  animation: growWidth 1.4s cubic-bezier(0.4,0,0.2,1) both 0.2s, railGlow 2s ease 1.6s infinite;
}

/* Roadmap dots: scale from 0 with bounce, staggered */
@keyframes dotScaleIn {
  0% { opacity: 0; transform: translateX(-50%) scale(0); }
  60% { opacity: 1; transform: translateX(-50%) scale(1.2); }
  80% { transform: translateX(-50%) scale(0.9); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}
.slide.active .rm-dot-wrap {
  animation: dotScaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.slide.active .roadmap-item:nth-child(1) .rm-dot-wrap { animation-delay: 0.4s; }
.slide.active .roadmap-item:nth-child(2) .rm-dot-wrap { animation-delay: 0.6s; }
.slide.active .roadmap-item:nth-child(3) .rm-dot-wrap { animation-delay: 0.8s; }
.slide.active .roadmap-item:nth-child(4) .rm-dot-wrap { animation-delay: 1.0s; }

/* Timeline line: clip-path draws downward */
@keyframes tlLineGrow {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}
.slide.active .timeline::before {
  animation: tlLineGrow 0.8s cubic-bezier(0.4, 0, 0.2, 1) both 0.2s;
}

/* Timeline dots: scale from 0 with overshoot */
@keyframes tlDotReveal {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  80% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.slide.active .tl-item::before {
  animation: tlDotReveal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.slide.active .tl-item:nth-child(1)::before { animation-delay: 0.3s; }
.slide.active .tl-item:nth-child(2)::before { animation-delay: 0.45s; }
.slide.active .tl-item:nth-child(3)::before { animation-delay: 0.6s; }
.slide.active .tl-item:nth-child(4)::before { animation-delay: 0.75s; }
.slide.active .tl-item:nth-child(5)::before { animation-delay: 0.9s; }

/* ===== IMAGE IN ILLUSTRATION SLOT ===== */
.sl-image img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 8px;
}

/* ===== LAYOUT: BG-IMAGE (full-bleed background photo) ===== */
.slide.layout-bg-image { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sl-bg-image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
}
.sl-bg-image-overlay {
  position: absolute; inset: 0; z-index: 1;
}
.slide.theme-dark .sl-bg-image-overlay {
  background: linear-gradient(135deg, rgba(8,22,43,0.88) 0%, rgba(8,22,43,0.55) 100%);
}
.slide.theme-light .sl-bg-image-overlay {
  background: linear-gradient(135deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.7) 100%);
}
.slide.layout-bg-image .sl-content {
  position: relative; z-index: 2; padding: 5%; max-width: 78%;
  display: flex; flex-direction: column; align-items: center;
}

/* ===== LAYOUT: TWO-COL ===== */
.sl-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  align-content: center; padding: 5% 5.5%;
}
.sl-two-col .sl-heading { grid-column: 1 / -1; }
.sl-two-col .sl-overline { grid-column: 1 / -1; }
.sl-two-col .sl-divider { grid-column: 1 / -1; }
.sl-two-col .sl-body { grid-column: 1 / -1; }
.sl-two-col .sl-feature-list { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; }
.sl-two-col .sl-tag-grid { grid-column: 1 / -1; }
.slide.layout-two-col { display: flex; }

/* ===== FEATURE LIST ===== */
.sl-feature-list { display: flex; flex-direction: column; gap: 12px; }
.sl-feature-item { display: flex; align-items: flex-start; gap: 12px; }
.sl-feature-arrow {
  flex-shrink: 0; width: clamp(24px, 2.2vw, 36px); height: clamp(24px, 2.2vw, 36px);
  background: var(--red); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.sl-feature-arrow svg { width: 55%; height: 55%; }
.sl-feature-item strong {
  font-family: 'Oswald', sans-serif; font-weight: 500; text-transform: uppercase;
  font-size: clamp(13px, 1.2vw, 20px);
}
.theme-dark .sl-feature-item strong { color: var(--white); }
.theme-light .sl-feature-item strong { color: var(--midnight); }
.sl-feature-desc {
  color: rgba(255,255,255,0.5); margin-left: 8px;
  font-size: clamp(11px, 1vw, 16px); font-weight: 300;
}
.theme-light .sl-feature-desc { color: #6b7280; }

/* ===== TAG/PILL GRID ===== */
.sl-tag-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(8px, 1vw, 16px); }
.sl-tag {
  padding: 8px 16px; border-radius: 20px;
  font-size: clamp(11px, 0.9vw, 15px); font-weight: 400;
  white-space: nowrap;
}
.theme-dark .sl-tag { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }
.theme-light .sl-tag { background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.08); color: #374151; }
.sl-tag-label { font-weight: 600; color: var(--blue); margin-right: 6px; }
.theme-light .sl-tag-label { color: var(--red); }

/* ===== IMAGE CARD GRID ===== */
.sl-image-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.2vw, 16px); margin-top: clamp(8px, 1vw, 16px); width: 100%; }
.sl-image-card { border-radius: 8px; overflow: hidden; min-width: 0; }
.theme-dark .sl-image-card { border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); }
.theme-light .sl-image-card { border: 1px solid rgba(0,0,0,0.06); background: #f8f9fa; }
.sl-image-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.sl-image-card-caption { padding: 6px 10px; font-size: clamp(9px, 0.75vw, 13px); text-align: center; }
.theme-dark .sl-image-card-caption { color: rgba(255,255,255,0.5); }
.theme-light .sl-image-card-caption { color: #6b7280; }

/* ===== NEW CONTENT TYPE ANIMATIONS ===== */
/* Feature list items: staggered fade-in */
@keyframes featureSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
.slide.active .sl-feature-item {
  animation: featureSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.slide.active .sl-feature-item:nth-child(1) { animation-delay: 0.2s; }
.slide.active .sl-feature-item:nth-child(2) { animation-delay: 0.3s; }
.slide.active .sl-feature-item:nth-child(3) { animation-delay: 0.4s; }
.slide.active .sl-feature-item:nth-child(4) { animation-delay: 0.5s; }
.slide.active .sl-feature-item:nth-child(5) { animation-delay: 0.55s; }
.slide.active .sl-feature-item:nth-child(6) { animation-delay: 0.6s; }

/* Tags: staggered scale-in */
@keyframes tagScaleIn {
  0% { opacity: 0; transform: scale(0.8); }
  60% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
.slide.active .sl-tag {
  animation: tagScaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.slide.active .sl-tag:nth-child(1) { animation-delay: 0.15s; }
.slide.active .sl-tag:nth-child(2) { animation-delay: 0.2s; }
.slide.active .sl-tag:nth-child(3) { animation-delay: 0.25s; }
.slide.active .sl-tag:nth-child(4) { animation-delay: 0.3s; }
.slide.active .sl-tag:nth-child(5) { animation-delay: 0.35s; }
.slide.active .sl-tag:nth-child(6) { animation-delay: 0.4s; }
.slide.active .sl-tag:nth-child(7) { animation-delay: 0.45s; }
.slide.active .sl-tag:nth-child(8) { animation-delay: 0.5s; }

/* Image cards: staggered fade-up */
@keyframes imageCardFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.slide.active .sl-image-card {
  animation: imageCardFadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.slide.active .sl-image-card:nth-child(1) { animation-delay: 0.2s; }
.slide.active .sl-image-card:nth-child(2) { animation-delay: 0.3s; }
.slide.active .sl-image-card:nth-child(3) { animation-delay: 0.4s; }
.slide.active .sl-image-card:nth-child(4) { animation-delay: 0.5s; }

/* bg-image overlay entrance */
.slide.layout-bg-image.active .sl-bg-image {
  animation: bgImageReveal 1.2s ease both;
}
@keyframes bgImageReveal {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .deck-container {
    width: 96vw; max-width: calc(84vh * 16 / 9);
  }
}
@media (max-width: 768px) {
  /* Faster fade on mobile */
  .slide { transition: opacity 0.4s ease !important; }
  /* Hide ambient shapes on mobile */
  .ambient-shape { display: none !important; }

  body { overflow: hidden; height: 100vh; height: 100dvh; }
  #editor-panel { padding: 16px; }
  textarea#md-input { width: 100%; height: 240px; font-size: 12px; padding: 12px; }
  .editor-help { font-size: 9px; }
  .editor-actions { flex-wrap: wrap; justify-content: center; }

  #presentation {
    height: 100vh; height: 100dvh;
    padding: 0; display: none; flex-direction: column;
  }
  #presentation.active { display: flex; }

  .deck-container {
    width: 100vw !important; height: calc(100dvh - 60px) !important;
    max-height: none !important; max-width: none !important;
    border-radius: 0; flex-shrink: 0;
  }
  /* Slides use inset:0 so they fill whatever the container is. 
     On mobile the container is full-width and nearly full-height.
     Content may be slightly letterboxed but everything stays proportional
     because all sizing uses vw-based clamp(). */

  .nav-bar {
    height: 60px; min-height: 60px;
    gap: 10px; margin-top: 0; padding: 0 16px;
    flex-wrap: nowrap; justify-content: center; align-items: center;
    background: var(--midnight);
  }
  .nav-btn {
    width: 44px !important; height: 44px !important; font-size: 18px !important;
    flex-shrink: 0;
  }
  .slide-dots { gap: 4px; max-width: 160px; flex-shrink: 1; }
  .dot { width: 7px; height: 7px; }
  .dot.active { width: 18px; }
  .slide-counter { font-size: 11px; min-width: 40px; }
  .nav-extra .btn { padding: 8px 14px; font-size: 11px; }
  .key-hint { display: none; }

  /* Slightly reduce font/spacing to fit portrait aspect ratio */
  .sl-heading.sz-lg { font-size: clamp(24px, 5vw, 52px); }
  .sl-heading.sz-md { font-size: clamp(20px, 4.2vw, 40px); }
  .sl-heading.sz-sm { font-size: clamp(16px, 3.5vw, 32px); }
  .sl-body { font-size: clamp(11px, 2.5vw, 16px); }
  .sl-overline { font-size: clamp(7px, 1.5vw, 11px); }
  .sl-quote { font-size: clamp(11px, 2.5vw, 16px); padding: 8px 14px; }

  /* Hero on mobile */
  .slide.layout-hero .sl-heading { font-size: clamp(28px, 7vw, 56px) !important; }
  .slide.layout-hero .sl-overline { font-size: clamp(9px, 2vw, 14px) !important; }
  .slide.layout-hero .sl-body { font-size: clamp(12px, 2.8vw, 18px) !important; }

  /* Stack side-by-side layouts */
  .slide.layout-illust-right,
  .slide.layout-illust-left { flex-direction: column !important; }
  .slide.layout-illust-right .sl-content,
  .slide.layout-illust-left .sl-content {
    flex: 1 !important; padding: 6% 6% 2% !important;
  }
  .slide.layout-illust-right .sl-illust,
  .slide.layout-illust-left .sl-illust {
    flex: 0 0 30% !important; padding: 0 25% !important;
  }

  .slide.layout-split { flex-direction: column !important; }
  .slide.layout-split .sl-accent-panel { flex: 0 0 30% !important; padding: 3% !important; }
  .slide.layout-split .sl-content { flex: 1 !important; padding: 3% 6% !important; }

  .slide.layout-center .sl-content { max-width: 92% !important; }
  .slide.layout-top-illust .sl-illust { width: 18% !important; }
  .slide.layout-top-illust .sl-content { max-width: 90% !important; }

  /* Icon cards 2-col on mobile */
  .icon-cards.cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .icon-card { padding: 10px !important; }
  .icon-card .ic-icon { font-size: 18px !important; }
  .icon-card .ic-title { font-size: clamp(10px, 2.2vw, 14px) !important; }
  .icon-card .ic-desc { font-size: clamp(8px, 1.8vw, 11px) !important; }

  /* Stats 2-col */
  .stats-grid.cols-3, .stats-grid.cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .stat-number { font-size: clamp(18px, 4.5vw, 32px) !important; }
  .stat-label { font-size: clamp(8px, 1.8vw, 11px) !important; }

  /* Progress bars */
  .progress-label { font-size: clamp(9px, 2vw, 13px) !important; min-width: 70px !important; }
  .progress-pct { font-size: clamp(9px, 2vw, 13px) !important; }

  /* Roadmap on mobile */
  .roadmap-track { padding: 0 3%; }
  .rm-quarter { font-size: clamp(14px, 3.8vw, 24px) !important; }
  .rm-desc { font-size: clamp(8px, 1.8vw, 12px) !important; }
  .rm-dot { width: 12px !important; height: 12px !important; }
  .rm-badge { font-size: 7px !important; }

  /* Two-col: stack to single column on mobile */
  .sl-two-col { grid-template-columns: 1fr !important; gap: 16px !important; }
  .sl-two-col .sl-feature-list { grid-template-columns: 1fr !important; }

  /* Image card grid: single column on mobile */
  .sl-image-cards { grid-template-columns: 1fr !important; }

  /* Tags: smaller pills on mobile */
  .sl-tag { padding: 6px 12px !important; font-size: clamp(9px, 2vw, 13px) !important; }

  /* Feature list: tighter spacing */
  .sl-feature-item { gap: 8px !important; }
  .sl-feature-item strong { font-size: clamp(11px, 2.5vw, 16px) !important; }
  .sl-feature-desc { font-size: clamp(9px, 2vw, 13px) !important; }

  /* bg-image layout on mobile */
  .slide.layout-bg-image .sl-content { max-width: 92% !important; }

  /* Footer */
  .sl-footer { height: 20px; font-size: 5px; }
  .sl-date { font-size: 8px; padding: 3px 8px; }
}

@media (max-width: 380px) {
  .sl-heading.sz-lg { font-size: clamp(20px, 5.5vw, 36px); }
  .icon-cards.cols-4, .icon-cards.cols-2 { grid-template-columns: 1fr !important; }
}

/* ===== PRINT / PDF EXPORT ===== */
@media print {
  @page { size: landscape; margin: 0; }

  /* Force background colors/images to print */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  /* Hide all page chrome */
  .site-header, .nav-bar, .demo-actions, .demo-subtitle, .slide-label,
  .controls-bar, .thumb-panel, .presenter-layout > :not(.main-area),
  .preview-nav, .preview-controls, .edit-panel, .edit-footer,
  .viewer-panel, .key-hints, .thumb-toggle, .presenter-header,
  #loading, .slide-dots, .slide-counter { display: none !important; }

  /* Reset body */
  body {
    overflow: visible !important; height: auto !important;
    background: none !important; background-image: none !important;
  }

  /* Show ALL slides in sequence — high specificity to beat inline <style> blocks */
  .deck-container, .preview-deck,
  .main-area .deck-container {
    position: static !important; width: 100vw !important; height: auto !important;
    max-width: none !important; max-height: none !important;
    box-shadow: none !important; border-radius: 0 !important; overflow: visible !important;
  }

  /* Override every specificity variant used across pages.
     Use aspect-ratio to maintain 16:9 regardless of paper size. */
  .slide,
  .deck-container .slide,
  .main-area .deck-container .slide,
  .preview-deck .slide {
    position: relative !important; inset: auto !important;
    opacity: 1 !important; pointer-events: auto !important;
    width: 100vw !important; height: auto !important;
    aspect-ratio: 16 / 9;
    page-break-after: always; break-after: page;
    page-break-inside: avoid; break-inside: avoid;
    overflow: hidden !important;
    transition: none !important;
  }
  .slide:last-child,
  .deck-container .slide:last-child { page-break-after: auto; break-after: auto; }

  /* Hide decorative elements that don't print well */
  .slide-geo-bg, .slide-ambient-gradient, .ambient-shape,
  .hero-particles, .hero-hex-rings, .hero-glow { display: none !important; }

  /* Freeze all animations */
  *, *::before, *::after {
    animation: none !important; transition: none !important;
  }

  /* Make stagger/animated elements visible — only reset opacity, NOT transform
     (many elements use transform for positioning like translateX(-50%)) */
  .stagger, .sl-feature-item, .sl-tag, .sl-image-card,
  .stat-card, .icon-card, .tl-item, .progress-item,
  .roadmap-item, .sl-overline, .sl-heading, .sl-body,
  .sl-date, .sl-divider, .sl-quote, .sl-cta,
  .rm-dot-wrap, .ic-accent-line, .ic-icon {
    opacity: 1 !important;
  }

  /* SVG draw-in: show fully drawn strokes */
  .draw-in {
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
  }

  /* Progress bar fills: ensure they show at their inline width */
  .progress-bar-fill {
    opacity: 1 !important;
  }
  /* Kill the shimmer pseudo-element */
  .progress-bar-fill::after {
    display: none !important;
  }

  /* Ensure hero network SVG prints */
  .hero-network { opacity: 1 !important; }

  /* Demo page wrapper */
  .demo-wrap {
    height: auto !important; padding: 0 !important;
    display: block !important;
  }

  /* Presenter page layout */
  .presenter-layout { display: block !important; height: auto !important; }
  .main-area { display: block !important; padding: 0 !important; }
}
