/* ============================================================
   hero.css — sección de portada (fondo OSCURO)
   ============================================================ */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + 92px) 24px 104px;
  overflow: hidden;
  background:
    radial-gradient(1100px 560px at 78% 6%, rgba(41, 82, 163, 0.22), transparent 62%),
    radial-gradient(900px 500px at 8% 90%, rgba(74, 127, 224, 0.08), transparent 60%);
}

/* Líneas geométricas finas trazadas al cargar (evocan el monograma ATX) */
.hero__decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}
.hero__decor path,
.hero__decor line {
  fill: none;
  stroke: var(--blue-bright);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
  animation: traceLine 2.6s var(--ease-precise) forwards;
  animation-delay: calc(0.5s + var(--d, 0) * 1s);
}
@keyframes traceLine {
  to { stroke-dashoffset: 0; }
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.hero__eyebrow {
  display: inline-block;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 22px;
  padding-left: 40px;
  position: relative;
  opacity: 0;
  animation: heroFade 0.8s var(--ease-precise) forwards;
  animation-delay: 0.2s;
}
.hero__eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 28px;
  height: 1px;
  background: var(--blue-bright);
  box-shadow: 0 0 8px rgba(74, 127, 224, 0.7);
}

.hero__title {
  font-size: clamp(3rem, 8vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.hero__title-accent {
  color: var(--blue-bright);
  text-shadow: 0 0 40px rgba(74, 127, 224, 0.45);
}

/* Reveal por palabras (stagger) — inyectado por JS */
.hero__title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.hero__title .word__i {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  animation: wordUp 0.7s var(--ease-precise) forwards;
  animation-delay: calc(0.35s + var(--wi, 0) * 40ms);
}
@keyframes wordUp {
  to { transform: translateY(0); opacity: 1; }
}

.hero__tagline {
  margin-top: 22px;
  font-family: 'Sora', sans-serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--ink);
  letter-spacing: -0.01em;
  opacity: 0;
  animation: heroFade 0.8s var(--ease-precise) forwards;
  animation-delay: 0.6s;
}

.hero__location {
  margin-top: 10px;
  font-size: 1rem;
  color: var(--muted);
  opacity: 0;
  animation: heroFade 0.8s var(--ease-precise) forwards;
  animation-delay: 0.72s;
}

.hero__actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  opacity: 0;
  animation: heroFade 0.8s var(--ease-precise) forwards;
  animation-delay: 0.86s;
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Media / logo */
.hero__media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* Glow azul que pulsa lentamente detrás del logo */
.hero__glow {
  position: absolute;
  width: min(420px, 88%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(74, 127, 224, 0.45), rgba(41, 82, 163, 0.12) 45%, transparent 68%);
  filter: blur(6px);
  z-index: 0;
  animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50%      { transform: scale(1.08); opacity: 1; }
}
.hero__logo {
  position: relative;
  z-index: 1;
  width: min(360px, 78%);
  height: auto;
  aspect-ratio: 1;
  filter: drop-shadow(0 24px 60px rgba(41, 82, 163, 0.55));
  opacity: 0;
  transform: scale(0.8);
  animation: logoIn 1s var(--ease-precise) forwards, heroFloat 7s ease-in-out 1s infinite;
  animation-delay: 0.25s, 1.25s;
}
@keyframes logoIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-12px) scale(1); }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero {
    padding: calc(var(--nav-h) + 48px) 24px 72px;
    text-align: center;
  }
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero__media { order: -1; }
  .hero__logo { width: min(240px, 62%); }
  .hero__glow { width: min(300px, 72%); }
  .hero__eyebrow { padding-left: 0; }
  .hero__eyebrow::before { display: none; }
  .hero__actions { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__logo,
  .hero__glow,
  .hero__decor path,
  .hero__decor line,
  .hero__title .word__i,
  .hero__eyebrow,
  .hero__tagline,
  .hero__location,
  .hero__actions {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

@media (max-width: 420px) {
  .hero { padding-left: 16px; padding-right: 16px; }
  .hero__actions .btn { width: 100%; }
}
