/* Voidfall Pitch Deck — Base Theme */

@font-face {
  font-family: 'Major Mono Display';
  src: url('../assets/fonts/MajorMonoDisplay-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050816;
  --bg-panel: rgba(8, 16, 36, 0.92);
  --player: #00E6FF;
  --player-alt: #00BFFF;
  --enemy: #FF4D4D;
  --enemy-alt: #FF6633;
  --xp: #FFD84D;
  --xp-alt: #FFCC00;
  --hazard: #A855F7;
  --hazard-alt: #7C3AED;
  --ui-cyan: rgba(0, 230, 255, 0.75);
  --ui-white: #f4f8ff;
  --text-body: #e8eef8;
  --text-muted: #b8c8dc;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Major Mono Display', monospace;
  --glow-cyan: 0 0 12px rgba(0, 230, 255, 0.35);
  --glow-cyan-strong: 0 0 20px rgba(0, 230, 255, 0.5), 0 0 40px rgba(0, 191, 255, 0.25);
  --glow-red: 0 0 16px rgba(255, 77, 77, 0.45);
  --glow-gold: 0 0 14px rgba(255, 216, 77, 0.4);
  --glow-purple: 0 0 18px rgba(168, 85, 247, 0.45);
  --transition: 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  --slide-pad-x: clamp(2.5rem, 5vw, 4.5rem);
  --slide-pad-y: clamp(1.75rem, 3.5vh, 2.75rem);
  --nav-reserve: 3.5rem;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Deck container ── */

.deck {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ── Global background layers ── */

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0, 100, 180, 0.06) 0%, transparent 70%),
    linear-gradient(rgba(0, 230, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 230, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 60px 60px, 60px 60px;
  background-position: center, center, center;
}

.grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, var(--bg) 100%);
}

.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--player);
  border-radius: 50%;
  opacity: 0;
  animation: particle-float linear infinite;
}

/* ── Slides ── */

.slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding:
    var(--slide-pad-y)
    var(--slide-pad-x)
    calc(var(--slide-pad-y) + var(--nav-reserve));
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

.slide.prev {
  opacity: 0;
  transform: scale(1.02);
}

/* ── Typography ── */

.font-display {
  font-family: var(--font-display);
}

.slide-title {
  font-family: var(--font-body);
  font-size: clamp(2.4rem, 5vh, 3.6rem);
  font-weight: 700;
  color: var(--ui-white);
  text-shadow: none;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: clamp(0.65rem, 1.4vh, 1rem);
  line-height: 1.2;
  flex-shrink: 0;
  padding-left: 0.85rem;
  border-left: 3px solid var(--player);
}

.slide:not(.title-slide):not(.closing-slide) .slide-title {
  margin-bottom: clamp(0.5rem, 1vh, 0.75rem);
}

.slide-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.slide-title--hero {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vh, 5.5rem);
  font-weight: normal;
  color: var(--player);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: none;
  margin-bottom: 0.4rem;
  padding-left: 0;
  border-left: none;
}

.slide-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2vh, 1.45rem);
  font-weight: 500;
  color: var(--text-body);
  letter-spacing: 0.01em;
  text-transform: none;
  margin-bottom: clamp(1rem, 2vh, 1.5rem);
}

.slide-body {
  font-size: clamp(1.35rem, 2.5vh, 1.7rem);
  line-height: 1.55;
  color: var(--text-body);
  max-width: 54rem;
  flex-shrink: 1;
  min-height: 0;
}

.slide-body p {
  margin-bottom: 0.75rem;
}

.slide-body ul {
  list-style: none;
  padding: 0;
}

.slide-body li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.slide-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: rgba(0, 230, 255, 0.7);
  box-shadow: none;
}

.slide-body em {
  font-style: normal;
  font-weight: 600;
  color: var(--ui-white);
}

.slide-body strong {
  font-weight: 600;
  color: var(--ui-white);
}

.slide-body code {
  font-family: var(--font-display);
  font-size: 0.9em;
  color: var(--text-body);
  background: rgba(0, 230, 255, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  border: 1px solid rgba(0, 230, 255, 0.15);
}

/* ── HUD panels ── */

.hud-panel {
  background: var(--bg-panel);
  border: 1px solid rgba(0, 230, 255, 0.28);
  border-radius: 6px;
  padding: clamp(0.75rem, 1.4vh, 1rem) clamp(1rem, 1.8vw, 1.35rem);
  box-shadow: none;
  flex-shrink: 0;
}

.hud-panel--gold {
  border-color: rgba(255, 216, 77, 0.35);
  box-shadow: none;
}

.pull-quote {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.2vh, 1.5rem);
  font-weight: 500;
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0;
  line-height: 1.5;
  margin-top: clamp(0.75rem, 1.5vh, 1rem);
  padding: 0.65rem 0 0.65rem 1rem;
  border-left: 2px solid rgba(0, 230, 255, 0.4);
  flex-shrink: 0;
}

