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

html, body {
  height: 100%;
  background-color: #080000;
  overflow: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  color: #f5f2f2;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background layer — pure 2D GPU translation, minimal pixel bleed */
.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  z-index: 0;
}

.room-bg {
  position: absolute;
  inset: -36px;
  background-color: #080000;
  background-image: url("../brand/vda-red-room.jpg");
  background-position: 50% 44%;
  background-size: cover;
  background-repeat: no-repeat;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  contain: strict;
}

.room-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6, 0, 0, 0.72) 0%,
    rgba(6, 0, 0, 0.22) 26%,
    transparent 48%
  );
  contain: strict;
}

/* Foreground stage */
.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Floating logo — static anchor + compositor-only parallax & hover */
.logo-anchor {
  position: absolute;
  top: 41.5%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo-layer {
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.logo-float {
  animation:
    logoEntrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) both,
    logoHover 6s ease-in-out 0.9s infinite;
  will-change: transform;
}

.logo {
  display: block;
  width: min(clamp(270px, 34vw, 560px), 82vw, 76svh);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* Bottom caption */
.caption-anchor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(clamp(1.75rem, 10vh, 6rem) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
}

.caption {
  max-width: 42rem;
  text-align: center;
  font-size: clamp(0.9rem, 2.2vw, 1.15rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
  text-wrap: balance;
  transform: translate3d(0, 0, 0);
  animation: captionEntrance 0.9s ease-out 0.1s both;
  will-change: transform;
  pointer-events: auto;
}

/* Subtle iOS-only gyroscope permission trigger */
.motion-hint {
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  color: rgba(255, 255, 255, 0.62);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 240ms ease, border-color 200ms ease, color 200ms ease;
}

.motion-hint:active {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
}

.motion-hint[hidden] {
  display: none;
}

@keyframes logoEntrance {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes logoHover {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
}

@keyframes captionEntrance {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-float,
  .caption {
    animation: none;
  }

  .room-bg,
  .logo-layer,
  .logo-float,
  .caption {
    will-change: auto;
  }
}
