@font-face {
  font-family: "Futura LT Condensed Bold";
  src: url("Futura%20LT%20Condensed%20Bold.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futura LT Condensed";
  src: url("FuturaLT-Condensed.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root{
  --wrap: 1200px;

  --azul:        #1b7fd4;
  --azul-medio:  #4aa8e6;
  --azul-claro:  #8fd8f8;
  --azul-texto:  #2a9bdc;
  --navy:        #16305c;
  --texto:       #1a1a1a;

  --font: 'Futura LT Condensed', 'Arial Narrow', Arial, sans-serif;

  /* Referencia: en los @media va literal, las media queries no leen variables */
  --bp: 768px;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html{
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;      /* evita scroll lateral por las balotas decorativas */
}

body{
  margin: 0;
  font-family: var(--font);
  color: var(--texto);
  background-color: #ffffff;
  background-image: url("PC/Fondo.webp");
  background-repeat: repeat-y;
  background-position: top center;
  background-size: 100% auto;
  overflow-x: hidden;
}

img{ display: block; max-width: 100%; height: auto; }

a{ text-decoration: none; color: inherit; }

h2, p{ margin: 0; }

.page{ position: relative; }

.wrap{
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
  position: relative;
  z-index: 1;
}

.only-mobile{ display: none; }


/* Hero ------------------------------------------------------
   El PNG "Recurso 14" trae una franja blanca sobrante a la
   derecha (el arte ocupa solo el 67.06% del archivo), así que se
   agranda para que quede a todo el ancho como en el diseño.
   Si les entregan el arte recortado, dejen width: 100%. */
.hero{
  overflow: hidden;
  line-height: 0;
}

.hero img{
  width: 149.12%;   /* 100 / 0.6706 */
  max-width: none;
}


/* Intro ---------------------------------------------------- */
.intro{ padding: clamp(24px, 3vw, 46px) 0 0; }

.intro__inner{ position: relative; }

.intro__text{
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
}

.intro__text p{
  font-size: clamp(17px, 5.6vw, 43px);
  font-weight: 500;
  line-height: 1.22;
}

.intro__text p + p{ margin-top: 1.1em; }

.intro__text .brand{
  color: var(--azul-texto);
  font-weight: 700;
}

.br-pc{ display: inline; }
.br-mv{ display: none; }


/* Botones flotantes (app / página web) --------------------- */
.apps{
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1vw, 16px);
}

.apps img{ width: 100%; }

.apps--float{
  position: fixed;
  right: clamp(12px, 1.6vw, 30px);
  bottom: clamp(12px, 1.6vw, 30px);
  z-index: 50;
  width: clamp(86px, 8vw, 132px);
}

.apps--float a{
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .3));
  transition: transform .18s ease;
}

.apps--float a:hover,
.apps--float a:focus-visible{ transform: scale(1.07); }


/* Botoneras ------------------------------------------------ */
.cta-row{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 1.8vw, 30px);
  margin-top: clamp(26px, 3.4vw, 52px);
}

.btn{
  flex: 0 0 auto;
  width: clamp(160px, 20vw, 245px);
  transition: transform .18s ease, filter .18s ease;
}

.btn--wide{ width: clamp(190px, 26vw, 315px); }

.btn:hover,
.btn:focus-visible{
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.06);
}

.btn img{ width: 100%; }


/* Secciones y títulos -------------------------------------- */
.section{
  position: relative;
  padding: clamp(38px, 5vw, 78px) 0 0;
}