.pull-quote--inline {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  border-left: none;
  padding: 0.5rem 0 0;
  font-style: italic;
}

/* ── Tech badges ── */

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.tech-badge {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.4vh, 1rem);
  font-weight: 600;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(0, 230, 255, 0.3);
  border-radius: 3px;
  color: var(--text-body);
  letter-spacing: 0.01em;
  text-transform: none;
  background: rgba(0, 230, 255, 0.06);
}

/* ── Navigation UI ── */

.nav-ui {
  position: fixed;
  bottom: clamp(1rem, 2vh, 1.5rem);
  right: clamp(1rem, 2vw, 2rem);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slide-counter {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.nav-dots {
  display: flex;
  gap: 0.4rem;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--ui-cyan);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav-dot.active {
  background: var(--player);
  box-shadow: 0 0 6px rgba(0, 230, 255, 0.4);
}

.nav-dot:hover {
  background: rgba(0, 230, 255, 0.4);
}

.click-zone {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 30%;
  z-index: 50;
  cursor: pointer;
}

.click-zone--left { left: 0; }
.click-zone--right { right: 0; }

/* ── Layout helpers ── */

.slide-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.slide--split .slide-split {
  align-items: center;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.85rem, 1.5vw, 1.5rem);
  width: 100%;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.accent-gold { color: var(--xp); font-weight: 600; }
.accent-cyan { color: var(--player); font-weight: 600; }
.accent-purple { color: var(--hazard); font-weight: 600; }

/* ── Slide-specific layout tuning ── */

.title-slide,
.closing-slide {
  justify-content: center;
}

.slide--loop .loop-diagram {
  flex: 1;
  min-height: 0;
  max-height: min(40vh, 360px);
  max-width: min(560px, 92vw);
}

.slide--roadmap .roadmap-grid {
  flex: 1;
  min-height: 0;
}

.slide--bounty .two-col {
  max-height: 48vh;
}

.slide--bounty .closing-statement {
  flex-shrink: 0;
}

.slide--opportunity .pull-quote {
  margin-top: clamp(0.5rem, 0.9vh, 0.7rem);
  padding-top: 0;
  border-left: none;
  padding-left: 0;
}

.slide--features .slide-content {
  align-items: center;
  justify-content: center;
}

.slide--features .feature-highlights,
.slide--features .buildcraft-showcase {
  width: 100%;
  max-width: min(48rem, 92vw);
  flex: 0 0 auto;
}

.slide--features .buildcraft-showcase {
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

.slide--features .pull-quote {
  flex: 0 0 auto;
}

.slide--features .showcase-section {
  width: 100%;
}

.slide--features .showcase-label {
  text-align: center;
}

.slide--features .item-slot-grid--4 {
  margin-left: auto;
  margin-right: auto;
}

.slide--shipped .shipped-grid {
  flex: 1;
  min-height: 0;
}

.slide--business .slide-split {
  flex: 1;
  min-height: 0;
}

/* ── Animations ── */

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 230, 255, 0.6)); }
  50% { filter: drop-shadow(0 0 22px rgba(0, 230, 255, 0.9)) drop-shadow(0 0 40px rgba(0, 191, 255, 0.4)); }
}

@keyframes drift {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(12px, -8px) rotate(5deg); }
  66% { transform: translate(-8px, 6px) rotate(-3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(var(--orbit-r)) rotate(0deg); }
  to { transform: rotate(360deg) translateX(var(--orbit-r)) rotate(-360deg); }
}

@keyframes particle-float {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

@keyframes dash-flow {
  to { stroke-dashoffset: -100; }
}

@keyframes enemy-advance {
  0% { transform: translateX(80px); opacity: 0.3; }
  100% { transform: translateX(0); opacity: 1; }
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .slide { transition: opacity 0.2s, visibility 0.2s; transform: none !important; }
  .particle, .player-core, .enemy-shape, .loop-node,
  .roadmap-card--active, .enemy-wave-item { animation: none !important; }
  .loop-ring-path { animation: none !important; }
}

/* ── Responsive ── */

@media (max-width: 1100px) {
  .roadmap-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: auto auto;
  }

  .roadmap-card:nth-child(4),
  .roadmap-card:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .slide-split,
  .two-col,
  .shipped-grid {
    grid-template-columns: 1fr;
  }

  .feature-highlights {
    grid-template-columns: repeat(2, 1fr);
  }

  .item-slot-grid--8 {
    grid-template-columns: repeat(4, 1fr);
  }

  .item-slot-grid--4 {
    max-width: 100%;
  }

  .roadmap-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .click-zone { width: 25%; }
}

@media (max-height: 700px) {
  :root {
    --slide-pad-y: 1.25rem;
  }

  .slide-title--hero {
    font-size: clamp(2.25rem, 9vh, 3.5rem);
  }

  .title-visual {
    height: clamp(120px, 22vh, 180px) !important;
    width: clamp(120px, 22vh, 180px) !important;
    margin-bottom: 0.75rem !important;
  }
}