/* ═══════════════════════════════════════════════════════════════
   Camera Solutions — sistema de motion (compartido)
   Lo cargan el configurador (/configurador/) y la Home (bloque de solicitud).
   Un vocabulario corto, aplicado por clase: nada se anima "a mano" por producto.

     m-enter   Entrada     hijos suben 8 px en cascada (--i = índice, lo pone CS_MOTION.stagger)
     m-rule    Línea       trazo técnico de 1 px que se dibuja de izquierda a derecha
     m-path    Línea SVG   stroke con pathLength="1" que se traza (cables, conectores)
     m-hl      Highlight   destello de señal sobre un valor que acaba de cambiar
     m-tag     Etiqueta    cota/etiqueta que aparece con barrido (clip) como impresa
     m-swap    Variante    el texto de un valor recién elegido parte en verde y vuelve
     m-bump    Agregado    pulso de escala en el contador / botón que recibió algo
     m-seq     Confirmar   lista de LEDs que se encienden en orden (registro → aviso)

   Significado del verde: señal activa / confirmación (mismo ADN que la Home).
   prefers-reduced-motion: todo queda en su estado final, sin desplazamiento.
   ═══════════════════════════════════════════════════════════════ */
:root {
  --m-fast: 160ms;
  --m-state: 260ms;
  --m-draw: 620ms;
  --m-stagger: 45ms;
  --m-ease: cubic-bezier(.16, 1, .3, 1);
  --m-ease-io: cubic-bezier(.65, 0, .35, 1);
  --m-signal: #c1d72e;
}

.m-enter > * { animation: m-rise var(--m-state) var(--m-ease) both; animation-delay: calc(min(var(--i, 0), 12) * var(--m-stagger)); }

.m-rule { position: relative; }
.m-rule::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: currentColor; opacity: .28; transform-origin: left center; animation: m-draw-x var(--m-draw) var(--m-ease) both; pointer-events: none; }

.m-path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: m-stroke var(--m-draw) var(--m-ease-io) both; }

.m-hl { animation: m-hl 900ms var(--m-ease) both; }

.m-tag { animation: m-tag 420ms var(--m-ease) both; }

.m-swap { animation: m-swap 700ms var(--m-ease) both; }

.m-bump { animation: m-bump 380ms var(--m-ease) both; }

.m-seq > li .led { transition: background-color var(--m-fast), box-shadow var(--m-fast); }
.m-seq > li { opacity: .38; transition: opacity var(--m-state) var(--m-ease); }
.m-seq > li.is-on { opacity: 1; }
.m-seq > li.is-on .led { background: var(--m-signal); box-shadow: 0 0 10px rgba(193, 215, 46, .75); }

@keyframes m-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes m-draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes m-stroke { to { stroke-dashoffset: 0; } }
@keyframes m-hl { 0% { box-shadow: inset 0 0 0 999px rgba(193, 215, 46, .28); } 100% { box-shadow: inset 0 0 0 999px rgba(193, 215, 46, 0); } }
@keyframes m-tag { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes m-swap { from { color: var(--m-signal); } }
@keyframes m-bump { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .m-enter > *, .m-rule::before, .m-path, .m-hl, .m-tag, .m-swap, .m-bump { animation: none !important; }
  .m-path { stroke-dashoffset: 0; }
  .m-seq > li { opacity: 1; transition: none; }
}
