/* Athenas Studio · athena-s.net
   Una noche de museo de arriba abajo: el estudio, en azul marino (#23264A) con el busto de
   mármol; Rutinas, en el mármol negro con vetas de oro de la propia app
   (rutinas/assets/images/marble). El oro, sólo como luz y acento.
   Dos letras: Cinzel para titulares (sin espaciar, salvo la marca) e Inter para todo lo
   demás, en minúscula normal. Las mayúsculas espaciadas, sólo en «Athenas Studio». */

@font-face { font-family: "Cinzel"; src: url("fuentes/cinzel-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("fuentes/cinzel-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fuentes/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fuentes/inter-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --marino: #23264A;
  --marino-hondo: #15172E;
  --noche: #0F1124;
  --marmol: #ECEAF1;
  --niebla: #AEB5D3;
  --oro: #E6C873;
  --oro-tinta: #5C4406;
  --tinta: #121213;
  --marmol-negro: #0C0C0E;
  /* Oro iluminado desde arriba, como el «Empuje» del resumen de la app */
  --oro-luz: linear-gradient(180deg, #F7E8B4 0%, #E6C873 48%, #B8913D 100%);
  /* Sombra sobre el mármol, del lado del texto: las vetas de oro no pasan por detrás de
     los titulares dorados. En el móvil el texto va arriba, y la sombra también */
  --sombra-texto: linear-gradient(90deg, rgba(12, 12, 14, .8) 0%, rgba(12, 12, 14, .5) 45%, rgba(12, 12, 14, .15) 80%);
  --serif: "Cinzel", "Trajan Pro", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --margen: clamp(16px, 5vw, 72px);
  --ancho: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--noche);
  color: var(--marmol);
  font: 500 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

/* ── Cabecera ─────────────────────────────────────────────
   Arriba, transparente y a lo ancho. Al bajar (web.js pone data-flotante) se
   recoge en la píldora del menú de Rutinas (components/base/TabBar.tsx): opaca,
   con borde fino y sombra, y la sección en la que estás en una píldora más clara. */
.cabecera {
  --muelle: cubic-bezier(.3, 1.3, .5, 1);   /* se pasa un poco y vuelve */
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: center;
  padding: 18px var(--margen) 0;
  pointer-events: none; /* la franja vacía no tapa clics; la barra sí los recibe */
  transition: padding-top .5s var(--muelle);
}
.cabecera-barra {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%; max-width: 100%; padding: 0;
  border: 1px solid transparent; border-radius: 999px;
  scroll-target-group: auto; /* el busto (#inicio) también cuenta: en la portada no se enciende ninguna pestaña */
  transition: max-width .55s var(--muelle), padding .55s var(--muelle),
              background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.cabecera-marca { display: flex; flex: none; border-radius: 50%; }
.cabecera-marca img { border-radius: 50%; }
.cabecera-nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.cabecera-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  font: 500 15px/1 var(--sans);
  text-decoration: none; color: var(--niebla);
  border-radius: 999px;
  transition: background-color .25s ease, color .25s ease;
}
.cabecera-nav a:hover { color: var(--marmol); }

.cabecera[data-flotante] { padding-top: 12px; }
/* Medidas del menú de la app (TAB_BAR): 64 de alto, pestañas de 52 y 6 de margen;
   en el móvil ocupa el ancho menos los márgenes, como allí */
.cabecera[data-flotante] .cabecera-barra {
  max-width: 440px; padding: 6px; gap: 8px;
  background: var(--marino-hondo);
  border-color: rgba(174, 181, 211, .18);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .5);
}
.cabecera[data-flotante] .cabecera-nav { flex: 1; gap: 6px; }
.cabecera[data-flotante] .cabecera-nav a {
  flex: 1; height: 52px; padding-inline: 20px;
  font: 500 16px/1 var(--sans); letter-spacing: 0; text-transform: none;
}
/* La sección en la que estás: :target-current (Chrome 140) o la clase que pone web.js */
.cabecera[data-flotante] .cabecera-nav a:is(:target-current, .target-current) {
  background: rgba(255, 255, 255, .09); color: var(--marmol); font-weight: 800;
}
/* El busto, con aire: 44 px dentro de una píldora de 64, a 10 del borde y 12 de las pestañas */
.cabecera[data-flotante] .cabecera-marca { margin-inline: 4px 6px; }
.cabecera[data-flotante] .cabecera-marca img { width: 44px; height: 44px; }

/* Lo que vigila web.js: cuando sale de la pantalla, la cabecera flota */
.centinela { position: absolute; top: 0; left: 0; width: 1px; height: 140px; pointer-events: none; }

/* Las secciones reciben el foco al saltar desde el menú (para seguir con el teclado);
   no son controles, así que sin anillo */
section[tabindex="-1"]:focus { outline: none; }

/* ── Botones ──────────────────────────────────────────── */
.boton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font: 500 16px/1 var(--sans); text-decoration: none;
  transition: transform .15s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.boton:active { transform: scale(.97); }
/* El oro, con su luz: más claro arriba, un filo de brillo y un halo cálido debajo */
.boton-oro {
  background: linear-gradient(180deg, #F2DC94, #E2C068); color: var(--tinta);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 12px 32px -12px rgba(230, 200, 115, .55);
}
.boton-oro:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 16px 40px -12px rgba(230, 200, 115, .75); }
.boton-linea { border: 1px solid rgba(236, 234, 241, .28); color: var(--marmol); }
.boton-linea:hover { border-color: rgba(236, 234, 241, .6); background: rgba(255, 255, 255, .05); }

/* Foco de teclado: oro, que se ve sobre el azul y sobre el mármol negro */
:where(a, button):focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; }

