/* Reset and Base Styles */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #050505;
  color: #ffffff;
  overflow-x: hidden;
}

/* 
  Full Screen Takeover Container
  No headers or navigation. Keeps the video locked in position as the page scrolls.
*/
.scroll-wrapper {
  position: relative;
  width: 100%;
  height: 350vh; /* Scroll depth determines video scrubbing speed and timeline length */
  background-color: #050505;
}

/* 
  Sticky Wrapper that stays locked in viewport.
  Avoids layout shift or jumpiness during ScrollTrigger operations.
*/
.hero-container {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Background Video and Dark Overlay wrapper */
.video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.bg-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* GPU Hardware Acceleration & Composition */
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000;
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

/* Dark Overlay to maintain readability for white text */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 2;
}

/* 
  Content Overlay containing absolute centered story text layers.
  Z-index sits on top of video and overlay.
*/
.content-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
  pointer-events: none; /* Allows pointer events to pass through, but CTA button explicitly allows clicking */
}

/* Common style for text blocks */
.story-text {
  position: absolute;
  text-align: center;
  width: 90%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto; /* Re-enable pointer events for interactions (CTA click) */
  will-change: transform, opacity;
}

/* Text Layer 1 styling */
.story-text-1 {
  opacity: 1;
  transform: translateY(0);
}

.story-text-1 h1 {
  font-size: clamp(2.2rem, 6.5vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1.15;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
  color: #ffffff;
}

/* Text Layer 2 styling */
.story-text-2 {
  opacity: 0;
  transform: translateY(60px);
}

.story-text-2 h2 {
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0 0 2.5rem 0;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
  color: #ffffff;
}

/* Premium CTA Button styling */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 48px;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
  color: #000000;
  background-color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.cta-btn:hover {
  background-color: transparent;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.35);
}

.cta-btn:active {
  transform: translateY(-1px);
}

/* Sub-text hint or storytelling detail under heading 2 */
.story-subtitle {
  font-size: clamp(0.85rem, 2vw, 1.25rem);
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

/* 
  Preloader Overlay
  Fullscreen black cover that fades out gracefully.
*/
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #050505;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  visibility: visible;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Preloader Content Stack */
.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Minimalist elegant preloader spinner */
.preloader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Progress Text style (inheriting WordPress fonts) */
.preloader-text {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

