/*
 * ==========================================================================================
 * ABC DESARROLLOS
 * Sistema : AULA+ · Sistema de registro de estudiantes
 * Archivo : public/css/aula.css
 * Módulo  : Sitio público · estilos
 * Revisión: 17-nov-2026
 * © 2026 ABC Desarrollos
 *
 * DESCRIPCIÓN TÉCNICA
 *   - Hoja de estilos del sitio público: portada, secciones, registro por pasos, listas
 *     con buscador y páginas de texto.
 *
 * ENTRADA
 *   - Clases e identificadores de public/index.html, privacidad.html y 404.html.
 *   - Fuentes Archivo y Outfit e imágenes de /img.
 *
 * PROCESO
 *   - Define la paleta y la tipografía de la marca como variables.
 *   - Adapta la disposición a tres anchos: escritorio, tableta (860 px) y teléfono (560
 *     px).
 *   - Respeta la preferencia de movimiento reducido.
 *
 * SALIDA
 *   - Presentación visual del sitio.
 * ==========================================================================================
 */
/* AULA+ · sitio público
   Paleta tomada de las tramas y del mockup de la app. Títulos en Archivo ancha (sustituto libre de
   Cy Grotesk Wide) y texto en Outfit (sustituto libre de Century Gothic). */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/outfit.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --petroleo: #003847;
  --petroleo-2: #01414d;
  --naranja: #ff6536;
  --durazno: #ffa46f;
  --verde: #009377;
  --lima: #c5da4a;
  --crema: #f3f2ed;
  --blanco: #ffffff;
  --tinta: #0b2f39;
  --tinta-suave: #476269;
  --linea: #d5dad6;
  --error: #b3261e;
  --titulo: "Archivo", "Arial Black", sans-serif;
  --texto: "Outfit", "Century Gothic", "Trebuchet MS", sans-serif;
  --radio: 28px;
  --radio-chico: 14px;
  --ancho: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.con-dialogo { overflow: hidden; }
body { margin: 0; font-family: var(--texto); font-size: 1.0625rem; line-height: 1.55; color: var(--tinta); background: var(--crema); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }

h1, h2 { font-family: var(--titulo); font-stretch: 125%; font-weight: 800; text-transform: uppercase; line-height: 1.02; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5.25rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.75rem); }
h3 { font-family: var(--titulo); font-stretch: 112%; font-weight: 700; font-size: 1.3rem; line-height: 1.2; }

:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; border-radius: 6px; }
.salto { position: absolute; left: -999px; top: 8px; background: var(--blanco); padding: 10px 16px; border-radius: 10px; z-index: 20; }
.salto:focus { left: 8px; }

