/* Os fios do ecossistema, 2ª versão (par do comum/eco-fios.js): três feixes retos, dos módulos até a Funnely AI,
   que passa a ocupar a largura inteira; a Base fica embaixo, ligada à IA por um feixe no centro.
   Só vale quando o script desenhou (.eco--feixes); sem ele, fica o desenho antigo. */
/* em todas as larguras (o celular também tem a ligação) */
@media all {
  .eco--feixes .eco__liga { grid-template-columns: minmax(0, 1fr) !important; }
  .eco--feixes .eco__fios { height: 72px; }
  .eco--feixes .eco__fios svg > :not(defs):not(.eco__feixe):not(.eco__luz) { display: none; }
  .eco--feixes .eco__pulso { display: none; }

  /* a Funnely AI: a faixa larga onde os três feixes chegam */
  .eco--feixes .eco__ia { position: relative; justify-content: center; padding: 20px 28px; box-shadow: 0 -1px 0 rgba(255, 255, 255, .18) inset, 0 18px 40px -24px rgba(91, 79, 219, .8); }
  .eco--feixes .eco__ia span:last-child { max-width: 62ch; }

  /* a Base embaixo, ligada à IA por um feixe no centro */
  .eco--feixes .eco__base { position: relative; margin-top: 44px; justify-content: center; }
  .eco--feixes .eco__base span:last-child { max-width: 62ch; }
  .eco--feixes .eco__base::before {
    content: ""; position: absolute; left: 50%; top: -45px; width: 2px; height: 44px; margin-left: -1px; border-radius: 1px;
    background: linear-gradient(to bottom, rgba(122, 111, 240, .9), rgba(167, 159, 245, .25));
  }
  .eco--feixes .eco__base::after {
    content: ""; position: absolute; left: 50%; top: -45px; width: 2px; height: 16px; margin-left: -1px; border-radius: 1px;
    background: linear-gradient(to bottom, rgba(184, 240, 74, 0), #b8f04a);
    box-shadow: 0 0 10px 1px rgba(184, 240, 74, .6); opacity: 0;
  }
  .eco--feixes.is-vivo:not(.is-parado) .eco__base::after { animation: eco-desce-base var(--m-cycle, 3.6s) cubic-bezier(.45, 0, .3, 1) infinite; }
  @keyframes eco-desce-base { 0%, 62% { transform: translateY(0); opacity: 0; } 66% { transform: translateY(0); opacity: 1; } 88% { transform: translateY(28px); opacity: 1; } 94%, 100% { transform: translateY(28px); opacity: 0; } }
}

/* os feixes e o brilho que desce dentro deles */
.eco--feixes .eco__luz {
  fill: none; stroke: #b8f04a; stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 16 100; stroke-dashoffset: 16; opacity: 0;
  filter: drop-shadow(0 0 4px rgba(184, 240, 74, .9));
}
.eco--feixes.is-vivo:not(.is-parado) .eco__luz { animation: eco-desce var(--m-cycle, 3.6s) cubic-bezier(.45, 0, .3, 1) infinite; }
.eco--feixes.is-vivo:not(.is-parado) .eco__luz[data-n="2"] { animation-delay: .25s; }
.eco--feixes.is-vivo:not(.is-parado) .eco__luz[data-n="3"] { animation-delay: .5s; }
@keyframes eco-desce {
  0% { stroke-dashoffset: 16; opacity: 0; }
  6% { stroke-dashoffset: 10; opacity: 1; }
  44% { stroke-dashoffset: -84; opacity: 1; }
  52%, 100% { stroke-dashoffset: -84; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .eco--feixes .eco__luz, .eco--feixes .eco__base::after { animation: none !important; opacity: 0 !important; }
}

/* no celular os três cards ficam empilhados: os três feixes caem no mesmo centro e o brilho desce um depois do outro */
@media (max-width: 1023px) {
  .eco--feixes .eco__fios { display: block !important; height: 48px; }
  .eco--feixes .eco__ia, .eco--feixes .eco__base { justify-content: flex-start; }
  .eco--feixes .eco__base { margin-top: 40px; }
  .eco--feixes .eco__base::before { top: -41px; height: 40px; }
  .eco--feixes .eco__base::after { top: -41px; }
}
