/* ============================================================
   Hero component: full-viewport section with photo background,
   animated LED canvas overlay, title, subtitle and actions.
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--blue);
  color: var(--white);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 7.375rem var(--pad-x) 5.25rem;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../../images/hero/hero-1.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  mix-blend-mode: luminosity;
  filter: contrast(1.05) saturate(0.7);
  animation: heroZoom 14s var(--ease) forwards;
}
.hero__leds {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
  mix-blend-mode: screen;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(ellipse at 30% 80%, rgba(6, 96, 223, 0) 0%, rgba(6, 96, 223, 0.35) 45%, rgba(20, 20, 20, 0.85) 100%),
    linear-gradient(180deg, rgba(6, 96, 223, 0.35) 0%, rgba(6, 96, 223, 0.55) 55%, rgba(20, 20, 20, 0.85) 100%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero__title {
  font-size: clamp(3.125rem, min(9.5vw, 13vh), 9.75rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 2.5rem;
  max-width: 18ch;
  opacity: 0;
  animation: fadeUp 1.1s 0.3s var(--ease) forwards;
}
.hero__title em {
  font-style: normal;
  color: var(--white);
}

/* Dark variant (e.g. pantallas): black background, no tinted overlay,
   base title in white with green-highlighted words instead of the
   other way around. */
.hero--dark {
  background: var(--black);
  flex-direction: column;
  justify-content: center;
  align-items: normal;
}
.hero--dark .hero__bg {
  background-position: center right;
  opacity: 0.42;
  mix-blend-mode: normal;
  filter: contrast(1.05) saturate(0.85) brightness(0.82);
}
.hero--dark .hero__overlay {
  background: linear-gradient(90deg, rgba(20, 20, 20, 0.92) 0%, rgba(20, 20, 20, 0.55) 50%, rgba(20, 20, 20, 0.15) 100%),
    linear-gradient(180deg, rgba(20, 20, 20, 0.35) 0%, transparent 40%, rgba(20, 20, 20, 0.55) 100%);
}
.hero--dark .hero__title {
  color: var(--white);
  margin-bottom: 0;
}
.hero--dark .hero__title em {
  color: var(--green);
}
.hero--dark .hero__sub {
  margin-top: 2.75rem;
  max-width: 52ch;
}

/* Gradient variant (publicitario): diagonal blue-to-black gradient
   background instead of a flat color, a wider hero-2.webp photo, a
   deeper blue-tinted overlay, taller top/bottom padding, and a roll-up
   stats row below the actions ($heroStats). Title colors are the same
   as the default (blue) variant, so no override needed here. */
.hero--gradient {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #0a1a3a 55%, var(--black) 100%);
  padding: 8.75rem var(--pad-x) 6.25rem;
}
.hero--gradient .hero__bg {
  background-image: url('../../images/hero/hero-2.webp');
}
.hero--gradient .hero__overlay {
  background: radial-gradient(ellipse at 30% 80%, rgba(3, 48, 110, 0) 0%, rgba(3, 48, 110, 0.35) 45%, rgba(20, 20, 20, 0.9) 100%),
    linear-gradient(180deg, rgba(3, 48, 110, 0.35) 0%, rgba(3, 48, 110, 0.55) 55%, rgba(20, 20, 20, 0.9) 100%);
}
.hero--gradient .hero__title {
  max-width: 14ch;
}
.hero--gradient .hero__sub {
  max-width: 52ch;
}

/* Extra radial glow decoration, opt-in via $heroGlow. */
.hero__glow {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  top: -20%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(221, 247, 183, 0.22), transparent 60%);
  mix-blend-mode: screen;
}

.hero__sub {
  font-size: clamp(1.0625rem, 1.5vw, 1.5rem);
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  max-width: 44ch;
  text-wrap: balance;
  margin-bottom: 2.75rem;
  opacity: 0;
  animation: fadeUp 0.9s 1.1s var(--ease) forwards;
}
.hero__actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s 1.35s var(--ease) forwards;
}

/* Roll-up stats row, opt-in via $heroStats. Numbers are driven by the
   counter utility (assets/js/counter.js), which wraps data-suffix in
   its own .unit span. */
.hero__stats {
  margin-top: 4.375rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.875rem;
  opacity: 0;
  animation: fadeUp 0.9s 1.6s var(--ease) forwards;
}
.hero__stat strong {
  display: block;
  font-size: clamp(3rem, 7vw, 6.25rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hero__stat strong .unit {
  display: inline;
  color: var(--white);
  font-size: 0.45em;
  margin-left: 0.375rem;
  letter-spacing: -0.02em;
}
.hero__stat span {
  display: block;
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .hero {
    padding: 6.5rem var(--pad-x) 4rem;
  }
  .hero__title {
    margin-bottom: 1.75rem;
  }
  .hero__sub {
    margin-bottom: 2rem;
  }
  .hero__actions .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 760px) {
  .hero__stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
