/* ==========================================================================
   ATMOSPHERIC ENGINE STYLES
   100% Bright and Crystal Clear Background Deity Artwork, Ambient Video & Accents
   ========================================================================== */

/* 1. Primary Full-Screen Ambient Video Layer (100% Bright & Crystal Clear) */
.video-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-deity-art);
  overflow: hidden;
  background-color: transparent;
  pointer-events: none;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  opacity: 1;
  filter: saturate(110%) contrast(102%);
  transition: opacity 0.5s var(--ease-smooth);
}

/* 2. Fast-Loading Poster Artwork Layer (Hidden when video is active) */
.scene-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-bg-video);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.deity-artwork {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  z-index: var(--z-bg-video);
  opacity: 0;
  display: none;
  pointer-events: none;
}

/* Divine Pulsing Backlight Glow */
.divine-glow {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--aura-glow) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(50px);
  opacity: 0.5;
  animation: divinePulse 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes divinePulse {
  0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.35; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.65; }
}

/* 3. Drifting Mist Layers (Light, non-obscuring) */
.mist-layer {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  background-repeat: repeat-x;
  background-size: cover;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: screen;
}

.mist-back {
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0) 60%);
  animation: driftMistBack 32s linear infinite;
}

.mist-front {
  background: radial-gradient(ellipse at 50% 75%, rgba(247, 215, 148, 0.1) 0%, rgba(0, 0, 0, 0) 55%);
  animation: driftMistFront 24s linear infinite reverse;
}

@keyframes driftMistBack {
  0% { transform: translate3d(-4%, 0, 0); }
  50% { transform: translate3d(4%, -1%, 0); }
  100% { transform: translate3d(-4%, 0, 0); }
}

@keyframes driftMistFront {
  0% { transform: translate3d(5%, 0, 0); }
  50% { transform: translate3d(-5%, 1%, 0); }
  100% { transform: translate3d(5%, 0, 0); }
}

/* 4. Canvas Particles (Petals / Golden Sacred Dust) */
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-atmosphere);
}

/* 5. Scene Wash: Subtle Edge Framing Only, Zero Blur */
.scene-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-scene-wash);
  background: radial-gradient(
    ellipse at center,
    transparent 60%,
    rgba(10, 8, 7, 0.35) 100%
  );
  pointer-events: none;
}

/* 6. Mobile Horizontal Panorama Pan: Reveals entire landscape (iOS Safari & Android GPU Accelerated) */
@media (max-width: 768px), (orientation: portrait) {
  .deity-artwork {
    width: auto !important;
    min-width: 185vh !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    left: 0;
    top: 0;
    object-fit: cover;
    transform: translate3d(calc((100vw - 100%) / 2), 0, 0);
    animation: panTransformMobile 26s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  .bg-video {
    width: auto !important;
    min-width: 185vh !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    left: 0;
    top: 0;
    transform: translate3d(calc((100vw - 100%) / 2), 0, 0);
    animation: panTransformMobile 26s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

@keyframes panTransformMobile {
  0% {
    transform: translate3d(calc((100vw - 100%) / 2), 0, 0);
  }
  25% {
    transform: translate3d(0, 0, 0);
  }
  75% {
    transform: translate3d(calc(100vw - 100%), 0, 0);
  }
  100% {
    transform: translate3d(calc((100vw - 100%) / 2), 0, 0);
  }
}

/* Motion-reduced accessibility */
@media (prefers-reduced-motion: reduce) {
  .mist-back,
  .mist-front,
  .divine-glow,
  .deity-artwork,
  .bg-video {
    animation: none !important;
  }
}
