* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #303136;
}

body {
  touch-action: none;
  overscroll-behavior: none;
}

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #303136;
}

.stage {
  --stage-scale: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1408px;
  height: 1023px;
  transform: translate(-50%, -50%) scale(var(--stage-scale));
  transform-origin: center center;
  will-change: transform;
}

.layer {
  position: absolute;
  display: block;
  max-width: none;
  user-select: none;
  pointer-events: none;
  will-change: transform;
}

.background {
  inset: 0;
  width: 1408px;
  height: 1023px;
}

.vases {
  left: 0;
  top: 0;
  width: 470px;
  height: 1023px;
}

.curtain {
  left: 926px;
  top: 0;
  width: 482px;
  height: 1023px;
}

/* Desktop: moved right to sit closer to the visual centre. */
.statue {
  left: 650px;
  top: 0;
  width: 157px;
  height: 658px;
}

.logo-fixed {
  position: fixed;
  left: max(36px, env(safe-area-inset-left));
  bottom: max(30px, env(safe-area-inset-bottom));
  width: 139px;
  height: auto;
  z-index: 50;
  pointer-events: none;
  user-select: none;
}

/* Mobile portrait */
@media (max-width: 700px) and (orientation: portrait) {
  .stage {
    left: 0;
    top: 0;
    width: 100vw;
    height: 100svh;
    transform: none;
  }

  .background {
    inset: -5%;
    width: 110%;
    height: 110%;
    object-fit: cover;
  }

  .vases {
    left: -32vw;
    top: -4svh;
    width: auto;
    height: 108svh;
  }

  .curtain {
    left: auto;
    right: -34vw;
    top: -4svh;
    width: auto;
    height: 108svh;
  }

  /*
    The layer is anchored to the top so the cables always touch
    the top edge. Its reduced height raises the suspended figure
    into the centre of the empty space.
  */
  .statue {
    left: 50%;
    top: 0;
    width: auto;
    height: 60svh;
    transform: translateX(-50%);
  }

  .logo-fixed {
    left: max(24px, env(safe-area-inset-left));
    bottom: max(24px, env(safe-area-inset-bottom));
    width: 118px;
  }
}

/* Mobile landscape */
@media (max-height: 520px) and (orientation: landscape) {
  .logo-fixed {
    left: max(20px, env(safe-area-inset-left));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .layer {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 700px) and (orientation: portrait) {
  .statue {
    transform: translateX(-50%) !important;
  }
}
