/* style.css */

/* ============================================
   PRELOAD STATE - Prevents animations on load
   ============================================ */
.preload * {
  -webkit-transition: none !important;
  transition: none !important;
  -webkit-animation: none !important;
  animation: none !important;
  opacity: 0;
}

/* ============================================
   BASE STYLES
   ============================================ */
html,
body {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #000;
  overflow: hidden;
}

body { -webkit-tap-highlight-color: transparent; }

/* Remove focus outlines and borders */
::-moz-focus-inner { border: 0; }
:focus { outline: none; }

/* Disable text/image selection */
html div, html img, body div, body img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Default div behavior for backgrounds */
div {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  will-change: opacity;
  -webkit-transition: opacity 1.4s ease-in-out;
  transition: opacity 1.4s ease-in-out;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.alphanull { opacity: 0; }

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
  --site-width: 1000px;
  --safezone-height: 88%;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
  position: relative;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translateX(-50%);
  background-image: url("../img/bg.webp");
  background-position: center;
  background-size: cover;
  cursor: pointer;
  -webkit-perspective: 1000px;
  perspective: 1000px;
  -webkit-transition: opacity 2s ease-in-out;
  transition: opacity 2s ease-in-out;
  opacity: 0;
}

/* ============================================
   SIDE CONTENT (Left & Right)
   ============================================ */
.sbl, .sbr {
  position: absolute;
  width: calc(50% - 500px);
  height: 100%;
  opacity: 0;
  -webkit-transition: opacity 0.6s ease-in-out;
  transition: opacity 0.6s ease-in-out;
}

.sbl { left: 0; }
.sbr { right: 0; }

.scrolled .sbr, .scrolled .sbl { opacity: 1; }

/* ============================================
   INFO PANELS (Side content when scrolled)
   ============================================ */
.info {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background-position: bottom;
  opacity: 0;
}

.info-top { background-position: top; }

#sb-bottom-l { background-image: url("../img/sb-bottom.webp"); }
#sb-bottom-r { background-image: url("../img/sb-bottom.webp"); }
#sb-top-l    { background-image: url("../img/sb-top.webp"); }
#sb-top-r    { background-image: url("../img/sb-top.webp"); }

.scrolled .info {
  transition-delay: 0.5s;
  opacity: 1 !important;
}

/* ============================================
   SB-CTA (829x313px) - Centered on sidebars
   ============================================ */
.sb-cta {
  position: absolute;
  width: 100%;
  height: auto;
  aspect-ratio: 829 / 313;
  background-image: url("../img/sb-cta.webp");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
  -webkit-transition: opacity 0.6s ease-in-out;
  transition: opacity 0.6s ease-in-out;
}

.scrolled .sb-cta {
  transition-delay: 0.5s;
  opacity: 1 !important;
}

.sb-cta:hover {
  -webkit-filter: brightness(1.2);
  filter: brightness(1.2);
}

/* ============================================
   SAFEZONE
   ============================================ */
.safezone {
  position: absolute;
  width: 100%;
  min-width: 1000px;
  height: 88%;
  opacity: 0;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  z-index: 200;
}

#action { width: 100%; height: 100%; }

/* ============================================
   HEADER LOGOS
   ============================================ */
.header-logos {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1000px;
  height: auto;
  aspect-ratio: 1994 / 736;
  transform: translateX(-50%);
  background-image: url("../img/header.webp");
  background-position: center top;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
}

/* ============================================
   BUTTONS (FOOTER)
   ============================================ */
.buttons {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1000px;
  height: auto;
  aspect-ratio: 1994 / 73;
  transform: translateX(-50%);
  font-size: 0;
  text-align: center;
  background-image: url("../img/footer.webp");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
}

.buttons.animate {
  animation: slideInFromLeft 0.6s ease-out forwards;
}

@keyframes slideInFromLeft {
  0% { opacity: 0; transform: translateX(calc(-50% - 40px)); }
  100% { opacity: 1; transform: translateX(-50%); }
}

