/**
 * styles.css
 * Identidad de Mateguarida: misma familia visual que Lectoguarida (contorno
 * grueso en tinta, sombra dura sin blur, radio 20px, fondo papel con
 * topitos), con un acento propio para Matemática: el turquesa.
 *
 * Paleta compartida con Lectoguarida (../lectoguarida/outputs/Lectoguarida-Windows/public/styles.css):
 *   naranja, rosado, azul, verde, amarillo, morado, tinta, papel y los tintes.
 * Esos colores son los del gato (Guarida) y los de apoyo; no son el acento
 * de Mateguarida. El turquesa es nuevo, no existe en Lectoguarida, y es lo
 * que distingue esta plataforma a simple vista.
 *
 * Tipografias: Baloo 2 (titulos) y Nunito Sans (interfaz), igual que
 * Lectoguarida. Se agrega Andika (que Lectoguarida usa para lectura
 * inicial) para los NUMEROS GRANDES de los juegos: es la unica de las tres
 * diseñada para que un niño distinga formas parecidas (6/9, por ejemplo),
 * y ya se carga en el proyecto hermano, asi que no suma peso nuevo al
 * ecosistema.
 */

:root {
  --naranja: #F0591B;
  --rosado: #F03264;
  --azul: #3D83BC;
  --verde: #0FA36D;
  --amarillo: #FFB302;
  --morado: #7B3FE4;
  --tinta: #2B1633;

  --turquesa: #0E7C7C;
  --tinte-turquesa: #D9F0EE;

  --papel: #FFF6EA;
  --blanco: #FFFFFF;
  --gris: #EDE4D8;
  --gris-texto: #6A5A73;
  --tinte-verde: #DDF5EA;
  --tinte-rosado: #FFE1E9;
  --tinte-azul: #DCEBF7;

  --borde: 3px solid var(--tinta);
  --sombra: 0 5px 0 var(--tinta);
  --sombra-chica: 0 3px 0 var(--tinta);
  --radio: 20px;

  --f-titulo: "Baloo 2", "Nunito Sans", ui-rounded, system-ui, sans-serif;
  --f-numeros: "Andika", "Nunito Sans", system-ui, sans-serif;
  --f-ui: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--papel);
  background-image: radial-gradient(var(--gris) 2px, transparent 2px);
  background-size: 30px 30px;
  color: var(--tinta);
  font-family: var(--f-ui);
  font-size: 1rem;
  line-height: 1.45;
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 4px solid var(--morado); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.salto {
  position: absolute;
  left: -9999px;
}
.salto:focus {
  left: 1rem;
  top: 1rem;
  background: var(--blanco);
  border: var(--borde);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 800;
  color: var(--tinta);
  z-index: 20;
}

/* ------------------------------------------------------------------ */
/* Barra de marca                                                      */
/* ------------------------------------------------------------------ */

.barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--turquesa);
  border-bottom: var(--borde);
  box-shadow: var(--sombra);
}

.marca {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--blanco);
}
.marca-gato svg {
  display: block;
  width: 48px;
  height: auto;
  filter: drop-shadow(0 3px 0 var(--tinta));
}
.marca-texto {
  font-family: var(--f-titulo);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--blanco);
  text-shadow: 0 3px 0 var(--tinta);
}
/* Compatibilidad: si alguna pantalla todavia usa el icono viejo (emoji). */
.marca-icono { font-size: 1.5rem; }

/* ------------------------------------------------------------------ */
/* Estructura                                                          */
/* ------------------------------------------------------------------ */

.contenido {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pantalla {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}
.pantalla--angosta { max-width: 420px; }

.saludo { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.saludo-gato svg { display: block; width: clamp(80px, 20vw, 130px); height: auto; filter: drop-shadow(0 5px 0 var(--tinta)); }

.titulo {
  font-family: var(--f-titulo);
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  line-height: 1.05;
  margin: 0;
}

.texto { font-size: 1.1rem; line-height: 1.5; margin: 0; }
.texto.vacio { color: var(--gris-texto); }
.texto--grande { font-size: 1.5rem; font-weight: 800; }

.etiqueta-curso {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 16px;
  background: var(--amarillo);
  border: var(--borde);
  border-radius: 999px;
  box-shadow: var(--sombra-chica);
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 1.05rem;
}

.formulario {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}
.etiqueta { font-weight: 700; font-family: var(--f-titulo); }

input, select, textarea {
  font-size: 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: var(--borde);
  background: var(--blanco);
  color: var(--tinta);
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--f-titulo);
  font-size: 1.15rem;
  font-weight: 700;
  min-height: 56px;
  padding: 12px 26px;
  border: var(--borde);
  border-radius: 999px;
  background: var(--turquesa);
  color: var(--blanco);
  box-shadow: var(--sombra);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .08s ease, box-shadow .08s ease;
}
.boton:hover { transform: translateY(-1px); }
.boton:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--tinta); }
.boton--claro { background: var(--blanco); color: var(--tinta); }
.boton--verde { background: var(--verde); color: var(--blanco); }
.boton--amarillo { background: var(--amarillo); color: var(--tinta); }
.boton--rosado { background: var(--rosado); color: var(--blanco); }
.boton--morado { background: var(--morado); color: var(--blanco); }
.boton--peligro { background: var(--rosado); color: var(--blanco); }
.boton:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.error { margin: 0; min-height: 1.4em; font-weight: 800; color: var(--tinta); font-size: 0.95rem; }
.error:not(:empty) {
  padding: 8px 14px;
  background: var(--tinte-rosado);
  border: var(--borde);
  border-radius: 14px;
}

.nombres {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.nombre {
  width: 100%;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: var(--borde);
  border-radius: var(--radio);
  background: var(--turquesa);
  color: var(--blanco);
  font-family: var(--f-titulo);
  font-weight: 700;
  cursor: pointer;
  padding: 0.75rem;
  box-shadow: var(--sombra);
  touch-action: manipulation;
  transition: transform .08s ease, box-shadow .08s ease;
  text-decoration: none;
}
.nombre:hover { transform: translateY(-1px); }
.nombre:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--tinta); }
.nombre:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.nombre-inicial {
  font-size: 1.75rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
.nombre-texto { font-size: 1rem; word-break: break-word; }

.nombre[data-color="1"] { background: var(--verde); }
.nombre[data-color="2"] { background: var(--morado); }
.nombre[data-color="3"] { background: var(--rosado); }
.nombre[data-color="4"] { background: var(--azul); }
.nombre[data-color="5"] { background: var(--amarillo); color: var(--tinta); }

.acciones { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

.aviso-noscript { margin: 24px 16px; font-size: 1.2rem; text-align: center; }

/* Numeros grandes que el niño tiene que leer e identificar: Andika. */
.numero-grande { font-family: var(--f-numeros); font-variant-numeric: tabular-nums; }
