/* Advanced Homepage Styles & Animations */

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Audio Visualizer (Hero Section) */
.audio-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
  margin: 2rem 0;
}
.bar {
  width: 6px;
  background: var(--secondary);
  border-radius: 3px;
  animation: equalize 1s infinite alternate ease-in-out;
  box-shadow: 0 0 10px var(--secondary-glow);
}
.bar:nth-child(1) { height: 20%; animation-delay: 0.1s; }
.bar:nth-child(2) { height: 60%; animation-delay: 0.4s; }
.bar:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.bar:nth-child(4) { height: 100%; animation-delay: 0.5s; background: var(--primary); box-shadow: 0 0 10px var(--primary-glow); }
.bar:nth-child(5) { height: 70%; animation-delay: 0.3s; background: var(--primary); }
.bar:nth-child(6) { height: 30%; animation-delay: 0.6s; }
.bar:nth-child(7) { height: 50%; animation-delay: 0.2s; }

@keyframes equalize {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Advanced Bento Grid Architecture */
.adv-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 320px;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.bento-card {
  background: rgba(10, 6, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: transform 0.4s ease, border-color 0.3s;
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
}

.bento-card h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; z-index: 2;}
.bento-card p { color: var(--text-muted); font-size: 1rem; z-index: 2; line-height: 1.5;}

.span-row-2 { grid-row: span 2; }
.span-col-2 { grid-column: span 2; }
.span-col-3 { grid-column: span 3; }

/* Interactive Radar Visual inside Card */
.radar-container {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 300px; height: 300px;
  z-index: 0; opacity: 0.3;
}
.radar-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--secondary);
  border-radius: 50%;
  animation: pulse-ring 3s infinite linear;
}
.radar-ring:nth-child(1) { width: 100px; height: 100px; animation-delay: 0s; }
.radar-ring:nth-child(2) { width: 200px; height: 200px; animation-delay: 1s; }
.radar-ring:nth-child(3) { width: 300px; height: 300px; animation-delay: 2s; }
@keyframes pulse-ring {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Map Nodes Visual */
.map-nodes-container {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at top right, rgba(157, 78, 221, 0.2), transparent);
  z-index: 0;
}
.node-dot {
  position: absolute; width: 8px; height: 8px;
  background: var(--primary); border-radius: 50%;
  box-shadow: 0 0 15px var(--primary);
  animation: blink 2s infinite alternate;
}
.node-1 { top: 30%; left: 20%; animation-delay: 0s; }
.node-2 { top: 60%; left: 70%; animation-delay: 0.5s; background: var(--secondary); box-shadow: 0 0 15px var(--secondary);}
.node-3 { top: 80%; left: 40%; animation-delay: 1s; }
@keyframes blink { 0% { opacity: 0.3; transform: scale(1); } 100% { opacity: 1; transform: scale(1.5); } }

/* Chat Visual */
.chat-visual {
  position: absolute; bottom: 10px; right: 20px;
  width: 200px; z-index: 0; opacity: 0.4;
  transform: rotate(-10deg);
}
.chat-bubble {
  background: rgba(255,255,255,0.1); padding: 10px; border-radius: 12px;
  margin-bottom: 10px; font-size: 0.8rem;
  animation: floatUp 4s infinite linear;
}
.chat-bubble.right { background: var(--accent-glow); margin-left: 30px; }
@keyframes floatUp { 0% { transform: translateY(50px); opacity:0;} 50% {opacity:1;} 100% { transform: translateY(-50px); opacity:0;} }

/* Global Scale Stats Section */
.stats-section {
  padding: 8rem 5%;
  background: linear-gradient(180deg, var(--bg-core) 0%, rgba(10, 6, 20, 0.9) 100%);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem; max-width: 1200px; margin: 4rem auto 0;
}
.stat-box h4 { font-size: 4rem; font-weight: 900; background: linear-gradient(90deg, #fff, var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1;}
.stat-box p { color: var(--text-muted); font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-top: 0.5rem;}

/* CTA Section */
.cta-section {
  padding: 8rem 5%; text-align: center;
  position: relative; overflow: hidden;
}
.cta-box {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.2), rgba(0, 255, 204, 0.1));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 40px; padding: 6rem 2rem;
  max-width: 1000px; margin: 0 auto;
  position: relative; backdrop-filter: blur(20px);
}
.cta-box h2 { font-size: 3.5rem; font-weight: 900; margin-bottom: 1rem; }

/* Responsive Grid */
@media (max-width: 900px) {
  .adv-bento { grid-template-columns: repeat(2, 1fr); }
  .span-col-3 { grid-column: span 2; }
}
@media (max-width: 768px) {
  .adv-bento { grid-template-columns: 1fr; }
  .span-col-2, .span-col-3, .span-row-2 { grid-column: span 1; grid-row: span 1; }
  .stat-box h4 { font-size: 3rem; }
  .cta-box h2 { font-size: 2.5rem; }
}