.title{
  font-size: clamp(30px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  background-image: linear-gradient(180deg,
                    var(--azul-claro) 0%,
                    var(--azul-medio) 48%,
                    var(--azul) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.subtitle{
  text-align: center;
  font-size: clamp(18px, 2.7vw, 31px);
  font-weight: 500;
  margin-top: .35em;
}

.banner{ display: block; }

.banner img{
  width: 100%;
  margin-top: clamp(16px, 2vw, 32px);
}


/* Resultados ----------------------------------------------- */
.fecha{
  text-align: center;
  font-size: clamp(15px, 1.5vw, 26px);
  font-weight: 500;
  margin-top: clamp(14px, 1.6vw, 26px);
}

/* Cada balota es un elemento independiente, así la API puede pintar
   (o quitar) las que necesite. Para cambiar el tamaño basta con tocar
   el `width` de .balota: el número se ajusta solo porque va en cqw. */
.balotas{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 1.4vw, 22px);
  list-style: none;
  padding: 0;
  margin: clamp(16px, 2vw, 30px) auto 0;
}

.balota{
  position: relative;
  container-type: inline-size;
  width: clamp(45px, 7.7vw, 98px);
  aspect-ratio: 681 / 696;
  background: url("PC/balota-vacia@4x.webp") center / contain no-repeat;
}

.balota__num{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 4%;        /* centro óptico de la esfera */
  color: #ffffff;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  font-size: 4.4vw;          /* respaldo para navegadores sin cqw */
  font-size: 42cqw;
  text-shadow: 0 1px 2px rgb(248, 246, 246);
}

/* Subrayado del número, dentro de la balota. Va absoluto para no
   empujar la cifra de su centro óptico, y todo en cqw para que crezca
   con la balota. Los números siempre son de 2 dígitos, así que un
   ancho fijo queda igual de centrado en todas. */
.balota__num::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: 28%;
  transform: translateX(-50%);
  width: 4.6vw;              /* respaldo para navegadores sin cqw */
  width: 48cqw;
  height: .48vw;
  height: 5cqw;
  border-radius: 1cqw;
}

/* Mientras la API responde */
.balotas.is-loading .balota__num{ opacity: .45; }


/* Banner inferior ------------------------------------------ */
.banner-inferior{
  position: relative;
  margin-top: clamp(38px, 5vw, 76px);
}

.banner-inferior a img{ width: 100%; }


/* Footer --------------------------------------------------- */
.footer{
  background: #ffffff;
  padding: clamp(22px, 2.6vw, 42px) 20px clamp(18px, 2vw, 32px);
  position: relative;
  z-index: 1;
}

.footer__logos{
  width: min(100%, 640px);
  margin-inline: auto;
}

.footer__legal{
  width: min(100%, 1000px);
  margin: clamp(18px, 2.2vw, 34px) auto 0;
}


/* Balotas decorativas -------------------------------------- */
img.deco{
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* La balota pequeña "12" solo aparece en móvil */
img.deco--12{ display: none; }

img.deco--m-left{
  left: -3.5%;
  top: 12%;
  width: clamp(90px, 11vw, 190px);
}

img.deco--28-right{
  right: -4%;
  top: 46%;
  width: clamp(95px, 12vw, 210px);
}

img.deco--m-bottom{
  left: -1%;
  bottom: 6%;
  width: clamp(60px, 6.5vw, 115px);
  z-index: 2;
}


/* Móvil (< 768px) ------------------------------------------ */
@media (max-width: 767px){

  body{ background-image: url("MOVIL/Fondo.webp"); }

  .only-mobile{ display: block; }

  .wrap{ padding-inline: 16px; }

  .intro{ padding-top: 20px; }

  .intro__text p{ font-size: 25px; }

  /* Se invierten los saltos: mandan los de móvil */
  .br-pc{ display: none; }
  .br-mv{ display: inline; }

  .apps--float{
    right: 10px;
    bottom: 10px;
    width: 68px;
    gap: 8px;
  }

  .cta-row{
    gap: 10px;
    margin-top: 22px;
  }

  .btn{ width: calc(50% - 20px); }

  .btn--wide{ width: min(74%, 300px); }

  /* Los banners de móvil son verticales: se estrechan un poco */
  .como-jugar .banner img,
  .manera .banner img{
    width: min(72%, 340px);
    margin-inline: auto;
  }

  .como-jugar .wrap,
  .manera .wrap{ position: relative; }

  .title{ font-size: 45px; }

  .subtitle{ font-size: 27px; }

  .fecha{ font-size: 14px; }

  .balotas{ gap: 6px; }

  .balota{ width: min(14%, 50px); }

  /* Más pequeñas para no invadir el contenido */
  img.deco--12{
    display: block;
    right: -11px;
    top: 30%;
    width: 63px;
  }

  img.deco--m-left{
    left: -6px;
    top: 25%;
    width: 99px;
  }

  img.deco--28-right{
    right: -26px;
    top: 58%;
    width: 82px;
  }

  img.deco--m-bottom{
    left: -10px;
    bottom: 12%;
    width: 52px;
  }
}


@media (prefers-reduced-motion: reduce){
  .btn{ transition: none; }
  .btn:hover,
  .btn:focus-visible{ transform: none; }
}
