/* =====================================================
   HERO CINEMATOGRÁFICO - DOMINANDO TU VIDA
   Versión corregida sin bloque celeste gigante
===================================================== */

.hero-cinematic {
  position: relative;

  /*
    Antes era 285vh / 300vh / 330vh.
    Eso generaba el bloque celeste gigante.
    Ahora el hero ocupa solo la pantalla visible.
  */
  min-height: 100vh;
  min-height: 100svh;

  overflow: hidden;
  background: #d9edf7;
  isolation: isolate;
}

/* =====================================================
   HERO STICKY
   Se cambia de sticky a relative para eliminar espacio sobrante
===================================================== */

.hero-sticky {
  position: relative;
  top: auto;

  min-height: 100vh;
  min-height: 100svh;

  width: 100%;

  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 140px 5vw 90px;

  background:
    linear-gradient(
      to bottom,
      rgba(170, 222, 248, 1) 0%,
      rgba(208, 235, 248, 1) 48%,
      rgba(217, 237, 247, 1) 100%
    );

  isolation: isolate;
}

/* =====================================================
   FONDO POR CAPAS
===================================================== */

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

/* Extensión visual inferior usando nubes de fondo */
.hero-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6%;

  width: 100%;
  height: 50vh;

  z-index: 4;
  pointer-events: none;

  background-image: url("../img/hero/nubes-fondo.webp");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;

  opacity: 0.42;
  mix-blend-mode: screen;

  -webkit-mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.82) 48%,
    rgba(0, 0, 0, 0) 100%
  );

  mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.82) 48%,
    rgba(0, 0, 0, 0) 100%
  );
}

.hero-layer {
  position: absolute;

  left: 0;
  top: -12%;

  width: 100%;
  height: 124%;

  object-fit: cover;
  object-position: center center;

  pointer-events: none;
  user-select: none;

  transform-origin: center center;
  will-change: transform, opacity, filter;
}

/* Nubes de fondo */
.hero-clouds-back {
  z-index: 2;
  opacity: 0.88;
  mix-blend-mode: screen;
}

/* Nubes del frente */
.hero-clouds-front {
  z-index: 5;
  opacity: 0.95;
  mix-blend-mode: screen;
}

/* Degradado inferior suave */
.hero-sticky::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;

  height: 14vh;
  z-index: 8;

  background:
    linear-gradient(
      to bottom,
      rgba(217, 237, 247, 0) 0%,
      rgba(217, 237, 247, 0.05) 55%,
      rgba(217, 237, 247, 0.18) 100%
    );

  pointer-events: none;
}

/* =====================================================
   NUBES EXTRA INFERIORES
===================================================== */

.hero-clouds-bottom-fill {
  position: absolute;
  left: 0;
  bottom: -4vh;

  width: 100%;
  height: 44vh;

  object-fit: cover;
  object-position: center bottom;

  z-index: 10;

  opacity: 0.72;
  mix-blend-mode: screen;

  pointer-events: none;
  user-select: none;

  transform-origin: center bottom;
  will-change: transform, opacity;

  -webkit-mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.92) 48%,
    rgba(0, 0, 0, 0) 100%
  );

  mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.92) 48%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Primera nube inferior */
.hero-clouds-bottom-fill:nth-of-type(1) {
  bottom: -4vh;
  opacity: 0.72;
  z-index: 10;
}

/* Segunda nube inferior, usada como relleno visual */
.hero-clouds-bottom-fill:nth-of-type(2) {
  bottom: 2vh;
  height: 40vh;
  opacity: 0.52;
  z-index: 11;
  transform: scaleX(-1) scale(1.08);
}

/* =====================================================
   LOGO ASSEMBLY
===================================================== */

.hero-logo-stage {
  position: absolute;
  inset: 0;
  z-index: 9;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;

  transform: translateY(-18vh);
}

.logo-assembly {
  position: relative;

  width: clamp(220px, 24vw, 380px);
  aspect-ratio: 1 / 1;

  filter:
    drop-shadow(0 18px 40px rgba(23, 72, 108, 0.22))
    drop-shadow(0 0 34px rgba(255, 255, 255, 0.28));

  will-change: transform, opacity, filter;
}

.logo-piece {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;

  opacity: 0;
  transform-origin: center;

  will-change: transform, opacity, filter;
}

