/* hero.css */

.hero {
  min-height: 100svh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  padding-top: var(--navbar-h);
}

/* ── Ambient glow orbs ── */
.hero__orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 4;
}

.hero__orb--1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(232, 69, 0, 0.2) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  animation: orbPulse 6s ease-in-out infinite;
}

.hero__orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 106, 26, 0.15) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation: orbPulse 8s ease-in-out infinite reverse;
}

.hero__orb--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 106, 26, 0.1) 0%, transparent 70%);
  top: 50%;
  left: 60%;
  animation: orbPulse 10s ease-in-out infinite 2s;
}

/* ── Grid texture overlay ── */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 69, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 69, 0, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 3;
}

/* ── Overlay vignette cinematográfico: bordes oscuros, centro más claro
      (deja ver el video al centro, da profundidad) ── */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0.50) 0%,
    rgba(0,0,0,0.78) 55%,
    rgba(0,0,0,0.94) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ── Content ── */
.hero__content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 960px;
  padding-inline: var(--container-pad);
  padding-top: 2rem;
  /* Espacio inferior para no pisar el indicador de scroll */
  padding-bottom: 5.5rem;
}

.hero__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--color-neon-purple);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.2s ease forwards;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 13vw, 9rem);
  font-weight: 900;
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--text);
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.4s ease forwards;
}

/* "MARCA" en naranja sólido (--accent): sobrevive al split por caracteres */
.hero__title--accent {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.hero__title--small {
  font-size: clamp(1.6rem, 4.5vw, 3rem);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.18em;
  -webkit-text-fill-color: var(--color-text-muted);
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--color-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2.75rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.6s ease forwards;
}

.hero__subtitle span {
  color: var(--color-neon-purple);
  font-weight: 500;
}

/* Separador "·": en desktop se mantiene discreto (no púrpura como los servicios) */
.hero__subtitle .hero__sep {
  color: var(--color-text-muted);
  font-weight: 400;
}

.hero__cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.8s ease forwards;
}

/* ── Social proof + urgency ── */
.hero__social-proof {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeSlideUp 0.8s 1s ease forwards;
}

.hero__urgency {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--color-neon-purple);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  opacity: 0;
  animation: fadeSlideUp 0.8s 1.1s ease forwards;
}

/* ── Scroll indicator — siempre al fondo del hero, separado del texto ── */
.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeSlideUp 0.8s 1.2s ease forwards;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-purple-mid), transparent);
  animation: float 2s ease-in-out infinite;
}

/* ════════════════════════════════════════════════
   HERO CTA — máximo contraste y visibilidad
   ════════════════════════════════════════════════ */
.hero .btn--primary {
  background: linear-gradient(135deg, #ff6a1a 0%, #e84500 100%);
  animation: heroPulse 2.5s ease-in-out infinite;
  font-size: 1.3rem;
  padding: 1.25rem 3rem;
}

.hero .btn--primary:hover {
  background: linear-gradient(135deg, #ff8040 0%, #ff6a1a 100%);
  box-shadow: 0 0 40px rgba(255, 106, 26, 1), 0 0 80px rgba(232, 69, 0, 0.5);
  transform: translateY(-3px) scale(1.03);
  animation: none;
}

@keyframes heroPulse {
  0%, 100% {
    box-shadow: 0 0 18px rgba(255, 106, 26, 0.5), 0 0 40px rgba(232, 69, 0, 0.25);
  }
  50% {
    box-shadow: 0 0 32px rgba(255, 106, 26, 0.9), 0 0 70px rgba(232, 69, 0, 0.45), 0 4px 24px rgba(0,0,0,0.5);
  }
}

/* ════════════════════════════════════════════════
   FONDO: VIDEO DE FONDO
   Stack: video(0) → overlay(1) → particles(2) → grid(3) → orbs(4) → content(5)
   ════════════════════════════════════════════════ */
.hero__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Prioriza el lado derecho del encuadre (la persona) para que en pantallas
     angostas no se corte la cara al aplicar object-fit: cover. */
  object-position: 75% center;
  z-index: 0;
  opacity: 0.65;
  pointer-events: none;
}

/* ════════════════════════════════════════════════
   CANVAS DE PARTÍCULAS (brasas/chispas de fuego)
   ════════════════════════════════════════════════ */
.hero__particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */

/* Desktop: bloque de contenido (título + subtítulo + botones + social-proof)
   anclado a la IZQUIERDA para no tapar a la persona del video, que aparece a
   la derecha del encuadre. Solo ≥769px; en móvil el bloque sigue centrado. */
@media (min-width: 769px) {
  .hero__content {
    justify-self: start;   /* ancla el bloque al lado izquierdo del hero grid */
    text-align: left;
    max-width: 58%;        /* ~55-60% del ancho del hero */
  }
  .hero__cta-group { justify-content: flex-start; }
  .hero__line { margin-inline: 0; } /* líneas decorativas alineadas a la izquierda */
}

@media (max-width: 768px) {
  .hero {
    place-items: start center;
    padding-top: calc(var(--navbar-h) + 10px);
    min-height: unset;
    padding-bottom: 3rem;
  }

  .hero__content {
    padding-bottom: 5rem;
  }

  .hero__cta-group .btn--large {
    width: 90%;
    justify-content: center;
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
  }

  .hero__social-proof,
  .hero__urgency {
    font-size: 0.82rem;
  }

  /* FIX 3B — subtexto: cada servicio en su línea, separadores como ornamento */
  .hero__subtitle {
    font-size: 1rem;
    letter-spacing: .12em;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
  }
  .hero__subtitle .hero__sep {
    color: var(--accent, #ff6b00);
    font-size: .7rem;
    opacity: .6;
  }

  /* FIX 3C — overlay plano más oscuro sobre el poster para legibilidad
     (el overlay real del hero es ::after, la vignette radial; ::before es la grid) */
  .hero::after {
    background: rgba(10, 10, 10, .72);
  }
}

@media (max-width: 480px) {
  .hero__title { font-size: clamp(3rem, 18vw, 5rem); }
  .hero__scroll { display: none; }
}

/* ════════════════════════════════════════════════
   LÍNEAS DORADAS DECORATIVAS (toque premium)
   Visibles por defecto (sin JS); GSAP las dibuja con scaleX.
   ════════════════════════════════════════════════ */
.hero__line {
  display: block;
  width: min(260px, 55%);
  height: 1px;
  margin-inline: auto;
  background: var(--gold);
  opacity: 0.4;
}
.hero__line--top    { margin-bottom: 1.75rem; }
.hero__line--bottom { margin-top: 1.25rem; margin-bottom: 1.75rem; }

/* ════════════════════════════════════════════════
   GSAP controla la entrada del hero → desactivar las animaciones CSS
   de entrada para que no compitan con el timeline (la visibilidad real
   la gestiona GSAP vía estilos inline).
   ════════════════════════════════════════════════ */
.hero-js .hero__title,
.hero-js .hero__subtitle,
.hero-js .hero__cta-group,
.hero-js .hero__social-proof,
.hero-js .hero__scroll {
  animation: none !important;
  opacity: 1;
}
