/* "Your next role starts with one free class." - the learner in 3D
   (assets/js/cta-3d.js). The picture holds the space until the model is
   ready, and stays wherever the model does not load. */

.cta-band--img .cta-band__art[data-cta3d] {
  position: relative;
  width: min(580px, 46vw);
  aspect-ratio: 9 / 8;
  align-self: center;
  margin: -24px -12px -30px 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.cta-band--img .cta-band__art[data-cta3d] img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transition: opacity .6s ease;
}
.cta-band--img .cta-band__art[data-cta3d].is-3d { pointer-events: auto; }
.cta-band--img .cta-band__art[data-cta3d].is-3d img { opacity: 0; }

.cta3d__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity .6s ease;
  touch-action: pan-y;          /* a vertical swipe still scrolls the page */
  cursor: grab;
  outline: none;
}
.is-3d > .cta3d__canvas { opacity: 1; }
.is-3d.is-pointing > .cta3d__canvas { cursor: pointer; }
.is-3d.is-dragging > .cta3d__canvas { cursor: grabbing; }

.cta3d__tip {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, calc(-100% - 16px));
  padding: 6px 11px;
  border-radius: 999px;
  background: #0b1f2df0;
  border: 1px solid #70edcd59;
  color: #e8fffa;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
}
.cta3d__tip.is-on { opacity: 1; }

.cta3d__hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: #0a2a35d9;
  border: 1px solid #70edcd40;
  color: #bfe1dc;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .6s ease;
}
.cta3d__hint.is-gone { opacity: 0; }

.cta3d__pause {
  position: absolute;
  right: 4px;
  top: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #70edcd45;
  background: #0a2a35cc;
  color: #bfe1dc;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.cta3d__pause:hover { border-color: #70edcd; color: #70edcd; }
.cta3d__pause:focus-visible { outline: 2px solid #70edcd; outline-offset: 3px; }

@media (max-width: 900px) {
  /* stacked under the words, so it no longer squeezes the buttons, and
     reaching into the band's side padding so it is as big as the band allows */
  .cta-band--img .cta-band__art[data-cta3d] {
    display: block;
    width: calc(100% + 48px);
    max-width: 560px;
    margin: 4px auto -18px;
    justify-self: center;
  }
}
