/* Both photographs share the 1536 × 1024 frame. Image-space positions travel
   with the picture through the viewport crop and the existing camera transform. */
.camera-viewport {
  container-type: size;
}

.camera-world {
  --photo-width: max(100cqw, 150cqh);
  --photo-height: max(66.666667cqw, 100cqh);
  --photo-left: calc((100cqw - var(--photo-width)) / 2);
  --photo-top: calc((100cqh - var(--photo-height)) * .47);
}

.camera-page .printshop-facade::after {
  content: none;
}

.printshop-photo {
  position: absolute;
  left: var(--photo-left);
  top: var(--photo-top);
  width: var(--photo-width);
  height: var(--photo-height);
}

.printshop-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Fascia corners are (223,188), (1397,188), (1397,346), (223,347).
   The near-frontal camera allows the mounting plane to be treated as rectangular. */
.printshop-sign {
  position: absolute;
  left: 31.64%;
  top: 22.36%;
  width: 41.8%;
  height: 7.42%;
  display: flex;
  align-items: center;
  gap: 3%;
}

.printshop-sign img {
  width: 10.8%;
  height: auto;
  filter: drop-shadow(0 1px 1px #16121cec);
}

.printshop-sign svg {
  display: block;
  width: 86.2%;
  height: auto;
  fill: var(--sign, #ffe9bf);
  filter: drop-shadow(0 1px 1px #19131ce8)
          drop-shadow(0 0 .24cqw color-mix(in srgb, var(--glow, #ffca7b) 58%, transparent));
  transition: filter 450ms ease;
}

[data-light="day"] .printshop-sign svg {
  filter: drop-shadow(.08cqw .12cqw 0 #29252d) drop-shadow(.04cqw .13cqw .08cqw #15131b99);
}

.printshop-door {
  position: absolute;
  top: 47%;
  left: 75.35%;
  width: 5.6%;
  height: 4.5%;
  display: grid;
  place-content: center;
  text-align: center;
  background: #f6ede4e8;
  color: #24212b;
  font-size: calc(var(--photo-width) * .0085);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.02;
  box-shadow: 0 1px 3px #1c162855;
}

/* Image coordinates, in pixels, are sign (805,315), door (1201,546),
   and the emerging print (685,670). */
.camera-stage .hotspot {
  left: calc(var(--photo-left) + var(--photo-width) * var(--target-x));
  top: calc(var(--photo-top) + var(--photo-height) * var(--target-y));
  width: var(--target-width);
  height: var(--target-height);
  transform: translate(-50%, -50%);
}

.camera-stage .spot-sign {
  --target-x: .5241;
  --target-y: .3076;
  --target-width: 25%;
  --target-height: 16%;
}

.camera-stage .spot-door {
  --target-x: .7819;
  --target-y: .5332;
  --target-width: 10%;
  --target-height: 22%;
}

.camera-stage .spot-print {
  --target-x: .4460;
  --target-y: .6543;
  --target-width: 22%;
  --target-height: 16%;
}

.hotspot .dot {
  inset: auto;
}

.hotspot .spot-label {
  left: auto;
  right: auto;
  top: calc(50% + 15px);
}

.camera-stage[data-zone="sign"] .camera-world {
  transform: translate(-11%, -2.2%) scale(1.22);
}

.camera-stage[data-zone="door"] .camera-world {
  transform: translate(-24%, -5.5%) scale(1.3);
}

.camera-stage[data-zone="print"] .camera-world {
  transform: translate(-14%, -27%) scale(1.3);
}

@media (min-width: 1101px) {
  .camera-stage[data-zone="print"] .spot-sign {
    visibility: hidden;
  }
}

@media (min-width: 701px) and (max-width: 1100px) {
  .camera-stage[data-zone="print"] .camera-world {
    transform: translate(-14%, -15%) scale(1.3);
  }

  /* Keep the return control below the printer and away from the fascia. */
  .camera-stage[data-zone="print"] .camera-back {
    inset: auto auto 18px 18px;
  }
}

@media (max-width: 700px) {
  /* Let the viewport crop the full photo as the camera pans past the center. */
  .camera-stage .camera-world,
  .camera-page .printshop-facade {
    overflow: visible;
  }

  .camera-stage .camera-back {
    top: calc(100vw / 1.12 - 56px);
  }

  .camera-stage[data-zone="sign"] .camera-world {
    transform: translate(calc(-26% - 9px), -18%) scale(1.42);
  }

  .camera-stage[data-zone="door"] .camera-world {
    transform: translate(-70%, -49.5%) scale(1.5);
  }

  .camera-stage[data-zone="print"] .camera-world {
    transform: translate(-27%, -32.4%) scale(1.54);
  }

  .spot-door .spot-label {
    translate: var(--label-edge-offset, 0px);
  }

  .hotspot[data-marker-outside],
  .hotspot[data-label-outside] .spot-label {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .printshop-sign svg {
    transition: none;
  }
}
