/* ==========================================================================
   steamrobothink.com · EFECTOS DE LA WEB PÚBLICA  (css/efectos.css)
   Va siempre junto con js/efectos.js. Para usarlos en una página, agrega en el <head>,
   debajo de css/style.css:
       <link rel="stylesheet" href="css/efectos.css">
       <script src="js/efectos.js" defer></script>
   Hoy lo usa: web_01_inicio.html. No es para la plataforma (imagen_*).
   No cambia el diseño: solo agrega movimiento suave.

   1. Aparecer al hacer scroll (las clases las pone js/efectos.js;
      sin ese script, todo se ve normal y quieto).
   2. Tarjetas que se levantan al pasar el mouse.
   3. Sombra del encabezado al bajar.
   4. Destello de luz en los botones de acción.
   5. Línea que se dibuja con el scroll (solo en pantallas anchas).
   6. Movimiento reducido: si la persona lo pide en su equipo, nada se mueve.
   ========================================================================== */

/* ---------- 1. aparecer al hacer scroll ---------- */
html.fx .fx-up {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .6s ease var(--fx-delay, 0s),
    transform .6s cubic-bezier(.2, .7, .2, 1) var(--fx-delay, 0s);
}
html.fx .fx-up.fx-in { opacity: 1; transform: none; }

/* el robot llega con un pequeño rebote, una sola vez */
html.fx .fx-pop {
  opacity: 0;
  transform: scale(.94);
  transition:
    opacity .5s ease,
    transform .7s cubic-bezier(.34, 1.56, .64, 1);
}
html.fx .fx-pop.fx-in { opacity: 1; transform: none; }

/* ---------- 2. tarjetas que se levantan ---------- */
main .section .card,
main .where-item {
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}
main .section .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(22, 32, 79, .10);
}
main .where-item:hover {
  transform: translateY(-4px);
  background-color: rgba(255, 255, 255, .13);
}

/* ---------- 3. encabezado al bajar ---------- */
.header { transition: box-shadow .3s ease; }
html.is-scrolled .header { box-shadow: 0 6px 22px rgba(22, 32, 79, .08); }

/* ---------- 4. destello en los botones de acción ---------- */
.btn-primary,
.btn-yellow {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::after,
.btn-yellow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .5) 50%, transparent 62%);
  transform: translateX(-110%);
  animation: fx-brillo 7s ease-in-out infinite;
  animation-delay: var(--fx-shine-delay, 1.2s);
}
/* el texto queda por encima del brillo */
.btn-primary,
.btn-yellow { z-index: 0; }
@keyframes fx-brillo {
  0%, 80% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

/* ---------- 5. línea que se dibuja con el scroll ---------- */
main[data-lang] { position: relative; }
.fx-linea {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.fx-linea .pista { fill: none; stroke: rgba(27, 43, 133, .13); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.fx-linea .halo { fill: none; stroke-width: 9; stroke-linecap: round; opacity: .16; }
.fx-linea .trazo { fill: none; stroke-width: 3; stroke-linecap: round; }
.fx-linea .punta-halo { opacity: .28; }
.fx-linea .punta { fill: #fff; stroke-width: 3; }
.fx-linea .punta-grupo { transition: opacity .3s ease; }

.fx-linea .nodo circle { transition: fill .35s ease, r .35s ease; }
.fx-linea .nodo .centro { fill: #fff; stroke: rgba(27, 43, 133, .25); stroke-width: 2; }
.fx-linea .nodo .onda { fill: none; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.fx-linea .nodo.on .centro { fill: var(--fx-nodo, var(--orange)); stroke: #fff; }
.fx-linea .nodo.on .onda { animation: fx-onda .9s ease-out 1; }
@keyframes fx-onda {
  0% { opacity: .7; transform: scale(.6); }
  100% { opacity: 0; transform: scale(3.2); }
}

/* ---------- 6. movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html.fx .fx-up, html.fx .fx-pop { opacity: 1; transform: none; transition: none; }
  .btn-primary::after, .btn-yellow::after { animation: none; display: none; }
  main .section .card:hover, main .where-item:hover { transform: none; }
  .fx-linea .nodo.on .onda { animation: none; }
}
