/* ═══════════════════════════════════════════
   VOICE UNIVERSE — Premium Silicon Valley
   Layered mesh, orbs, particles, depth
   ═══════════════════════════════════════════ */

/* Pause all animations when section off-screen — reduces scroll lag */
.vu-section.vu-paused .vu-mesh,
.vu-section.vu-paused .vu-wave-pattern,
.vu-section.vu-paused .vu-orb,
.vu-section.vu-paused .vu-center-glow,
.vu-section.vu-paused .vu-particle,
.vu-section.vu-paused .vu-node,
.vu-section.vu-paused .vu-connections line,
.vu-section.vu-paused .vu-node-wave span {
  animation-play-state: paused !important;
}

.vu-section {
  padding: 140px 5% 160px;
  background: 
    linear-gradient(rgba(212, 96, 122, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 96, 122, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  background-color: #0d0a0b;
  position: relative;
  overflow: hidden;
}

/* Light grain — premium texture */
.vu-grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  background-repeat: repeat;
}

.vu-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Gradient mesh — pink + black, animated */
.vu-mesh {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 120% 90% at 30% 25%, rgba(212, 96, 122, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 100% 120% at 75% 30%, rgba(232, 132, 106, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 110% 80% at 65% 75%, rgba(242, 196, 206, 0.12) 0%, transparent 52%),
    radial-gradient(ellipse 90% 110% at 25% 70%, rgba(212, 96, 122, 0.08) 0%, transparent 48%),
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(20, 18, 20, 0.5) 0%, transparent 55%);
  background-size: 120% 120%;
  background-position: 0% 0%;
  animation: vuMeshMove 38s ease-in-out infinite;
}

@keyframes vuMeshMove {
  0%, 100% { background-position: 0% 0%; opacity: 1; }
  25% { background-position: 5% 8%; opacity: 0.98; }
  50% { background-position: -3% -5%; opacity: 1; }
  75% { background-position: 8% -3%; opacity: 0.97; }
}

/* Wave pattern — pink grid */
.vu-wave-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background: 
    repeating-linear-gradient(90deg, transparent, transparent 80px, rgba(212, 96, 122, 0.15) 80px, rgba(212, 96, 122, 0.15) 81px),
    repeating-linear-gradient(0deg, transparent, transparent 80px, rgba(232, 132, 106, 0.1) 80px, rgba(232, 132, 106, 0.1) 81px);
  background-size: 160px 160px;
  animation: vuWaveShift 45s linear infinite;
}

@keyframes vuWaveShift {
  to { background-position: 160px 160px; }
}

/* 4 glowing orbs — pink palette, reduced blur for scroll performance */
.vu-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  transform: translate(-50%, -50%);
  animation: vuOrbFloat 36s ease-in-out infinite;
}

.vu-orb-1 {
  width: 420px; height: 420px;
  left: -5%; top: 20%;
  background: radial-gradient(circle, rgba(212, 96, 122, 0.22) 0%, rgba(212, 96, 122, 0.06) 50%, transparent 70%);
  animation-delay: 0s;
}

.vu-orb-2 {
  width: 380px; height: 380px;
  left: 106%; top: 28%;
  background: radial-gradient(circle, rgba(232, 132, 106, 0.2) 0%, rgba(232, 132, 106, 0.05) 50%, transparent 70%);
  animation-delay: -9s;
}

.vu-orb-3 {
  width: 360px; height: 360px;
  left: 12%; top: 88%;
  background: radial-gradient(circle, rgba(242, 196, 206, 0.18) 0%, rgba(212, 96, 122, 0.05) 50%, transparent 70%);
  animation-delay: -18s;
}

.vu-orb-4 {
  width: 340px; height: 340px;
  left: 92%; top: 78%;
  background: radial-gradient(circle, rgba(212, 96, 122, 0.18) 0%, rgba(242, 196, 206, 0.05) 50%, transparent 70%);
  animation-delay: -5s;
}

@keyframes vuOrbFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.92; }
  33% { transform: translate(-50%, -50%) scale(1.06); opacity: 0.98; }
  66% { transform: translate(-50%, -50%) scale(0.97); opacity: 0.94; }
}

/* Radial spotlight — Calm Reflection, pink glow */
.vu-center-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(212, 96, 122, 0.18) 0%,
    rgba(232, 132, 106, 0.06) 30%,
    rgba(212, 96, 122, 0.02) 55%,
    transparent 70%
  );
  filter: blur(35px);
  animation: vuCenterGlow 28s ease-in-out infinite;
}

