/* La landing de Zodiac Galaxy: los colores del juego (el azul noche de sus chapas, el cian de sus
   barras y el dorado de sus botones), sin fuentes ni nada de fuera. */
:root {
  --noche: #0B1826;
  --noche-2: #0F2238;
  --azul: #173F73;
  --cian: #2FA9E6;
  --cian-claro: #8FE0FF;
  --oro-claro: #FFE38A;
  --oro: #FFB52E;
  --oro-oscuro: #E0801C;
  --cafe: #3A1A00;
  --texto: #EAF4FF;
  --texto-suave: #A9C2DC;
  --redondo: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--noche);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--cian-claro); }

/* ---- La barra de arriba ---- */
.barra {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px clamp(16px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(11, 24, 38, 0.85), rgba(11, 24, 38, 0));
  background-color: transparent;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Cuando el logo llega a la barra, la barra se vuelve solida: lo que pasa por debajo no se lee. */
.logo-en-barra .barra {
  background-color: rgba(11, 24, 38, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(143, 224, 255, 0.14);
}

.barra-marca img { width: 120px; }

.barra-enlaces { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }

.barra-enlaces a {
  color: var(--texto);
  text-decoration: none;
  font-family: var(--redondo);
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.barra-enlaces a:hover { color: var(--cian-claro); }

/* El otro idioma: una pastilla pequeña con su codigo (EN / ES), visible tambien en el telefono. */
.barra-enlaces a.barra-idioma {
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1.5px solid rgba(169, 194, 220, 0.45);
  color: var(--texto-suave);
}

.barra-enlaces a.barra-idioma:hover { color: var(--cian-claro); border-color: rgba(143, 224, 255, 0.7); }

.barra-jugar {
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(47, 169, 230, 0.18);
  border: 1.5px solid rgba(143, 224, 255, 0.6);
}

/* ---- La portada, como la del juego ---- */
.portada {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 90px 16px 64px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(23, 63, 115, 0) 0%, rgba(11, 24, 38, 0.55) 75%),
    linear-gradient(180deg, rgba(11, 24, 38, 0) 70%, var(--noche) 100%),
    url("/img/fondo_cosmos.webp") center 35% / cover no-repeat;
}

/* El reparto de la portada del juego, a los lados. Su alto depende del ancho y del alto, y en
   pantallas medianas se abre hacia los bordes para no pisar el texto. */
.reparto {
  position: absolute;
  bottom: 0;
  height: min(78vh, 760px, 50vw);
  width: auto;
  pointer-events: none;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.reparto-izq { left: max(-40px, -3vw); }
.reparto-der { right: max(-30px, -2vw); }

.portada-centro {
  position: relative;
  z-index: 1;
  max-width: 600px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Un halo oscuro detras del texto: sobre el cielo y los personajes, se lee siempre. */
.portada-centro::before {
  content: "";
  position: absolute;
  inset: -8% -14%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(8, 18, 32, 0.62) 0%, rgba(8, 18, 32, 0.35) 45%, rgba(8, 18, 32, 0) 72%);
  pointer-events: none;
}

.cifras {
  list-style: none;
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  margin: 24px 0 0;
  padding: 0;
  font-family: var(--redondo);
  font-weight: 700;
  color: var(--texto-suave);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.cifras strong {
  display: block;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  color: #FFFFFF;
}

h1 { margin: 0; }

.logo {
  width: min(78vw, 520px, 75svh);
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.55));
}

/* El logo de la portada y el de la barra son uno (el script de index.html): arriba del todo la
   barra va sin logo, y al bajar el grande vuela hasta ella. Sin JavaScript se ven los dos. */
.con-heroe:not(.logo-en-barra) .barra-marca { visibility: hidden; }

.logo-fuera .portada .logo { opacity: 0; }

.logo-volador {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 11;
  max-width: none;
  transform-origin: 0 0;
  pointer-events: none;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.55));
}

.logo-volador[hidden] { display: none; }

.lema {
  max-width: 460px;
  text-wrap: balance;
  margin: 8px 0 26px;
  font-family: var(--redondo);
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 24px);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

/* El boton de jugar: una pildora dorada con canto, como los botones del juego. */
.boton-jugar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 42px 18px 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--oro-claro) 0%, var(--oro) 48%, var(--oro-oscuro) 100%);
  color: var(--cafe);
  font-family: var(--redondo);
  font-weight: 900;
  font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  border: 3px solid #FFF1C2;
  box-shadow: 0 6px 0 #9A4D0B, 0 12px 28px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.boton-jugar svg { width: 1.2em; height: 1.2em; fill: currentColor; }