.buttons .button:hover {
  -webkit-filter: brightness(1.2);
  filter: brightness(1.2);
}

/* ============================================
   PACKSHOTS
   ============================================ */
.packshots {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1000px;
  height: auto;
  aspect-ratio: 1994 / 354;
  transform: translateX(-50%);
  background-image: url("../img/packshots.webp");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center bottom;
  opacity: 0;
  pointer-events: none;
}

.packshots.animate {
  animation: fadeIn 0.6s ease-out forwards;
}

/* ============================================
   VIDEO TRAILER + PLAY BUTTON
   ============================================ */
.trailer,
.play {
  position: absolute;
  opacity: 0;
}

/* Video positioned by JS - WITHOUT position transition */
.trailer {
  z-index: 300;
  object-fit: cover;
  -webkit-transition: opacity 0.3s ease-in-out !important;
  transition: opacity 0.3s ease-in-out !important;
}

/* Play button synchronized with video */
.play {
  z-index: 350;
  cursor: pointer;
  pointer-events: auto;
  object-fit: contain;
  -webkit-transition: opacity 0.6s ease-out;
  transition: opacity 0.6s ease-out;
}

.trailer:hover + .play,
.play:hover {
  -webkit-filter: brightness(1.2);
  filter: brightness(1.2);
}

.active .play {
  opacity: 0;
  visibility: hidden;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1250px) {
  .sbl, .sbr { opacity: 0 !important; }
}

@media (max-width: 1110px) {
  .play {
    height: 54%;
    top: 52%;
  }
}

/* ============================================
   CTA (info-cta.webp 909x336px) - WITHOUT transition
   ============================================ */
.cta {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: auto;
  aspect-ratio: 909 / 336;
  background-image: url("../img/info-cta.webp");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left top;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ============================================
   VIDEO BG IMAGE (963x597) - Vertically centered
   ============================================ */
.video-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: auto;
  aspect-ratio: 963 / 597;
  background-image: url("../img/video-bg.webp");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: right center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Enlarge (playback) - Max dimensions 960x540 */
.active .trailer {
  width: 960px !important;
  height: 540px !important;
  max-width: 960px !important;
  max-height: 540px !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain !important;
  -webkit-transition: all 0.6s ease-out !important;
  transition: all 0.6s ease-out !important;
}

/* ============================================
   DARKEN OVERLAY
   ============================================ */
.darken {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: auto;
  opacity: 0;
  background: #000;
  -webkit-transition: 1s;
  transition: 1s;
  pointer-events: none;
  z-index: 150;
}

.active .darken { opacity: 0.7; }

/* ============================================
   CLOSE BUTTON
   ============================================ */
.close {
  position: absolute !important;
  top: 20px !important;
  right: 10px !important;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
}

.close.animate {
  animation: fadeIn 0.6s ease-out forwards;
  animation-delay: 1.6s;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.close:hover { opacity: 1 !important; }

.close.dark {
  background: url("../img/close-dark.svg") no-repeat center/73%;
  background-color: rgba(255, 255, 255, 0.5);
}

.close.light {
  background: url("../img/close-btn.png") no-repeat center/73%;
  background-color: rgba(0, 0, 0, 0);
}

.scrolled .close {
  opacity: 0;
  visibility: hidden;
}

/* ============================================
   SITE FOOTER
   ============================================ */
#site {
  position: absolute;
  width: 1000px;
  height: 12%;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  background-color: transparent;
}

/* ============================================
   AD LABELS (ANZEIGE)
   ============================================ */
#al, #ar {
  position: fixed;
  font-family: Arial, sans-serif;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
  text-align: center;
  z-index: 10000;
}

#al { left: 10px; top: 10px; }
#ar { right: 10px; top: 10px; }

/* ============================================
   PLAYBACK MODE: hide decorations (not safezone)
   ============================================ */
.active .header-logos,
.active .buttons,
.active .packshots,
.active .video-bg,
.active .cta {
  opacity: 0 !important;
  visibility: hidden !important;
}
