/* El Perenquén · perenquen.com.es
   Noche canaria: azul de madrugada, luz ámbar de farola y piedra seca. */

@font-face {
  font-family: "Grandstander";
  src: url("../fonts/grandstander-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Grandstander";
  src: url("../fonts/grandstander-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --noche: #161a33;
  --noche-clara: #20264a;
  --madrugada: #2b2f57;
  --farola: #f2c14e;
  --farola-suave: #f7dc96;
  --piedra: #6b645c;
  --piedra-oscura: #2c2723;
  --perenquen: #a7b0aa;
  --tunera: #6f9a58;
  --texto: #f1ead9;
  --texto-suave: #c9c2b4;
  --tinta: #1f1710;
  --display: "Grandstander", "Trebuchet MS", system-ui, sans-serif;
  --cuerpo: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --ancho: 72rem;
  --texto-max: 38rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--noche);
  color: var(--texto);
  font: 400 1.125rem/1.65 var(--cuerpo);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--farola-suave); text-underline-offset: 0.2em; }
a:hover { color: var(--farola); }

:focus-visible {
  outline: 3px solid var(--farola);
  outline-offset: 3px;
  border-radius: 4px;
}

.saltar {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--farola);
  color: var(--tinta);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  z-index: 100;
}
.saltar:focus { top: 1rem; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--farola-suave); }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: var(--texto-max); }

.contenedor {
  width: min(100% - 2.5rem, var(--ancho));
  margin-inline: auto;
}

/* ------------------------------------------------------------ cabecera */

.cabecera {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(22, 26, 51, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(242, 193, 78, 0.15);
}
.cabecera .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.marca {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--texto);
  text-decoration: none;
}
.marca img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 1.4rem; }
.nav a {
  color: var(--texto-suave);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}
.nav a:hover, .nav a:focus-visible { color: var(--farola); }
.boton-menu {
  display: none;
  background: none;
  border: 2px solid var(--piedra);
  color: var(--texto);
  font: 700 1rem var(--cuerpo);
  padding: 0.35rem 0.8rem;
  border-radius: 0.6rem;
  cursor: pointer;
}

@media (max-width: 52rem) {
  .boton-menu { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--noche-clara);
    border-bottom: 1px solid rgba(242, 193, 78, 0.2);
  }
  .nav.abierto { display: flex; }
  .nav a { padding: 0.9rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
}

/* ------------------------------------------------------------ portada */

.portada {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem) 0 7rem;
  background:
    radial-gradient(38rem 30rem at 78% 40%, rgba(242, 193, 78, 0.22), transparent 70%),
    radial-gradient(60rem 40rem at 10% -10%, var(--madrugada), transparent 70%),
    var(--noche);
}
.portada::after {
  /* El muro de piedra seca del juego, al pie de la portada. */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  background: url("../img/muro.jpg") repeat-x left bottom / auto 96px;
}
.portada .contenedor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.portada h1 {
  font-size: clamp(3.4rem, 9vw, 6.5rem);
  color: var(--texto);
  text-shadow: 0 4px 0 #0c0e1e;
  margin-bottom: 0.2em;
}
.lema {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  color: var(--farola);
  line-height: 1.3;
  margin-bottom: 1.2rem;
}
.acciones { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.6rem 0 0.8rem; }
.boton {
  display: inline-block;
  font: 700 1.05rem var(--cuerpo);
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.boton-principal { background: var(--farola); color: var(--tinta); }
.boton-principal:hover { background: var(--farola-suave); color: var(--tinta); }
.boton-secundario { border-color: var(--farola); color: var(--farola-suave); background: transparent; }
.boton-secundario:hover { background: rgba(242, 193, 78, 0.12); }
.nota { font-size: 0.95rem; color: var(--texto-suave); }

/* Pase de capturas de la portada, enmarcado como un trozo de pared iluminado por la farola. */
.portada-captura {
  margin: 0;
  background: #2b241e;
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 0 0 3px #4a4038, 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 90px rgba(242, 193, 78, 0.18);
}
.carrusel-marco {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  touch-action: pan-y;
}
.carrusel-marco img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.carrusel-marco img.activa { opacity: 1; }
.carrusel-barra {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.2rem 0.2rem;
}
.carrusel-pie { flex: 1; margin: 0; max-width: none; font-size: 0.98rem; color: var(--texto-suave); text-align: center; }
.carrusel-flecha, .carrusel-pausa {
  flex: none;
  display: grid;
  place-items: center;
  background: var(--piedra-oscura);
  color: var(--texto);
  border: 2px solid var(--piedra);
  border-radius: 999px;
  cursor: pointer;
}
.carrusel-flecha { width: 2.4rem; height: 2.4rem; }
.carrusel-flecha:hover, .carrusel-pausa:hover { border-color: var(--farola); color: var(--farola); }
.carrusel-puntos { display: flex; justify-content: center; align-items: center; gap: 0.45rem; padding: 0.2rem 0 0.3rem; }
.carrusel-puntos button:not(.carrusel-pausa) {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--piedra);
  background: transparent;
  cursor: pointer;
}
.carrusel-puntos button[aria-current="true"] { background: var(--farola); border-color: var(--farola); }
.carrusel-pausa { width: 1.9rem; height: 1.9rem; margin-left: 0.5rem; }
.carrusel-pausa .icono-play { display: none; }
.carrusel-pausa[aria-pressed="true"] .icono-play { display: block; }
.carrusel-pausa[aria-pressed="true"] .icono-pausa { display: none; }

