/* ACADEMIA PITAGÓRICA · PROPUESTA DE DISEÑO (versión de demostración, fase 2)
   Proyecto independiente: no comparte archivos ni estilos con otros sitios.

   Idea: un cuaderno de geometría vivo, con la sobriedad de una institución.
   Paleta institucional (todas las variables aquí arriba):
   - azul marino: titulares, botones principales, la pizarra de la portada y el cierre;
   - blanco y marfil: fondos;
   - beige y dorado suave: bordes, detalles y acentos.
   Los colores de UCR, UNA y TEC aparecen solo en sus propias tarjetas. */

@font-face { font-family: "Lexend"; font-style: normal; font-weight: 400; font-display: swap; src: url("fuentes/lexend-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 500; font-display: swap; src: url("fuentes/lexend-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 700; font-display: swap; src: url("fuentes/lexend-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 800; font-display: swap; src: url("fuentes/lexend-latin-800-normal.woff2") format("woff2"); }
/* STIX Two: la letra de la notación matemática */
@font-face { font-family: "STIX Two Text"; font-style: italic; font-weight: 500; font-display: swap; src: url("fuentes/stix-two-text-latin-500-italic.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+2212, U+2215; }

:root {
  /* azul marino */
  --marino: #16264c;
  --marino-2: #233a6e;
  --marino-3: #0d1834;
  --pizarra: #172a55;
  /* texto */
  --tinta: #14203e;
  --texto: #3b4459;
  --texto-suave: #5b6376;
  /* blanco, marfil y beige */
  --blanco: #ffffff;
  --marfil: #fbf8f1;
  --marfil-2: #f5efe2;
  --beige: #ebe1cd;
  --beige-2: #d6c7a9;
  --linea: #e8e0cf;
  /* dorado suave */
  --dorado: #c4a157;
  --dorado-2: #dcc185;
  --dorado-claro: #f6eed9;
  --dorado-texto: #83601c;

  --radio-l: 22px;
  --radio-m: 16px;
  --radio-s: 12px;
  --margen: clamp(16px, 4vw, 40px);
  --ancho: 1200px;
  --cabecera: 76px;
  --suave: cubic-bezier(.22, .7, .2, 1);
  --sombra: 0 1px 2px rgb(20 32 62 / .04), 0 14px 34px -26px rgb(20 32 62 / .32);
  --sombra-alta: 0 1px 2px rgb(20 32 62 / .05), 0 24px 48px -30px rgb(20 32 62 / .42);

  --f-texto: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mate: "STIX Two Text", "Cambria Math", "Times New Roman", serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--cabecera) + 16px); }
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--texto);
  background: var(--marfil);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
/* en celulares con barra de estado superpuesta: franja del color de la cabecera encima de ella */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--marfil); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--tinta); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
i { font-family: var(--f-mate); font-style: italic; font-weight: 500; }
.nowrap { white-space: nowrap; }
.iconos { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico, .tarjeta-ico svg, .compromiso-ico svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--dorado); outline-offset: 3px; border-radius: 6px; }

.contenedor { width: min(var(--ancho), 100% - 2 * var(--margen)); margin-inline: auto; }

.saltar {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radio-s);
  background: var(--marino); color: #fff; font-weight: 500; text-decoration: none;
}
.saltar:focus { top: 12px; }

.demo-aviso {
  padding: 8px var(--margen);
  background: var(--marino-3);
  color: rgb(251 248 241 / .86);
  font-size: .82rem; line-height: 1.4; text-align: center;
}

/* ---------- botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 44px; padding: .65rem 1.15rem;
  border: 1px solid transparent; border-radius: var(--radio-s);
  font: 500 .95rem/1.2 var(--f-texto); letter-spacing: -.005em;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: transform .25s var(--suave), box-shadow .25s var(--suave), background-color .25s, border-color .25s, color .25s;
}
.boton .ico { width: 1.25em; height: 1.25em; flex: none; }
.boton--grande { min-height: 54px; padding: .9rem 1.4rem; border-radius: 14px; font-size: 1rem; }
.boton:active { transform: scale(.98); }

.boton--primario { color: #fff; background: var(--marino); box-shadow: 0 10px 22px -14px rgb(13 24 52 / .9); }
.boton--primario .ico { color: var(--dorado-2); }
.boton--primario:hover { background: var(--marino-2); transform: translateY(-1px); box-shadow: 0 14px 26px -14px rgb(13 24 52 / .9); }

.boton--claro { color: var(--tinta); background: var(--blanco); border-color: var(--beige-2); }
.boton--claro .ico { color: var(--dorado-texto); }
.boton--claro:hover { border-color: var(--marino); transform: translateY(-1px); }

.boton--linea { color: var(--tinta); border-color: var(--beige-2); background: transparent; }
.boton--linea:hover { border-color: var(--marino); background: var(--blanco); }

.boton--dorado { color: var(--marino-3); background: linear-gradient(135deg, var(--dorado-2), var(--dorado)); font-weight: 700; box-shadow: 0 14px 30px -16px rgb(196 161 87 / .9); }
.boton--dorado .ico { color: var(--marino); }
.boton--dorado:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -16px rgb(196 161 87 / .95); }

.boton--transparente { color: var(--marfil); border-color: rgb(251 248 241 / .35); background: transparent; }
.boton--transparente:hover { border-color: var(--marfil); background: rgb(251 248 241 / .08); }

/* ---------- cabecera ---------- */
.cabecera {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgb(251 248 241 / .9);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.cabecera.con-sombra { border-bottom-color: var(--linea); box-shadow: 0 10px 28px -24px rgb(20 32 62 / .45); }
.cabecera-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--cabecera); }

