/*
 Theme Name:   Charlie Shaw's Revenge
 Theme URI:    https://charlieshawsrevenge.com/
 Description:  Master Child Theme for Charlie Shaw's Revenge, to pair with Divi
 Author:       NGU Digital
 Author URI:   https://www.ngudigital.co.uk
 Template:     Divi
 Version:      1.0.0
*/

/* =====================================================
   HERO SECTION (100vh WITH DIVI BACKGROUND IMAGE)
===================================================== */

#hero-video {
  position: relative;
  height: 40vh;
  overflow: hidden;
}

@media only screen and (min-width:980px){
	#hero-video {
	  position: relative;
	  height: 100vh!important;
	  overflow: hidden;
	}
}

/* Ensure Divi background behaves nicely */
#hero-video .et_pb_background_image {
  background-size: cover !important;
  background-position: center center !important;
}

/* =====================================================
   PILL CURSOR — ▶ PLAY TRAILER
===================================================== */

.custom-play-cursor {
  position: fixed;
  top: 0;
  left: 0;
  height: 52px;
  padding: 0 22px 0 16px;
  border: 1px solid #ffffff;
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.18s ease-out,
    visibility 0.18s ease-out,
    transform 0.18s ease-out;
  z-index: 9998;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Play triangle icon */
.custom-play-cursor::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid #ffffff;
}

/* Text */
.custom-play-cursor::after {
  content: "Play Trailer";
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* Active state */
.custom-play-cursor.is-active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Hide native cursor over hero when active */
body.cursor-hidden-over-hero #hero-video {
  cursor: none;
}

/* =====================================================
   VIDEO MODAL (980px)
===================================================== */

.video-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.video-lightbox.is-open {
  display: block;
}

/* Backdrop with Gaussian blur */
.video-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, 0.55);

  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
}

/* Center modal */
.video-lightbox__inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* 980px video container */
.video-lightbox__iframe-wrap {
  position: relative;
  width: 100%;
  max-width: 980px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.85);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.video-lightbox.is-open .video-lightbox__iframe-wrap {
  transform: scale(1);
}

.video-lightbox__iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Close button */
.video-lightbox__close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  line-height: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  z-index: 10000;
  transition: opacity 0.2s ease;
}

.video-lightbox__close:hover {
  opacity: 0.7;
}

/* =====================================================
   SLIDEOUT MENU CROSS CURSOR
===================================================== */

.custom-close-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease-out;
  z-index: 10000;
}

/* X shape */
.custom-close-cursor::before,
.custom-close-cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  background: #ffffff;
}

.custom-close-cursor::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.custom-close-cursor::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.custom-close-cursor.is-active {
  opacity: 1;
  visibility: visible;
}

/* Hide default cursor over slideout */
body.cursor-hidden-over-slideout #slideout-menu {
  cursor: none;
}

/* =====================================================
   MOBILE SAFETY
===================================================== */

@media (max-width: 767px) {

  .custom-play-cursor,
  .custom-close-cursor {
    display: none;
  }

  body.cursor-hidden-over-hero #hero-video,
  body.cursor-hidden-over-slideout #slideout-menu {
    cursor: auto;
  }

  .video-lightbox__iframe-wrap {
    max-width: 100%;
    border-radius: 0;
  }

}
/* =====================================================
   MOUSE SCROLL INDICATOR (BOTTOM RIGHT POSITIONED)
===================================================== */

.charlie-scroll-indicator {
  position: fixed;
  right: 10%;
  bottom: 5%;

  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;

  opacity: 0;
  transition: opacity 0.25s ease;

  pointer-events: none; /* remove if you want clickable later */
}

/* Fade in class (added via JS after 500ms) */
body.home .charlie-scroll-indicator {
  opacity: 1;
}

/* Mouse shell */
.charlie-scroll-indicator .mouse-shell {
  width: 32px;
  height: 52px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-sizing: border-box;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  padding-top: 8px;

  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Animated inner circle */
.charlie-scroll-indicator .mouse-wheel {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffffff;
  opacity: 0.9;

  animation: charlie-mouse-wheel 1.4s ease-in-out infinite;
}

@keyframes charlie-mouse-wheel {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  20% {
    transform: translateY(0);
    opacity: 1;
  }
  60% {
    transform: translateY(14px);
    opacity: 1;
  }
  100% {
    transform: translateY(14px);
    opacity: 0;
  }
}

/* Hide once user scrolls */
body.charlie-scrolled-a-bit .charlie-scroll-indicator {
  opacity: 0;
}

/* Mobile hide */
@media (max-width: 767px) {
  .charlie-scroll-indicator {
    display: none;
  }
}