/* Personaje pixel animado de las guías. Lo arma assets/clawd.js en cada [data-clawd]. */
.clawd { display: inline-block; line-height: 0; color: var(--orange); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.clawd svg { display: block; width: 100%; height: auto; overflow: visible; }
.clawd rect { fill: currentColor; }
.clawd .cl-eye { fill: #141210; }
.clawd .cl-body, .clawd .cl-eye, .clawd .cl-arm, .clawd .cl-leg { transform-box: fill-box; transform-origin: 50% 50%; }

/* parpadeo */
.clawd .cl-eye { animation: cl-blink 4.6s infinite; }
@keyframes cl-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.15); } }

/* caminar */
.clawd.walk .cl-l1, .clawd.walk .cl-l3 { animation: cl-step .34s steps(1) infinite; }
.clawd.walk .cl-l2, .clawd.walk .cl-l4 { animation: cl-step .34s steps(1) infinite; animation-delay: -.17s; }
.clawd.walk .cl-body { animation: cl-bob .34s steps(1) infinite; }
@keyframes cl-step { 0% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes cl-bob { 0% { transform: translateY(0); } 50% { transform: translateY(-1px); } }

/* saludar */
.clawd.wave .cl-ar { animation: cl-wave 2.8s steps(1) infinite; }
@keyframes cl-wave { 0%, 45%, 100% { transform: translateY(0); } 50%, 60%, 70% { transform: translateY(-4px); } 55%, 65% { transform: translateY(-2px); } }

/* escribir */
.clawd.type .cl-al { animation: cl-type .26s steps(1) infinite; }
.clawd.type .cl-ar { animation: cl-type .26s steps(1) infinite; animation-delay: -.13s; }
@keyframes cl-type { 0% { transform: translateY(0); } 50% { transform: translateY(1px); } }

/* salto al tocarlo */
.clawd.hop { animation: cl-hop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes cl-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-34%) rotate(-6deg); } 70% { transform: translateY(0) scaleY(.9); } }

/* fuera de pantalla, quieto */
.clawd:not(.on) *, .clawd-parade:not(.on) .walker, .clawd-parade:not(.on) .sign { animation-play-state: paused; }

/* hero: se asoma por arriba del chat */
.hero-visual .chat { position: relative; z-index: 1; }
.clawd-hero { position: absolute; top: -46px; right: 40px; width: 80px; z-index: 0; }

/* desfile de agentes */
.clawd-parade { position: relative; height: 104px; margin-top: 30px; overflow: hidden; container-type: inline-size; border-bottom: 2px dashed var(--line-2); }
.clawd-parade .walker { position: absolute; bottom: 0; left: 0; width: 50px; transform: translateX(-80px); animation: cl-cross 15s linear infinite; }
.clawd-parade .walker .clawd { width: 50px; }
.clawd-parade .sign { position: absolute; left: 50%; top: -34px; margin-left: -15px; width: 30px; height: 30px; display: grid; place-items: center; font-size: 15px; line-height: 1; background: var(--card); border: 1px solid var(--line-2); border-radius: 9px; animation: bob 2.4s ease-in-out infinite; }
.clawd-parade .walker:nth-child(1) { animation-delay: 0s; }
.clawd-parade .walker:nth-child(2) { animation-delay: -2.5s; }
.clawd-parade .walker:nth-child(3) { animation-delay: -5s; }
.clawd-parade .walker:nth-child(4) { animation-delay: -7.5s; }
.clawd-parade .walker:nth-child(5) { animation-delay: -10s; }
.clawd-parade .walker:nth-child(6) { animation-delay: -12.5s; }
.clawd-parade .walker:nth-child(2n) .clawd { color: #e8896a; }
.clawd-parade .walker:nth-child(3n) .clawd { color: #c96a4c; }
.clawd-parade .walker:nth-child(2n) .sign { animation-delay: -1.2s; }
@keyframes cl-cross { from { transform: translateX(-80px); } to { transform: translateX(calc(100cqw + 20px)); } }
@media (max-width: 600px) {
  .clawd-parade { height: 92px; }
  .clawd-parade .walker, .clawd-parade .walker .clawd { width: 40px; }
  .clawd-parade .sign { width: 26px; height: 26px; margin-left: -13px; top: -30px; font-size: 13px; }
}
.clawd-cap { margin-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

/* barra de las ventanas de la prueba */
.clawd-bar { margin-left: auto; width: 26px; }

/* cierre */
.clawd-end-wrap { display: flex; justify-content: center; margin-bottom: 22px; }
.clawd-end { width: 96px; }

/* el que camina sobre la barra de progreso */
.clawd-runner { position: fixed; top: 4px; left: 0; width: 20px; z-index: 61; pointer-events: none; opacity: 0; transition: opacity .3s; will-change: transform; }
.clawd-runner.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .clawd *, .clawd, .clawd-parade .walker, .clawd-parade .sign { animation: none !important; }
  .clawd-parade .walker:nth-child(1) { transform: translateX(8cqw); }
  .clawd-parade .walker:nth-child(2) { transform: translateX(24cqw); }
  .clawd-parade .walker:nth-child(3) { transform: translateX(40cqw); }
  .clawd-parade .walker:nth-child(4) { transform: translateX(56cqw); }
  .clawd-parade .walker:nth-child(5) { transform: translateX(72cqw); }
  .clawd-parade .walker:nth-child(6) { transform: translateX(88cqw); }
  .clawd-runner { display: none; }
}
