@import url("./base.css") layer(home);
@import url("./components/navbar.css") layer(components);
@import url("./components/footer.css") layer(components);
@import url("./components/welcome.css") layer(components);


@layer home {

  body.home--landing,
  body.home--landing::before {
    max-width: 100%;
  }

  .hero-banner {
    overflow: hidden;
  }

  .hero-video {
    display: block;
    width: 100%;
    height: auto;
  }

  .home-actions {
    padding: 16px 0 32px;
  }

  .home-btn-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 268px;
    text-align: center;
    padding: 10px 25px;
    font-size: var(--fs-body-20);
    font-weight: 300;
    line-height: 1.3;
    border-radius: 35px;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    height: var(--btn-height);
    border: 1px solid #fffA;

    &.btn-primary {
      background: var(--brand);
      color: var(--light);
      font-weight: 500;

      /* red drop shadow */
      box-shadow: 0 0 8px 2px var(--brand);

      &.btn-apps {
        gap: 4px;

        svg {
          width: 60px;
          height: 24px;
        }
      }

      &.btn-store {
        gap: 16px;
        background: linear-gradient(to bottom, #ff090909 0%, #2c010188 50%, #5c0000BB 100%), var(--brand);
      }
    }

    &.btn-primary:hover {
      opacity: 0.8;
    }

    &.btn-secondary {
      margin-top: 8px;
      background: transparent;
      color: var(--light);
      font-size: var(--fs-body-16);
      height: 38px;
    }

    @media screen and (width >=768px) {
      max-width: 452px;
      height: 80px;

      &.btn-primary,
      &.btn-secondary {
        font-size: 2rem;
        line-height: 1;
        height: 80px;
      }
    }
  }
}



.btn-apps-mobile {
  display: block;
}

.btn-apps-desktop {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.btn-store {
  margin-top: 0;
  gap: 8px;
}

.home-descarga-title {
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--light);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;

  svg {
    width: 132px;
    height: 52px;
  }
}

@media screen and (width >=768px) {
  .btn-apps-mobile {
    display: none;
  }

  .btn-apps-desktop {
    display: flex;
  }
}

.home-premios,
.home-ranking,
.home-participar,
.home-tyc {
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.home-premios {
  h2 {
    font-size: var(--fs-heading-h2);
    font-weight: 500;
    text-align: center;
    line-height: 1.1;

    em {
      display: block;
      text-transform: uppercase;
      font-size: var(--fs-heading-h1);
      font-weight: 800;
      text-shadow: 2px 2px 0 var(--brand);
    }

    @media screen and (width >=768px) {
      font-size: 3.75rem;

      em {
        display: inline;
        font-size: 4.5rem;
      }
    }
  }

  .home-premios-container {
    width: 100%;
    overflow: hidden;
    padding: 16px 0;
  }

  .home-premios-carousel {
    touch-action: none;
    position: relative;
    width: 100%;
    height: 370px;

    @media (min-width: 768px) {
      height: 450px;
    }

    .carousel-track {
      position: relative;
      width: 100%;
      max-width: 1014px;
      margin: 0 auto;
      height: 100%;
    }

    .carousel-slide {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 280px;
      height: 370px;

      @media (min-width: 768px) {
        width: 340px;
        height: 450px;
      }

      display: flex;
      justify-content: center;
      align-items: center;
      will-change: transform,
      opacity;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.35s ease;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
    }

    .premio-card {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      background: linear-gradient(180deg, rgba(255, 9, 9, 0.15) 0%, rgba(92, 0, 0, 0.83) 100%), radial-gradient(ellipse at center, transparent 50%, #FB2825 100%), #000;
      border: 2px solid #fff9;
      border-radius: 16px;
      padding: 10px;
      box-shadow: 0 0 8px 2px var(--brand);

      img {
        width: 100%;
        flex: 1;
        min-height: 0;
        object-fit: contain;
        display: block;
        border-radius: 12px;
      }
    }

    .premio-name {
      flex-shrink: 0;
      font-size: var(--fs-body-14);
      font-weight: 600;
      text-align: center;
      color: var(--light);
      padding: 5px 10px;
      min-width: 200px;

      @media screen and (min-width: 768px) {
        min-width: 240px;
      }

      border-radius: 20px;
      border: 1px solid rgb(255 255 255 / 80%);
    }
  }
}


.home-download-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 32px;
}

.home-participar {
  scroll-margin-top: var(--navbar-height);
}

/* .swiper */
.home-participar-container {
  width: 100%;
  max-width: 371px;
  border: 1px solid var(--brand);
  padding: 20px 10px;
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #9f3634;

  & .btn {
    margin-top: 20px;
  }
}


.home-participar-carousel {
  width: 100%;
  overflow: hidden;

  .swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 0;

    .participar-step-index {
      display: grid;
      place-items: center;
      width: 35px;
      height: 35px;
      border-radius: 50%;
      background: var(--brand);
      color: var(--light);
      font-weight: 600;
      font-size: var(--fs-heading-h2);
      margin: 0 auto;
    }

    img {
      margin: 12px auto 0;
      width: 100%;
      max-width: 212px;
      display: block;
    }

    .participar-step-desc {
      font-size: var(--fs-body-18);
      text-align: center;
      color: var(--light);
      line-height: 1.4;
      margin: 0 auto;

      em {
        font-style: normal;
        font-weight: 600;
      }

      .hint {
        display: block;
        padding-top: 16px;
        font-style: italic;
        font-size: var(--fs-body-14);
        color: #fffE;
      }
    }
  }

  .carousel-btn {
    position: absolute;
    top: 170px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border-radius: 50%;
    border: 1px solid #fffA;
    background: #000F;
    cursor: pointer;
    z-index: 10;

    &:disabled {
      cursor: not-allowed;
      opacity: 0.5;
    }

    & svg {
      position: relative;
    }

    &.carousel-prev {
      left: 8px;
    }

    &.carousel-next {
      right: 8px;

      & svg {
        left: 2px;
      }
    }
  }
}

@media screen and (width >=768px) {
  .home-participar-container {
    max-width: 688px;
    padding: 30px 70px;
  }

  .home-participar-title {
    font-size: 4rem;
  }

  .home-participar-carousel {
    & .swiper-slide {
      .participar-step-index {
        width: 56px;
        height: 56px;
        font-size: var(--fs-heading-h1);
      }

      img {
        width: 100%;
        max-width: 340px;
      }

      .participar-step-desc {
        font-size: 1.75rem;
      }
    }

    .carousel-btn {
      top: 270px;
      width: 60px;
      height: 60px;
    }
  }
}

.home-video-dialog {
  border: none;
  padding: 0;
  background: transparent;
  width: 90%;
  height: 100%;
  margin: 0 auto;
}

.home-video-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-video-dialog-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 48px;
  background-color:
    color-mix(in srgb, var(--brand) 80%, transparent);
  border-radius: 16px;
}

.home-video-dialog::backdrop {
  background: rgb(0 0 0 / 70%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.home-video-dialog-logo {
  width: 120px;
  height: auto;
}

.home-video-dialog-text {
  color: var(--light);
  font-size: 1.25rem;
  text-align: center;
}