.marca { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: var(--tinta); }
.marca-texto { display: flex; flex-direction: column; min-width: 0; }
.marca-nombre { font-weight: 800; font-size: 1.1rem; line-height: 1.15; letter-spacing: -.025em; white-space: nowrap; }
.marca-lema { font-size: .78rem; line-height: 1.35; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- la medalla del logo ---
   La imagen ya viene cuadrada y con el busto centrado (herramientas/logo/medalla.py), así que aquí solo se
   muestra completa: sin desplazamientos, sin alturas en porcentaje. Queda centrada en cualquier tamaño. */
.medalla {
  position: relative; flex: none; display: block;
  width: 52px; aspect-ratio: 1 / 1;
  overflow: hidden; border-radius: 50%;
  background: var(--blanco);
  box-shadow: 0 6px 14px -8px rgb(20 32 62 / .45);
}
.medalla img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.medalla::after {
  /* el aro va encima de la imagen, sin tocar el dibujo */
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 0 0 1.75px var(--marino);
}

.menu { display: flex; align-items: center; gap: 2px; }
.menu-enlace {
  padding: 10px 12px; border-radius: 10px;
  font-size: .93rem; font-weight: 500; color: var(--texto); text-decoration: none;
  transition: background-color .2s, color .2s;
}
.menu-enlace:hover { background: var(--marfil-2); color: var(--tinta); }
.menu-acciones { display: flex; gap: 8px; margin-left: 12px; }

.menu-boton {
  display: none; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px 0 14px;
  border: 1px solid var(--beige-2); border-radius: 999px;
  background: var(--blanco); color: var(--tinta);
  font: 500 .92rem/1 var(--f-texto); cursor: pointer;
}
.menu-boton-lineas { display: grid; gap: 5px; width: 18px; }
.menu-boton-lineas span { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--suave); }
.cabecera.menu-abierto .menu-boton-lineas span:first-child { transform: translateY(3.5px) rotate(45deg); }
.cabecera.menu-abierto .menu-boton-lineas span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- portada ---------- */
.portada {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(28px, 4.5vw, 64px) 0 clamp(56px, 7vw, 96px);
  background:
    radial-gradient(50% 60% at 0% 0%, rgb(220 193 133 / .22), transparent 70%),
    linear-gradient(180deg, var(--marfil) 0%, var(--marfil) 100%);
}
.portada::before {
  /* papel cuadriculado muy tenue detrás del texto */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgb(22 38 76 / .05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(22 38 76 / .05) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 20% 40%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 20% 40%, #000 10%, transparent 75%);
}
.portada-in {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(28px, 4.5vw, 64px);
}
.portada-texto { min-width: 0; container-type: inline-size; }
.portada-previo {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  background: var(--blanco); border: 1px solid var(--linea);
  font-size: .86rem; font-weight: 500; color: var(--texto);
}
.portada-previo svg { width: 14px; height: 14px; fill: var(--dorado); }
.portada-titulo {
  margin-top: 22px;
  font-size: clamp(2.3rem, 1.2rem + 4vw, 4.3rem);
  /* el ancho de la columna manda: «Preparate para la» siempre cabe en una línea */
  font-size: min(4.35rem, 11.3cqi);
  font-weight: 800; line-height: 1; letter-spacing: -.045em;
}
.portada-titulo .linea { display: block; }
.portada-bajada {
  margin-top: 22px; max-width: 36ch;
  font-size: clamp(1.1rem, 1rem + .45vw, 1.28rem); font-weight: 500; line-height: 1.5;
  color: var(--marino);
}
.portada-detalle { margin-top: 14px; max-width: 56ch; font-size: .98rem; color: var(--texto-suave); }
.portada-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.portada-juego {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 16px; padding: 9px 14px;
  border-radius: 12px;
  color: var(--texto); text-decoration: none;
  transition: background-color .25s;
}
.portada-juego > .ico { width: 24px; height: 24px; flex: none; color: var(--marino); }
.portada-juego:hover { background: var(--marfil-2); }
.juego-texto { font-size: .9rem; line-height: 1.35; }
.juego-texto strong { font-weight: 700; color: var(--tinta); }
.juego-texto span { color: var(--texto-suave); }
.juego-bajar { width: 18px; height: 18px; flex: none; color: var(--dorado-texto); transition: transform .3s var(--suave); }
.portada-juego:hover .juego-bajar { transform: translateY(2px); }

/* --- la pizarra con el teorema --- */
.pizarra {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0; min-width: 0;
  padding: clamp(18px, 2.4vw, 30px) clamp(18px, 2.4vw, 30px) clamp(20px, 2.4vw, 28px);
  border-radius: 28px;
  color: var(--marfil);
  background:
    radial-gradient(90% 70% at 85% 0%, rgb(255 255 255 / .07), transparent 60%),
    linear-gradient(160deg, #1c3062 0%, var(--pizarra) 45%, #102043 100%);
  box-shadow: 0 40px 70px -40px rgb(13 24 52 / .75);
}
.pizarra::before {
  /* cuadrícula de tiza */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgb(251 248 241 / .05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(251 248 241 / .05) 1px, transparent 1px);
  background-size: 28px 28px; background-position: center;
}
.pizarra::after {
  /* filete dorado interior, como un marco */
  content: ""; position: absolute; inset: 10px; z-index: -1; border-radius: 20px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgb(220 193 133 / .3);
}
.pizarra-titulo {
  display: flex; align-items: center; gap: 10px;
  padding-left: 6px;
  font-size: .85rem; font-weight: 500; letter-spacing: .01em; color: var(--dorado-2);
}
.pizarra-titulo::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.teorema-svg { width: 100%; height: auto; max-width: 430px; margin: 4px auto 0; overflow: visible; }
.arco { fill: none; stroke: rgb(251 248 241 / .42); stroke-width: 1.6; stroke-dasharray: 3 7; stroke-linecap: round; }
.parte-a { fill: var(--dorado-2); fill-opacity: .16; }
.parte-b { fill: var(--marfil); fill-opacity: .07; }
.cuadro { stroke-width: 2.4; stroke-linejoin: round; }
.cuadro-a { fill: var(--dorado-2); fill-opacity: .2; stroke: var(--dorado-2); }
.cuadro-b { fill: var(--marfil); fill-opacity: .08; stroke: rgb(251 248 241 / .9); }
.cuadro-c { fill: none; stroke: var(--marfil); }
.altura { fill: none; stroke: rgb(251 248 241 / .45); stroke-width: 1.4; stroke-dasharray: 2 6; stroke-linecap: round; }
.triangulo { fill: #1a2e5c; stroke: var(--marfil); stroke-width: 3; stroke-linejoin: round; }
.recto { fill: none; stroke: var(--marfil); stroke-width: 1.8; stroke-linejoin: round; }
.centro { fill: rgb(251 248 241 / .6); }
.et {
  font-family: var(--f-mate); font-style: italic; font-weight: 500;
  font-size: 34px; text-anchor: middle; dominant-baseline: central;
  fill: var(--marfil); pointer-events: none; user-select: none;
  transform-box: fill-box; transform-origin: center;
}
.et-a { fill: var(--dorado-2); }
.asa { cursor: grab; touch-action: none; outline: none; }
.asa-zona { fill: transparent; }
.asa-punto { fill: var(--dorado-2); stroke: #102043; stroke-width: 3; transition: r .2s; }
.asa-halo { fill: var(--dorado-2); fill-opacity: .25; transform-box: fill-box; transform-origin: center; opacity: 0; }
.asa:hover .asa-punto, .asa:focus-visible .asa-punto { r: 9; }
.asa:focus-visible .asa-halo { opacity: 1; fill-opacity: .3; stroke: var(--dorado-2); stroke-width: 2; animation: none; }
.teorema-svg.arrastrando .asa { cursor: grabbing; }
@keyframes halo { 0% { transform: scale(.7); opacity: 1; } 75%, 100% { transform: scale(2.1); opacity: 0; } }

.teorema-pie { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 4px; text-align: center; }
.teorema-ecuacion { font-family: var(--f-mate); font-style: italic; font-weight: 500; font-size: clamp(1.7rem, 1.2rem + 1.3vw, 2.25rem); line-height: 1.1; color: var(--marfil); }
.teorema-ecuacion i { font-size: 1em; }
.teorema-valores { font-size: .98rem; font-weight: 500; color: rgb(251 248 241 / .72); font-variant-numeric: tabular-nums; }
.teorema-valores [data-valor] { display: inline-block; min-width: 2.4ch; }
.pizarra .va { color: var(--dorado-2); }
.pizarra .vb, .pizarra .vc { color: var(--marfil); }
.teorema-ayuda { margin-top: 6px; max-width: 40ch; font-size: .82rem; color: rgb(251 248 241 / .62); text-wrap: balance; }

/* dibujo de entrada (una sola vez; solo con JavaScript y sin «reducir movimiento») */
html.js .pizarra .triangulo, html.js .pizarra .cuadro { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; }
html.js .pizarra .arco, html.js .pizarra .parte, html.js .pizarra .altura, html.js .pizarra .recto,
html.js .pizarra .centro, html.js .pizarra .et, html.js .pizarra .asa, html.js .teorema-pie { opacity: 0; }
html.js .pizarra.visible .triangulo { animation: trazo .9s .25s var(--suave) forwards, relleno-uno .5s .9s forwards; }
html.js .pizarra.visible .recto, html.js .pizarra.visible .centro { animation: aparecer .4s 1s forwards; }
html.js .pizarra.visible .arco { animation: aparecer .8s .8s forwards; }
html.js .pizarra.visible .cuadro-a { animation: trazo .8s 1.05s var(--suave) forwards, relleno-a .5s 1.6s forwards; }
html.js .pizarra.visible .cuadro-b { animation: trazo .8s 1.35s var(--suave) forwards, relleno-b .5s 1.9s forwards; }
html.js .pizarra.visible .cuadro-c { animation: trazo .9s 1.65s var(--suave) forwards; }
html.js .pizarra.visible .altura { animation: aparecer .6s 2.2s forwards; }
html.js .pizarra.visible .parte-a { animation: aparecer .6s 2.35s forwards; }
html.js .pizarra.visible .parte-b { animation: aparecer .6s 2.5s forwards; }
html.js .pizarra.visible .et-a { animation: etiqueta .5s 2s var(--suave) forwards; }
html.js .pizarra.visible .et-b { animation: etiqueta .5s 2.2s var(--suave) forwards; }
html.js .pizarra.visible .et-c { animation: etiqueta .5s 2.6s var(--suave) forwards; }
html.js .pizarra.visible .asa { animation: aparecer .5s 2.9s forwards; }
html.js .pizarra.visible .asa-halo { animation: halo 2.2s 3.1s ease-out 3; }
html.js .pizarra.visible .teorema-pie { animation: aparecer .6s 2.7s forwards; }
@keyframes trazo { to { stroke-dashoffset: 0; } }
@keyframes relleno-uno { to { fill-opacity: 1; } }
@keyframes relleno-a { to { fill-opacity: .2; } }
@keyframes relleno-b { to { fill-opacity: .08; } }
@keyframes aparecer { to { opacity: 1; } }
@keyframes etiqueta { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- secciones ---------- */
.seccion { position: relative; padding: clamp(72px, 9vw, 120px) 0; }
.seccion-cabeza { max-width: 720px; margin-bottom: clamp(32px, 4.5vw, 52px); }
.seccion-cabeza--centro { margin-inline: auto; text-align: center; }
.seccion-cabeza--centro p { margin-inline: auto; }
.seccion-cabeza h2, .academia-marca h2 { font-size: clamp(1.95rem, 1.3rem + 2vw, 2.9rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.seccion-cabeza p { margin-top: 16px; max-width: 60ch; font-size: 1.06rem; color: var(--texto-suave); }

/* aparición al desplazarse: corta y suave */
html.js .aparece { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .7s var(--suave); transition-delay: var(--retraso, 0s); }
html.js .aparece.visible { opacity: 1; transform: none; }

/* ---------- accesos: tarjetas uniformes ---------- */
.accesos { padding-top: clamp(24px, 4vw, 48px); }
.tarjetas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "mat ent pra" "aco rec rec";
  gap: 20px;
}
.tarjeta--matricula { grid-area: mat; }
.tarjeta--entorno { grid-area: ent; }
.tarjeta--recursos { grid-area: rec; }
.tarjeta--recursos .lista-check { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.tarjeta--practicas { grid-area: pra; }
.tarjeta--acompanamiento { grid-area: aco; }

.tarjeta {
  display: flex; flex-direction: column; align-items: flex-start;
  min-width: 0;
  padding: 28px;
  border-radius: var(--radio-l);
  background: var(--blanco);
  border: 1px solid var(--linea);
  box-shadow: var(--sombra);
  transition: transform .35s var(--suave), box-shadow .35s var(--suave), border-color .35s;
}
.tarjeta:hover { transform: translateY(-3px); border-color: var(--beige-2); box-shadow: var(--sombra-alta); }
.tarjeta-ico {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: 20px;
  border-radius: 14px;
  background: var(--marfil-2); border: 1px solid var(--beige);
  color: var(--marino);
  transition: background-color .35s, color .35s, border-color .35s;
}
.tarjeta-ico svg { width: 26px; height: 26px; }
.tarjeta:hover .tarjeta-ico { background: var(--marino); border-color: var(--marino); color: var(--dorado-2); }
.tarjeta h3 { font-size: 1.24rem; font-weight: 700; letter-spacing: -.02em; }
.tarjeta-sub { margin-top: 4px; font-size: .9rem; font-weight: 500; color: var(--dorado-texto); }
.tarjeta > p:not(.tarjeta-sub) { margin-top: 12px; font-size: .97rem; color: var(--texto); }
.tarjeta > :nth-last-child(2) { margin-bottom: auto; }
.tarjeta-enlace {
  display: inline-flex; align-items: center; min-height: 44px;
  margin-top: 22px; padding: .55rem 1.05rem;
  border-radius: 999px; border: 1px solid var(--beige-2);
  color: var(--marino); background: var(--blanco);
  font-size: .92rem; font-weight: 500; text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s;
}
.tarjeta-enlace:hover { background: var(--marino); border-color: var(--marino); color: #fff; }

.lista-check { list-style: none; display: grid; gap: 10px; margin-top: 18px; }
.lista-check li { position: relative; padding-left: 30px; font-size: .97rem; color: var(--texto); line-height: 1.45; }
.lista-check li::before {
  content: ""; position: absolute; left: 0; top: .1em;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--dorado-claro); border: 1px solid var(--beige);
}
.lista-check li::after {
  content: ""; position: absolute; left: 7px; top: calc(.1em + 4px);
  width: 5px; height: 9px;
  border: solid var(--dorado-texto); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- universidades ---------- */
.universidades { background: linear-gradient(180deg, var(--marfil) 0%, var(--marfil-2) 22%, var(--beige) 70%, var(--marfil-2) 100%); }
.unis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.uni--ucr { --u: #0873b0; }
.uni--una { --u: #b8213a; }
.uni--tec { --u: #1d4b9a; }
.uni {
  position: relative;
  display: flex; flex-direction: column; min-width: 0;
  overflow: hidden;
  border-radius: var(--radio-l);
  background: var(--blanco);
  border: 1px solid var(--linea);
  box-shadow: var(--sombra-alta);
  transition: transform .4s var(--suave), box-shadow .4s var(--suave);
}
.uni::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; z-index: 2; background: var(--u); }
.uni:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgb(20 32 62 / .05), 0 32px 56px -30px rgb(20 32 62 / .5); }
.uni-foto {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(color-mix(in srgb, var(--u) 7%, transparent) 1px, transparent 1px) -1px -1px / 26px 26px,
    linear-gradient(90deg, color-mix(in srgb, var(--u) 7%, transparent) 1px, transparent 1px) -1px -1px / 26px 26px,
    var(--marfil);
}
.uni-foto img {
  /* la imagen oficial se muestra completa: sin recortar ni deformar */
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: clamp(24px, 3vw, 36px) clamp(32px, 4vw, 52px) clamp(36px, 4vw, 48px);
  object-fit: contain;
  transition: transform .8s var(--suave);
}
.uni:hover .uni-foto img { transform: scale(1.04); }
.uni-sigla { display: none; }
.uni.sin-foto .uni-foto img { display: none; }
.uni.sin-foto .uni-sigla {
  position: absolute; inset: 0; padding-bottom: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
}
.uni-sigla b { font-size: clamp(2.6rem, 2rem + 2vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--u); }

.uni-cuerpo { position: relative; display: flex; flex-direction: column; flex: 1; padding: 0 24px 24px; }
.uni-insignia {
  display: grid; place-items: center; flex: none;
  width: 58px; height: 58px; margin: -29px 0 14px;
  border-radius: 50%; border: 4px solid var(--blanco);
  background: var(--u); color: #fff;
  font-size: .9rem; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 8px 18px -10px rgb(20 32 62 / .6);
}
.uni-cuerpo h3 { font-size: 1.22rem; font-weight: 800; letter-spacing: -.025em; }
.uni-cuerpo h3 small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.uni-cuerpo > p { margin: 10px 0 22px; font-size: .96rem; color: var(--texto-suave); }
.uni-enlaces { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
.uni-enlaces a {
  display: flex; align-items: center; justify-content: center; min-height: 44px;
  padding: .4rem .5rem; border-radius: 12px;
  border: 1px solid var(--linea); background: var(--marfil);
  font-size: .9rem; font-weight: 500; color: var(--tinta); text-decoration: none;
  transition: border-color .2s, color .2s, background-color .2s;
}
.uni-enlaces a:hover { border-color: var(--u); color: var(--u); background: var(--blanco); }
.uni-oficial {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; margin-top: 10px; padding: .7rem 1.05rem;
  border-radius: 12px;
  background: var(--marino); color: #fff;
  font-size: .94rem; font-weight: 500; text-decoration: none;
  transition: background-color .25s;
}
.uni-oficial .ico { width: 18px; height: 18px; color: var(--dorado-2); }
.uni-oficial:hover { background: var(--u); }
.uni-oficial:hover .ico { color: #fff; }

/* ---------- metodología ---------- */
.metodologia { background: linear-gradient(180deg, var(--marfil-2) 0, var(--blanco) 200px); }
.pasos { position: relative; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.pasos::before, .pasos::after {
  content: ""; position: absolute; top: 51px; left: 52px; right: calc(25% - 52px - 21px);
  height: 2px; border-radius: 2px;
}
.pasos::before { background: repeating-linear-gradient(90deg, var(--beige-2) 0 6px, transparent 6px 12px); }
.pasos::after { background: linear-gradient(90deg, var(--dorado-2), var(--dorado)); transform: scaleX(0); transform-origin: left center; transition: transform 1.6s var(--suave) .35s; }
.pasos.visible::after, html:not(.js) .pasos::after { transform: scaleX(1); }
.paso { position: relative; min-width: 0; }
.paso-figura { position: relative; z-index: 1; width: 104px; height: 104px; margin-bottom: 22px; }
.paso-figura svg { width: 100%; height: 100%; overflow: visible; }
.paso-figura path { fill: var(--dorado-claro); stroke: var(--marino); stroke-width: 2.6; stroke-linejoin: round; }
.paso-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1;
  color: var(--marino);
}
.paso:nth-child(1) .paso-num { padding-top: 22px; }
.paso:nth-child(3) .paso-num { padding-top: 6px; }
html.js .paso-figura path { stroke-dasharray: 1; stroke-dashoffset: 1; fill: var(--blanco); transition: stroke-dashoffset 1s var(--suave), fill .6s ease; transition-delay: calc(var(--retraso, 0s) + .2s), calc(var(--retraso, 0s) + .8s); }
html.js .paso-num { opacity: 0; transition: opacity .5s; transition-delay: calc(var(--retraso, 0s) + .7s); }
html.js .paso.visible .paso-figura path { stroke-dashoffset: 0; fill: var(--dorado-claro); }
html.js .paso.visible .paso-num { opacity: 1; }
.paso h3 { display: flex; align-items: center; gap: 10px; font-size: 1.16rem; font-weight: 700; letter-spacing: -.02em; }
.paso h3 .ico { width: 22px; height: 22px; flex: none; color: var(--dorado-texto); }
.paso p { margin-top: 10px; font-size: .97rem; color: var(--texto); }

/* ---------- la academia ---------- */
.academia { overflow: hidden; background: var(--marfil); }
.academia-espiral { position: absolute; z-index: 0; right: -14%; bottom: -22%; width: min(820px, 70%); height: auto; fill: none; pointer-events: none; }
.espiral-cuadros { stroke: rgb(22 38 76 / .05); stroke-width: 1.5; }
.espiral-curva { stroke: rgb(196 161 87 / .5); stroke-width: 2.2; stroke-linecap: round; }
html.js .espiral-curva { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 3.5s cubic-bezier(.4, 0, .2, 1) .3s; }
html.js .academia.visible .espiral-curva { stroke-dashoffset: 0; }
.academia-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.medalla--grande { width: 132px; margin-bottom: 28px; box-shadow: 0 0 0 5px var(--marfil), 0 0 0 6px var(--dorado), 0 22px 40px -22px rgb(20 32 62 / .6); }
.medalla--grande::after { box-shadow: inset 0 0 0 2.5px var(--marino); }
.academia-lead { margin-top: 20px; max-width: 46ch; font-size: 1.16rem; line-height: 1.6; color: var(--tinta); }
.academia-objetivo { margin-top: 14px; max-width: 52ch; font-size: 1rem; color: var(--texto-suave); }
.compromisos {
  list-style: none;
  padding: 6px clamp(20px, 3vw, 32px);
  border-radius: var(--radio-l);
  background: var(--blanco); border: 1px solid var(--linea);
  box-shadow: var(--sombra-alta);
}
.compromiso { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; align-items: start; padding: 24px 0; }
.compromiso + .compromiso { border-top: 1px solid var(--linea); }
.compromiso-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--marfil-2); border: 1px solid var(--beige); color: var(--marino); }
.compromiso-ico svg { width: 24px; height: 24px; }
.compromiso h3 { font-size: 1.1rem; font-weight: 700; }
.compromiso p { margin-top: 6px; font-size: .96rem; color: var(--texto); }

/* ---------- cierre: llamado a matrícula ---------- */
.cierre {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(80px, 10vw, 136px) 0;
  color: var(--marfil);
  background:
    radial-gradient(55% 80% at 80% 50%, rgb(255 255 255 / .06), transparent 70%),
    linear-gradient(140deg, var(--marino-3) 0%, var(--marino) 55%, #1b2f60 100%);
}
.cierre-fondo { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cierre-fondo svg { width: 100%; height: 100%; fill: none; stroke: rgb(251 248 241 / .07); stroke-width: 1.2; }
.cierre-fondo .cierre-arco { stroke: rgb(220 193 133 / .28); stroke-dasharray: 3 9; stroke-linecap: round; }
.cierre-in { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .55fr); align-items: center; gap: clamp(32px, 6vw, 80px); }
.cierre-texto h2 {
  max-width: 17ch;
  color: var(--marfil);
  font-size: clamp(2.15rem, 1.3rem + 3vw, 3.7rem);
  font-weight: 800; line-height: 1.04; letter-spacing: -.04em;
}
.cierre-texto p { margin-top: 20px; max-width: 46ch; font-size: 1.12rem; color: rgb(251 248 241 / .78); }
.cierre-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cierre-dibujo svg { width: 100%; max-width: 280px; height: auto; margin-inline: auto; overflow: visible; }
.tetra-circulo { fill: none; stroke: rgb(251 248 241 / .16); stroke-width: 1.2; stroke-dasharray: 2 6; stroke-linecap: round; }
.tetra-circulo--afuera { stroke: rgb(251 248 241 / .08); stroke-dasharray: none; }
.tetra-lineas { fill: rgb(220 193 133 / .06); stroke: rgb(220 193 133 / .45); stroke-width: 1.4; stroke-linejoin: round; }
.tetractys circle { fill: rgb(251 248 241 / .16); transform-box: fill-box; transform-origin: center; }
html:not(.js) .tetractys circle { fill: var(--dorado-2); }
.cierre-dibujo.visible .tetractys circle { animation: encender .55s var(--suave) forwards; animation-delay: calc(.35s + var(--i) * .28s); }
@keyframes encender { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { fill: var(--dorado-2); transform: scale(1); } }
.tetra-suma { font: 500 12px var(--f-texto); fill: rgb(251 248 241 / .55); text-anchor: middle; font-variant-numeric: tabular-nums; }

/* ---------- pie ---------- */
.pie { background: var(--blanco); border-top: 1px solid var(--linea); padding: 40px 0 calc(28px + env(safe-area-inset-bottom)); }
.pie-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 28px 48px; align-items: start; }
.pie-marca { display: flex; align-items: center; gap: 14px; }
.pie-nombre { font-weight: 800; font-size: 1.08rem; color: var(--tinta); letter-spacing: -.025em; }
.pie-lema { font-size: .9rem; color: var(--texto-suave); }
.pie-contacto > p, .pie-redes > p { margin-bottom: 10px; font-size: .9rem; font-weight: 500; color: var(--texto-suave); }
.pie-contacto ul { list-style: none; display: grid; gap: 4px; }
.pie-contacto a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px;
  font-size: .93rem; font-weight: 500; color: var(--tinta); text-decoration: none; overflow-wrap: anywhere;
}
.pie-contacto a:hover { color: var(--marino-2); text-decoration: underline; text-underline-offset: 3px; }
.pie-contacto .ico { width: 20px; height: 20px; flex: none; color: var(--dorado-texto); }
.pie-redes { display: flex; flex-direction: column; align-items: flex-start; }
.pie-redes ul { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; }
.pie-redes a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: .5rem .95rem .5rem .75rem; border-radius: 999px;
  border: 1px solid var(--beige-2);
  font-size: .9rem; font-weight: 500; color: var(--tinta); text-decoration: none;
  transition: border-color .2s, background-color .2s;
}
.pie-redes a:hover { border-color: var(--marino); background: var(--marfil); }
.pie-redes svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pie-redes li:first-child svg { fill: currentColor; stroke: none; }
.pie-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid var(--linea); font-size: .85rem; color: var(--texto-suave); }
.pie-legal-enlaces { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pie-legal-enlaces a { display: inline-flex; align-items: center; min-height: 40px; color: var(--marino); text-underline-offset: 3px; }

/* ---------- intro de bienvenida: «del compás a la medalla» (ver intro.js) ---------- */
.intro { display: none; }
html.con-intro { overflow: hidden; }
html.con-intro .intro {
  --im: clamp(132px, 30vw, 184px);   /* tamaño de la medalla */
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
}
/* mientras está la intro, el logo del encabezado espera: la medalla de la intro llega a su lugar */
html.con-intro .cabecera .marca-logo { opacity: 0; }
.intro-fondo {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 50% 44%, #22396f 0%, var(--pizarra) 50%, var(--marino-3) 100%);
  /* el «círculo que se abre»: un agujero de radio --ir que crece desde la medalla (cerrado al inicio: -2px) */
  -webkit-mask-image: radial-gradient(circle at var(--ix, 50%) var(--iy, 50%), transparent var(--ir, -2px), #000 calc(var(--ir, -2px) + 1px));
  mask-image: radial-gradient(circle at var(--ix, 50%) var(--iy, 50%), transparent var(--ir, -2px), #000 calc(var(--ir, -2px) + 1px));
}
.intro-fondo::before {
  /* cuadrícula de tiza, muy tenue */
  content: ""; position: absolute; inset: 0; opacity: 0;
  background-image:
    linear-gradient(rgb(251 248 241 / .05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(251 248 241 / .05) 1px, transparent 1px);
  background-size: 32px 32px; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, #000 20%, transparent 75%);
}
.intro-centro { position: relative; display: flex; flex-direction: column; align-items: center; padding: 24px; text-align: center; }
.intro-arte { position: relative; width: var(--im); height: var(--im); transition: transform .85s cubic-bezier(.65, 0, .25, 1); will-change: transform; }
.intro-trazo {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--im) * 4 / 3); height: calc(var(--im) * 4 / 3);
  transform: translate(-50%, -50%); overflow: visible;
  transition: opacity .3s ease;
}
.intro-circulo { fill: none; stroke: var(--dorado-2); stroke-width: 2.6; stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro-linea { fill: none; stroke: rgb(251 248 241 / .6); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.intro-recto { fill: none; stroke: rgb(251 248 241 / .6); stroke-width: 1.6; opacity: 0; }
.intro-punto { fill: var(--dorado-2); opacity: 0; }
/* el brazo del compás gira con el trazo del círculo */
.intro-brazo { transform-box: view-box; transform-origin: 0 0; opacity: 0; }   /* 0 0 = el centro del círculo (origen del viewBox) */
.intro-brazo path { stroke: rgb(220 193 133 / .55); stroke-width: 1.4; }
.intro-brazo circle { fill: var(--dorado-2); }
.intro-medalla {
  position: absolute; inset: 0; overflow: hidden; border-radius: 50%;
  background: var(--blanco);
  box-shadow: 0 0 0 3px var(--dorado-2), 0 26px 60px -24px rgb(0 0 0 / .7);
  opacity: 0; transform: scale(.84);
  transition: box-shadow .85s ease;
}
.intro-medalla img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.intro-textos { display: flex; flex-direction: column; align-items: center; margin-top: clamp(24px, 4vh, 36px); transition: opacity .3s ease, transform .3s ease; }
.intro-nombre {
  color: var(--marfil);
  font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3.1rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05;
  clip-path: inset(-10% 100% -10% 0);
}
.intro-regla { display: block; width: 64px; height: 1px; margin-top: 18px; background: var(--dorado-2); transform: scaleX(0); }
.intro-frase { margin-top: 14px; color: rgb(251 248 241 / .78); font-size: clamp(.98rem, .9rem + .45vw, 1.15rem); opacity: 0; }

/* la secuencia (unos 3,3 s hasta que se abre) */
.intro--activa .intro-fondo::before { animation: aparecer .8s .05s forwards; }
.intro--activa .intro-punto { animation: aparecer .3s .1s forwards; }
.intro--activa .intro-brazo { animation: brazo-compas 1.05s .15s cubic-bezier(.55, .1, .35, 1) forwards; }
.intro--activa .intro-circulo { animation: trazo 1.05s .15s cubic-bezier(.55, .1, .35, 1) forwards; }
.intro--activa .intro-diametro { animation: trazo .5s .8s ease-out forwards; }
.intro--activa .intro-triangulo { animation: trazo .6s 1.05s ease-out forwards; }
.intro--activa .intro-recto { animation: aparecer .3s 1.5s forwards; }
.intro--activa .intro-medalla { animation: medalla-entra .75s 1.6s var(--suave) forwards; }
.intro--activa .intro-nombre { animation: nombre-entra .8s 2.05s cubic-bezier(.6, 0, .2, 1) forwards; }
.intro--activa .intro-regla { animation: regla-entra .6s 2.5s var(--suave) forwards; }
.intro--activa .intro-frase { animation: aparecer .6s 2.6s forwards; }
@keyframes brazo-compas { 0% { opacity: 1; transform: rotate(0deg); } 85% { opacity: 1; } 100% { opacity: 0; transform: rotate(360deg); } }
@keyframes medalla-entra { to { opacity: 1; transform: none; } }
@keyframes nombre-entra { to { clip-path: inset(-10% 0 -10% 0); } }
@keyframes regla-entra { to { transform: none; } }

/* la salida: el texto se va, el círculo se abre y la medalla vuela al encabezado */
.intro--sale .intro-textos { opacity: 0; transform: translateY(-8px); }
.intro--sale .intro-trazo { opacity: 0; }
.intro--sale .intro-medalla { box-shadow: 0 0 0 3px var(--marino), 0 10px 20px -14px rgb(0 0 0 / .5); }
.intro--sale .intro-fondo.sin-mascara { opacity: 0; transition: opacity .8s ease; }
.intro--rapida { opacity: 0; transition: opacity .35s ease; }

/* ================= responsivo ================= */

/* menú desplegable */
@media (max-width: 1100px) {
  .menu-boton { display: inline-flex; }
  .menu {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px var(--margen) 20px;
    background: var(--blanco);
    border-bottom: 1px solid var(--linea);
    box-shadow: 0 24px 40px -28px rgb(20 32 62 / .5);
    max-height: calc(100dvh - var(--cabecera)); overflow-y: auto;
  }
  .cabecera.menu-abierto .menu { display: flex; animation: bajar-menu .28s var(--suave); }
  .menu-enlace { padding: 14px 12px; font-size: 1rem; }
  .menu-acciones { flex-direction: column; margin: 12px 0 0; gap: 10px; }
  .menu-acciones .boton { min-height: 50px; font-size: 1rem; }
  @keyframes bajar-menu { from { opacity: 0; transform: translateY(-6px); } }
}

/* tablet */
@media (max-width: 1000px) {
  .tarjetas { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "mat ent" "pra aco" "rec rec"; }
  .unis { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .uni { flex-direction: row; }
  .uni::before { inset: 0 auto 0 0; width: 3px; height: auto; }
  .uni-foto { flex: 0 0 38%; aspect-ratio: auto; min-height: 100%; }
  .uni-cuerpo { padding: 26px 28px; }
  .uni-insignia { margin: 0 0 14px; width: 52px; height: 52px; border: 0; }
  .academia-in { grid-template-columns: minmax(0, 1fr); }
  .pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .pasos::before, .pasos::after { display: none; }
  .cierre-in { grid-template-columns: minmax(0, 1fr) 200px; }
  .pie-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pie-marca { grid-column: 1 / -1; }
}

/* portada en una columna: la pizarra se acomoda a lo ancho, con la ecuación al lado de la figura */
@media (max-width: 980px) {
  .portada-in { grid-template-columns: minmax(0, 1fr); }
  .pizarra { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 16px; align-items: center; }
  .pizarra-titulo { grid-column: 1 / -1; }
  .teorema-svg { margin: 0; }
  .teorema-pie { margin: 0; }
}

/* celular */
@media (max-width: 680px) {
  :root { --cabecera: 64px; }
  body { font-size: 1rem; }
  .medalla.marca-logo { width: 44px; }
  .marca-lema { display: none; }
  .marca-nombre { font-size: 1.02rem; }
  .menu-boton-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .menu-boton { padding: 0 13px; }

  .portada-titulo { margin-top: 18px; letter-spacing: -.04em; }
  .portada-acciones { flex-direction: column; align-items: stretch; }
  .portada-acciones .boton { width: 100%; }
  .portada-juego { display: flex; width: 100%; padding-inline: 4px; }
  .juego-bajar { margin-left: auto; }
  .pizarra { display: block; border-radius: 24px; }
  .teorema-svg { max-width: 360px; margin: 4px auto 0; }
  .teorema-pie { margin-top: 4px; }

  .tarjetas { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mat" "ent" "pra" "aco" "rec"; gap: 16px; }
  .tarjeta { padding: 24px 22px; }
  .tarjeta--recursos .lista-check { grid-template-columns: minmax(0, 1fr); }

  .uni { flex-direction: column; }
  .uni::before { inset: 0 0 auto; width: auto; height: 3px; }
  .uni-foto { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .uni-cuerpo { padding: 0 20px 22px; }
  .uni-insignia { width: 54px; height: 54px; margin: -27px 0 12px; border: 4px solid var(--blanco); }

  .pasos { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .pasos::before, .pasos::after { display: block; top: 38px; bottom: 70px; left: 37px; right: auto; width: 2px; height: auto; }
  .pasos::before { background: repeating-linear-gradient(180deg, var(--beige-2) 0 6px, transparent 6px 12px); }
  .pasos::after { background: linear-gradient(180deg, var(--dorado-2), var(--dorado)); transform: scaleY(0); transform-origin: center top; }
  .pasos.visible::after, html:not(.js) .pasos::after { transform: scaleY(1); }
  .paso { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 18px; padding-bottom: 30px; }
  .paso:last-child { padding-bottom: 0; }
  .paso-figura { width: 76px; height: 76px; margin: 0; }
  .paso-num { font-size: 1.9rem; }
  .paso:nth-child(1) .paso-num { padding-top: 15px; }
  .paso-texto { padding-top: 8px; }
  .paso h3 { font-size: 1.08rem; }
  .paso p { margin-top: 6px; }

  .medalla--grande { width: 112px; margin-bottom: 22px; }
  .academia-espiral { display: none; }
  .compromiso { grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 20px 0; }
  .compromiso-ico { width: 42px; height: 42px; }
  .compromiso-ico svg { width: 21px; height: 21px; }

  .cierre-in { grid-template-columns: minmax(0, 1fr); }
  .cierre-dibujo { order: -1; }
  .cierre-dibujo svg { max-width: 170px; margin-inline: 0; }
  .cierre-acciones { flex-direction: column; align-items: stretch; }
  .cierre-acciones .boton { width: 100%; }

  .pie-in { grid-template-columns: minmax(0, 1fr); }
  .pie-legal { flex-direction: column; }
}

@media (max-width: 380px) {
  .portada-previo { font-size: .8rem; }
  .boton--grande { padding-inline: 1.1rem; }
  .uni-enlaces a { font-size: .85rem; }
}

/* quien pidió menos movimiento: todo queda quieto y visible desde el inicio */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html.js .aparece { opacity: 1; transform: none; }
  .asa-halo { display: none; }
}
