/* ==========================================================================
   Automatización: 6 tarjetas con la misma mecánica, formato, tamaños y fondo que Webs (webs-tarjetas.css y .js). Aquí, solo sus
   dibujos: líneas finas y formas planas, cobalto de acento. Mismas reglas que Webs: el estilo base de cada pieza ES su estado
   final, y los @keyframes solo existen bajo .is-viendo .is-actual (ciclo de 7 s con fundido al final, de webs-tarjetas.css).
   El contenido anterior (banners dolor → solución) está en descartes/2026-11-14_automatizacion-contenido-anterior/.
   ========================================================================== */

/* 1 · La hucha se agrieta por detrás (junto a la cola): las monedas salen por la grieta y quedan en un montón a ese lado, lejos de las patas */
/* desde la grieta (--sx, --sy), por el punto alto del salto (--mx, --my), hasta su sitio en el montón (estado final) */
.a1-m1 { --sx: 92px; --sy: -47px; --mx: 68px; --my: -65px; }
.a1-m2 { --sx: 65px; --sy: -47px; --mx: 41px; --my: -65px; }
.a1-m3 { --sx: 78.5px; --sy: -25px; --mx: 54.5px; --my: -43px; }
.a1-euro { font-size: 12px; fill: #fff; }
.a1-grieta { stroke-dasharray: 1; stroke-dashoffset: 0; }
.wt.is-viendo .is-actual .a1-grieta { animation-name: a1-grieta; }
.wt.is-viendo .is-actual .a1-cerdo { animation-name: a1-cerdo; }
.wt.is-viendo .is-actual .a1-m1 { animation-name: a1-m1; animation-timing-function: linear; }
.wt.is-viendo .is-actual .a1-m2 { animation-name: a1-m2; animation-timing-function: linear; }
.wt.is-viendo .is-actual .a1-m3 { animation-name: a1-m3; animation-timing-function: linear; }
@keyframes a1-grieta { 0%, 8% { stroke-dashoffset: 1; } 20%, 100% { stroke-dashoffset: 0; } }
@keyframes a1-cerdo { 0%, 18% { transform: none; } 20% { transform: rotate(-2deg); } 22% { transform: rotate(2deg); } 24% { transform: rotate(-1deg); } 26%, 100% { transform: none; } }
@keyframes a1-m1 { 0%, 24% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.3); }
  26% { opacity: 1; transform: translate(var(--sx), var(--sy)) scale(1); animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  31% { transform: translate(var(--mx), var(--my)) rotate(-180deg); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  36% { transform: rotate(-360deg); } 38% { transform: translateY(-5px) rotate(-360deg); } 40%, 100% { opacity: 1; transform: none; } }
@keyframes a1-m2 { 0%, 34% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.3); }
  36% { opacity: 1; transform: translate(var(--sx), var(--sy)) scale(1); animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  41% { transform: translate(var(--mx), var(--my)) rotate(-180deg); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  46% { transform: rotate(-360deg); } 48% { transform: translateY(-5px) rotate(-360deg); } 50%, 100% { opacity: 1; transform: none; } }
@keyframes a1-m3 { 0%, 44% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.3); }
  46% { opacity: 1; transform: translate(var(--sx), var(--sy)) scale(1); animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  51% { transform: translate(var(--mx), var(--my)) rotate(-180deg); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  56% { transform: rotate(-360deg); } 58% { transform: translateY(-4px) rotate(-360deg); } 60%, 100% { opacity: 1; transform: none; } }

/* 2 · El formulario se envía y el aviso de WhatsApp entra con un «ding» */
.a2-enviar { font-family: var(--font-text); font-stretch: 100%; font-weight: 600; font-size: 13px; fill: #fff; }
.a2-ding-t { font-size: 15px; fill: #2747E0; }
.a2-avion { opacity: 0; }
.wt-anim .a2-avion { transform-box: view-box; transform-origin: 0 0; }
.wt.is-viendo .is-actual .a2-boton { animation-name: a2-boton; }
.wt.is-viendo .is-actual .a2-avion { animation-name: a2-avion; animation-timing-function: ease-in-out; }
.wt.is-viendo .is-actual .a2-aviso { animation-name: a2-aviso; }
.wt.is-viendo .is-actual .a2-ding { animation-name: a2-ding; }
.wt.is-viendo .is-actual .a2-movil { animation-name: a2-movil; }
@keyframes a2-boton { 0%, 10% { transform: none; } 13% { transform: scale(.92); } 17%, 100% { transform: none; } }
@keyframes a2-avion { 0%, 14% { opacity: 0; transform: none; } 17% { opacity: 1; transform: none; }
  30% { opacity: 1; transform: translate(150px, -88px); } 33%, 100% { opacity: 0; transform: translate(156px, -92px); } }
@keyframes a2-aviso { 0%, 32% { opacity: 0; transform: translateY(-16px) scale(.94); } 38% { opacity: 1; transform: translateY(2px); } 41%, 100% { opacity: 1; transform: none; } }
@keyframes a2-ding { 0%, 36% { opacity: 0; transform: scale(.4); } 40% { opacity: 1; transform: scale(1.15); } 44%, 100% { opacity: 1; transform: none; } }
@keyframes a2-movil { 0%, 36% { transform: none; } 38% { transform: rotate(-3deg); } 40% { transform: rotate(3deg); } 42% { transform: rotate(-1.5deg); } 44%, 100% { transform: none; } }

/* 3 · El texto se multiplica (×3) y vuela a tres pantallas */
.a3-por-t { font-size: 14px; fill: #fff; }
.a3-copia { opacity: 0; }
.a3-k1 { --dx: 176px; --dy: -69px; } .a3-k2 { --dx: 176px; --dy: 22px; } .a3-k3 { --dx: 177px; --dy: 90px; }
.wt.is-viendo .is-actual .a3-texto { animation-name: a3-texto; }
.wt.is-viendo .is-actual .a3-por { animation-name: a3-por; }
.wt.is-viendo .is-actual .a3-k1 { animation-name: a3-k1; animation-timing-function: ease-in-out; }
.wt.is-viendo .is-actual .a3-k2 { animation-name: a3-k2; animation-timing-function: ease-in-out; }
.wt.is-viendo .is-actual .a3-k3 { animation-name: a3-k3; animation-timing-function: ease-in-out; }
.wt.is-viendo .is-actual .a3-c1 { animation-name: a3-c1; }
.wt.is-viendo .is-actual .a3-c2 { animation-name: a3-c2; }
.wt.is-viendo .is-actual .a3-c3 { animation-name: a3-c3; }
@keyframes a3-texto { 0%, 4% { opacity: 0; transform: translateY(10px); } 10%, 100% { opacity: 1; transform: none; } }
@keyframes a3-por { 0%, 12% { opacity: 0; transform: scale(.3); } 16% { opacity: 1; transform: scale(1.18); } 19%, 100% { opacity: 1; transform: none; } }
@keyframes a3-k1 { 0%, 20% { opacity: 0; transform: none; } 22% { opacity: 1; transform: none; } 34% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(.7); } 36%, 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.7); } }
@keyframes a3-k2 { 0%, 26% { opacity: 0; transform: none; } 28% { opacity: 1; transform: none; } 40% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(.7); } 42%, 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.7); } }
@keyframes a3-k3 { 0%, 32% { opacity: 0; transform: none; } 34% { opacity: 1; transform: none; } 46% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(.5); } 48%, 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.5); } }
@keyframes a3-c1 { 0%, 34% { opacity: 0; } 38%, 100% { opacity: 1; } }
@keyframes a3-c2 { 0%, 40% { opacity: 0; } 44%, 100% { opacity: 1; } }
@keyframes a3-c3 { 0%, 46% { opacity: 0; } 50%, 100% { opacity: 1; } }

