/**
 * Home Hero Parallax Block
 * Full-screen hero with parallax scroll effects
 */

.home-hero-parallax {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Background layer with parallax effect */
.home-hero-parallax__background {
  position: absolute;
  top: -150px; /* Extend upward to prevent gaps during scroll transitions */
  left: 0;
  width: 100%;
  height: calc(120% + 150px); /* Compensate for negative top */
  z-index: 0; /* Lowest layer - image/video */
  will-change: transform, opacity;
  transition: transform 0.1s ease-out, opacity 0.3s ease-out;
}

.home-hero-parallax__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-hero-parallax__video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.home-hero-parallax__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Middle layer - between background and content */
  background-color: var(--overlay-color, #000000);
  opacity: var(--overlay-opacity, 0.4);
  transition: opacity 0.3s ease-out, background-color 0.3s ease-out;
  pointer-events: none; /* Allow clicks to pass through to content */
}

/* Content layer */
.home-hero-parallax__content {
  position: relative;
  z-index: 2; /* Top layer - text and button */
  width: 100%;
  max-width: 1200px;
  padding: 0 2rem;
  text-align: center;
  color: var(--text-color, white);
  will-change: opacity;
  transition: opacity 0.3s ease-out;
}

.home-hero-parallax__inner {
  max-width: 900px;
  margin: 0 auto;
}

.home-hero-parallax__title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text-color, white);
  animation: fadeInUp 0.8s ease-out;
}

.home-hero-parallax__subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  color: var(--text-color, white);
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Text shadow effect when enabled */
.home-hero-parallax--shadow .home-hero-parallax__title {
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 4px 12px rgba(0, 0, 0, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.4);
}

.home-hero-parallax--shadow .home-hero-parallax__subtitle {
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.7),
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Text glow effect when enabled */
.home-hero-parallax--glow .home-hero-parallax__title {
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 255, 255, 0.3),
    0 2px 10px rgba(0, 0, 0, 0.3);
}

.home-hero-parallax--glow .home-hero-parallax__subtitle {
  text-shadow:
    0 0 15px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(255, 255, 255, 0.2),
    0 1px 5px rgba(0, 0, 0, 0.2);
}

.home-hero-parallax__cta {
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.home-hero-parallax__button {
  display: inline-block;
  padding: 1rem 3rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--button-text-color, #7d11ff);
  background: var(--button-bg-color, white);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.home-hero-parallax__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  opacity: 0.9;
}

/* Scroll indicator */
.home-hero-parallax__scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  animation: bounce 2s ease-in-out infinite;
}

.home-hero-parallax__scroll-indicator svg {
  width: 24px;
  height: 24px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .home-hero-parallax {
    min-height: 500px;
  }

  .home-hero-parallax__content {
    padding: 0 1.5rem;
  }

  .home-hero-parallax__button {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
  }

  .home-hero-parallax__scroll-indicator {
    bottom: 2rem;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .home-hero-parallax__background {
    transition: none;
  }

  .home-hero-parallax__title,
  .home-hero-parallax__subtitle,
  .home-hero-parallax__cta {
    animation: none;
  }

  .home-hero-parallax__scroll-indicator {
    animation: none;
  }
}
