/* ==========================================================================
   HATCO SPORTS INFRA - 3D HERO & SCROLL SEQUENCE STYLES
   ========================================================================== */

.hero-scroll-container {
  position: relative;
  height: 420vh; /* Scroll distance for the 8 construction phases */
  background-color: #070f0b;
  touch-action: pan-y;
}

.hero-sticky-viewport {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

#three-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  outline: none;
  pointer-events: none; /* Never blocks mouse wheel, trackpad or mobile touch scrolling */
  touch-action: pan-y;
}

/* Atmospheric Vignette & Gradients */
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(7, 14, 10, 0.75) 100%),
              linear-gradient(to bottom, rgba(7, 14, 10, 0.4) 0%, transparent 20%, transparent 75%, #070e0a 100%);
  pointer-events: none;
  z-index: 2;
}

/* 3D Construction Stage HUD Card */
.hero-hud {
  position: absolute;
  bottom: 2.5rem;
  left: clamp(1.5rem, 5vw, 4rem);
  z-index: 10;
  max-width: 480px;
  background: rgba(10, 22, 16, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--border-radius-md);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  pointer-events: auto;
}

.hud-phase-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.hud-phase-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-accent);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.hud-title {
  font-size: 1.35rem;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.hud-desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Grand Hero Banner (Visible on Stage 1 initial load & Stage 8 completion) */
.hero-content-overlay {
  position: absolute;
  z-index: 10;
  width: 100%;
  max-width: var(--container-max-width);
  padding: 0 var(--container-padding);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.hero-main-title {
  font-size: clamp(2.5rem, 6.5vw, 5.25rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 950px;
}

.hero-main-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: #cbd5e1;
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  pointer-events: auto;
  flex-wrap: wrap;
}

/* Scroll Progress Sidebar Indicator */
.hero-progress-nav {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  pointer-events: auto;
}

.progress-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.progress-step-dot:hover,
.progress-step-dot.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.4);
  box-shadow: 0 0 12px var(--color-accent);
}

.progress-step-dot::before {
  content: attr(data-label);
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(9, 19, 13, 0.9);
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-heading);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.progress-step-dot:hover::before {
  opacity: 1;
}

/* Bottom Scroll Prompt */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
  pointer-events: none;
}

.scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid var(--color-accent);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollAnim 1.8s infinite;
}

@keyframes scrollAnim {
  0% { top: 6px; opacity: 1; }
  100% { top: 20px; opacity: 0; }
}

/* Fallback for WebGL Unavailable or Reduced Motion */
.hero-fallback {
  display: none;
  position: relative;
  min-height: 85vh;
  background: radial-gradient(circle at 70% 30%, rgba(32, 79, 55, 0.4) 0%, #070e0a 70%),
              url('../images/hero-arena-night.png') center/cover no-repeat;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 2rem) 0 4rem;
}

.no-webgl .hero-scroll-container {
  display: none;
}

.no-webgl .hero-fallback {
  display: flex;
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-container {
    height: 250vh;
  }
}

@media (max-width: 768px) {
  .hero-scroll-container {
    height: 350vh;
    touch-action: pan-y;
  }
  .hero-sticky-viewport {
    height: 100dvh;
    touch-action: pan-y;
  }
  .hero-hud {
    bottom: 1.5rem;
    left: 1.25rem;
    right: 1.25rem;
    max-width: none;
    padding: 1.25rem;
  }
  .hero-progress-nav {
    display: none;
  }
}