/* ── Portada ──────────────────────────────────────────────
   Una estela: «ATHENAS» grabado a lo ancho y el busto delante, tapando la parte
   baja de las letras con la cresta. Al bajar, la inscripción se queda atrás
   (parallax con scroll-driven animations, sólo donde las hay). */
.portada {
  position: relative; isolation: isolate; overflow: clip;
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: center;
  min-height: 100svh;
  padding: 92px var(--margen) 56px;
  text-align: center;
  background:
    radial-gradient(40% 44% at 50% 34%, rgba(132, 144, 214, .32), transparent 72%), /* el foco sobre el busto */
    linear-gradient(180deg, var(--marino) 0%, var(--marino-hondo) 100%);
}
.portada-escena {
  --nombre: clamp(44px, 14.2vw, 212px);   /* cuerpo de la inscripción */
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; width: 100%;
  /* minmax(0, 1fr): el busto puede ser más ancho que la columna (en el móvil, de borde a borde)
     sin ensancharla, y lo demás sigue centrado */
}
.portada-escena > * { grid-area: 1 / 1; }

.lema {
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; width: 100%;
  font-family: var(--serif); font-weight: 700;
}
.lema-nombre {
  position: relative; z-index: 0;
  font-size: var(--nombre); line-height: .8; letter-spacing: .06em;
  margin-right: -.06em; /* el espaciado de la última letra descentraba la palabra */
  text-transform: uppercase; color: var(--marmol);
}
/* Mármol iluminado desde arriba: blanco en la cabeza de la letra, gris azulado al pie */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .lema-nombre {
    background: linear-gradient(180deg, #FBFAFD 10%, #CED2E7 55%, #7C84AC 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    filter: drop-shadow(0 2px 0 rgba(8, 9, 24, .6));
  }
}
.lema-studio {
  position: relative; z-index: 2; grid-row: 3;
  display: flex; align-items: center; gap: .9em; width: min(100%, 520px);
  font-weight: 600; font-size: clamp(14px, 1.9vw, 22px); line-height: 1;
  letter-spacing: .62em; text-transform: uppercase; color: var(--niebla);
}
.lema-studio::before, .lema-studio::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(174, 181, 211, .8));
}
.lema-studio::after { margin-left: -.62em; scale: -1 1; }

.portada-busto {
  position: relative; z-index: 1;
  margin: calc(var(--nombre) * .32) 0 0;
  /* El logo, protagonista: tan grande como quepa con el texto y los botones a la vista
     (330 px es lo que ocupa lo demás), nunca menos de 54svh; en el móvil, de lado a lado */
  width: min(640px, max(54svh, 100svh - 330px), 100vw);
}
.portada-busto img {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 95%);
          mask-image: linear-gradient(180deg, #000 70%, transparent 95%);
}

