/* The app strip's icons move when they are pointed at or focused
   (lib/appIcons — the same file in every Inetro app; keep the copies equal).
   A host element (the strip tile) carries .ai-host. Motion only while the
   pointer / focus is on the tile, and none at all for reduced motion: the
   icon is then exactly the static artwork. */
.ai { display: block; width: 28px; height: 28px; border-radius: 7px; overflow: visible; }
.ai * { transform-box: fill-box; transform-origin: center; }
/* The globe's meridians scale about the globe's centre, not their own box. */
.ai .ai-mer { transform-box: view-box; transform-origin: 24px 24px; }

@media (prefers-reduced-motion: no-preference) {
  .ai-host .ai { transition: transform 160ms cubic-bezier(.2, .8, .2, 1); }
  .ai-host:is(:hover, :focus-visible) .ai { transform: translateY(-1px) scale(1.06); }

  /* dashboard — the tiles settle one after another, then the dot glows */
  .ai-host:is(:hover, :focus-visible) .ai-dashboard .ai-t1 { animation: ai-pop 520ms ease-out both; }
  .ai-host:is(:hover, :focus-visible) .ai-dashboard .ai-t2 { animation: ai-pop 520ms ease-out 80ms both; }
  .ai-host:is(:hover, :focus-visible) .ai-dashboard .ai-t3 { animation: ai-pop 520ms ease-out 160ms both; }
  .ai-host:is(:hover, :focus-visible) .ai-dashboard .ai-d  { animation: ai-pop 520ms ease-out 240ms both; }

  /* iq — a heartbeat traces across the screen, the dot beats with it */
  .ai-host:is(:hover, :focus-visible) .ai-iq .ai-trace { stroke-dasharray: 1 1; animation: ai-sweep 1.6s ease-in-out infinite; }
  .ai-host:is(:hover, :focus-visible) .ai-iq .ai-d { animation: ai-beat 1.6s ease-in-out infinite; }

  /* rmm — the cursor dot on the screen blinks on and off; the prompt nudges */
  .ai-host:is(:hover, :focus-visible) .ai-rmm .ai-d { animation: ai-blink 1s steps(1, end) infinite; }
  .ai-host:is(:hover, :focus-visible) .ai-rmm .ai-chev { animation: ai-nudge 1s ease-in-out infinite; }

  /* helpdesk — the headset rocks on its band, the dot rings */
  .ai-host:is(:hover, :focus-visible) .ai-helpdesk .ai-rock { transform-origin: 50% 0; animation: ai-rock 1.2s ease-in-out infinite; }
  .ai-host:is(:hover, :focus-visible) .ai-helpdesk .ai-d { animation: ai-beat 1.2s ease-in-out infinite; }

  /* audit (Netro 365) — a scan line sweeps the shield, then the check is drawn and the dot passes */
  .ai-host:is(:hover, :focus-visible) .ai-audit .ai-beam { animation: ai-beam 2.2s linear infinite; }
  .ai-host:is(:hover, :focus-visible) .ai-audit .ai-trace { stroke-dasharray: 1 1; animation: ai-check 2.2s ease-out infinite; }
  .ai-host:is(:hover, :focus-visible) .ai-audit .ai-d { animation: ai-pass 2.2s ease-out infinite; }

  /* dns — the globe spins: three meridians flow across it, the dot pings */
  .ai-host:is(:hover, :focus-visible) .ai-dns .ai-mer { opacity: 1; animation: ai-spin 2.4s cubic-bezier(.45, 0, .55, 1) infinite; }
  .ai-host:is(:hover, :focus-visible) .ai-dns .ai-m2 { animation-name: ai-spin-mirrored; animation-delay: -0.8s; }
  .ai-host:is(:hover, :focus-visible) .ai-dns .ai-m3 { animation-delay: -1.6s; }
  .ai-host:is(:hover, :focus-visible) .ai-dns .ai-d { animation: ai-beat 2.4s ease-in-out infinite; }

  /* migrate — the arc flows from source to target, the target fills */
  .ai-host:is(:hover, :focus-visible) .ai-migrate .ai-trace { stroke-dasharray: 1 1; animation: ai-sweep 1.4s ease-in-out infinite; }
  .ai-host:is(:hover, :focus-visible) .ai-migrate .ai-d { animation: ai-land 1.4s ease-in-out infinite; }
  .ai-host:is(:hover, :focus-visible) .ai-migrate .ai-src { animation: ai-fade 1.4s ease-in-out infinite; }
  .ai-host:is(:hover, :focus-visible) .ai-migrate .ai-head { animation: ai-head 1.4s ease-in-out infinite; }
}

@keyframes ai-pop   { 0% { transform: scale(1); } 40% { transform: scale(.78); } 75% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes ai-sweep { 0% { stroke-dashoffset: 1; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes ai-draw  { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes ai-beat  { 0%, 40%, 100% { transform: scale(1); } 52% { transform: scale(1.35); } 64% { transform: scale(.92); } 76% { transform: scale(1.12); } }
@keyframes ai-blink { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes ai-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.5px); } }
@keyframes ai-rock  { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes ai-spin  { 0% { transform: scaleX(-2); } 100% { transform: scaleX(2); } }
@keyframes ai-spin-mirrored { 0% { transform: scaleX(2); } 100% { transform: scaleX(-2); } }
@keyframes ai-beam  { 0% { transform: translateY(0); opacity: 0; } 6% { opacity: .9; } 40% { transform: translateY(13px); opacity: .9; } 46%, 100% { transform: translateY(13px); opacity: 0; } }
@keyframes ai-check { 0%, 44% { stroke-dashoffset: 1; } 70%, 100% { stroke-dashoffset: 0; } }
@keyframes ai-pass  { 0%, 70% { transform: scale(1); } 80% { transform: scale(1.4); } 90% { transform: scale(.92); } 100% { transform: scale(1); } }
@keyframes ai-head  { 0%, 42% { opacity: 0; transform: scale(.4); } 55% { opacity: 1; transform: scale(1.15); } 62%, 88% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.7); } }
@keyframes ai-land  { 0%, 45% { transform: scale(.55); opacity: .55; } 62% { transform: scale(1.15); opacity: 1; } 75%, 100% { transform: scale(1); opacity: 1; } }
@keyframes ai-fade  { 0%, 20% { opacity: 1; } 55% { opacity: .35; } 100% { opacity: 1; } }
.ai-wrap { display: block; line-height: 0; }
