/* Shapesound: the bundle constellation (tech/bundle3d.css), the styles for tech/bundle3d.js.
   Nothing here changes the panel until the script has gone live (class is-live on .bundle-art); without
   WebGL2 the static grid of tiles stays exactly as draft.css draws it. */

.bundle-art[data-bundle3d].is-live {
  display: block;
  isolation: isolate;
  contain: layout paint;
}

/* The live field and threads. It fades in over the static wave image as the tiles gather. */
.bundle-art[data-bundle3d] .b3-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s ease;
}
.bundle-art[data-bundle3d] .b3-canvas.is-on { opacity: 1; }
.bundle-art[data-bundle3d] .b3-canvas.is-lost { visibility: hidden; opacity: 0; transition: none; }

/* Each tile is a link, laid out larger than it is shown and only ever scaled down, so it stays crisp. */
.bundle-art[data-bundle3d] .b3-tile {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  display: block;
  width: var(--b3-r, 128px);
  height: var(--b3-r, 128px);
  border-radius: 24%;
  transform-origin: 50% 50%;
  will-change: transform;
  outline: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  filter: brightness(var(--b3-dim, 1));
  transition: filter 0.35s ease;
}
.bundle-art[data-bundle3d] .b3-tile.is-active { filter: brightness(1.14) saturate(1.06); }
.bundle-art[data-bundle3d].is-live .b3-tile img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.55));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Keyboard focus: a ring round the rounded tile itself (the tile fills the middle 80% of its image). */
.bundle-art[data-bundle3d] .b3-tile::after {
  content: "";
  position: absolute;
  inset: 6.5%;
  border-radius: 26%;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--b3-accent, #7aa8f5) 50%, #ffffff);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.bundle-art[data-bundle3d] .b3-tile:focus-visible::after { opacity: 1; }

/* Name and job, shown on hover or focus. */
.bundle-art[data-bundle3d] .b3-label {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px 8px 11px;
  border-radius: 999px;
  background: rgba(9, 12, 16, 0.9);
  border: 1px solid color-mix(in srgb, var(--b3-accent, #7aa8f5) 30%, rgba(255, 255, 255, 0.06));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  font: 600 13px/1 var(--sans, "Manrope", -apple-system, BlinkMacSystemFont, sans-serif);
  color: var(--text-2, #b9c3cf);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.bundle-art[data-bundle3d] .b3-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--b3-accent, #7aa8f5);
  box-shadow: 0 0 10px var(--b3-accent, #7aa8f5);
}
.bundle-art[data-bundle3d] .b3-label b { color: var(--text, #f4f6f9); font-weight: 700; }
.bundle-art[data-bundle3d] .b3-label i { font-style: normal; color: var(--muted, #7d8a99); }
.bundle-art[data-bundle3d] .b3-label.is-on { opacity: 1; }

@media (max-width: 640px) {
  .bundle-art[data-bundle3d] .b3-label { gap: 6px; padding: 7px 11px 7px 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .bundle-art[data-bundle3d] .b3-tile,
  .bundle-art[data-bundle3d] .b3-tile::after,
  .bundle-art[data-bundle3d] .b3-label { transition: none; }
  .bundle-art[data-bundle3d] .b3-canvas { transition-duration: 0.2s; }
}
