/* ===== Reset básico ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Montserrat', sans-serif;
  overflow: hidden; /* evita scroll */
}

/* ===== Fondo adaptable ===== */
body {
  position: relative;
  background-image: url('../img/bg-desktop.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  width: 100%;
  height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 2rem;
  z-index: 0;
}

/* ===== SVG como textura ===== */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('../img/EstrellitasYDuendes.svg');
  margin-top: 2vh!important;
  background-size: 90% auto;
  background-position: top center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 80%, rgba(0,0,0,0) 100%); /* corte suave abajo */
}

/* ===== Carátula ===== */
.album-cover {
  position: relative;
  width: min(80%, 400px);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.album-cover img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

/* ===== Botón PRE-SAVE ===== */
.btn-presave {
  display: inline-block;
  background-color: #58767C;
  color: #fff;
  font-weight: 600;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: transform 0.2s ease, background-color 0.3s ease;
  z-index: 2;
}

.btn-presave:hover {
  background-color: #6b8d93;
  transform: scale(1.03);
}

/* ===== Fondo y textura para dispositivos móviles ===== */
@media (max-width: 768px) {
  html, body {
    overflow: hidden;
  }

  body {
    background-image: url('../img/bg-mobile.webp');
    background-attachment: scroll;
  }

  body::after {
    background-image: url('../img/EstrellitasYDuendes.svg');
    background-size: 95% auto;
    margin-top: 5svh!important;
    background-repeat: no-repeat;
  }

  .album-cover {
    width: 70%;
  }
}


/* ====== Variables configurables ====== */
:root {
  --cols-desktop: 3;    /* columnas deseadas en escritorio */
  --cols-tablet: 3;     /* columnas deseadas en tablet */
  --cols-mobile: 2;     /* columnas deseadas en móvil */

  --btn-width: 18vw;   /* ancho fijo (ideal) de cada botón */
  --btn-gap: 2vw;      /* separación entre botones */
  --btn-max-width: 250px; /* ancho máximo absoluto de cada botón */

}

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --btn-width: 22vw;
    --btn-max-width: 250px;
  }
}

/* Móvil */
@media (max-width: 600px) {
  :root {
    --btn-width: 45vw;
    --btn-max-width: 170px;
  }
}

/* ====== Contenedor (flex) ====== */
.platform-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--btn-gap);
  width: 100%;
  max-width: calc((var(--cols-desktop) * var(--btn-width)) + ((var(--cols-desktop) - 1) * var(--btn-gap)));
  margin: 0 auto;
  padding-top: 3vh;
  box-sizing: border-box;
}

/* ====== Botones (tamaño fijo para que el contenedor calcule bien) ====== */
.platform-buttons a {
  flex: 0 0 var(--btn-width);
  width: var(--btn-width);
  max-width: var(--btn-max-width);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Efecto hover */
.platform-buttons a:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

/* ====== ÍCONOS ====== */
.platform-buttons img {
  width: 100%;
  height: auto;
  display: block;
}

/* ====== Responsive: recalculamos max-width para cada breakpoint ====== */

/* Tablet */
@media (max-width: 1024px) {
  .platform-buttons {
    max-width: min(
      calc(var(--cols-tablet) * var(--btn-width) + (var(--cols-tablet) - 1) * var(--btn-gap)),
      100%
    );
  }
}

/* Móvil */
@media (max-width: 600px) {
  .platform-buttons {
    max-width: min(
      calc(var(--cols-mobile) * var(--btn-width) + (var(--cols-mobile) - 1) * var(--btn-gap)),
      100%
    );
    gap: 0.6rem;
    padding-top: 2.5vh;
  }
}


/* ====== Logo ====== */

.logo-fixed {
  position: fixed;
  bottom: 1.5rem;
  right: 2rem;
}

.logo-fixed img {
  width: 10vw;
  max-width: 200px;
  height: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.logo-fixed img:hover {
  opacity: 1;
}

@media (max-width: 600px) {

  .logo-fixed {
  right: 1.5rem;
}
 .logo-fixed img {
  width: 25vw;
  max-width: 250px;
}

}