/* Dexmate clips under the gesture-to-robot figure: a row of square tiles; the tile under the pointer grows.
   Each tile grows from its own place in the row (the first from its left edge, the last from its right),
   so the enlarged clip never leaves the column. On touch screens a tap does what the pointer does (js/robots.js). */
.robots { margin-top: 34px; }
.robots-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-bottom: 12px; }
.robots-head .panel-label { margin: 0; }
.robots-hint { font-size: 12.5px; line-height: 1.4; color: var(--ink-faint); }
.robots-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }

.robot-tile {
  position: relative; z-index: 0; margin: 0; min-width: 0; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius-media); background: var(--stage); box-shadow: 0 0 0 1px var(--hair); cursor: zoom-in;
  transition: transform 280ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 280ms ease, opacity 220ms ease;
}
.robot-tile video { width: 100%; height: 100%; object-fit: cover; }
.robot-tile:nth-child(1) { transform-origin: 0% 50%; }
.robot-tile:nth-child(2) { transform-origin: 25% 50%; }
.robot-tile:nth-child(3) { transform-origin: 50% 50%; }
.robot-tile:nth-child(4) { transform-origin: 75% 50%; }
.robot-tile:nth-child(5) { transform-origin: 100% 50%; }

.robot-tile.is-open, .robot-tile:focus-visible {
  transform: scale(1.9); z-index: 3; border-radius: var(--radius-media);
  box-shadow: 0 0 0 1px var(--line-strong), 0 30px 70px -18px rgba(0, 0, 0, 0.85);
}
.robot-tile:focus-visible { outline-offset: 2px; }
@media (hover: hover) {
  .robot-tile:hover {
    transform: scale(1.9); z-index: 4;
    box-shadow: 0 0 0 1px var(--line-strong), 0 30px 70px -18px rgba(0, 0, 0, 0.85);
  }
  .robots-grid:hover .robot-tile:not(:hover) { opacity: 0.5; }
}
@media (hover: none) {
  .robots-hint { display: none; }
}
.robots-grid.has-open .robot-tile:not(.is-open) { opacity: 0.5; }

@media (max-width: 760px) {
  .robots { margin-top: 26px; }
  .robots-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .robot-tile { grid-column: span 2; }
  .robot-tile:nth-child(4) { grid-column: 2 / span 2; }
  .robot-tile:nth-child(5) { grid-column: 4 / span 2; }
  .robot-tile:nth-child(1) { transform-origin: 0% 0%; }
  .robot-tile:nth-child(2) { transform-origin: 50% 0%; }
  .robot-tile:nth-child(3) { transform-origin: 100% 0%; }
  .robot-tile:nth-child(4) { transform-origin: 0% 100%; }
  .robot-tile:nth-child(5) { transform-origin: 100% 100%; }
  .robot-tile.is-open, .robot-tile:focus-visible { transform: scale(2); }
}
@media (prefers-reduced-motion: reduce) {
  .robot-tile { transition: none; }
}
