/* Selected Clients, flip tiles (10 Nov 2026, option B from hero-lab/clients-options.html). Six sector clusters of
   tiles in two columns; in a sector with more than six clients one tile at a time flips to the next client (main.js).
   Square grey and magenta pixels behind, as in the pattern. The sector buttons keep their a.css styles. */
.clients .ct { margin-top: clamp(40px, 7vh, 72px); }
.ct-px { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; pointer-events: none; }

/* the list of clients: the accessible list of names; shown as a plain logo grid only if the script never runs */
.ct-src { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; }
.ct-src img { max-width: 100%; height: auto; max-height: 56px; filter: invert(1) grayscale(1); mix-blend-mode: screen; }
.ct-on .ct-src { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.ct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vh, 64px) clamp(32px, 5vw, 96px); }
.ct-cluster { transition: opacity .4s var(--ease); }
.ct-k { display: inline-block; margin: 0 0 18px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font: 400 11px/1 var(--f-mono); letter-spacing: .16em;
  text-transform: uppercase; color: var(--fg-2); transition: color .3s, border-color .3s; }
.ct-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ct-tile { position: relative; height: 104px; perspective: 600px; }
.ct-in { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px 18px; border: 1px solid var(--rule-soft); border-radius: 14px;
  background: oklch(0.16 0.008 358 / .6); transition: border-color .3s, opacity .3s; }
/* the node: one square pixel in the corner of each tile */
.ct-in::before { content: ""; position: absolute; left: 12px; top: 12px; width: 5px; height: 5px; background: var(--fg-3); transition: background-color .3s; }
.ct-tile:nth-child(4n+2) .ct-in::before { background: var(--accent); }
.ct-logo { display: block; width: var(--w); max-width: 100%; height: auto; max-height: 54px; object-fit: contain; opacity: 0; transition: opacity .35s; }
.ct-logo.is-in { opacity: .95; }

/* the flip: the tile turns edge-on, the next client is put in, it turns back */
.ct-tile.flip .ct-in { animation: ct-flip .62s cubic-bezier(.5, 0, .2, 1); }
@keyframes ct-flip { 0% { transform: rotateX(0); } 48% { transform: rotateX(-90deg); } 52% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.ct-tile.fade .ct-in { opacity: 0; }

/* a lit sector */
.ct-grid.has-on .ct-cluster { opacity: .28; }
.ct-grid .ct-cluster.on { opacity: 1; }
.ct-cluster.on .ct-k { color: var(--accent); border-color: var(--accent); }
.ct-cluster.on .ct-in { border-color: oklch(0.6 0.244 358.6 / .45); }
.ct-cluster.on .ct-in::before { background: var(--accent); }

@media (max-width: 1023px) { .ct-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .clients .ct { margin-top: 32px; }
  .ct-grid { gap: 36px; }
  .ct-tiles { gap: 8px; }
  .ct-tile { height: 84px; }
  .ct-in { padding: 10px 12px; border-radius: 12px; }
  .ct-in::before { left: 9px; top: 9px; width: 4px; height: 4px; }
  .ct-logo { max-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .ct-tile.flip .ct-in { animation: none; } }
