/* ===================================
   Hero Section
   =================================== */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  min-height: 100vh;
  padding: 75% var(--space-md) var(--space-3xl);
  position: relative;
  overflow: hidden;
}

/* Video Background */
.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  background-color: var(--color-dark);
}

/* grid Pattern Background - Bottom 35% with fade */
.hero-grid-pattern {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: gridFadeIn 3s ease-out forwards;
  animation-delay: 3s;
}

@keyframes gridFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.25;
  }
}

.hero-grid-pattern img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    transparent 10%,
    transparent 70%,
    black 100%
  );
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    transparent 10%,
    transparent 70%,
    black 100%
  );
  mask-size: cover;
  -webkit-mask-size: cover;
}

/* Wide screens - full width coverage */
@media (min-width: 1024px) {
  .hero-grid-pattern img {
    object-fit: cover;
    width: 100vw;
    max-width: none;
    height: 100vh;
  }
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mask-image: linear-gradient(to bottom, black 60%, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 75%);
}

.hero-subtitle {
  color: var(--color-light);
  padding: 0 1rem;
}

.hero-content {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 4s;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: absolute;
  top: 60%;
  left: 0;
  z-index: 10;
}

.hero-scroll-indicator {
  --arrow-y: 0px;
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  opacity: 0;
  text-decoration: none;
  transform: translateY(var(--arrow-y));
  animation:
    fadeIn 1s ease forwards,
    bounce 2s ease-in-out infinite;
  animation-delay: 6s, 7s;
  z-index: 10;
}

.hero-scroll-indicator svg {
  width: 32px;
  height: 32px;
  color: var(--color-light);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(var(--arrow-y));
  }
  50% {
    transform: translateY(calc(var(--arrow-y) + 10px));
  }
}

/* Hero Middle Container - Between video and content */
.hero-middle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 2s ease;
}

.hero-middle-container.visible {
  opacity: 0.4;
  pointer-events: auto;
}

#projector {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Desktop hero */
@media (min-width: 768px) {
  .hero {
    min-height: 100vh;
    padding: var(--space-3xl) 0;
  }

  .hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .hero-subtitle {
    font-size: 1.125rem;
    max-width: 600px;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: var(--space-3xl) 0;
  }

  .hero-content {
    transform: translateY(5rem);
  }

  .hero-subtitle {
    font-size: 1.25rem;
    max-width: 700px;
  }

  .hero-scroll-indicator {
    margin-top: 0;
    --arrow-y: -0.5rem;
  }
}
