/* Trilhos de circuito da marca (2026-11-14): linhas como as da logo, com uma luz que corre por elas.
   Só CSS e SVG, sem imagem e sem script. Quem pede menos movimento no aparelho vê as linhas paradas. */

/* ---------- Topo (herói) ---------- */
.trilhos-topo {
  position: absolute;
  top: 0;
  right: calc(50% - 50vw);
  width: min(62vw, 46rem);
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
}

.hero > *:not(.trilhos-topo) {
  position: relative;
  z-index: 1;
}

.trilho-base {
  fill: none;
  stroke: rgba(45, 212, 191, 0.26);
  stroke-width: 2;
  stroke-linejoin: round;
}

.trilho-luz {
  fill: none;
  stroke: url(#gradiente-luz);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 46 394;
  stroke-dashoffset: 440;
  filter: drop-shadow(0 0 5px rgba(124, 242, 156, 0.9));
  animation: corre-luz 5.6s linear infinite;
}

.trilho-luz.l2 { animation-duration: 7.2s; animation-delay: -1.6s; }
.trilho-luz.l3 { animation-duration: 6.4s; animation-delay: -3.1s; }
.trilho-luz.l4 { animation-duration: 8.4s; animation-delay: -0.8s; }
.trilho-luz.l5 { animation-duration: 5s; animation-delay: -2.4s; }
.trilho-luz.l6 { animation-duration: 6.8s; animation-delay: -4.2s; }

.no-trilho {
  fill: #0b1220;
  stroke: rgba(45, 212, 191, 0.7);
  stroke-width: 2;
}

@keyframes corre-luz {
  to { stroke-dashoffset: 0; }
}

/* ---------- Divisórias entre as seções ---------- */
.divisor-circuito {
  max-width: 72rem;
  margin: 0 auto;
  height: 3rem;
  overflow: hidden;
  pointer-events: none;
}

.divisor-circuito svg {
  display: block;
  width: 100%;
  height: 100%;
}

.divisor-circuito .trilho-base {
  stroke: rgba(15, 118, 110, 0.28);
}

.divisor-circuito .trilho-luz {
  stroke-width: 3;
  stroke-dasharray: 70 370;
  filter: drop-shadow(0 0 4px rgba(45, 212, 191, 0.9));
  animation-duration: 6s;
}

.divisor-circuito .no-trilho {
  fill: var(--bg, #f5f7fa);
  stroke: rgba(15, 118, 110, 0.6);
}

/* ---------- Cartões: uma luz corre pela borda de cima ao passar o mouse ---------- */
.card {
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 1.25rem;
  right: 1.25rem;
  height: 5px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.95) 50%, transparent 100%) no-repeat;
  background-size: 40% 100%;
  background-position: -67% 0;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.7);
}

.card:hover::before,
.card:focus-within::before {
  opacity: 1;
  animation: luz-cartao 1.4s linear infinite;
}

@keyframes luz-cartao {
  from { background-position: -67% 0; }
  to { background-position: 167% 0; }
}

/* ---------- Apresentações (slides escuros) ---------- */
.slide {
  isolation: isolate; /* os trilhos ficam atrás do texto, mas na frente do fundo do slide */
}

.trilhos-slide {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(88vw, 24rem);
  height: 68%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.8;
}

.captura .trilhos-slide {
  opacity: 0.95;
}

@media (prefers-reduced-motion: reduce) {
  .trilho-luz,
  .card:hover::before,
  .card:focus-within::before {
    animation: none;
  }
  .trilho-luz {
    stroke-dashoffset: 300;
  }
}

@media (max-width: 40rem) {
  .trilhos-topo { width: 100vw; opacity: 0.55; }
}
