/**
 * Hero Section - TecnoMax v2.0
 * Animated background with particles, grid, glow effects
 */

/* ============================================
   HERO MAIN CONTAINER
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0e27 0%, #1a2850 100%);
}

@media (max-width: 640px) {
  .hero {
    min-height: 60vh;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .hero {
    min-height: 70vh;
  }
}

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */

/* Animated Grid Background */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(0deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: 0 0, 0 0;
  animation: grid-move 20s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes grid-move {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 50px 0, 0 50px;
  }
}

/* Central Glow - Radial Gradient */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

@media (max-width: 640px) {
  .hero::after {
    width: 400px;
    height: 400px;
  }
}

/* ============================================
   PARTICLE CANVAS
   ============================================ */
#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* ============================================
   HERO CONTENT
   ============================================ */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  padding: var(--sp-2xl);
  animation: fade-in 0.8s ease-out;
}

@media (max-width: 640px) {
  .hero-content {
    padding: var(--sp-lg);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   HERO HEADLINE
   ============================================ */
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-lg);
  animation: headline-enter 0.8s ease-out;
  line-height: 1.1;
}

@keyframes headline-enter {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient text effect on headline */
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--color-accent-cyan) 0%, var(--color-accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   HERO SUBHEADLINE
   ============================================ */
.hero .subheadline {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--sp-2xl);
  max-width: 700px;
  line-height: 1.8;
  animation: subheadline-enter 1s ease-out 0.2s both;
}

@media (max-width: 640px) {
  .hero .subheadline {
    font-size: 1rem;
  }
}

@keyframes subheadline-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   HERO CTA BUTTONS
   ============================================ */
.hero-buttons {
  display: flex;
  gap: var(--sp-lg);
  justify-content: center;
  flex-wrap: wrap;
  animation: buttons-enter 1.2s ease-out 0.4s both;
}

@keyframes buttons-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-buttons .btn {
  padding: 1.25rem 2.5rem;
  font-size: 1rem;
  min-height: 56px;
}

.hero-buttons .btn:hover {
  animation: button-bounce 0.6s ease;
}

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

@media (max-width: 640px) {
  .hero-buttons {
    flex-direction: column;
    gap: var(--sp-md);
  }

  .hero-buttons .btn {
    width: 100%;
  }
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  animation: scroll-bounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-accent-cyan);
  fill: none;
  stroke-width: 2;
}

@keyframes scroll-bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
  100% {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .scroll-indicator {
    bottom: 1rem;
  }
}

/* ============================================
   HERO VARIANTS
   ============================================ */

/* Smaller hero for inner pages */
.hero-small {
  min-height: 40vh;
  padding: var(--sp-3xl) var(--sp-lg);
}

@media (max-width: 640px) {
  .hero-small {
    min-height: 30vh;
    padding: var(--sp-2xl) var(--sp-md);
  }
}

.hero-small h1 {
  font-size: var(--fs-h2);
}

/* ============================================
   CONTENT OVER HERO
   ============================================ */
.content-over-hero {
  position: relative;
  z-index: 20;
  width: 100%;
}