@keyframes vuCenterGlow {
  0%, 100% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

/* Floating particles — voices in the universe */
.vu-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.vu-particle {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(212, 96, 122, 0.5);
  animation: vuParticleFloat 24s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -2s);
}

.vu-particle:nth-child(odd) {
  background: rgba(242, 196, 206, 0.45);
  animation-duration: 30s;
}

.vu-particle:nth-child(3n) {
  background: rgba(232, 132, 106, 0.4);
  animation-duration: 28s;
}

@keyframes vuParticleFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  25% { transform: translate(12px, -18px) scale(1.2); opacity: 0.9; }
  50% { transform: translate(-8px, 10px) scale(0.9); opacity: 0.7; }
  75% { transform: translate(-15px, -8px) scale(1.1); opacity: 0.85; }
}

/* Soft vignette — depth */
.vu-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 70% 50% at 0% 50%, rgba(0,0,0,0.3) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 50%, rgba(0,0,0,0.25) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.vu-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 72px;
  position: relative;
  z-index: 2;
}

.vu-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  font-weight: 700;
  background: linear-gradient(135deg, #FAF7F2 0%, #F2C4CE 50%, #D4607A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 20px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.vu-subtitle {
  font-family: 'Instrument Serif', 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(250, 247, 242, 0.75);
  line-height: 1.6;
  margin: 0;
}

/* Desktop: constellation canvas */
.vu-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 480px;
  margin: 0 auto;
  display: block;
  z-index: 2;
}

@media (max-width: 768px) {
  .vu-canvas-wrap {
    display: none;
  }
}

.vu-connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.vu-connections line {
  stroke: url(#vuLineGrad);
  stroke-width: 1.5;
  stroke-dasharray: 8 12;
  animation: vuLineFlow 4s linear infinite;
  opacity: 0.6;
}

@keyframes vuLineFlow {
  to { stroke-dashoffset: -20; }
}

.vu-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vu-nodes > * {
  pointer-events: auto;
}

.vu-node {
  position: absolute;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.4s ease;
  z-index: 1;
  animation: vuNodeFloat 10s ease-in-out infinite;
  --node-color: var(--rose);
}

.vu-node:nth-child(1) { animation-delay: 0s; }
.vu-node:nth-child(2) { animation-delay: -1.2s; }
.vu-node:nth-child(3) { animation-delay: -2.5s; }
.vu-node:nth-child(4) { animation-delay: -3.8s; }
.vu-node:nth-child(5) { animation-delay: -2s; }
.vu-node:nth-child(6) { animation-delay: -4.5s; }
.vu-node:nth-child(7) { animation-delay: -5.5s; }
.vu-node:nth-child(8) { animation-delay: -0.8s; }

@keyframes vuNodeFloat {
  0%, 100% { transform: translate(-50%, -50%) translate(0, 0); }
  25% { transform: translate(-50%, -50%) translate(5px, -4px); }
  50% { transform: translate(-50%, -50%) translate(-3px, 5px); }
  75% { transform: translate(-50%, -50%) translate(-4px, -3px); }
}

.vu-node:hover {
  transform: translate(-50%, -50%) scale(1.2);
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.12));
  z-index: 10;
  animation-play-state: paused;
}

.vu-node-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(250,247,242,0.95) 100%);
  border: 2px solid rgba(212, 96, 122, 0.25);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(212, 96, 122, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.vu-node-bubble::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--node-color) 0%, transparent 60%);
  opacity: 0.12;
  transition: opacity 0.3s ease;
}

.vu-node:hover .vu-node-bubble {
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.25),
    0 0 0 2px rgba(212, 96, 122, 0.4),
    0 0 40px rgba(212, 96, 122, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: scale(1.05);
}

.vu-node:hover .vu-node-bubble::before {
  opacity: 0.2;
}

.vu-node-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 18px;
  position: relative;
  z-index: 1;
}

.vu-node-wave span {
  width: 4px;
  height: 8px;
  background: var(--node-color);
  border-radius: 2px;
  opacity: 0.7;
  animation: vuWaveBar 1.2s ease-in-out infinite;
}

.vu-node-wave span:nth-child(1) { animation-delay: 0s; }
.vu-node-wave span:nth-child(2) { animation-delay: 0.08s; }
.vu-node-wave span:nth-child(3) { animation-delay: 0.16s; }
.vu-node-wave span:nth-child(4) { animation-delay: 0.24s; }
.vu-node-wave span:nth-child(5) { animation-delay: 0.16s; }
.vu-node-wave span:nth-child(6) { animation-delay: 0.08s; }