.portada-texto { display: grid; justify-items: center; margin-top: 26px; }
.portada-entrada { max-width: 34em; font-size: clamp(16px, 1.5vw, 18px); color: #C9CDE2; text-wrap: balance; }
.portada-botones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* Al abrir: se graba la inscripción y después sube el busto.
   (Lo que se mueve con el scroll está al final, en «Movimiento con el scroll».) */
@media (prefers-reduced-motion: no-preference) {
  .lema-nombre { animation: graba 1.1s cubic-bezier(.2, .7, .2, 1) backwards; }
  .portada-busto img { animation: aparece 1.3s .25s cubic-bezier(.2, .7, .2, 1) backwards; }
}
@keyframes graba { from { opacity: 0; scale: 1.04; } }
@keyframes aparece { from { opacity: 0; translate: 0 24px; } }

/* ── Rutinas ──────────────────────────────────────────────
   Sobre el mármol negro con vetas de oro de la app (el de su resumen al terminar).
   Arriba se funde con el azul de la portada y abajo con la noche de Juegos: una sola
   noche, sin cortes. El fondo es .rutinas-fondo, más abajo (la transición entre páginas). */
.rutinas {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: clamp(32px, 5vw, 72px);
  padding: clamp(120px, 12vw, 168px) var(--margen);
  background: var(--marmol-negro); color: var(--marmol);
}
.rutinas-estatua { /* la Atenea de la lanza, en línea blanca, casi un relieve */
  position: absolute; z-index: -1;
  width: min(80vw, 860px); right: -8%; top: 50%;
  transform: translateY(-50%) rotate(-6deg);
  opacity: .07; pointer-events: none;
}
.rutinas-texto { max-width: 520px; justify-self: end; width: 100%; }
.app-marca { display: flex; align-items: center; gap: 16px; }
.app-marca img { width: 64px; height: 64px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 30px rgba(0, 0, 0, .5); }
.app-nombre { font: 700 22px/1.1 var(--serif); letter-spacing: .08em; text-transform: uppercase; }
.app-tipo { font-size: 14px; color: var(--niebla); }
.rutinas-titulo {
  margin-top: 40px;
  font: 700 clamp(36px, 4.4vw, 58px)/1.08 var(--serif); letter-spacing: .01em;
  color: var(--oro);
}
.rutinas-titulo span { color: inherit; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .rutinas-titulo {
    background: var(--oro-luz); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}
.rutinas-entrada { margin-top: 24px; font-size: 18px; max-width: 28em; color: rgba(236, 234, 241, .86); }
.rutinas-lista { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; color: rgba(236, 234, 241, .86); }
.rutinas-lista li { position: relative; padding-left: 28px; }
.rutinas-lista li::before { /* un rombo de oro, como las incrustaciones del mármol */
  content: ""; position: absolute; left: 3px; top: .6em;
  width: 7px; height: 7px; rotate: 45deg; border-radius: 1px; background: var(--oro);
}
/* «Sin cuentas · Sin anuncios» entre las dos mitades de la corona de laurel de la app,
   como en la portada de las capturas de tienda: las ramas abrazan el texto */
.rutinas-sello {
  display: flex; align-items: center; gap: 8px; margin-top: 32px;
  font: 700 17px/1.25 var(--serif); letter-spacing: .04em; text-align: center; color: var(--oro);
}
.rutinas-sello img { height: 76px; width: auto; }

/* Los distintivos oficiales de las tiendas (img/tienda-*), tal cual: sin recolorear ni
   deformar, y nunca por debajo de 40 px de alto (norma de Apple) */
.tiendas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.tienda {
  display: block; border-radius: 9px;
  transition: transform .15s ease, opacity .15s ease;
}
.tienda img { display: block; width: auto; height: 52px; }
.tienda:hover { opacity: .85; }
.tienda:active { transform: scale(.97); }

/* ── El iPhone de las capturas ────────────────────────────
   El mismo que las capturas de tienda (rutinas/app-preview/shared/devices.css): canto de
   titanio, marco negro, isla dinámica y la barra de estado. Las medidas, en cqw del propio
   móvil, salen de los puntos del de allí: 402 de pantalla + 9 de marco + 4 de canto a
   cada lado = 428 de ancho y 900 de alto. Así escala igual a cualquier tamaño. */
.iphone {
  --barra: #121213; /* la hora y los iconos; en blanco sobre las pantallas oscuras (.oscura) */
  container-type: inline-size;
  position: relative; isolation: isolate;
  border-radius: 16.6% / 7.9%;
  background: linear-gradient(145deg, #6B6B74 0%, #2B2B31 18%, #18181C 40%, #3D3D45 62%, #1C1C21 80%, #55555E 100%);
  box-shadow: 0 30px 60px -18px rgba(40, 26, 0, .55), 0 12px 24px -12px rgba(40, 26, 0, .35);
}
.iphone.oscura { --barra: #fff; }
.iphone::before { /* el marco negro, dentro del canto */
  content: ""; position: absolute; z-index: -1; inset: .93cqw; border-radius: 15.65cqw; background: #0B0B0D;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.iphone > img {
  display: block; width: calc(100% - 6.07cqw); height: auto; margin: 3.04cqw;
  border-radius: 13.55cqw;
}
.iphone::after { /* la isla dinámica */
  content: ""; position: absolute; top: 5.6cqw; left: 50%; translate: -50% 0;
  width: 29.4cqw; height: 8.6cqw; border-radius: 99px; background: #000;
}
.iphone-barra { /* la hora a la izquierda y cobertura, wifi y batería a la derecha */
  position: absolute; top: 7.4cqw; left: 3.04cqw; right: 3.04cqw; height: 4.6cqw;
  display: flex; align-items: center; justify-content: space-between; padding-inline: 10.5cqw 9cqw;
  font: 600 3.9cqw/1 -apple-system, "SF Pro Text", "Inter", system-ui, sans-serif; letter-spacing: -.02em;
  color: var(--barra); pointer-events: none;
}
.iphone-barra::after {
  content: ""; width: 15.6cqw; height: 3cqw; background: var(--barra);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 13'%3E%3Crect x='0' y='8' width='3' height='4' rx='.8'/%3E%3Crect x='4.5' y='6' width='3' height='6' rx='.8'/%3E%3Crect x='9' y='3.5' width='3' height='8.5' rx='.8'/%3E%3Crect x='13.5' y='1' width='3' height='11' rx='.8'/%3E%3Cpath d='M29 12.2l2.3-2.5a3.3 3.3 0 0 0-4.6 0z M24.4 7.4a6.6 6.6 0 0 1 9.2 0l-1.3 1.4a4.7 4.7 0 0 0-6.6 0z M22 4.8a10 10 0 0 1 14 0l-1.3 1.4a8.1 8.1 0 0 0-11.4 0z'/%3E%3Crect x='41.5' y='.5' width='22' height='11.5' rx='3.4' fill='none' stroke='%23000' stroke-opacity='.45'/%3E%3Crect x='43.5' y='2.5' width='18' height='7.5' rx='2'/%3E%3Cpath d='M65 4.3v4c.9-.3 1.5-1.1 1.5-2s-.6-1.7-1.5-2z' fill-opacity='.45'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 13'%3E%3Crect x='0' y='8' width='3' height='4' rx='.8'/%3E%3Crect x='4.5' y='6' width='3' height='6' rx='.8'/%3E%3Crect x='9' y='3.5' width='3' height='8.5' rx='.8'/%3E%3Crect x='13.5' y='1' width='3' height='11' rx='.8'/%3E%3Cpath d='M29 12.2l2.3-2.5a3.3 3.3 0 0 0-4.6 0z M24.4 7.4a6.6 6.6 0 0 1 9.2 0l-1.3 1.4a4.7 4.7 0 0 0-6.6 0z M22 4.8a10 10 0 0 1 14 0l-1.3 1.4a8.1 8.1 0 0 0-11.4 0z'/%3E%3Crect x='41.5' y='.5' width='22' height='11.5' rx='3.4' fill='none' stroke='%23000' stroke-opacity='.45'/%3E%3Crect x='43.5' y='2.5' width='18' height='7.5' rx='2'/%3E%3Cpath d='M65 4.3v4c.9-.3 1.5-1.1 1.5-2s-.6-1.7-1.5-2z' fill-opacity='.45'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rutinas-moviles {
  display: block; position: relative; width: min(100%, 600px); aspect-ratio: 1 / 1.08; justify-self: start;
  border-radius: 24px; /* el anillo del foco, cuando es enlace (en la portada) */
}
/* Detrás de los móviles, un resplandor de oro, como una vitrina iluminada */
.rutinas-moviles::before {
  content: ""; position: absolute; z-index: -1; inset: -12% -16%;
  background: radial-gradient(closest-side, rgba(230, 200, 115, .2), rgba(230, 200, 115, .06) 55%, transparent);
  pointer-events: none;
}
.rutinas .iphone { box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 40px 80px -24px rgba(0, 0, 0, .85), 0 18px 36px -18px rgba(0, 0, 0, .6); }
.movil {
  position: absolute; width: 46%;
  transition: scale .35s cubic-bezier(.3, 1.3, .5, 1);
}
/* En la portada, los móviles abren la página de Rutinas: al pasar por encima, se acercan */
a.rutinas-moviles:hover .movil { scale: 1.04; }
.rutinas-mas {
  display: inline-block; margin-top: 24px;
  font-size: 16px; color: var(--oro);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  text-decoration-color: rgba(230, 200, 115, .5);
}
.rutinas-mas:hover { text-decoration-thickness: 2px; }

/* De la portada a la página de Rutinas (y al volver): el oro crece hasta llenar la
   pantalla y el texto, los móviles y la estatua van de un sitio al otro. El oro es una
   capa vacía (.rutinas-fondo): si creciera la sección entera, su texto se vería doble.
   Transición entre páginas: Chrome y Safari 18.2+; en el resto, la página se abre sin más. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.rutinas-fondo {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, var(--marino-hondo), rgba(21, 23, 46, 0) 200px),   /* viene de la portada */
    linear-gradient(0deg, var(--noche), rgba(15, 17, 36, 0) 200px),            /* va a Juegos */
    var(--sombra-texto),
    url("img/marmol-negro.webp") center / cover var(--marmol-negro);
  view-transition-name: rutinas-fondo;
}
.rutinas-estatua { view-transition-name: rutinas-estatua; }
.rutinas-texto { view-transition-name: rutinas-texto; }
.rutinas-moviles { view-transition-name: rutinas-moviles; }
::view-transition-group(*) { animation-duration: .6s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
.movil-centro { left: 27%; top: 0; z-index: 2; }
.movil-izq { left: 0; top: 10%; rotate: -6deg; }
.movil-der { right: 0; top: 10%; rotate: 6deg; }

/* ── Juegos ───────────────────────────────────────────── */
.juegos {
  padding: clamp(100px, 10vw, 128px) var(--margen);
  /* El resplandor, detrás del título y no pegado arriba: el mármol se funde en la noche
     sin costura */
  background:
    radial-gradient(55% 30% at 50% 22%, rgba(80, 92, 160, .2), transparent 75%),
    var(--noche);
  text-align: center;
}
.juegos-titulo { font: 700 clamp(34px, 4.6vw, 56px)/1.08 var(--serif); letter-spacing: .01em; }
.juegos-entrada { margin: 20px auto 0; max-width: 32em; color: #C9CDE2; text-wrap: balance; }

.juegos-lista {
  list-style: none; margin: 48px auto 0; padding: 0; max-width: var(--ancho);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 2vw, 24px);
  text-align: left;
}
.juego { display: flex; flex-direction: column; transition: opacity .3s ease; }
/* Como piezas de una galería: el vídeo enmarcado, el nombre en Cinzel y el voto discreto */
.juego video {
  width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 20px;
  background: var(--marino-hondo); cursor: pointer;
  box-shadow: 0 0 0 1px rgba(236, 234, 241, .1), 0 30px 60px -28px rgba(0, 0, 0, .9);
}
.juego h3 { margin-top: 20px; font: 700 19px/1.2 var(--serif); letter-spacing: .02em; }
.juego p { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--niebla); flex: 1; }
.votar {
  align-self: start; margin-top: 16px; min-height: 44px; padding: 0 22px;
  border: 1px solid rgba(230, 200, 115, .45); border-radius: 999px;
  background: transparent; color: var(--oro); cursor: pointer;
  font: 500 15px/1 var(--sans);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.votar:hover:not(:disabled) { background: rgba(230, 200, 115, .1); border-color: var(--oro); }
.votar:active:not(:disabled) { transform: scale(.97); }
.votar:disabled { cursor: default; }

/* Ya ha votado: su juego en oro, el resto atenuado */
.juegos[data-votado] .juego { opacity: .45; }
.juegos[data-votado] .juego.elegido { opacity: 1; }
.juego.elegido .votar { background: var(--oro); color: var(--tinta); border-color: var(--oro); }
.juego video { outline: 2px solid transparent; outline-offset: 5px; transition: outline-color .4s ease; }
.juego.elegido video { outline-color: var(--oro); }
/* Al votar (no al volver a la página), el botón se sella con un pequeño rebote */
@media (prefers-reduced-motion: no-preference) {
  .juego.recien .votar { animation: sella .5s linear(0, .45 15%, 1.08 35%, .97 55%, 1.01 75%, 1) both; }
}
@keyframes sella { from { scale: .86; } }

.juegos-gracias { min-height: 1.6em; margin-top: 32px; font: 600 17px/1.4 var(--serif); color: var(--oro); }

/* Las redes: un cierre con presencia, con sus iconos y sin cápsulas */
.redes { margin-top: clamp(56px, 8vw, 96px); }
.redes p { font: 700 clamp(20px, 2.2vw, 26px)/1.2 var(--serif); letter-spacing: .01em; color: var(--marmol); }
.redes ul { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 36px; margin: 22px 0 0; padding: 0; }
.redes a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  text-decoration: none; color: var(--niebla); font-size: 16px;
  transition: color .2s ease;
}
.redes a svg { width: 22px; height: 22px; fill: currentColor; }
.redes a:hover { color: var(--oro); }

/* ── Aviso de cookies (lo pone web.js) ────────────────────
   Pequeño, abajo y sin bloquear la página. «Rechazar» y «Aceptar», idénticos: la AEPD
   pide que rechazar esté al mismo nivel que aceptar. */
.aviso-cookies {
  position: fixed; z-index: 30; left: 50%; translate: -50% 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(660px, calc(100% - 2 * var(--margen)));
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 14px 14px 14px 20px; border-radius: 20px;
  background: rgba(21, 23, 46, .9);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(236, 234, 241, .14);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
  color: rgba(236, 234, 241, .9); font-size: 14px; line-height: 1.45;
}
.aviso-cookies p { flex: 1 1 300px; }
.aviso-cookies a { color: var(--oro); text-underline-offset: 3px; }
.aviso-cookies-botones { display: flex; gap: 8px; }
.aviso-cookies button {
  min-height: 44px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(236, 234, 241, .32); background: rgba(255, 255, 255, .06);
  color: var(--marmol); font: 500 15px/1 var(--sans);
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.aviso-cookies button:hover { border-color: var(--oro); color: var(--oro); }
@media (prefers-reduced-motion: no-preference) {
  .aviso-cookies { animation: sube-aviso .5s cubic-bezier(.2, .7, .2, 1) backwards; }
}
@keyframes sube-aviso { from { opacity: 0; translate: -50% 24px; } }
@media (max-width: 640px) {
  .aviso-cookies { padding: 12px; gap: 10px; font-size: 13px; line-height: 1.4; }
  .aviso-cookies-botones { flex: 1 1 100%; }
  .aviso-cookies button { flex: 1; }
  /* Con la píldora del menú abajo, el aviso va encima de ella */
  body:has(.cabecera[data-flotante]) .aviso-cookies { bottom: calc(64px + 24px + max(12px, env(safe-area-inset-bottom))); }
}

/* «Cookies» en el pie: un botón (reabre el aviso) con aspecto de enlace */
.pie-enlace { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.pie-enlace:hover { color: var(--marmol); text-decoration: underline; }

/* ── Aviso legal y privacidad (legal/) ────────────────── */
.pagina-legal body {
  background: radial-gradient(60% 40% at 50% 0%, rgba(80, 92, 160, .22), transparent 70%), var(--noche);
}
.legal { max-width: 42rem; margin: 0 auto; padding: clamp(40px, 8vw, 96px) var(--margen) 72px; }
.legal-volver { color: var(--niebla); text-decoration: none; font-size: 15px; }
.legal-volver:hover { color: var(--oro); }
.legal h1 { margin-top: 40px; font: 700 clamp(32px, 5vw, 48px)/1.1 var(--serif); letter-spacing: .01em; }
.legal-fecha { margin-top: 12px; font-size: 14px; color: var(--niebla); }
.legal h2 { margin-top: 44px; font: 700 21px/1.25 var(--serif); letter-spacing: .01em; color: var(--oro); }
.legal p, .legal li { color: rgba(236, 234, 241, .86); }
.legal p { margin-top: 14px; }
.legal ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.legal li::marker { color: var(--oro); }
.legal a:not(.legal-volver) { color: var(--oro); text-underline-offset: 3px; }
.legal strong { color: var(--marmol); }
/* Privacidad y términos de Rutinas (rutinas/privacidad/, rutinas/terminos/): español e inglés */
.legal-arriba { display: flex; justify-content: space-between; gap: 16px; }
.legal h3 { margin-top: 36px; font: 700 18px/1.3 var(--serif); letter-spacing: .01em; color: var(--oro); }
.legal-en { margin-top: 64px; padding-top: 40px; border-top: 1px solid rgba(230, 200, 115, .25); }
.legal-en > h2 { margin-top: 0; font-size: clamp(24px, 3.4vw, 32px); color: var(--marmol); }
.legal-otra { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(174, 181, 211, .15); font-size: 15px; }

/* ── Página que no existe (404.html) ──────────────────── */
.no-existe {
  min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 18px;
  padding: 48px var(--margen); text-align: center;
  background: radial-gradient(40% 44% at 50% 30%, rgba(132, 144, 214, .28), transparent 72%),
    linear-gradient(180deg, var(--marino), var(--marino-hondo));
}
.no-existe img { width: min(280px, 60vw); height: auto; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 95%); mask-image: linear-gradient(180deg, #000 70%, transparent 95%); }
.no-existe h1 { font: 700 clamp(28px, 5vw, 44px)/1.1 var(--serif); }
.no-existe p { color: var(--niebla); max-width: 26em; }
.no-existe .boton { margin-top: 10px; }

/* ── Pie ──────────────────────────────────────────────── */
.pie {
  padding: 72px var(--margen) 44px; background: var(--noche);
  text-align: center; color: var(--niebla); font-size: 14px;
  /* una veta de oro como línea de separación */
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(230, 200, 115, .35), transparent) 1;
}
.pie-busto { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(236, 234, 241, .12); }
.pie-marca { font: 700 15px/1 var(--serif); letter-spacing: .3em; text-transform: uppercase; color: var(--marmol); }
.pie-columnas { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px 72px; margin: 32px 0; }
.pie-columnas div { display: grid; gap: 8px; }
.pie-titulo { font: 700 15px/1 var(--serif); letter-spacing: .02em; color: var(--oro); margin-bottom: 4px; }
.pie a { text-decoration: none; }
.pie a:hover { color: var(--marmol); text-decoration: underline; }
.pie-nota { margin-top: 8px; font-size: 13px; opacity: .8; }
.pie-marcas { max-width: 46em; margin: 24px auto 0; font-size: 11px; line-height: 1.5; color: #868CA7; text-wrap: balance; }

/* ── Móvil y tableta ──────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sombra-texto: linear-gradient(180deg, rgba(12, 12, 14, .82) 0%, rgba(12, 12, 14, .6) 50%, rgba(12, 12, 14, .25) 100%); }
  .portada { padding-top: 92px; }

  .rutinas { grid-template-columns: 1fr; }
  .rutinas-texto { justify-self: center; }
  .rutinas-moviles { justify-self: center; width: min(100%, 460px); }
  .rutinas-estatua { width: 140vw; right: -50%; top: 30%; }

  .juegos-lista { grid-template-columns: repeat(2, 1fr); }
}

/* Móvil: la píldora, abajo, como el menú de la app (a 12 px del borde, o encima de la
   franja del indicador de inicio del iPhone). Arriba sólo queda la barra de la portada. */
@media (max-width: 640px) {
  .cabecera[data-flotante] {
    inset: auto 0 0 0;
    padding: 0 var(--margen) max(12px, env(safe-area-inset-bottom));
  }
  /* Saltar de arriba abajo no se puede transicionar: la barra cambia sin más y la píldora
     sube desde fuera de la pantalla, con el mismo rebote */
  .cabecera { transition: none; }
  .cabecera-barra { transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease; }
  .cabecera[data-flotante] .cabecera-barra { animation: sube-pildora .5s var(--muelle) both; }

  /* Con la píldora abajo, las secciones vuelven a su margen de arriba; el pie deja sitio
     para que la píldora no tape lo último, y el foco del teclado tampoco se queda debajo */
  .rutinas, .juegos { padding-top: 72px; }
  /* Con la píldora abajo, la ola de los juegos acaba más abajo: que no pise el «Gracias» */
  .juegos-gracias { margin-top: 56px; }
  .pie { padding-bottom: calc(64px + 40px + max(12px, env(safe-area-inset-bottom))); }
  html { scroll-padding-bottom: 96px; }
}
@keyframes sube-pildora { from { translate: 0 calc(100% + 32px); } }

@media (max-width: 420px) {
  .portada-botones .boton { flex: 1 1 100%; }
  .tienda img { height: 46px; }
  .juego h3 { font-size: 15px; }
  .juego p { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cabecera, .cabecera-barra { transition: none; }
  .cabecera[data-flotante] .cabecera-barra { animation: none; }
}

/* ── Movimiento con el scroll ─────────────────────────────
   Scroll-driven animations: van en el hilo del compositor (sólo translate,
   rotate, scale y opacity) y no necesitan JS. Donde no las hay (Safari < 26,
   Firefox < 159) la página se ve quieta, tal cual: es decoración. */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {

    /* Portada: la estatua se eleva y deja atrás la inscripción; el texto se hunde */
    .portada { view-timeline: --portada; }
    .portada-busto, .lema-studio, .portada-texto {
      animation-timing-function: linear; animation-fill-mode: both;
      animation-timeline: --portada; animation-range: exit 0% exit 100%;
    }
    .portada-busto { animation-name: se-eleva; }
    .lema-studio, .portada-texto { animation-name: se-hunde; }
    .lema-nombre {
      animation: graba 1.1s cubic-bezier(.2, .7, .2, 1) backwards, queda-atras linear both;
      animation-timeline: auto, --portada;
      animation-range: normal, exit 0% exit 100%;
    }

    /* Rutinas: los móviles llegan juntos y se abren en abanico; la Atenea del fondo se balancea */
    .rutinas { view-timeline: --rutinas; }
    .rutinas-moviles { view-timeline: --moviles; }
    .movil {
      animation: linear both;
      animation-timeline: --moviles; animation-range: entry 0% cover 45%;
    }
    .movil-izq { animation-name: abanico-izq; }
    .movil-der { animation-name: abanico-der; }
    .movil-centro { animation-name: abanico-centro; }
    .rutinas-estatua {
      animation: balancea linear both;
      animation-timeline: --rutinas; animation-range: cover 0% cover 100%;
    }

    /* Juegos: desalineados al entrar y al salir, y alineados cuando la fila está en el
       centro de la pantalla (cover 50 %: ahí el desplazamiento es 0). Las pares se mueven
       siete veces más. Las dos con el mismo signo: lo que va antes en la página siempre
       queda más arriba, así nunca se pisan una fila y la siguiente. */
    .juego {
      --ola: 20px;
      animation: ola linear both;
      animation-timeline: view(); animation-range: cover 0% cover 100%;
    }
    .juego:nth-child(even) { --ola: 140px; }
  }
}
@keyframes se-eleva { to { translate: 0 -30svh; scale: 1.1; } }
@keyframes queda-atras { to { translate: 0 -8svh; } }
@keyframes se-hunde { 45% { opacity: 0; } to { translate: 0 14svh; opacity: 0; } }
@keyframes abanico-izq { from { translate: 45% 6%; rotate: 0deg; } }
@keyframes abanico-der { from { translate: -45% 6%; rotate: 0deg; } }
@keyframes abanico-centro { from { translate: 0 10%; } }
@keyframes balancea { from { translate: 0 12%; rotate: -5deg; } to { translate: 0 -12%; rotate: 5deg; } }
@keyframes ola { from { translate: 0 var(--ola); } to { translate: 0 calc(var(--ola) * -1); } }
