/* css/hero.css */

.hero-section {
  position: relative;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--spacing-md);
  padding-bottom: var(--spacing-3xl);
  border-bottom: 1px solid var(--border-hairline);
}

@media (max-width: 900px) {
  .hero-section {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-2xl);
  }
}


/* Background Mountain & Star Elements */
.hero-bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Low-opacity subtle background mountain silhouette line art */
.hero-mountain-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  filter: grayscale(1);
}

/* Stars background overlay */
.hero-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px),
    radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.05) 2px, transparent 2px),
    radial-gradient(circle at 85% 85%, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 400px 400px;
  width: 100%;
  height: 100%;
}

/* Interactive SVG path for the Lightning Mountain Trace overlay */
.lightning-trace-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  /* Anchored to bottom half */
  z-index: 2;
  pointer-events: none;
}

.lightning-path {
  fill: none;
  stroke: var(--accent-lime);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(198, 255, 61, 0.5));

  /* Tracing animation preparation */
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  /* Will trigger via Javascript on DOMContentLoaded, or run via CSS on load */
  animation: drawLightning 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes drawLightning {
  to {
    stroke-dashoffset: 0;
  }
}

/* Static fallback if animation completes or for reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .lightning-path {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }
}

/* Hero Content Styling - Grid Layout */
.hero-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--spacing-xl); /* 32px gap on desktop */
  position: relative;
  z-index: 5;
}

@media (max-width: 900px) {
  .hero-layout-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-md); /* 16px gap on mobile */
  }
}

.hero-content {
  max-width: 680px;
}

@media (max-width: 900px) {
  .hero-content {
    margin: 0 auto;
    order: 2; /* Text below image on mobile */
  }
}

.hero-kicker {
  font-family: var(--font-mono);
  color: var(--accent-lime);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

@media (max-width: 900px) {
  .hero-kicker {
    justify-content: center;
  }
}

.hero-kicker::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 1px;
  background-color: var(--accent-lime);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
  margin-bottom: var(--spacing-lg);
  font-family: var(--font-display);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
}

@media (max-width: 900px) {
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-section {
    padding-top: var(--spacing-3xl);
    padding-bottom: var(--spacing-3xl);
  }

  .hero-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

/* Hero Carousel Styles */
.hero-carousel-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/4;
  max-height: 600px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  /* Optional: subtle bg to show bounds if image is transparent/small */
  background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 70%);
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}

@media (max-width: 900px) {
  .hero-carousel-container {
    aspect-ratio: 16/9;
    max-height: 400px;
    order: 1; /* Image above text on mobile */
  }
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.hero-bg-img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none; /* Prevent drag ghosting on desktop */
}

/* Pause animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    transition: none !important;
  }
}

.carousel-indicators {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 10;
  pointer-events: auto; /* Allow clicking the dots */
}

.carousel-indicators .indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-indicators .indicator.active {
  background-color: var(--accent-lime);
  transform: scale(1.3);
}

.carousel-indicators .indicator:hover {
  background-color: rgba(255, 255, 255, 0.8);
}