/* 4 · Un mensaje que se convierte en una lista de tareas que se marcan solas */
.a4-flecha { stroke-dasharray: 1; stroke-dashoffset: 0; }
.a4-check { stroke-dasharray: 1; stroke-dashoffset: 0; }
.wt.is-viendo .is-actual .a4-msg { animation-name: a4-msg; }
.wt.is-viendo .is-actual .a4-flecha { animation-name: a4-flecha; }
.wt.is-viendo .is-actual .a4-punta { animation-name: a4-punta; }
.wt.is-viendo .is-actual .a4-lista { animation-name: a4-lista; }
.wt.is-viendo .is-actual .a4-f1 { animation-name: a4-fila; }
.wt.is-viendo .is-actual .a4-f2 { animation-name: a4-fila2; }
.wt.is-viendo .is-actual .a4-f3 { animation-name: a4-fila3; }
.wt.is-viendo .is-actual .a4-f1 .a4-caja { animation-name: a4-caja1; }
.wt.is-viendo .is-actual .a4-f2 .a4-caja { animation-name: a4-caja2; }
.wt.is-viendo .is-actual .a4-f3 .a4-caja { animation-name: a4-caja3; }
.wt.is-viendo .is-actual .a4-f1 .a4-check { animation-name: a4-check1; }
.wt.is-viendo .is-actual .a4-f2 .a4-check { animation-name: a4-check2; }
.wt.is-viendo .is-actual .a4-f3 .a4-check { animation-name: a4-check3; }
@keyframes a4-msg { 0%, 3% { opacity: 0; transform: translateY(12px) scale(.8); } 9% { opacity: 1; transform: scale(1.04); } 12%, 100% { opacity: 1; transform: none; } }
@keyframes a4-flecha { 0%, 13% { stroke-dashoffset: 1; } 21%, 100% { stroke-dashoffset: 0; } }
@keyframes a4-punta { 0%, 20% { opacity: 0; } 22%, 100% { opacity: 1; } }
@keyframes a4-lista { 0%, 20% { opacity: 0; transform: translateY(14px); } 26%, 100% { opacity: 1; transform: none; } }
@keyframes a4-fila { 0%, 24% { opacity: 0; transform: translateX(-8px); } 28%, 100% { opacity: 1; transform: none; } }
@keyframes a4-fila2 { 0%, 27% { opacity: 0; transform: translateX(-8px); } 31%, 100% { opacity: 1; transform: none; } }
@keyframes a4-fila3 { 0%, 30% { opacity: 0; transform: translateX(-8px); } 34%, 100% { opacity: 1; transform: none; } }
@keyframes a4-caja1 { 0%, 38% { fill: #FFFFFF; stroke: #111111; transform: none; } 40% { transform: scale(1.15); } 42%, 100% { fill: #2747E0; stroke: #2747E0; transform: none; } }
@keyframes a4-caja2 { 0%, 50% { fill: #FFFFFF; stroke: #111111; transform: none; } 52% { transform: scale(1.15); } 54%, 100% { fill: #2747E0; stroke: #2747E0; transform: none; } }
@keyframes a4-caja3 { 0%, 62% { fill: #FFFFFF; stroke: #111111; transform: none; } 64% { transform: scale(1.15); } 66%, 100% { fill: #2747E0; stroke: #2747E0; transform: none; } }
@keyframes a4-check1 { 0%, 40% { stroke-dashoffset: 1; } 45%, 100% { stroke-dashoffset: 0; } }
@keyframes a4-check2 { 0%, 52% { stroke-dashoffset: 1; } 57%, 100% { stroke-dashoffset: 0; } }
@keyframes a4-check3 { 0%, 64% { stroke-dashoffset: 1; } 69%, 100% { stroke-dashoffset: 0; } }

/* 5 · La mascota, tranquila, con el botón «OK» en la mano */
.a5-escena { position: relative; width: min(100%, 300px); aspect-ratio: 1; }
.a5-masc { position: absolute; inset: 6% 6% 0 0; width: 94%; height: auto; }
.a5-ok, .a5-onda { position: absolute; left: 70%; top: 62%; }
.a5-ok { display: grid; place-items: center; min-width: 2.4em; padding: .38em .7em; border-radius: 999px; background: var(--accent); color: #fff; border: 3px solid #fff;
  font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: clamp(20px, 2vw, 28px); line-height: 1; transform-origin: 50% 50%; }
.a5-onda { width: 4.4em; height: 2.6em; margin: -.3em 0 0 -.4em; border-radius: 999px; border: 2px solid var(--accent); opacity: 0; font-size: clamp(20px, 2vw, 28px); }
.wt.is-viendo .is-actual .a5-masc { animation-name: a5-masc; }
.wt.is-viendo .is-actual .a5-ok { animation-name: a5-ok; }
.wt.is-viendo .is-actual .a5-onda { animation-name: a5-onda; }
@keyframes a5-masc { 0%, 4% { opacity: 0; transform: translateY(22px); } 14% { opacity: 1; transform: none; } 50% { transform: none; } 53% { transform: translateY(-6px); } 57%, 100% { opacity: 1; transform: none; } }
@keyframes a5-ok { 0%, 22% { opacity: 0; transform: scale(.3) rotate(-10deg); } 28% { opacity: 1; transform: scale(1.12) rotate(3deg); } 32%, 46% { opacity: 1; transform: none; }
  49% { transform: scale(.88); } 53%, 100% { opacity: 1; transform: none; } }
@keyframes a5-onda { 0%, 48% { opacity: 0; transform: scale(.8); } 50% { opacity: .9; transform: scale(.9); } 64%, 100% { opacity: 0; transform: scale(1.5); } }

/* 6 · Piezas que encajan una a una; la última, cobalto */
.a6-p1 { --dx: -34px; --dy: -26px; } .a6-p2 { --dx: 34px; --dy: -26px; } .a6-p3 { --dx: -34px; --dy: 26px; } .a6-p4 { --dx: 34px; --dy: 26px; }
.a6-rayos { opacity: 0; }
.wt.is-viendo .is-actual .a6-p1 { animation-name: a6-p1; }
.wt.is-viendo .is-actual .a6-p2 { animation-name: a6-p2; }
.wt.is-viendo .is-actual .a6-p3 { animation-name: a6-p3; }
.wt.is-viendo .is-actual .a6-p4 { animation-name: a6-p4; }
.wt.is-viendo .is-actual .a6-rayos { animation-name: a6-rayos; }
@keyframes a6-p1 { 0%, 4% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(-8deg); } 14% { opacity: 1; transform: translate(1px, 1px); } 16%, 100% { opacity: 1; transform: none; } }
@keyframes a6-p2 { 0%, 16% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(8deg); } 26% { opacity: 1; transform: translate(-1px, 1px); } 28%, 100% { opacity: 1; transform: none; } }
@keyframes a6-p3 { 0%, 28% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(8deg); } 38% { opacity: 1; transform: translate(1px, -1px); } 40%, 100% { opacity: 1; transform: none; } }
@keyframes a6-p4 { 0%, 40% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(-8deg); } 50% { opacity: 1; transform: translate(-1px, -1px); } 52% { transform: scale(1.04); } 55%, 100% { opacity: 1; transform: none; } }
@keyframes a6-rayos { 0%, 52% { opacity: 0; transform: scale(.5); } 56% { opacity: 1; transform: scale(1.1); } 70%, 100% { opacity: 0; transform: scale(1.2); } }

/* Ordenador: la mascota, tan grande como la de Webs dentro de su mitad */
@media (min-width: 721px) {
  .wt.is-3d .a5-escena { width: 100%; height: 100%; aspect-ratio: auto; container-type: size; }
  .wt.is-3d .a5-masc { inset: 8% 0 0 0; width: 100%; height: 92%; object-fit: contain; }
  .wt.is-3d .a5-ok, .wt.is-3d .a5-onda { font-size: min(4.2cqw, 7cqh); left: calc(50% + min(18cqw, 30cqh)); }
}
