/* ===== Custom Properties ===== */
:root {
  --celestial: #5B8DEF;
  --lavender: #9B72CF;
  --memphis-pink: #FF6B9D;
  --neon-cyan: #4AEADC;
  --ghost-mist: #E8EDF5;
  --midnight: #151A2E;
  --slate: #6B7A99;
  --tangerine: #FF8A50;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito Sans', system-ui, sans-serif;
  background: var(--midnight);
  color: var(--ghost-mist);
  overflow-x: hidden;
  line-height: 1.65;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}

/* ===== Neon Text ===== */
.neon-text {
  color: var(--celestial);
  text-shadow: 0 0 10px rgba(91,141,239,0.5), 0 0 20px rgba(91,141,239,0.3), 0 0 40px rgba(155,114,207,0.2);
  animation: neonFlicker 4s ease-in-out infinite;
}
@keyframes neonFlicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  96% { opacity: 0.85; }
  97% { opacity: 1; }
}

/* ===== Confetti Layer ===== */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.confetti-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  opacity: 0.3;
  animation: confettiDrift var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
}
@keyframes confettiDrift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(10px, -15px); }
  50% { transform: translate(-8px, -30px); }
  75% { transform: translate(12px, -10px); }
}

/* ===== Hexagonal Shape ===== */
.hex-shape {
  width: 120px;
  height: 104px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hex-shape:hover {
  transform: scale(1.08);
  background: radial-gradient(circle, var(--lavender), var(--celestial)) !important;
}

/* Generative Fills */
.gen-fill-1 { background: conic-gradient(from 0deg, var(--celestial), var(--lavender), var(--celestial)); }
.gen-fill-2 { background: repeating-linear-gradient(45deg, var(--memphis-pink) 0px, var(--memphis-pink) 4px, transparent 4px, transparent 8px); }
.gen-fill-3 { background: radial-gradient(circle at 30% 30%, var(--neon-cyan), var(--midnight)); }
.gen-fill-4 { background: repeating-linear-gradient(135deg, var(--tangerine) 0px, var(--tangerine) 3px, transparent 3px, transparent 7px); }
.gen-fill-5 { background: conic-gradient(from 90deg, var(--lavender), var(--memphis-pink), var(--celestial), var(--lavender)); }

/* Avatar Silhouette */
.avatar-silhouette {
  width: 50px;
  height: 60px;
  position: relative;
}
.avatar-silhouette::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}
.avatar-silhouette::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 30px;
  border-radius: 50% 50% 0 0;
  background: rgba(255,255,255,0.2);
}

/* ===== Scene Base ===== */
.scene {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

/* ===== Scene 1: Hero ===== */
.scene-hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #151A2E 0%, #1E2A4A 40%, #2A3B6E 70%, #5B8DEF 100%);
  overflow: hidden;
}
.hero-title-cluster {
  text-align: center;
  z-index: 20;
  position: relative;
}
.hero-title {
  font-family: 'Jost', sans-serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero-sub {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--slate);
  margin-top: 0.75rem;
}
.skyline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 1.5s ease-out 1s forwards;
}
.skyline-svg { width: 100%; height: 120px; display: block; }
@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Scene 2: Talent ===== */
.scene-talent {
  background: var(--midnight);
  min-height: 120vh;
  position: relative;
}
.squiggle-connector {
  position: absolute;
  top: 10%;
  left: 0;
  right: 0;
  height: 200px;
  z-index: 5;
  opacity: 0.4;
}
.squiggle-connector svg { width: 100%; height: 100%; }
.hex-cluster-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 900px;
  z-index: 10;
}
.hex-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 160px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hex-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.hex-label {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ghost-mist);
  text-align: center;
}
.hex-desc {
  font-size: 0.85rem;
  color: var(--slate);
  text-align: center;
  line-height: 1.5;
}