.piece-01,
.piece-02,
.piece-03,
.piece-04,
.piece-05,
.piece-06,
.piece-07,
.piece-08,
.piece-09 {
  mix-blend-mode: normal;
}

/* =====================================================
   CONTENIDO
===================================================== */

.hero-content {
  position: absolute;
  left: 50%;
  top: 70%;

  transform: translate(-50%, -50%);

  z-index: 20;

  width: min(1120px, 100%);
  padding-inline: 5vw;

  text-align: center;

  opacity: 1;
  pointer-events: auto;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 38px;
  padding: 0 16px;
  margin-bottom: 24px;

  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.36);

  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  color: rgba(255, 255, 255, 0.94);

  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  text-shadow: 0 8px 22px rgba(23, 72, 108, 0.24);

  opacity: 0;
  transform: translateY(26px);
}

.hero-title {
  max-width: 1180px;
  margin: 0 auto;

  color: #ffffff;

  font-size: clamp(3.6rem, 9vw, 10rem);
  line-height: 0.88;
  letter-spacing: -0.085em;
  font-weight: 900;

  text-shadow:
    0 4px 18px rgba(23, 72, 108, 0.22),
    0 18px 48px rgba(23, 72, 108, 0.18);

  mix-blend-mode: normal;

  opacity: 1;
  transform: translateY(60px) scale(0.96);
}

/* =====================================================
   BOTONES DEL HERO
===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 50px;
  padding: 0 24px;

  border-radius: 999px;

  font-size: 0.95rem;
  font-weight: 800;

  text-decoration: none;

  transition:
    transform 0.35s ease,
    background 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.btn-primary {
  background: #ffffff;
  color: #17486c;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 20px 60px rgba(23, 72, 108, 0.22);
}

.btn-primary:hover {
  transform: translateY(-3px);
  background: #f1d8e8;
  color: #10263a;
  box-shadow: 0 26px 76px rgba(189, 115, 184, 0.3);
}

.btn-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.btn-glass:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.24);
}

/* =====================================================
   LOGO NAV DESTINO
===================================================== */

.nav-logo-target {
  position: relative;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1024px) {
  .hero-cinematic {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-logo-stage {
    transform: translateY(-16vh);
  }

  .logo-assembly {
    width: clamp(190px, 30vw, 310px);
  }

  .hero-content {
    top: 67%;
  }

  .hero-clouds-bottom-fill {
    height: 42vh;
    bottom: -4vh;
  }

  .hero-clouds-bottom-fill:nth-of-type(2) {
    bottom: 1vh;
    height: 38vh;
  }
}

@media (max-width: 768px) {
  .hero-cinematic {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-sticky {
    min-height: 100vh;
    min-height: 100svh;
    padding: 120px 20px 80px;
  }

  .hero-logo-stage {
    transform: translateY(-18vh);
  }

  .logo-assembly {
    width: clamp(155px, 42vw, 245px);
  }

  .hero-content {
    top: 68%;
  }

  .hero-title {
    font-size: clamp(3rem, 15vw, 5.8rem);
    line-height: 0.92;
    letter-spacing: -0.075em;
  }

  .hero-clouds-front {
    opacity: 0.88;
  }

  .hero-clouds-bottom-fill {
    height: 40vh;
    bottom: -3vh;
    opacity: 0.68;
  }

  .hero-clouds-bottom-fill:nth-of-type(2) {
    bottom: 2vh;
    height: 36vh;
    opacity: 0.48;
  }

  .hero-sticky::after {
    height: 16vh;
  }
}

@media (max-width: 520px) {
  .hero-cinematic {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-sticky {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-logo-stage {
    transform: translateY(-17vh);
  }

  .logo-assembly {
    width: clamp(150px, 48vw, 220px);
  }

  .hero-content {
    top: 69%;
    width: 100%;
  }

  .hero-kicker {
    font-size: 0.68rem;
    min-height: 34px;
    padding: 0 13px;
    margin-bottom: 18px;
    letter-spacing: 0.1em;
  }

  .hero-title {
    letter-spacing: -0.075em;
  }

  .hero-clouds-bottom-fill {
    height: 38vh;
    bottom: -2vh;
    opacity: 0.66;
  }

  .hero-clouds-bottom-fill:nth-of-type(2) {
    bottom: 3vh;
    height: 34vh;
    opacity: 0.44;
  }

  .hero-sticky::after {
    height: 14vh;
  }
}