/* rNexa landing v2 - the small live scenes inside the three product cards (run only while on screen) */
.demo {
  position: relative; height: 212px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, rgba(var(--az-rgb), 0.09), rgba(var(--az-rgb), 0.02) 70%), var(--surface);
}
.tile:not(.is-live) .demo *, .tile:not(.is-live) .demo *::after { animation-play-state: paused !important; }

/* Shared parts: a tiny window and the agent's pointer */
.win { position: absolute; width: 150px; height: 96px; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 28px -18px rgba(11, 12, 15, 0.55); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.win-bar i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.win-bar b { flex: 1; height: 8px; margin-left: 6px; border-radius: 99px; background: var(--track); }
.win u { display: block; height: 6px; margin: 10px 12px 0; border-radius: 99px; background: var(--track); }
.win u:nth-of-type(2) { width: 58%; }
.win u:nth-of-type(3) { width: 40%; }
.cur { position: absolute; z-index: 3; width: 22px; height: 22px; filter: drop-shadow(0 4px 6px rgba(var(--az-rgb), 0.5)); }
.cur svg { display: block; width: 100%; height: 100%; fill: #0169cc; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }

/* Orchestration: one lead hands work to helpers from different providers */
.demo-orch { height: 272px; }
.lead {
  position: absolute; left: 50%; top: 26px; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 8px; transform: translateX(-50%);
  border-radius: 12px; background: linear-gradient(155deg, #1d2029, #0a0b0e 72%); color: #f4f5f7; font-size: 13px; font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 24px -16px rgba(var(--az-rgb), 0.5);
}
.lead img { width: 22px; height: 22px; padding: 4px; border-radius: 7px; background: rgba(255, 255, 255, 0.1); filter: brightness(0) invert(1); }
.bus { position: absolute; left: 50%; top: 64px; width: min(76%, 420px); height: 62px; transform: translateX(-50%); }
.bus::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 22px; background: var(--line-2); }
.bus::after { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 22px; height: 1px; background: var(--line-2); }
.bus i { position: absolute; top: 22px; bottom: 0; width: 1px; background: var(--line-2); overflow: hidden; }
.bus i:nth-child(1) { left: 12.5%; }
.bus i:nth-child(2) { left: 37.5%; }
.bus i:nth-child(3) { left: 62.5%; }
.bus i:nth-child(4) { left: 87.5%; }
.bus i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 18px; background: linear-gradient(180deg, transparent, rgb(var(--hi-rgb))); animation: drop 2.6s var(--fly) infinite; animation-delay: calc(var(--i) * 0.4s); }
@keyframes drop { 0% { transform: translateY(-20px); } 45%, 100% { transform: translateY(44px); } }
.helpers { position: absolute; left: 50%; top: 126px; display: grid; grid-template-columns: repeat(4, 1fr); width: min(76%, 420px); margin: 0; padding: 0; list-style: none; transform: translateX(-50%); }
.helpers li { display: grid; justify-items: center; gap: 9px; width: 84px; margin: 0 auto; padding: 12px 10px 11px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 28px -20px rgba(11, 12, 15, 0.5); font-size: 12px; font-weight: 500; color: var(--ink-2); }
.helpers img { width: 22px; height: 22px; }
.helpers u { position: relative; width: 100%; height: 3px; border-radius: 3px; background: var(--track); overflow: hidden; }
.helpers u::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #0169cc, #2a8dff); transform-origin: 0 50%; transform: scaleX(0); animation: work 5.2s var(--fly) infinite; animation-delay: calc(var(--i) * 0.4s + 0.5s); }
@keyframes work { 0% { transform: scaleX(0); } 62%, 88% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

/* Browser Use: the pointer crosses a page and presses its button */
.demo-web .win { left: calc(50% - 112px); top: 30px; width: 224px; height: 136px; }
.demo-web .win em { position: absolute; left: 12px; bottom: 14px; width: 66px; height: 22px; border-radius: 99px; background: #0169cc; overflow: hidden; }
.demo-web .win em::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: 0; animation: press 5s ease-out infinite; }
.demo-web .cur { left: calc(50% - 112px + 52px); top: 138px; animation: web-cur 5s var(--fly) infinite; }
.demo-web .ring { position: absolute; left: calc(50% - 112px + 45px - 14px); top: 127px; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid rgb(var(--hi-rgb)); opacity: 0; animation: ring 5s ease-out infinite; }
@keyframes web-cur {
  0%, 8% { transform: translate(150px, -84px); }
  38%, 44% { transform: translate(0, 0); }
  48% { transform: translate(0, 0) scale(0.86); }
  54%, 70% { transform: translate(0, 0); }
  100% { transform: translate(150px, -84px); }
}
@keyframes press { 0%, 46% { opacity: 0; } 50% { opacity: 0.55; } 62%, 100% { opacity: 0; } }
@keyframes ring { 0%, 46% { opacity: 0; transform: scale(0.4); } 50% { opacity: 0.9; } 68%, 100% { opacity: 0; transform: scale(1.7); } }

/* Computer Use: the pointer picks one window, then the other */
.demo-desk .w1 { left: calc(50% - 124px); top: 24px; }
.demo-desk .w2 { left: calc(50% - 22px); top: 76px; }
.pick { position: absolute; width: 162px; height: 108px; border: 1.5px solid #0169cc; border-radius: 14px; box-shadow: 0 0 0 4px rgba(var(--az-rgb), 0.14); opacity: 0; animation: pick 7s ease-out infinite; }
.pick.p1 { left: calc(50% - 130px); top: 18px; }
.pick.p2 { left: calc(50% - 28px); top: 70px; animation-delay: 3.5s; }
.demo-desk .cur { left: calc(50% - 60px); top: 58px; animation: desk-cur 7s var(--fly) infinite; }
@keyframes pick { 0%, 12% { opacity: 0; transform: scale(1.06); } 18%, 42% { opacity: 1; transform: none; } 50%, 100% { opacity: 0; transform: none; } }
@keyframes desk-cur {
  0%, 10% { transform: translate(0, 0); }
  14% { transform: translate(0, 0) scale(0.86); }
  18%, 46% { transform: translate(0, 0); }
  60% { transform: translate(104px, 56px); }
  64% { transform: translate(104px, 56px) scale(0.86); }
  68%, 92% { transform: translate(104px, 56px); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .demo *, .demo *::after { animation: none !important; }
  .helpers u::after { transform: scaleX(0.7); }
  .pick.p1 { opacity: 1; }
}
