/* hero.css */

/* ─── Layout principal ─── */
#hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ─── Slider de fondo ─── */
.hero-slider {
  position: absolute;
  inset: 0;
  top: calc(-1 * env(safe-area-inset-top));
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

/* ─── Degradado superior — protección del navbar ─── */
.hero-top-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(
    to bottom,
    rgba(8, 31, 77, 0.75) 0%,
    rgba(8, 31, 77, 0.3) 60%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* ─── Overlay degradado vertical ─── */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(8, 31, 77, 0.78) 0%,
    rgba(8, 31, 77, 0.52) 45%,
    rgba(8, 31, 77, 0.88) 100%
  );
}

/* ─── Contenido centrado ─── */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  width: 100%;
  padding: clamp(0.8rem, 3vw, 2rem);
  padding-top: clamp(5rem, 10vh, 9rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.4rem, 1vh, 0.9rem);
}

/* ─── Logo en hero ─── */
.hero-logo {
  margin-top: clamp(1.5rem, 3vh, 2.5rem);
  margin-bottom: clamp(0.3rem, 0.8vh, 0.6rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
}

.hero-logo img {
  height: clamp(56px, 7vw, 96px);
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

/* ─── Título ─── */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.12;
  color: #FFFFFF;
  max-width: 680px;
  margin: 0;
  letter-spacing: 0.01em;
  animation: fadeUp 0.9s 0.2s var(--transition) both;
}

.hero-accent {
  font-family: var(--font-display);
  font-weight: 800;
  color: #00AEEF;
  display: inline;
}

/* ─── Subtítulo ─── */
.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  color: #AFC0D9;
  line-height: 1.6;
  max-width: 560px;
  margin: 0;
  animation: fadeUp 0.9s 0.35s var(--transition) both;
}

/* ─── Botones ─── */
.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: clamp(0.4rem, 1vh, 0.8rem);
  animation: fadeUp 0.9s 0.5s var(--transition) both;
}

/* ─── Stats — franja horizontal minimalista ─── */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 780px;
  margin-top: clamp(0.8rem, 1.8vh, 1.4rem);
  padding: clamp(0.8rem, 1.5vh, 1.2rem) 0;
  border-top: 1px solid rgba(175, 192, 217, 0.18);
  opacity: 0;
  animation: fadeUp 0.6s 0.65s ease forwards;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 clamp(1.2rem, 2.5vw, 2.2rem);
  flex: 1;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: clamp(0.6rem, 0.7vw, 0.72rem);
  color: #AFC0D9;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(175, 192, 217, 0.2);
  flex-shrink: 0;
}

/* ─── Keyframes ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .hero-stats {
    flex-wrap: wrap;
    gap: clamp(0.6rem, 2vw, 1rem);
    border-top: none;
    padding-top: 0;
  }
  .hero-stats .stat-item {
    flex: 0 0 calc(50% - 0.5rem);
    padding: 0.5rem 0.5rem;
  }
  .hero-stats .stat-divider {
    display: none;
  }
  .hero-title {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    letter-spacing: -0.5px;
  }
  .hero-content {
    padding-top: clamp(4rem, 10vh, 6rem);
  }
}
