/* =========================================================
   BACAN · BLOQUE APPS HOME FINAL
   Namespace aislado: bacan-apps-home
   ========================================================= */

.bacan-apps-home {
  --bacan-apps-pink: var(--pink, #ff2d78);
  --bacan-apps-white: var(--white, #ffffff);
  --bacan-apps-muted: rgba(255, 255, 255, 0.82);
  --bacan-apps-max: var(--max, 1440px);
  --bacan-apps-gutter: var(--gutter, clamp(20px, 4vw, 64px));

  position: relative;
  min-height: clamp(680px, 62vw, 960px);
  overflow: hidden;
  background: #050407;
  isolation: isolate;
}

.bacan-apps-home__background,
.bacan-apps-home__background img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bacan-apps-home__background {
  z-index: -3;
}

.bacan-apps-home__background img {
  object-fit: cover;
  object-position: center;
}

.bacan-apps-home__overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 2, 4, 0.88) 0%, rgba(2, 2, 4, 0.58) 36%, rgba(2, 2, 4, 0.10) 64%, rgba(2, 2, 4, 0.16) 100%),
    linear-gradient(180deg, rgba(2, 2, 4, 0.18) 0%, rgba(2, 2, 4, 0.02) 54%, rgba(2, 2, 4, 0.44) 100%);
  pointer-events: none;
}

.bacan-apps-home__inner {
  width: min(100%, var(--bacan-apps-max));
  min-height: inherit;
  margin-inline: auto;
  padding-inline: var(--bacan-apps-gutter);
  display: grid;
  align-items: center;
}

.bacan-apps-home__content {
  width: min(100%, 620px);
  padding-block: clamp(80px, 10vw, 150px);
}

.bacan-apps-home__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--bacan-apps-pink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.bacan-apps-home__title {
  margin: 0;
  max-width: 12ch;
  color: var(--bacan-apps-white);
  font-family: inherit;
  font-size: clamp(2.2rem, 4.7vw, 4.7rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.bacan-apps-home__text {
  margin: 24px 0 0;
  max-width: 50ch;
  color: var(--bacan-apps-muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.62;
}

.bacan-apps-home__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
  min-height: 48px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--bacan-apps-pink);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.bacan-apps-home__cta:hover {
  transform: translateY(-2px);
  background: #050506 !important;
  color: #ffffff !important;
  border: 1px solid var(--bacan-apps-pink) !important;
  box-shadow: 0 14px 36px rgba(255, 45, 120, 0.4);
}

.bacan-apps-home__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

[data-bacan-apps-reveal] {
  opacity: 1;
  transform: none;
}

.bacan-apps-home.is-motion-ready [data-bacan-apps-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms cubic-bezier(.2,.75,.25,1),
    transform 700ms cubic-bezier(.2,.75,.25,1);
}

.bacan-apps-home.is-motion-ready.is-visible [data-bacan-apps-reveal] {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .bacan-apps-home {
    min-height: clamp(640px, 78vw, 820px);
  }

  .bacan-apps-home__overlay {
    background:
      linear-gradient(90deg, rgba(2, 2, 4, 0.9) 0%, rgba(2, 2, 4, 0.62) 44%, rgba(2, 2, 4, 0.18) 76%),
      linear-gradient(180deg, rgba(2, 2, 4, 0.12), rgba(2, 2, 4, 0.36));
  }

  .bacan-apps-home__content {
    width: min(100%, 560px);
  }
}

@media (max-width: 767px) {
  .bacan-apps-home {
    min-height: clamp(620px, 140vw, 760px);
    aspect-ratio: auto;
  }

  .bacan-apps-home__background img {
    object-position: center bottom;
  }

  /* FIX responsive: en desktop el overlay horizontal protegía el texto del lado izquierdo.
     En mobile ese gradiente desaparece y la imagen se filtra sobre el copy.
     Aumentamos la opacidad vertical para compensar. */
  .bacan-apps-home__overlay {
    background:
      linear-gradient(180deg,
        rgba(2, 2, 4, 0.95) 0%,
        rgba(2, 2, 4, 0.90) 30%,
        rgba(2, 2, 4, 0.65) 62%,
        rgba(2, 2, 4, 0.42) 100%
      );
  }

  .bacan-apps-home__inner {
    align-items: start;
  }

  .bacan-apps-home__content {
    width: min(100%, 620px);
    padding-top: clamp(52px, 10vw, 88px);
    /* FIX responsive: padding-bottom:0 dejaba el texto pegado al borde de la imagen */
    padding-bottom: clamp(36px, 7vw, 64px);
  }

  .bacan-apps-home__title {
    max-width: 14ch;
    font-size: clamp(2rem, 9vw, 3.6rem);
  }

  .bacan-apps-home__text {
    max-width: 38ch;
    margin-top: 18px;
    font-size: clamp(0.95rem, 3.8vw, 1.08rem);
    line-height: 1.55;
  }

  .bacan-apps-home__cta {
    margin-top: 24px;
    min-height: 46px;
    padding: 13px 22px;
    font-size: 0.84rem;
  }
}

@media (max-width: 420px) {
  .bacan-apps-home__content {
    padding-top: 40px;
  }

  .bacan-apps-home__eyebrow {
    margin-bottom: 14px;
    font-size: 0.66rem;
  }

  .bacan-apps-home__title {
    font-size: clamp(1.86rem, 8.8vw, 2.8rem);
  }

  .bacan-apps-home__text {
    max-width: 34ch;
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bacan-apps-home *,
  .bacan-apps-home *::before,
  .bacan-apps-home *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