@media (max-width: 52rem) {
  .portada .contenedor { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ secciones */

.seccion { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.seccion-piedra { background: var(--piedra-oscura); }
.intro { font-size: 1.2rem; color: var(--texto-suave); margin-bottom: 2.5rem; }

/* El viaje: la ruta de la campaña, isla a isla, en orden. */
.ruta {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: isla;
  display: grid;
  gap: 1.2rem;
}
.ruta li {
  counter-increment: isla;
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1.2rem 1.4rem;
  background: var(--noche-clara);
  border-left: 6px solid var(--isla, var(--farola));
  border-radius: 6px 18px 18px 6px;
}
.ruta img { width: 9rem; height: auto; }
.ruta h3 { margin-bottom: 0.15em; font-size: 1.6rem; }
.ruta h3::before {
  content: counter(isla) ". ";
  color: var(--isla, var(--farola));
}
.ruta .especie { color: var(--texto-suave); font-size: 1rem; margin-bottom: 0.5em; }
.ruta p:last-child { margin-bottom: 0; }
@media (max-width: 40rem) {
  .ruta li { grid-template-columns: 1fr; }
  .ruta img { width: 7rem; }
}

/* Modos de juego. */
.modos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2rem 3rem;
}
.modos h3 { color: var(--farola-suave); }
.modos p { font-size: 1.05rem; }

/* Cuaderno de bichos. */
.cuaderno h3 { margin: 2rem 0 1rem; color: var(--perenquen); }
.fichas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.8rem;
}
.fichas li {
  background: #3a322b;
  border-radius: 14px;
  padding: 0.6rem 0.5rem 0.8rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.25;
}
.fichas img { width: 6.5rem; height: 6.5rem; margin: 0 auto 0.4rem; }
.fichas em { display: block; color: var(--texto-suave); font-size: 0.8rem; margin-top: 0.15rem; }

/* Capturas. */
.capturas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1.5rem;
}
.capturas figure { margin: 0; }
.capturas img { border-radius: 12px; border: 3px solid #3b3550; }
.capturas figcaption { font-size: 0.98rem; color: var(--texto-suave); margin-top: 0.5rem; }

/* Descargas. */
.descargas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}
.descargas h3 { color: var(--farola-suave); }
.descargas ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.descargas a {
  display: block;
  padding: 0.7rem 1rem;
  background: var(--noche-clara);
  border: 2px solid #3b3f6b;
  border-radius: 12px;
  color: var(--texto);
  text-decoration: none;
}
.descargas a:hover { border-color: var(--farola); }
.descargas small { color: var(--texto-suave); }
.descargas .pendiente { opacity: 0.6; pointer-events: none; }
.requisitos { font-size: 1rem; color: var(--texto-suave); }

/* Preguntas. */
.preguntas details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
  max-width: 48rem;
}
.preguntas summary {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
}
.preguntas details p { margin: 0.8rem 0 0; }

/* ------------------------------------------------------------ páginas legales */

.legal { padding: 3rem 0 5rem; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--farola-suave); }
.legal h2 { font-size: 1.5rem; color: var(--texto); margin-top: 2rem; }
.legal table { border-collapse: collapse; margin: 1rem 0; max-width: 48rem; width: 100%; font-size: 1rem; }
.legal th, .legal td { text-align: left; padding: 0.55rem 0.8rem; border-bottom: 1px solid rgba(255, 255, 255, 0.12); vertical-align: top; }
.legal th { color: var(--farola-suave); }
.legal .tabla { overflow-x: auto; }

/* ------------------------------------------------------------ pie */

.pie {
  background: #0f1226;
  padding: 3.5rem 0 2rem;
  font-size: 1rem;
  color: var(--texto-suave);
}
.pie .contenedor {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 2rem;
}
.pie img { width: 56px; margin-bottom: 0.8rem; }
.pie h4 { font-family: var(--display); font-size: 1.1rem; color: var(--texto); margin: 0 0 0.7rem; }
.pie ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.pie a { color: var(--texto-suave); }
.pie a:hover { color: var(--farola); }
.pie .creditos { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 1.5rem; font-size: 0.9rem; }
@media (max-width: 44rem) {
  .pie .contenedor { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ aviso de cookies */

.cookies {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 44rem;
  margin-inline: auto;
  background: var(--noche-clara);
  border: 2px solid var(--farola);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: none;
}
.cookies.visible { display: block; }
.cookies p { margin: 0 0 0.8rem; font-size: 1rem; }
.cookies .acciones { margin: 0; }
.cookies .boton { padding: 0.55rem 1.1rem; font-size: 0.98rem; }

/* En las páginas legales el menú es corto y se ve siempre. */
@media (max-width: 52rem) {
  .nav.nav-legal { display: flex; position: static; flex-direction: row; gap: 1rem; background: none; border: 0; }
  .nav.nav-legal a { padding: 0; border: 0; }
}
.legal ul { max-width: var(--texto-max); padding-left: 1.2rem; }
.legal li { margin-bottom: 0.4rem; }
code { font-size: 0.92em; background: rgba(255, 255, 255, 0.08); padding: 0.05em 0.35em; border-radius: 4px; }