/* ===== Scene 3: Pipeline ===== */
.scene-pipeline {
  background: linear-gradient(180deg, var(--midnight) 0%, #1E2A4A 100%);
}
.section-heading {
  font-family: 'Jost', sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}
.pipeline-flow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.pipeline-node.visible {
  opacity: 1;
  transform: translateX(0);
}
.node-hex {
  width: 80px;
  height: 70px;
  background: linear-gradient(135deg, var(--celestial), var(--lavender));
  font-size: 1.5rem;
  color: #fff;
}
.node-icon { font-size: 1.5rem; }
.node-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--neon-cyan);
  letter-spacing: 0.04em;
}
.zigzag-connector {
  width: 40px;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--memphis-pink) 0px, var(--memphis-pink) 6px, transparent 6px, transparent 10px);
}

/* ===== Scene 4: Command Center ===== */
.scene-command {
  background: var(--midnight);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2px;
  max-width: 700px;
  width: 100%;
}
.dash-cell {
  background: rgba(91, 141, 239, 0.06);
  border: 1px solid rgba(91, 141, 239, 0.15);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 160px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s;
}
.dash-cell.visible {
  opacity: 1;
  transform: scale(1);
}
.dash-cell:hover {
  background: radial-gradient(circle, rgba(155,114,207,0.15), rgba(91,141,239,0.08));
}
.dash-cell.wide {
  grid-column: span 2;
  clip-path: none;
  border-radius: 8px;
  min-height: auto;
  padding: 1.5rem;
}
.dash-metric {
  font-family: 'Jost', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
}
.dash-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--slate);
  letter-spacing: 0.04em;
  text-align: center;
}
.sparkline { width: 100%; height: 60px; }
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neon-cyan);
  animation: statusPulse 2s ease-in-out infinite;
}
.status-dot.live { background: var(--memphis-pink); }
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 234, 220, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(74, 234, 220, 0); }
}

/* ===== Scene 5: Invitation ===== */
.scene-invite {
  background: linear-gradient(135deg, #5B8DEF 0%, #2A3B6E 60%, #151A2E 100%);
  min-height: 80vh;
  gap: 2rem;
}
.invite-heading {
  font-family: 'Jost', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;
  letter-spacing: -0.02em;
}
.invite-hex {
  width: 140px;
  height: 122px;
  background: linear-gradient(45deg, var(--memphis-pink), var(--tangerine));
  cursor: pointer;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
}

/* ===== Nav Hub ===== */
.nav-hub {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  width: 100px;
  justify-content: center;
}
.nav-center {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--celestial);
  background: var(--midnight);
  color: var(--celestial);
  font-size: 1rem;
  cursor: pointer;
  animation: navPulse 3s ease-in-out infinite;
  transition: background 0.3s;
}
.nav-center:hover { background: var(--celestial); color: var(--midnight); }
@keyframes navPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91,141,239,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(91,141,239,0); }
}
.nav-petal {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(91,141,239,0.15);
  border: 1px solid rgba(91,141,239,0.3);
  color: var(--ghost-mist);
  text-decoration: none;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, background 0.3s;
}
.nav-petal:hover {
  transform: scale(1.2);
  background: var(--celestial);
  color: var(--midnight);
}

/* Floating Triangle */
.floating-triangle {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 28px solid var(--memphis-pink);
  opacity: 0.15;
  animation: triSpin 60s linear infinite;
  pointer-events: none;
}
@keyframes triSpin {
  to { transform: rotate(360deg); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hex-cluster-grid { gap: 1.5rem; }
  .hex-card { width: 130px; }
  .pipeline-flow { flex-direction: column; }
  .zigzag-connector { width: 4px; height: 20px; background: repeating-linear-gradient(180deg, var(--memphis-pink) 0px, var(--memphis-pink) 6px, transparent 6px, transparent 10px); }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-cell.wide { grid-column: span 2; }
  .nav-hub { bottom: 12px; right: 12px; width: 80px; }
}
@media (max-width: 480px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dash-cell.wide { grid-column: span 1; }
  .hex-shape { width: 90px; height: 78px; }
}
