/* ============================================================================
   portada.css · La portada de lizarraga.xyz: sobria y clara (no es pixel art: eso es de SK-Arcade). Tipografía Lora
   (libre, OFL: fuentes/OFL.txt), guardada aquí mismo. Claro y oscuro según el sistema.
   ============================================================================ */
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fuentes/lora-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fuentes/lora-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --fondo: #fbfaf7;
  --tarjeta: #ffffff;
  --texto: #1d2433;
  --suave: #6b6a63;
  --tenue: #8a877c;
  --borde: #e2ded2;
  --llave: #b9b4a5;
  --boton: #1d2433;
  --boton-texto: #ffffff;
  --rojo: #e53935;
  --verde: #22a32c;
  --azul: #1e40ff;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #14151a;
    --tarjeta: #1d1f27;
    --texto: #eeece6;
    --suave: #a9a69c;
    --tenue: #8a877c;
    --borde: #2e313c;
    --llave: #4b4e5a;
    --boton: #eeece6;
    --boton-texto: #14151a;
    --rojo: #ff5a52;
    --verde: #3fd14a;
    --azul: #5b7bff;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  color: var(--texto);
  font: 400 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.bloqueado { overflow: hidden; }

.portada { flex: 1; width: min(100% - 32px, 640px); margin: 0 auto; padding: clamp(48px, 12vh, 120px) 0 48px; }

/* ---------- la cuenta (27 oct 2026): arriba a la derecha, discreta; aparece cuando /cuenta/api/yo contesta */
.sesion {
  position: absolute; top: 14px; right: 16px; z-index: 5; display: flex; align-items: center; gap: 4px;
  font-size: 14px; color: var(--suave); animation: aparece .3s ease both;
}
.sesion[hidden], .sesion [hidden] { display: none; }
/* saludo y avatar, UN solo botón (28 oct 2026): el avatar a la derecha del saludo, como en todo el sitio. Sube un poco
   al pasar el cursor (se nota que se toca). Sin sesión («.entrar»), resaltado: «Iniciar sesión» y una silueta */
.cuentaboton {
  display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--borde);
  border-radius: 10px; background: var(--tarjeta); color: var(--suave); text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cuentaboton:hover { transform: translateY(-2px); border-color: var(--suave); box-shadow: 0 4px 10px rgba(0, 0, 0, .12); }
.cuentaboton:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.cuentaboton:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.cuentaboton .saludo { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cuentaboton .saludo b { color: var(--texto); font-weight: 600; }
.cuentaboton .avatar { display: grid; place-items: center; flex: none; width: 31px; height: 31px; border-radius: 6px; overflow: hidden; }
.cuentaboton .avatar img { display: block; width: 100%; height: 100%; }
.cuentaboton .silueta { width: 22px; height: 22px; }
.cuentaboton .avatar [hidden] { display: none; }   /* la imagen o la silueta: solo una */
.cuentaboton.entrar { background: var(--boton); border-color: var(--boton); color: var(--boton-texto); font-weight: 600; }
.cuentaboton.entrar .avatar { background: rgba(127, 127, 127, .22); }
.cuentaboton.entrar:hover { border-color: var(--boton); }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }

/* ---------- el nombre entre llaves */
.marca { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 22px); margin-bottom: clamp(48px, 9vh, 80px); }
.llave {
  font: 400 clamp(96px, 20vw, 150px)/1 "Lora", Georgia, serif;
  color: var(--llave);
  margin-top: -0.12em;   /* la llave se ve centrada con las dos líneas */
  user-select: none;
}
.nombres { text-align: center; min-width: 0; }
.sitio {
  margin: 0;
  font: 500 clamp(40px, 10vw, 68px)/1.05 "Lora", Georgia, serif;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.sitio .x { color: var(--rojo); }
.sitio .y { color: var(--verde); }
.sitio .z { color: var(--azul); }
.autor { margin: 10px 0 0; font: 400 clamp(15px, 3.6vw, 18px)/1.3 "Lora", Georgia, serif; color: var(--suave); }

/* la entrada: las llaves llegan desde el centro y se abren; luego caen las letras y aparece el nombre */
.anima .llave.izq { animation: abreIzq .7s cubic-bezier(.2, .9, .3, 1.15) both; }
.anima .llave.der { animation: abreDer .7s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes abreIzq { from { transform: translateX(var(--hacia, 120px)); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes abreDer { from { transform: translateX(calc(-1 * var(--hacia, 120px))); opacity: 0; } to { transform: none; opacity: 1; } }
.sitio .letra { display: inline-block; }
.anima .sitio .letra { animation: cae .6s cubic-bezier(.25, 1.5, .45, 1) both; }
@keyframes cae { from { transform: translateY(-0.9em); opacity: 0; } to { transform: none; opacity: 1; } }
.anima .autor { animation: sube .6s ease both; animation-delay: 1.15s; }
.anima .seccion { animation: sube .6s ease both; animation-delay: 1.4s; }
@keyframes sube { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- juegos */
.seccion h2 { margin: 0 0 12px; font: 600 12px/1 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--tenue); }
.juego {
  display: flex; align-items: center; gap: 16px;
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: 16px 18px;
}
.miniatura { flex: none; width: 72px; height: 72px; border-radius: 10px; background: #141625; display: grid; place-items: center; }
.pato { width: 64px; height: 64px; image-rendering: pixelated; background-repeat: no-repeat; }
.miniatura.icono { background: none; }
.miniatura.icono img { display: block; width: 72px; height: 72px; }
.seccion + .seccion { margin-top: 28px; }
.datos { flex: 1; min-width: 0; }
.datos h3 { margin: 0; font: 600 19px/1.2 "Lora", Georgia, serif; }
.datos p { margin: 4px 0 0; font-size: 14px; color: var(--suave); }
.jugar {
  flex: none; text-decoration: none; border-radius: 8px; padding: 11px 22px;
  background: var(--boton); color: var(--boton-texto); font: 600 15px/1 system-ui, sans-serif;
  transition: transform .12s ease, opacity .12s ease;
}
.jugar:hover { opacity: .88; }
.jugar:active { transform: scale(.97); }
.jugar:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; }

.pie { text-align: center; font-size: 13px; color: var(--tenue); padding: 24px 16px 28px; }
/* los avisos legales (1 nov 2026; viven en /cuenta): en el mismo gris del pie, sin llamar la atención */
.pie a { color: inherit; text-underline-offset: 2px; }
.pie a:hover { color: var(--texto); }
.pie .legales { white-space: nowrap; }

/* ---------- abrir SK-Arcade: una cortina oscura sube y el juego aparece aquí mismo */
.cortina { position: fixed; inset: 0; z-index: 30; background: #141625; transform: translateY(100%); pointer-events: none; }
.cortina.sube { transition: transform .45s cubic-bezier(.7, 0, .3, 1); transform: none; }
.cortina.baja { transition: transform .4s cubic-bezier(.7, 0, .3, 1); transform: translateY(-100%); }
#juego { position: fixed; inset: 0; z-index: 20; width: 100%; height: 100%; border: 0; background: #141625; }

/* ---------- el café (21 oct 2026): abajo a la derecha, como en el mapa de SK-Arcade; taza de líneas en el color del
   texto y el vapor en el rojo, verde y azul de «xyz». Debajo del juego cuando está abierto (z-index 20) */
.cafe {
  position: fixed; right: 16px; bottom: 16px; z-index: 10; width: 56px; height: 56px; display: grid; place-items: center;
  padding: 0; border: 1px solid var(--borde); border-radius: 8px; background: var(--tarjeta); color: var(--texto); cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08); transition: transform .12s ease;
}
.cafe:hover { transform: translateY(-2px); }
.cafe:active { transform: scale(.96); }
.cafe:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; }
.cafe svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.cafe .vapor { animation: vapor 2.4s ease-in-out infinite; }
.cafe .v1 { stroke: var(--rojo); }
.cafe .v2 { stroke: var(--verde); animation-delay: -.8s; }   /* después de .vapor: si no, su animation borra el retraso */
.cafe .v3 { stroke: var(--azul); animation-delay: -1.6s; }
@keyframes vapor {
  0% { transform: translateY(2px); opacity: .15; }
  40% { opacity: 1; }
  100% { transform: translateY(-3px); opacity: .15; }
}
.ventana {
  width: min(100% - 32px, 380px); padding: 24px 22px 22px; border: 1px solid var(--borde); border-radius: 14px;
  background: var(--tarjeta); color: var(--texto); box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.ventana::backdrop { background: rgba(10, 12, 18, .45); }
.ventana h2 { margin: 0 0 10px; font: 600 21px/1.2 "Lora", Georgia, serif; }
.ventana p { margin: 0 0 10px; font-size: 15px; color: var(--suave); }
.ventana .jugar { display: block; margin-top: 16px; text-align: center; }
.ventana .pronto { margin: 16px 0 0; font-size: 14px; color: var(--tenue); }
.ventana [hidden] { display: none; }   /* sin enlace, el botón se va (.jugar le ganaba a hidden) */
.ventana .cerrar {
  position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none;
  color: var(--tenue); font: 400 24px/1 system-ui, sans-serif; cursor: pointer;
}
.ventana .cerrar:hover { color: var(--texto); }

@media (max-width: 600px) {
  .pie { padding-bottom: 88px; }   /* el café no tapa el pie */
}
@media (max-width: 480px) {
  .juego { flex-wrap: wrap; }
  .jugar { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .anima .llave, .anima .sitio .letra, .anima .autor, .anima .seccion { animation: none; }
  .cortina.sube, .cortina.baja { transition: none; }
  .cafe .vapor { animation: none; }
  .cafe { transition: none; }
  .sesion { animation: none; }
  .cuentaboton { transition: none; }
  .cuentaboton:hover, .cuentaboton:active { transform: none; }
}

/* nada de la interfaz se marca como texto ni muestra el cursor de texto (28 oct 2026; la regla de todo el sitio, como en
   SK-Arcade): al hacer clic, doble clic o tocar en el celular no se subraya ni se resalta nada. Solo los campos de texto */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; caret-color: transparent; }
input, textarea, select, [contenteditable] { -webkit-user-select: text; user-select: text; caret-color: auto; }
img, svg { -webkit-user-drag: none; }
