/* ── cat heist · el diseño de la web de cat heist ─────────────────────
 *
 *  Cada app de aleclagarde.com tiene el suyo. Este es el del juego: la
 *  noche violeta del tablero, las tarjetas color crema de los menús, el
 *  amarillo de los botones y las mismas fuentes (Lilita One para los
 *  títulos, Fredoka para el texto), para que quien llegue desde la app
 *  reconozca dónde está.
 *
 *  Las fuentes se sirven desde aquí mismo, como en el resto de la web.
 *  Licencia OFL al lado.
 */

@font-face { font-family: 'Lilita One'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(./fuentes/lilita-one-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Lilita One'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(./fuentes/lilita-one-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(./fuentes/fredoka-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(./fuentes/fredoka-latin-ext-500-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(./fuentes/fredoka-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(./fuentes/fredoka-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* Los colores son los del juego. */
:root {
  --noche: #171230;      /* el fondo del tablero */
  --noche-2: #221a45;    /* un paso más claro: superficies sobre la noche */
  --crema: #fff8ec;      /* las tarjetas de los menús */
  --crema-2: #f3e9d6;    /* un paso más oscuro sobre la crema */
  --tinta: #2a1a5e;      /* el texto de las tarjetas */
  --luz: #fff7ea;        /* el texto sobre la noche */
  --luz-2: #cfc4ec;      /* notas sobre la noche */
  --oro: #ffcf4a;        /* los botones */
  --oro-tinta: #3a2600;
  --enlace: #2a1a5e;     /* enlaces sobre la crema: la misma tinta, subrayada */
  --titulos: 'Lilita One', 'Fredoka', ui-rounded, system-ui, sans-serif;
  --texto-fuente: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --margen: clamp(20px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--noche); color: var(--luz); font: 500 18px/1.6 var(--texto-fuente); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--oro); text-underline-offset: 3px; }
b, strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--oro); color: var(--oro-tinta); }

html[data-idioma="es"] [lang="en"]:not(html),
html[data-idioma="en"] [lang="es"]:not(html) { display: none !important; }

.marco { padding: 0 var(--margen); max-width: 1320px; margin: 0 auto; }