.boton-jugar:hover { transform: translateY(-2px); filter: brightness(1.05); }

.boton-jugar:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #9A4D0B, 0 6px 14px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.boton-jugar:focus-visible { outline: 3px solid var(--cian-claro); outline-offset: 4px; }

.portada-nota {
  margin: 18px 0 0;
  color: var(--texto-suave);
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.nota-movil { max-width: 360px; margin-top: 8px; color: #FFD27A; }

/* ---- Las secciones ---- */
.seccion {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 40px);
}

h2 {
  margin: 0 0 32px;
  text-align: center;
  font-family: var(--redondo);
  font-weight: 900;
  font-size: clamp(26px, 3.6vw, 40px);
  color: #FFFFFF;
}

.tarjetas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
}

.tarjeta {
  background: linear-gradient(180deg, var(--noche-2), #0C1B2E);
  border: 1.5px solid #1E4A6E;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.tarjeta img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-bottom: 1.5px solid #1E4A6E; }

.tarjeta h3 {
  margin: 18px 22px 6px;
  font-family: var(--redondo);
  font-weight: 800;
  font-size: 21px;
  color: var(--cian-claro);
}

.tarjeta p { margin: 0 22px 22px; color: var(--texto-suave); }

/* ---- Los doce signos ---- */
.signos {
  background: linear-gradient(90deg, #0C1D33, #12305A 50%, #0C1D33);
  border-block: 1.5px solid #1E4A6E;
  padding: 18px 16px;
}

.signos ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1000px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(8px, 2vw, 22px);
}

.signos img { width: clamp(36px, 5vw, 56px); height: auto; }

/* ---- La galeria ---- */
.galeria {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.galeria a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #1E4A6E;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.galeria a:hover { transform: translateY(-3px); border-color: var(--cian); }

.galeria img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

/* ---- El cierre, sobre el mapa ---- */
.cierre {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 460px;
  overflow: hidden;
}

.cierre-mundo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.cierre::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(11, 24, 38, 0.35), var(--noche) 85%);
}

.cierre-texto {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 64px 16px;
}

.cierre-texto h2 { margin-bottom: 8px; }

.cierre-texto p { margin: 0 0 26px; color: var(--texto-suave); font-size: 18px; }

/* ---- El pie ---- */
.pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 40px) 40px;
  color: var(--texto-suave);
  font-size: 14px;
  border-top: 1px solid #1E3A58;
}

.pie p { margin: 0; }
.pie nav { display: flex; gap: 20px; }

/* ---- Las paginas de texto: privacidad y creditos ---- */
.texto-legal { max-width: 780px; }
.texto-legal h1 {
  margin: 12px 0 8px;
  font-family: var(--redondo);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 40px);
}
.texto-legal h2 {
  margin: 36px 0 10px;
  text-align: left;
  font-size: clamp(20px, 2.6vw, 26px);
}
.texto-legal ul { padding-left: 1.2em; }
.texto-legal li { margin: 4px 0; }
.texto-legal .actualizado { color: var(--texto-suave); font-size: 14px; }
.texto-legal .idiomas { color: var(--texto-suave); }
.texto-legal hr { margin: 56px 0 8px; border: 0; border-top: 1px solid var(--azul); }

/* ---- Pantallas medianas, tableta y telefono ---- */
@media (max-width: 1200px) {
  .reparto-izq { left: -9vw; }
  .reparto-der { right: -8vw; }
}

@media (max-width: 900px) {
  /* El texto arriba y el reparto debajo, en las esquinas, sin pisarse. */
  .portada { align-items: start; padding-top: 96px; padding-bottom: 38vh; }
  .reparto { height: min(40vh, 380px); }
  .reparto-izq { left: -40px; }
  .reparto-der { right: -30px; }
}

@media (max-width: 720px) {
  .barra-marca img { width: 96px; }
  .barra-enlaces a:not(.barra-jugar):not(.barra-idioma) { display: none; }
  .tarjetas { grid-template-columns: 1fr; }
  .galeria { grid-template-columns: repeat(2, 1fr); }
  .portada { padding-bottom: 34vh; }
  .reparto { height: 34vh; }
  .reparto-izq { left: -50px; }
  .reparto-der { right: -40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boton-jugar, .galeria a { transition: none; }
}