.vu-node:hover .vu-node-wave span {
  animation-duration: 0.7s;
  opacity: 1;
}

@keyframes vuWaveBar {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

.vu-node-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(250, 247, 242, 0.9);
  text-align: center;
  max-width: 100px;
  line-height: 1.35;
  padding: 6px 12px;
  background: rgba(20, 20, 20, 0.85);
  border-radius: 10px;
  border: 1px solid rgba(212, 96, 122, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
}

.vu-node:hover .vu-node-label {
  color: #FAF7F2;
  background: rgba(30, 30, 30, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(212, 96, 122, 0.4);
}

/* Mobile: horizontal scroll */
.vu-mobile-scroll {
  display: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 28px 5%;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.vu-mobile-scroll::-webkit-scrollbar {
  height: 6px;
}

.vu-mobile-scroll::-webkit-scrollbar-thumb {
  background: rgba(28, 26, 24, 0.15);
  border-radius: 6px;
}

@media (max-width: 768px) {
  .vu-section {
    padding: 100px 0 120px;
    background-size: 48px 48px;
  }
  .vu-particles { display: none; }
  .vu-wave-pattern { opacity: 0.02; }
  .vu-mobile-scroll {
    display: flex;
    position: relative;
    z-index: 2;
  }
  .vu-header {
    margin-bottom: 48px;
    padding: 0 5%;
  }
  .vu-title { font-size: clamp(1.9rem, 7vw, 2.4rem); }
  .vu-subtitle { font-size: 1.05rem; }
}

.vu-mobile-inner {
  display: flex;
  gap: 24px;
  padding: 0 5%;
  min-width: min-content;
}

.vu-mobile-node {
  flex-shrink: 0;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.vu-mobile-node:active {
  transform: scale(0.96);
}

.vu-mobile-node .vu-node-bubble {
  width: 72px;
  height: 72px;
}

.vu-mobile-node .vu-node-wave span {
  width: 4px;
  height: 10px;
}

/* Floating card overlay — premium modal, pink theme */
.vu-card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 10, 11, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vu-card-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.vu-card {
  background: linear-gradient(180deg, #fff 0%, #FDF4F7 50%, #FAF0F2 100%);
  border-radius: 20px;
  padding: 32px 36px;
  max-width: 340px;
  width: calc(100% - 32px);
  box-shadow: 
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(212, 96, 122, 0.15),
    0 0 60px rgba(212, 96, 122, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  position: relative;
  transform: scale(0.94) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.vu-card-overlay.visible .vu-card {
  transform: scale(1) translateY(0);
}

.vu-card-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  background: rgba(212, 96, 122, 0.06);
  color: rgba(44, 40, 36, 0.6);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.vu-card-close:hover {
  color: var(--charcoal);
  background: rgba(212, 96, 122, 0.12);
}

.vu-card-mood {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(212, 96, 122, 0.9);
  margin-bottom: 12px;
  text-align: center;
}

.vu-card-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 44px;
  margin-bottom: 18px;
}

.vu-card-wave span {
  width: 4px;
  height: 12px;
  background: linear-gradient(180deg, #D4607A, #E8846A);
  border-radius: 2px;
  opacity: 0.7;
  animation: vuWaveBar 1.2s ease-in-out infinite;
}

.vu-card-play {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4607A 0%, #E8846A 100%);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 20px rgba(212, 96, 122, 0.45);
}

.vu-card-play:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(212, 96, 122, 0.55);
}

.vu-card-play:active {
  transform: scale(0.98);
}

.vu-card-caption {
  font-family: 'Instrument Serif', 'Playfair Display', Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(44, 40, 36, 0.85);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 14px;
}

.vu-card-progress-wrap {
  height: 4px;
  background: rgba(212, 96, 122, 0.15);
  border-radius: 2px;
  margin-bottom: 10px;
  overflow: hidden;
}

.vu-card-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #D4607A, #E8846A);
  border-radius: 2px;
  transition: width 0.15s linear;
}

.vu-card-time {
  font-size: 0.78rem;
  color: rgba(44, 40, 36, 0.5);
  text-align: center;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .vu-mesh,
  .vu-wave-pattern,
  .vu-orb,
  .vu-center-glow,
  .vu-particles .vu-particle,
  .vu-connections line,
  .vu-node-wave span,
  .vu-node {
    animation: none !important;
  }
}
