/* M5. Constelacao de Conexoes */

/* ============================================================
   M5. CONSTELAÇÃO DE CONEXÕES
   ============================================================ */
.constellation {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(80px, 12vw, 140px) clamp(24px, 6vw, 80px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(91,155,255,0.06) 0%, transparent 70%),
    var(--brn-surface);
}

.constellation-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.constellation-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.06;
  filter: saturate(0) brightness(0.8);
}
[data-theme="light"] .constellation-video video {
  opacity: 0.04;
  filter: saturate(0) brightness(1.2);
}

.constellation-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.constellation-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brn-blue-accent);
  opacity: 0;
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
  transform: scale(0);
}
.constellation-dot.visible {
  opacity: 0.7;
  transform: scale(1);
  animation: dotPulse 3s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Position dots in a network pattern */
.constellation-dot:nth-child(1) { top: 15%; left: 20%; animation-delay: 0s; }
.constellation-dot:nth-child(2) { top: 25%; left: 45%; animation-delay: 0.2s; width: 6px; height: 6px; }
.constellation-dot:nth-child(3) { top: 10%; left: 70%; animation-delay: 0.4s; }
.constellation-dot:nth-child(4) { top: 40%; left: 15%; animation-delay: 0.6s; }
.constellation-dot:nth-child(5) { top: 35%; left: 80%; animation-delay: 0.8s; width: 5px; height: 5px; }
.constellation-dot:nth-child(6) { top: 55%; left: 30%; animation-delay: 1s; }
.constellation-dot:nth-child(7) { top: 60%; left: 65%; animation-delay: 0.3s; width: 6px; height: 6px; }
.constellation-dot:nth-child(8) { top: 75%; left: 25%; animation-delay: 0.5s; }
.constellation-dot:nth-child(9) { top: 70%; left: 55%; animation-delay: 0.7s; }
.constellation-dot:nth-child(10) { top: 80%; left: 78%; animation-delay: 0.9s; width: 5px; height: 5px; }
.constellation-dot:nth-child(11) { top: 20%; left: 58%; animation-delay: 1.1s; }
.constellation-dot:nth-child(12) { top: 45%; left: 50%; animation-delay: 0.1s; width: 7px; height: 7px; }
.constellation-dot:nth-child(13) { top: 85%; left: 42%; animation-delay: 0.4s; }
.constellation-dot:nth-child(14) { top: 30%; left: 32%; animation-delay: 0.6s; }
.constellation-dot:nth-child(15) { top: 65%; left: 85%; animation-delay: 0.8s; }
.constellation-dot:nth-child(16) { top: 5%; left: 8%; animation-delay: 0.2s; width: 5px; height: 5px; }
.constellation-dot:nth-child(17) { top: 28%; left: 8%; animation-delay: 0.5s; }
.constellation-dot:nth-child(18) { top: 8%; left: 50%; animation-delay: 0.9s; width: 5px; height: 5px; }
.constellation-dot:nth-child(19) { top: 20%; left: 90%; animation-delay: 0.3s; width: 6px; height: 6px; }
.constellation-dot:nth-child(20) { top: 50%; left: 88%; animation-delay: 0.7s; }
.constellation-dot:nth-child(21) { top: 65%; left: 12%; animation-delay: 1.0s; width: 5px; height: 5px; }
.constellation-dot:nth-child(22) { top: 90%; left: 72%; animation-delay: 0.4s; }
.constellation-dot:nth-child(23) { top: 92%; left: 35%; animation-delay: 0.6s; width: 5px; height: 5px; }
.constellation-dot:nth-child(24) { top: 50%; left: 42%; animation-delay: 0.1s; width: 3px; height: 3px; }
.constellation-dot:nth-child(25) { top: 38%; left: 62%; animation-delay: 0.8s; width: 3px; height: 3px; }

.constellation-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.constellation-lines line {
  stroke: var(--brn-blue-accent);
  stroke-width: 1;
  opacity: 0;
  transition: opacity 1.5s ease-out 0.5s;
}
.constellation.visible .constellation-lines line {
  opacity: 0.2;
}

.constellation-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}
.constellation-number {
  font-family: 'Instrument Sans', 'Inter', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--brn-blue-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.constellation-headline {
  font-family: 'Noto Serif', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.constellation-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
