/* Labs: compact cards, each with a small live drawing of what that lab works on. Loops run only while on screen. */
.motion .panel .lab-code, .lab-code { font-size: clamp(36px, 4.2vw, 48px); margin-bottom: 14px; padding-bottom: 0; }
.panel { padding: 22px; }
.panel h3 { font-size: 20px; }
.lab-art { display: block; width: 150px; height: 84px; margin-bottom: 18px; overflow: visible; }
.lab-art * { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lab-art .dim { stroke: var(--control); stroke-width: 1.2; opacity: .6; }
.lab-art .ink { stroke: var(--ink); stroke-width: 2; }
.lab-art .nd { fill: var(--synapse); stroke: none; }
.lab-art .tl { stroke: var(--delta); stroke-width: 2.2; }
.lab-art .tf { fill: var(--delta); stroke: none; }
.lab-art .am { fill: var(--ember); stroke: none; }
.panel:hover { border-color: color-mix(in srgb, var(--delta) 45%, var(--line)); }
@media (min-width: 960px) {
  .motion .panel { width: 300px; padding: 26px; min-height: 0; }
  .motion .panel .lab-code { margin-bottom: 14px; padding-bottom: 0; }
}

/* VAIL: a thought finds its path through a network */
.vail .tl { stroke-dasharray: 1; }
.live.vail .tl { animation: la-draw 3.2s var(--ease-move) infinite; }
.live.vail .on { animation: la-pulse 3.2s infinite; }
.vail .on:nth-of-type(2) { animation-delay: .35s; } .vail .on:nth-of-type(3) { animation-delay: .7s; } .vail .on:nth-of-type(4) { animation-delay: 1.05s; }
@keyframes la-draw { 0% { stroke-dashoffset: 1; opacity: 1; } 45%, 75% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes la-pulse { 0%, 100% { fill: var(--synapse); } 12%, 40% { fill: var(--delta); } }

/* VAST: many bits flow into the chip, fewer and leaner come out */
.vast .bit { transform-box: view-box; }
.live.vast .bit.in { animation: la-in 1.8s linear infinite; }
.live.vast .bit.out { animation: la-out 1.8s linear infinite; }
.vast .bit:nth-of-type(2) { animation-delay: -.6s; } .vast .bit:nth-of-type(3) { animation-delay: -1.2s; }
.live.vast .q { animation: la-q 1.8s steps(1) infinite; }
@keyframes la-in { from { transform: translateX(0); opacity: 1; } 90% { opacity: 1; } to { transform: translateX(46px); opacity: 0; } }
@keyframes la-out { from { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateX(42px); opacity: 0; } }
@keyframes la-q { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ARMS: an arm reaches down, touches, and feels it */
.arms .arm, .arms .fore { transform-box: view-box; }
.arms .arm { transform-origin: 40px 74px; } .arms .fore { transform-origin: 64px 34px; }
.live.arms .arm { animation: la-arm 3.6s var(--ease-move) infinite; }
.live.arms .fore { animation: la-fore 3.6s var(--ease-move) infinite; }
.arms .touch { opacity: 0; transform-box: fill-box; transform-origin: center; }
.live.arms .touch { animation: la-touch 3.6s infinite; }
@keyframes la-arm { 0%, 100% { transform: none; } 40%, 60% { transform: rotate(14deg); } }
@keyframes la-fore { 0%, 100% { transform: none; } 40%, 60% { transform: rotate(18deg); } }
@keyframes la-touch { 0%, 42% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; } 64% { opacity: 0; transform: scale(1.6); } 100% { opacity: 0; } }

/* VAIS: a molecule turns while its atoms are tested one by one */
.vais .mol { transform-box: view-box; transform-origin: 80px 45px; }
.live.vais .mol { animation: la-spin 14s linear infinite; }
.live.vais .orb { animation: la-spin 6s linear infinite reverse; }
.vais .orb { transform-box: view-box; transform-origin: 80px 45px; }
.live.vais .at { animation: la-pulse 3s infinite; }
.vais .at:nth-of-type(2) { animation-delay: .5s; } .vais .at:nth-of-type(3) { animation-delay: 1s; }
.vais .at:nth-of-type(4) { animation-delay: 1.5s; } .vais .at:nth-of-type(5) { animation-delay: 2s; } .vais .at:nth-of-type(6) { animation-delay: 2.5s; }
@keyframes la-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .lab-art *, .lab-art { animation: none !important; }
}