/* ------------------------------------------------------------ botones */
.boton { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 0.7rem 1.35rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.12s ease, background-color 0.12s ease; }
.boton:active { transform: translateY(1px); }
.boton:disabled { opacity: 0.6; cursor: progress; }
.boton-grande { font-size: 1.125rem; padding: 1rem 1.9rem; }
.boton-lima { background: var(--lima); color: var(--petroleo); }
.boton-lima:hover { background: #d3e667; }
.boton-claro { background: var(--blanco); color: var(--petroleo); }
.boton-claro:hover { background: var(--crema); }
.boton-oscuro { background: var(--petroleo); color: var(--blanco); }
.boton-oscuro:hover { background: #0a5262; }
.boton-suave { background: transparent; color: var(--petroleo); box-shadow: inset 0 0 0 2px var(--linea); }
.boton-suave:hover { background: var(--crema); }
.enlace { font: inherit; font-weight: 600; background: none; border: 0; padding: 0; color: var(--verde); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.enlace:disabled { color: var(--tinta-suave); cursor: default; }

/* ------------------------------------------------------------ portada */
.portada { background: var(--petroleo) url("/img/trama-fondo.webp") center top / cover; color: var(--blanco); overflow: hidden; }
.barra { max-width: var(--ancho); margin: 0 auto; padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 2rem; }
.barra-enlaces { display: flex; gap: 1.75rem; margin-left: auto; }
.barra-enlaces a { text-decoration: none; font-weight: 500; opacity: 0.88; }
.barra-enlaces a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }

.barra-menu { display: none; align-items: center; gap: 0.45rem; font: inherit; font-weight: 600; color: var(--blanco); background: rgba(255, 255, 255, 0.12); border: 0; border-radius: 999px; padding: 0.55rem 1rem; cursor: pointer; }
.barra-menu:hover { background: rgba(255, 255, 255, 0.2); }

.portada-cuerpo { max-width: var(--ancho); margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) 1.5rem 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.portada-bajada { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 34rem; margin-top: 1.5rem; color: #dbe9ea; }
.portada-accion { margin-top: 2.25rem; }
.portada-nota { margin-top: 0.9rem; font-size: 0.95rem; color: #a9c6c9; }
.portada-trama { height: clamp(120px, 23vw, 330px); margin-top: clamp(1.5rem, 4vw, 3rem); background: url("/img/trama-color.webp") center bottom / auto 100% repeat-x; }

/* Credencial: la misma tarjeta del mockup de la app */
.credencial { position: relative; overflow: hidden; aspect-ratio: 1.58; width: 100%; max-width: 400px; justify-self: end; background: var(--naranja); border-radius: var(--radio); padding: 1.4rem 1.5rem; display: flex; flex-direction: column; justify-content: space-between; color: var(--blanco); transform: rotate(-4deg); box-shadow: 0 30px 60px -20px rgba(0, 20, 26, 0.7); }
.credencial::before { content: ""; position: absolute; width: 62%; aspect-ratio: 1; right: -18%; top: -34%; border-radius: 50%; background: var(--verde); }
.credencial::after { content: ""; position: absolute; width: 58%; aspect-ratio: 1; left: -20%; bottom: -48%; border-radius: 50%; background: #9a5a34; }
.credencial > * { position: relative; z-index: 1; }
.credencial-arriba { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.credencial-sello { background: var(--petroleo); font-size: 0.78rem; font-weight: 600; padding: 0.35rem 0.8rem; border-radius: 999px; white-space: nowrap; }
.credencial-abajo { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.credencial-nombre { font-weight: 700; font-size: 1.15rem; }
.credencial-dato { font-size: 0.85rem; opacity: 0.92; }
.credencial-qr { width: 27%; min-width: 72px; border-radius: 10px; border: 5px solid var(--blanco); }

/* ------------------------------------------------------------ secciones */
.seccion { padding: clamp(3.5rem, 8vw, 6.5rem) 1.5rem; }
.seccion-blanca { background: var(--blanco); }
.seccion-oscura { background: var(--petroleo) url("/img/trama-fondo.webp") center / cover; color: var(--blanco); }
.ancho, .dos-columnas { max-width: var(--ancho); margin: 0 auto; }
.dos-columnas { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.prosa p + p { margin-top: 1.1rem; }
.prosa p { font-size: 1.15rem; max-width: 36rem; }
.entrada { font-size: 1.15rem; max-width: 40rem; margin-top: 1rem; color: var(--tinta-suave); }

.etapas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.etapa { border-radius: var(--radio); padding: 1.75rem 1.6rem 1.6rem; display: flex; flex-direction: column; gap: 0.75rem; color: var(--petroleo); }
.etapa-naranja { background: var(--naranja); }
.etapa-verde { background: var(--verde); color: var(--blanco); }
.etapa-lima { background: var(--lima); }
.etapa-orden { font-weight: 600; font-size: 0.95rem; }
.etapa h3 { font-size: 1.45rem; }
.etapa-beneficio { margin-top: auto; padding-top: 1.25rem; font-weight: 700; border-top: 2px solid currentColor; }

.espacios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 4rem); margin-top: 3rem; }
.espacios > div { border-top: 3px solid var(--petroleo); padding-top: 1.1rem; }
.espacios p { margin-top: 0.5rem; color: var(--tinta-suave); max-width: 32rem; }

.pasos-lista { counter-reset: paso; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; margin: 2.5rem 0 2.75rem; }
.pasos-lista li { counter-increment: paso; padding-top: 0.25rem; text-align: center; }
.pasos-lista li::before { content: counter(paso); display: block; font-family: var(--titulo); font-stretch: 125%; font-weight: 800; font-size: 3.25rem; line-height: 1; color: var(--naranja); margin-bottom: 0.6rem; }
.pasos-lista strong { display: block; font-size: 1.1rem; margin-bottom: 0.2rem; }

.compromisos { display: grid; gap: 1.4rem; }
.compromisos li { padding-left: 1.4rem; border-left: 4px solid var(--lima); color: #dbe9ea; max-width: 36rem; }
.compromisos strong { display: block; color: var(--blanco); font-size: 1.1rem; }

.cierre { position: relative; background: var(--naranja); color: var(--petroleo); padding: clamp(3.5rem, 8vw, 6rem) 1.5rem; overflow: hidden; text-align: center; }
.cierre::before { content: ""; position: absolute; inset: 0; background: url("/img/trama-sola.webp") center / auto 135% repeat-x; opacity: 0.16; }
.cierre-cuerpo { position: relative; max-width: 40rem; margin: 0 auto; }
.cierre p { font-size: 1.2rem; margin: 0.9rem 0 1.9rem; font-weight: 500; }

.pie { background: var(--petroleo); color: #a9c6c9; padding: 2.5rem 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem 2rem; font-size: 0.95rem; }

/* ------------------------------------------------------------ registro por pasos */
.registro { width: min(560px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: var(--radio); background: var(--blanco); color: var(--tinta); overflow: hidden; }
.registro[open] { display: flex; flex-direction: column; }
.registro::backdrop { background: rgba(0, 34, 43, 0.72); }
.registro-cabecera { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem 0.9rem 1.75rem; }
.registro-avance { margin-left: auto; font-size: 0.92rem; font-weight: 600; color: var(--tinta-suave); }
.registro-cerrar { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--crema); color: var(--petroleo); cursor: pointer; }
.registro-cerrar:hover { background: #e6e5de; }
.registro-barra { height: 6px; background: var(--crema); }
.registro-barra span { display: block; height: 100%; width: 0; background: var(--naranja); border-radius: 0 6px 6px 0; transition: width 0.3s ease; }
.registro-cuerpo { padding: 1.75rem; overflow-y: auto; }
.paso h2 { font-size: clamp(1.45rem, 4.4vw, 1.9rem); }
.paso-ayuda { margin: 0.7rem 0 1.5rem; color: var(--tinta-suave); }

.campo { margin-bottom: 1.15rem; }
.campo label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.campo input, .campo select { width: 100%; font: inherit; color: inherit; background: var(--blanco); border: 2px solid var(--linea); border-radius: var(--radio-chico); padding: 0.8rem 1rem; min-height: 54px; }
.campo input::placeholder { color: #94a5a8; }
.campo input:focus, .campo select:focus { outline: none; border-color: var(--petroleo); box-shadow: 0 0 0 4px rgba(197, 218, 74, 0.6); }
.campo [aria-invalid="true"] { border-color: var(--error); }
.campo-error { color: var(--error); font-size: 0.95rem; font-weight: 500; margin-top: 0.4rem; }
.campo-error:empty { display: none; }
.campo-nota { color: var(--tinta-suave); font-size: 0.9rem; margin-top: 0.4rem; }
.campo-nota:empty { display: none; }
/* Lista con buscador: se despliega debajo del campo, dentro del flujo, para que no la recorte el diálogo */
.combo-lista { margin: 0.4rem 0 0; padding: 0.35rem; max-height: 248px; overflow-y: auto; background: var(--blanco); border: 2px solid var(--petroleo); border-radius: var(--radio-chico); }
.combo-lista li { padding: 0.65rem 0.8rem; border-radius: 9px; cursor: pointer; line-height: 1.3; }
.combo-lista li[role="option"]:hover, .combo-lista li[aria-selected="true"] { background: var(--lima); }
.combo-lista .combo-aviso { cursor: default; color: var(--tinta-suave); font-size: 0.93rem; }
.campo-cedula { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 0.75rem; }
.campo-cedula input { font-size: 1.35rem; font-weight: 600; letter-spacing: 0.04em; }
.campo-codigo { font-size: 1.9rem !important; font-weight: 700; letter-spacing: 0.4em; text-align: center; }
.casilla { display: flex; gap: 0.8rem; align-items: flex-start; cursor: pointer; }
.casilla input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--petroleo); flex: none; }

.aviso { padding: 0.85rem 1.1rem; border-radius: var(--radio-chico); margin-bottom: 1.25rem; font-weight: 500; background: var(--crema); }
.aviso-info { background: #fff3e6; color: #6b3a00; }
.desafio { margin-top: 1rem; min-height: 65px; }
.aviso-error { background: #fbe9e7; color: #7c1d17; }
.aviso-ok { background: #e3f3ee; color: #05503f; }

.registro-acciones { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.75rem; }
.registro-acciones .boton { padding: 0.9rem 1.6rem; }
#siguiente { flex: 1; }
#atras { flex: none; }

.paso-final { text-align: center; }
.final-marca { width: 84px; height: 84px; border-radius: 50%; background: var(--lima); color: var(--petroleo); display: grid; place-items: center; margin: 0.5rem auto 1.25rem; }
.paso-final .paso-ayuda { margin-bottom: 1.25rem; }
.folio { background: var(--petroleo); color: var(--blanco); border-radius: var(--radio-chico); padding: 1rem; margin-bottom: 1.25rem; }
.folio span { display: block; font-size: 0.9rem; color: #a9c6c9; }
.folio strong { font-family: var(--titulo); font-stretch: 112%; font-size: 1.7rem; letter-spacing: 0.03em; }

/* ------------------------------------------------------------ página de texto (términos, 404) */
.documento { max-width: 46rem; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.documento h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-bottom: 1.5rem; }
.documento h2 { font-size: 1.25rem; margin: 2.2rem 0 0.6rem; text-transform: none; font-stretch: 112%; }
.documento p, .documento li { margin-bottom: 0.8rem; }
.documento ul { list-style: disc; padding-left: 1.3rem; }
.documento .nota-borrador { background: #fff3d6; border-radius: var(--radio-chico); padding: 1rem 1.2rem; font-weight: 500; }
.cabecera-simple { background: var(--petroleo); padding: 1.25rem 1.5rem; }
.cabecera-simple a { display: inline-block; }

/* ------------------------------------------------------------ pantallas pequeñas */
@media (max-width: 860px) {
  /* El menú pasa a ser desplegable: se abre con el botón y queda debajo de la barra */
  .barra { justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1rem; position: relative; }
  .barra-menu { display: inline-flex; }
  .barra-cta { margin-left: auto; }
  .barra-enlaces { display: none; order: 5; width: 100%; margin: 0; flex-direction: column; gap: 0; background: var(--blanco); border-radius: var(--radio-chico); padding: 0.4rem; }
  .barra-enlaces.abierto { display: flex; }
  .barra-enlaces a { display: block; color: var(--petroleo); opacity: 1; font-weight: 600; padding: 0.85rem 1rem; border-radius: 10px; }
  .barra-enlaces a:hover { background: var(--crema); text-decoration: none; }
  .portada-cuerpo, .dos-columnas { grid-template-columns: minmax(0, 1fr); }
  .credencial { justify-self: center; max-width: 340px; margin-top: 0.5rem; }
  .etapas, .espacios { grid-template-columns: minmax(0, 1fr); }
  .pasos-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .pasos-lista { grid-template-columns: minmax(0, 1fr); }
  .barra { padding: 1rem; }
  .barra-menu span { display: none; }
  .barra-menu { padding: 0.55rem 0.7rem; }
  .marca img { width: 112px; height: auto; }
  .barra-cta { padding: 0.6rem 1rem; }
  .boton-grande { width: 100%; }
  .registro { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .registro-cuerpo { flex: 1; display: flex; flex-direction: column; padding: 1.4rem 1.25rem; }
  .registro-acciones { margin-top: auto; padding-top: 1.5rem; }
  .registro-cabecera { padding-left: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ------------------------------------------------------------ cintillo de aliados */
.cintillo { background: #fff; border-bottom: 1px solid rgba(0, 56, 71, 0.1); padding: 1.1rem 0 1.25rem; }
.cintillo-titulo { margin: 0 0 0.75rem; text-align: center; font-size: 0.85rem; font-weight: 600; color: rgba(0, 56, 71, 0.7); }
.cintillo-banda { overflow: hidden; }
.cintillo-pista { list-style: none; margin: 0; padding: 0 1.25rem; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1rem 2.75rem; }
.cintillo-pista li { flex: 0 0 auto; }
.cintillo-pista a, .cintillo-pista span { display: block; border-radius: 0.5rem; }
.cintillo-pista img { display: block; height: 3rem; width: auto; max-width: 10rem; object-fit: contain; }
.cintillo-pista a:focus-visible { outline: 3px solid var(--naranja); outline-offset: 4px; }
/* Con muchos logos la franja se desplaza sola. La lista va dos veces para que el recorrido no tenga corte. */
.cintillo.rueda .cintillo-pista { flex-wrap: nowrap; justify-content: flex-start; width: max-content; padding: 0; gap: 0; animation: cintillo-rueda var(--cintillo-segundos, 40s) linear infinite; }
.cintillo.rueda .cintillo-pista li { padding: 0 1.4rem; }
.cintillo.rueda:hover .cintillo-pista, .cintillo.rueda:focus-within .cintillo-pista { animation-play-state: paused; }
@keyframes cintillo-rueda { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .cintillo.rueda .cintillo-pista { animation: none; flex-wrap: wrap; justify-content: center; width: auto; padding: 0 1.25rem; gap: 1rem 2.75rem; }
  .cintillo.rueda .cintillo-pista li { padding: 0; }
  .cintillo.rueda .cintillo-pista li[aria-hidden="true"] { display: none; }
}
@media (max-width: 640px) { .cintillo-pista img { height: 2.4rem; max-width: 7.5rem; } }
