/* /servicios/automatizacion/ — flujo con bus de datos que se enciende nodo a nodo ([data-play]) + calculadora de horas */
.au { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 25em; }
.au .au-flow { position: relative; display: grid; gap: .7em; padding: 1.2em 1.2em 1.2em 2.6em; counter-reset: au; }
/* bus de datos: guía punteada de plano + conexión activa que se enciende cuando el flujo corre */
.au-flow::before, .au-flow::after { content: ""; position: absolute; left: 1.35em; top: 2.2em; bottom: 2.2em; width: 0; }
.au-flow::before { border-left: 1.5px dashed var(--line-strong); }
.au-flow::after { border-left: 2px solid var(--chalk); box-shadow: 0 0 10px rgba(255, 74, 28, .35); transform-origin: top; transform: scaleY(0); transition: transform 3.2s cubic-bezier(.45, 0, .2, 1) .2s; }
[data-play].is-played .au-flow::after, .no-motion .au-flow::after, .no-js .au-flow::after { transform: scaleY(1); }
.js:not(.no-motion) [data-play] .au-flow::after { transform: scaleY(0); }
.js:not(.no-motion) .stage__board:has(.au-node.is-on) .au-flow::after { transform: scaleY(1); }
/* paquete de datos que recorre el bus cuando la conexión ya está activa */
.au-flow > li:first-child::after { content: ""; position: absolute; left: -1.62em; top: 50%; width: .62em; height: .62em; margin-top: -.31em; border-radius: 1px; background: var(--chalk); box-shadow: 0 0 0 .3em rgba(255, 74, 28, .2); }
.is-played .au-flow > li:first-child::after { animation: au-pulse 3.6s cubic-bezier(.55, 0, .3, 1) 1s infinite; }
@keyframes au-pulse { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(var(--run, 19em)); opacity: 1; } 100% { transform: translateY(var(--run, 19em)); opacity: 0; } }

.au-node { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .05em .7em; align-items: baseline; padding: .55em .8em; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); }
/* nodo: terminal cuadrado sobre el bus; se enciende en naranja señal cuando su acción corre */
.au-node::before { content: ""; position: absolute; left: -1.53em; top: 50%; width: .5em; height: .5em; margin-top: -.25em; border-radius: 1px; background: var(--paper); border: 1.5px solid var(--ink); transition: background-color .3s, border-color .3s, box-shadow .3s; }
.au-node.is-on::before, .no-js .au-node::before { background: var(--chalk); border-color: var(--chalk); box-shadow: 0 0 0 .22em rgba(255, 74, 28, .18); }
.au-node.is-on { border-color: var(--ink); }
.au-node--trigger { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.au-node--trigger::before { background: var(--chalk); border-color: var(--chalk); }
.au-k { grid-row: span 2; font-family: var(--f-mono); font-size: .66em; letter-spacing: .08em; text-transform: uppercase; color: var(--chalk-deep); min-width: 5.2em; }
.au-node--trigger .au-k { color: var(--chalk); }
.au-node b { font-size: .98em; font-weight: 750; letter-spacing: -.01em; line-height: 1.2; }
.au-node > span:last-child { font-size: .8em; color: var(--mute); }
.au-node--trigger > span:last-child { color: var(--mute-dark); }

.au-log { background: var(--ink); color: #cfe9c8; font-family: var(--f-mono); font-size: .76em; padding: 1.3em 1.2em; display: flex; flex-direction: column; gap: .55em; min-width: 0; }
.au-log .m-s { color: var(--mute-dark); margin-bottom: .4em; }
.au-log p { white-space: pre; overflow: hidden; text-overflow: ellipsis; min-height: 1.3em; }
.au-done { margin-top: auto; }
.au-done .m-stamp { border-color: var(--chalk); color: var(--chalk); font-size: 1.1em; }

/* calculadora de horas */
.au-clock { height: 14px; border-radius: 1px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10%); border: 1px solid var(--line-strong); position: relative; overflow: hidden; margin-top: 6px; }
.au-clock i { position: absolute; inset: 0 auto 0 0; width: var(--w, 30%); background: var(--chalk); transition: width .5s var(--ease-out); }
.au-compare { margin-top: clamp(48px, 6vw, 90px); }

@media (max-width: 700px) {
  .au { grid-template-columns: 1fr; }
  .au-log { font-size: .72em; }
  .au-flow > li:first-child::after { --run: 17.5em; }
}
@media (prefers-reduced-motion: reduce) { .au-flow > li:first-child::after { animation: none !important; } .au-flow::after { transition: none; } }
/* «Automatización» es una palabra larga: título un poco más chico para que no se parta */
.page-hero__title { font-size: clamp(2.2rem, 5.6vw, 6.2rem); }

/* la cota del tablero se encima con la maqueta en móvil (kit): más aire arriba */
@media (max-width: 600px) { .stage__board { padding-top: 36px; } .stage__cota span:last-child { display: none; } }

