/* Lite page only: a moving "camera" over the custom hero (custom/hero-characters.*).
   Layers sit at different depths, so they shift by different amounts and turn slightly,
   which reads as 3D. --cam-x / --cam-y (-1..1) and --cam-z (0..1, scroll push-in) are set
   by custom/lite-camera.js. Loaded after hero-characters.css, so these rules win. */

.hc-layer {
  --cam-x: 0;
  --cam-y: 0;
  --cam-z: 0;
  perspective: 1300px;
  perspective-origin: calc(50% + var(--cam-x) * 6%) calc(46% + var(--cam-y) * 5%);
}

/* far: the background. Extra bleed so the edges never show while it moves */
.hc-scene {
  inset: -8%;
  translate: calc(var(--cam-x) * -34px) calc(var(--cam-y) * -22px);
  transform:
    translateZ(calc(var(--cam-z) * 70px))
    rotateY(calc(var(--cam-x) * 2.2deg))
    rotateX(calc(var(--cam-y) * -1.6deg));
  transform-style: preserve-3d;
}

/* near: the two figures move more than the background and turn towards the camera */
.hc-chars {
  perspective: 1100px;
  perspective-origin: calc(50% + var(--cam-x) * 10%) calc(46% + var(--cam-y) * 8%);
}
.hc-left {
  translate:
    calc(-100% - var(--hc-gap) - var(--hc-p) * 30vw + var(--cam-x) * -70px)
    calc(-47% + var(--hc-p) * 10vh + var(--cam-y) * -42px);
  rotate: y calc(var(--cam-x) * 9deg + 4deg);
}
.hc-right {
  translate:
    calc(var(--hc-gap) + var(--hc-p) * 30vw + var(--cam-x) * -70px)
    calc(-31% + var(--hc-p) * 10vh + var(--cam-y) * -42px);
  rotate: y calc(var(--cam-x) * 9deg - 4deg);
}
/* figures are slightly closer at the start and drift back as the camera pushes in */
.hc-char { scale: calc(1.02 + var(--cam-z) * .06); }

/* nearest: the desk image in the spotlight part */
.hc-desk {
  translate:
    calc((1 - var(--hc-d)) * 18vw + var(--hc-do) * 22vw + var(--cam-x) * -90px)
    calc(var(--cam-y) * -50px);
  rotate: y calc(var(--cam-x) * 6deg);
}

@media (max-width: 767px) {
  /* smaller moves on phones */
  .hc-scene { translate: calc(var(--cam-x) * -18px) calc(var(--cam-y) * -12px); }
  .hc-left, .hc-right { rotate: y calc(var(--cam-x) * 6deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hc-scene { translate: none; transform: none; }
  .hc-left, .hc-right, .hc-desk { rotate: none; }
  .hc-char { scale: none; }
}