/* ── la barra ── */
.barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.marca { display: flex; align-items: center; gap: 12px; color: var(--luz); text-decoration: none; font: 400 24px/1 var(--titulos); }
.marca img { width: 44px; height: 44px; border-radius: 11px; }
.nav { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.nav a { color: var(--luz-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; transition: background-color .2s, color .2s; }
.nav a:hover { color: var(--luz); background: var(--noche-2); }
.nav a[aria-current] { color: var(--luz); background: var(--noche-2); }
.nav .idioma { font-weight: 600; }

/* ── la cabecera: título grande y la banda ── */
.cabecera { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(24px, 4vw, 64px);
  padding-top: clamp(24px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 120px); }
.cabecera h1 { font: 400 clamp(64px, 11vw, 168px)/.92 var(--titulos); letter-spacing: -0.02em; margin: 0 0 28px; color: var(--luz); }
.lema { font-size: 24px; line-height: 1.4; max-width: 30ch; margin: 0 0 14px; }
.fecha { color: var(--luz-2); font-size: 16px; margin: 0; }
.cabecera .banda { width: 100%; animation: entra .7s cubic-bezier(.2,.8,.2,1) both .1s; }
.cabecera .pantalla { justify-self: end; width: min(100%, 420px); animation: entra .7s cubic-bezier(.2,.8,.2,1) both .1s; }

.boton { display: inline-block; text-decoration: none; background: var(--oro); color: var(--oro-tinta);
  font: 400 24px/1 var(--titulos); padding: 18px 30px; border-radius: 999px; margin-top: 22px;
  transition: transform .15s; }
.boton:hover { transform: translateY(-2px); }
.boton:active { transform: translateY(1px) scale(.98); }

/* Las capturas son del juego tal cual: sin marco, a tamaño de móvil. */
.pantalla { border-radius: 26px; overflow: hidden; background: var(--noche-2); }
.pantalla img { width: 100%; }

/* ── la hoja: el texto largo sobre crema, como los menús del juego ── */
.hoja { background: var(--crema); color: var(--tinta); border-radius: 36px 36px 0 0; }
.hoja a { color: var(--enlace); }
.hoja .marco { display: grid; grid-template-columns: minmax(0, 68ch) minmax(260px, 1fr); gap: clamp(32px, 6vw, 96px);
  padding-top: clamp(56px, 7vw, 104px); padding-bottom: clamp(64px, 8vw, 128px); }
.texto h2 { font: 400 44px/1.05 var(--titulos); letter-spacing: -0.01em; margin: 64px 0 16px; color: var(--tinta); }
.texto h2:first-child { margin-top: 0; }
.texto h3 { font-size: 24px; font-weight: 600; line-height: 1.3; margin: 32px 0 6px; }
.texto p, .texto li { margin: 0 0 14px; }
.texto ul { padding-left: 1.2em; margin: 0 0 14px; }

/* La columna de al lado: lo que sale de tu móvil, siempre a la vista. */
.lado { align-self: start; position: sticky; top: 32px; display: grid; gap: 28px; }
.resumen { background: var(--crema-2); border-radius: 26px; padding: 28px; }
.resumen h2 { font: 400 44px/1 var(--titulos); margin: 0 0 18px; }
.resumen dl { margin: 0; display: grid; gap: 16px; }
.resumen dt { font-weight: 600; font-size: 18px; }
.resumen dd { margin: 2px 0 0; font-size: 16px; line-height: 1.45; }
.lado .pantalla { width: min(100%, 360px); }
.pie-foto { font-size: 16px; line-height: 1.4; margin: 10px 0 0; }

/* ── ayuda: preguntas con su captura al lado, alternando ── */
.tema { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  padding-top: clamp(56px, 7vw, 104px); padding-bottom: clamp(56px, 7vw, 104px); }
.hoja .tema + .tema { padding-top: 0; }
.tema .pantalla { width: min(100%, 380px); justify-self: center; }
.tema.al-reves .pantalla { order: -1; }
.tema h2 { font: 400 44px/1 var(--titulos); letter-spacing: -0.015em; margin: 0 0 20px; color: var(--tinta); }
.tema h3 { font-size: 24px; font-weight: 600; line-height: 1.3; margin: 26px 0 6px; }
.tema p { margin: 0 0 12px; max-width: 60ch; }
.preguntas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px clamp(32px, 6vw, 96px);
  padding-top: clamp(56px, 7vw, 104px); padding-bottom: clamp(64px, 8vw, 128px); }
.preguntas > h2 { grid-column: 1 / -1; font: 400 44px/1 var(--titulos); margin: 0 0 12px; }
.preguntas h3 { font-size: 24px; font-weight: 600; line-height: 1.3; margin: 18px 0 6px; }
.preguntas p { margin: 0; }
.campo { background: var(--crema-2); }

/* ── el pie: el nombre vuelve a lo ancho ── */
.pie { padding-top: clamp(56px, 7vw, 96px); padding-bottom: 32px; }
.pie .nombre { font: 400 clamp(64px, 11vw, 168px)/.9 var(--titulos); letter-spacing: -0.03em; margin: 0 0 28px; color: var(--luz); }
.pie .enlaces { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; color: var(--luz-2); }
.pie .enlaces a { color: var(--luz-2); }
.pie .enlaces a:hover { color: var(--luz); }

/* La banda se balancea un poco, como en el juego. */
.cabecera .banda { animation: entra .7s cubic-bezier(.2,.8,.2,1) both .1s, mece 3.2s ease-in-out 1s infinite alternate; }
@keyframes mece { from { transform: translateY(0); } to { transform: translateY(-10px); } }
.pantalla.video video { display: block; width: 100%; height: auto; }

/* Entradas al hacer scroll (cat-heist.js pone .js en <html>; sin él todo se ve). */
html.js .entra { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1); transition-delay: var(--retraso, 0ms); }
html.js .entra.visto { opacity: 1; transform: none; }

@keyframes entra { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.cabecera h1, .cabecera .lema { animation: entra .6s cubic-bezier(.2,.8,.2,1) both; }
.cabecera .lema { animation-delay: .07s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── el móvil ── */
@media (max-width: 640px) {
  .cabecera { grid-template-columns: 1fr; }
  .cabecera .pantalla { justify-self: start; width: min(100%, 340px); }
}
@media (max-width: 860px) {
  .hoja .marco { grid-template-columns: 1fr; }
  .lado { position: static; }
  .tema { grid-template-columns: 1fr; }
  .tema.al-reves .pantalla { order: 0; }
  .tema .pantalla { justify-self: start; width: min(100%, 320px); }
  .preguntas { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .texto h2, .tema h2, .preguntas > h2, .resumen h2 { font-size: 36px; }
  .barra { flex-wrap: wrap; }
  .nav a { padding: 6px 9px; }
  .hoja { border-radius: 26px 26px 0 0; }
}
.campo { color: var(--tinta); }
.campo a { color: var(--enlace); }
.fecha.correo { margin-top: 14px; }
.pantalla-fig { margin: 0; }
