/* R6-WARSAW-01 prototype (D-049): Warsaw world behind the page, see world.mjs. No parallax. */
.world { position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;contain:strict }
.world-stage { position:absolute;left:0;top:0;transform-origin:0 0 }
.w-far-blur,.w-hero,.w-hero-img,.w-lights { position:absolute;inset:0;width:100%;height:100%;max-width:none }
.w-far-blur { transform:scale(1.05);transform-origin:52% 46% }
.w-hero-hi { position:absolute;max-width:none }
.w-hero-video { position:absolute;max-width:none;object-fit:fill;opacity:.01 }   /* not 0: WebKit stalls fully transparent autoplay video (R6-AUDIT-22) */
body.world-playing .w-hero-video { opacity:1 }
body.world-playing .scene picture,body.world-playing .scene .scene-video,
body.world-still .scene picture,body.world-still .scene .scene-video { opacity:0!important;transition:none!important }
.w-hero { transition:opacity .45s ease }
.w-lights { mix-blend-mode:screen;opacity:.45;animation:w-breathe 7s ease-in-out infinite alternate }
@keyframes w-breathe { from { opacity:.28 } to { opacity:.58 } }

.w-fog { position:absolute;left:0;width:100%;overflow:hidden }
.w-fog-tile { position:absolute;inset:0 -2048px 0 0;background-repeat:repeat-x;animation:w-drift 90s linear infinite }
.w-fog-far .w-fog-tile { background-image:url(assets/world/fogB.webp);background-size:2048px 100%;opacity:.3 }
.w-fog-front { left:-6%;width:112%;bottom:-8%;height:44% }
.w-fog-front .w-fog-tile { background-image:url(assets/world/fogA.webp);background-size:1400px 100%;opacity:.32;inset:0 -1400px 0 0;animation-duration:120s;animation-name:w-drift-front }
.w-dim { position:absolute;inset:0;background:radial-gradient(ellipse at 30% 50%,rgba(5,5,5,.25),rgba(5,5,5,.7));opacity:0;transition:opacity 1.1s ease }
@keyframes w-drift { to { transform:translateX(-2048px) } }
@keyframes w-drift-front { to { transform:translateX(-1400px) } }

/* R18: the world continues behind glass, while the camera's decoded L4 remains visible.
   Hiding it here consumed a decoder without displaying Kling's real mist motion. */
.scene picture,.scene .scene-video { transition:none }
.scene::after { display:none }
/* A decoded whole-bike frame is already the destination: a second CSS fade on
   the panorama/dimmer would reveal a dark intermediate frame at handover. */
body.world-playing .w-hero,body.world-still .w-hero { opacity:1;transition:none }
body.world-playing .w-dim,body.world-still .w-dim { opacity:0;transition:none }
/* Close-ups: rack focus. The sharp city gives way to the out-of-focus one and darkens;
   opaque close-up video preserves the approved black levels. */
body.world-focus .w-hero { opacity:0 }
body.world-focus .w-dim { opacity:1 }

/* The old canvas haze copied the video's smoke; the world has its own. */
body.has-world .scene-haze,body.has-world .mobile-atmosphere { display:none!important }
/* Glass lets the blurred city through. */
body.has-world { --glass:linear-gradient(135deg,rgba(255,255,255,.05),transparent 60%),rgba(8,9,10,.6) }
body.has-world .progress,body.has-world .panels,body.has-world .action-bar,body.has-world .scene-specs { -webkit-backdrop-filter:blur(18px) saturate(1.15) ;backdrop-filter:blur(18px) saturate(1.15) }

/* Desktop: header, support strip and footer are the same glass as the panels, over the
   same world (the world element reaches from the header to the end of the page). */
@media (min-width:1000px) {
  body.has-world { overflow-x:clip }
  body.has-world .header { background:var(--glass);-webkit-backdrop-filter:blur(18px) saturate(1.15);backdrop-filter:blur(18px) saturate(1.15);border-bottom:1px solid var(--line) }
  body.has-world .support-strip,body.has-world .footer { position:relative;z-index:1;background:transparent;border-bottom:0 }
  body.has-world .support-strip::before,body.has-world .footer::before {
    content:"";position:absolute;inset:0 auto 0 calc(50% - 50vw);width:100vw;z-index:-1;
    background:var(--glass);-webkit-backdrop-filter:blur(18px) saturate(1.15);backdrop-filter:blur(18px) saturate(1.15);border-top:1px solid var(--line)
  }
  body.has-world .journey { background:transparent }
}
/* Close-up videos stay opaque. Screen-blending them over the city lifted their blacks with
   the light mist of the plate: a milky glare (phone 60 -> 93 mean brightness, 25.10). */
body.has-world .scene-column .scene { mix-blend-mode:normal }
@media (max-width:999px) {
  body.has-world .scene-column .scene { background:#000 }
  /* A single video carries mobile motion; avoid four live backdrop filters and
     duplicate animated fog layers on phones. Desktop keeps its tinted glass. */
  body.has-world .progress,body.has-world .panels,body.has-world .action-bar,body.has-world .scene-specs { -webkit-backdrop-filter:none ;backdrop-filter:none }
  .w-lights,.w-fog-tile { animation:none }
}
body.dialog-open .w-lights,body.dialog-open .w-fog-tile,
body.motion-paused .w-lights,body.motion-paused .w-fog-tile { animation-play-state:paused }
@media (prefers-reduced-motion:reduce) {
  .w-lights,.w-fog-tile { animation:none }
  .w-hero,.w-dim { transition:none }
}
