* {
  box-sizing: border-box;
}

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

.scene {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: #000;
}

/* All layers are centered on the same 16:9 artwork coordinate system. */
.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(
    calc(var(--px, 0) * 1px),
    calc(var(--py, 0) * 1px),
    0
  );
}

.layer img {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.layer-bg {
  z-index: 1;
}

.layer-bg img {
  object-fit: cover;
  object-position: center center;
}

.layer-mountains {
  z-index: 3;
}

.layer-mountains img {
  object-fit: cover;
  object-position: center bottom;
}

.layer-text {
  z-index: 4;
}

.layer-text img {
  object-fit: contain;
  object-position: center center;
}

.layer-bag {
  z-index: 5;
}

.layer-bag img {
  object-fit: cover;
  object-position: center center;
}

.layer-smoke {
  /* Smoke sits behind the mountains, as requested. */
  z-index: 2;
}

.layer-smoke img {
  object-fit: cover;
  object-position: center center;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at center,
      transparent 40%,
      rgba(0, 0, 0, 0.12) 68%,
      rgba(0, 0, 0, 0.58) 100%
    );
}

/* Small motion-control prompt, mainly needed by iOS Safari. */
.motion-prompt {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(22px + var(--safe-bottom));
  transform: translateX(-50%);
}

.motion-prompt button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: 500 12px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Phone/tablet composition:
   The text layer uses contain/width sizing instead of cover so the entire
   "COMING SOON" artwork remains visible on narrow screens. */
@media (max-width: 700px) {
  .layer-bg img {
    object-position: center center;
  }

  .layer-mountains {
    inset: auto -18% 0;
    width: 136%;
    height: 72%;
  }

  .layer-mountains img {
    object-fit: cover;
    object-position: center bottom;
  }

  .layer-text {
    inset: auto 0 auto;
    top: 9%;
    left: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .layer-text img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Mobile only: make the bag larger and move it lower so it does not
     cover the "COMING SOON" artwork as much. */
  .layer-bag {
    inset: auto;
    top: 27%;
    left: -32%;
    width: 165%;
    height: auto;
    aspect-ratio: 1672 / 941;
  }

  .layer-bag img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .layer-smoke {
    inset: auto -14% 0;
    width: 128%;
    height: 72%;
  }

  .layer-smoke img {
    object-fit: cover;
    object-position: center bottom;
  }

  .vignette {
    background:
      radial-gradient(
        ellipse at 50% 42%,
        transparent 28%,
        rgba(0, 0, 0, 0.12) 58%,
        rgba(0, 0, 0, 0.62) 100%
      );
  }
}

@media (max-width: 420px) {
  .layer-text {
    top: 11%;
  }

  .layer-bag {
    top: 29%;
    left: -35%;
    width: 172%;
  }

  .layer-mountains {
    height: 64%;
  }

  .layer-smoke {
    height: 66%;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .layer-text {
    top: 4%;
  }

  .layer-bag {
    top: 12%;
  }
}

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