/*
 * Neola Apps · páginas de marca Neola: portada (/) e ingreso al panel.
 * Requiere /assets/neola/marca.css.
 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--neola-fuente);
  color: var(--neola-tinta);
  background: var(--neola-fondo);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--neola-azul); }
:focus-visible { outline: 3px solid rgba(63, 108, 223, .5); outline-offset: 2px; border-radius: 6px; }
.contenedor { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: var(--neola-radio);
  font: 800 16px/1 var(--neola-fuente); letter-spacing: -.005em; text-decoration: none; cursor: pointer;
  transition: background-color .18s, color .18s, box-shadow .18s, transform .12s;
}
.boton:active { transform: scale(.985); }
.boton-primario { background: var(--neola-azul); color: #fff; box-shadow: 0 10px 24px rgba(63, 108, 223, .28); }
.boton-primario:hover { background: var(--neola-azul-oscuro); }
.boton-secundario { background: #fff; color: var(--neola-tinta); box-shadow: inset 0 0 0 1.5px var(--neola-borde); }
.boton-secundario:hover { box-shadow: inset 0 0 0 1.5px var(--neola-azul); color: var(--neola-azul-oscuro); }
.boton-naranja { background: var(--neola-naranja); color: #fff; box-shadow: 0 10px 24px rgba(231, 139, 0, .3); }
.boton-naranja:hover { background: #CF7C00; }
.boton-chico { min-height: 42px; padding: 0 18px; font-size: 15px; border-radius: 12px; box-shadow: none; }
.boton-bloque { width: 100%; }
.boton[disabled] { cursor: progress; opacity: .9; }
.boton-cargando {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: girar .7s linear infinite;
}
.enviando .boton-cargando { display: block; }

.etiqueta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--neola-azul);
}
.etiqueta::before { content: ''; width: 18px; height: 3px; border-radius: 3px; background: var(--neola-naranja); }

/* Escena animada */
.escena { display: block; width: 100%; height: auto; }
.escena text { font: 700 14px var(--neola-fuente); fill: var(--neola-tinta); }

/* ===================================================================== */
/* Ingreso al panel                                                        */
/* ===================================================================== */
.ingreso { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }

.ingreso-escena {
  position: relative; overflow: hidden; color: #fff;
  padding: 40px clamp(28px, 4vw, 56px); display: flex; flex-direction: column; gap: 28px;
  background:
    radial-gradient(120% 90% at 90% 0%, rgba(63, 108, 223, .55), transparent 60%),
    radial-gradient(80% 60% at 0% 100%, rgba(231, 139, 0, .16), transparent 60%),
    linear-gradient(160deg, #14213D 0%, #172A52 55%, #1E3874 100%);
}
.ingreso-escena::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.ingreso-escena > * { position: relative; z-index: 1; }
.marca-grande { font-size: 22px; }
.ingreso-escena-texto h2 { font-size: clamp(28px, 2.9vw, 42px); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 800; max-width: 16ch; }
.ingreso-escena-texto p { margin: 0; color: rgba(255, 255, 255, .72); font-size: 16.5px; line-height: 1.55; max-width: 44ch; }
.ingreso-escena-mapa { flex: 1; display: grid; place-items: center; min-height: 0; }
.ingreso-escena-mapa .escena { max-width: 580px; max-height: 100%; }
.ingreso-canales { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ingreso-canales li {
  font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .88);
}

.ingreso-acceso { display: flex; flex-direction: column; align-items: center; padding: 40px 24px 24px; background: var(--neola-fondo); }
.ingreso-caja { width: min(400px, 100%); margin: auto 0; animation: subir .6s var(--neola-curva) both; }
.ingreso-marca-movil { display: none; font-size: 18px; margin-bottom: 28px; }
.ingreso-caja h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.025em; margin: 0 0 8px; font-weight: 800; }
.ingreso-sub { margin: 0 0 28px; color: var(--neola-tinta-2); font-size: 15.5px; line-height: 1.5; }

.formulario { display: grid; gap: 18px; }
.campo { display: grid; gap: 8px; }
.campo > span:first-child { font-size: 13.5px; font-weight: 700; color: var(--neola-tinta-2); }
.campo input {
  width: 100%; height: 54px; padding: 0 16px; border-radius: var(--neola-radio);
  border: 1.5px solid var(--neola-borde); background: #fff; color: var(--neola-tinta);
  font: 600 16px var(--neola-fuente); transition: border-color .15s, box-shadow .15s;
}
.campo input:hover { border-color: #C6D1E5; }
.campo input:focus { outline: none; border-color: var(--neola-azul); box-shadow: 0 0 0 4px rgba(63, 108, 223, .16); }
.campo-clave { position: relative; display: block; }
.campo-clave input { padding-right: 56px; }
.ver-clave {
  position: absolute; right: 7px; top: 7px; width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: transparent; color: var(--neola-tinta-3); cursor: pointer; display: grid; place-items: center;
}
.ver-clave:hover { background: var(--neola-borde-suave); color: var(--neola-tinta); }
.ver-clave svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ver-clave[aria-pressed="true"] { color: var(--neola-azul); }
.formulario .boton-bloque { margin-top: 6px; min-height: 56px; }

.alerta { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: 12px; font-size: 14.5px; font-weight: 600; line-height: 1.4; margin: 0 0 20px; }
.alerta svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.alerta-error { background: var(--neola-peligro-suave); color: #A12B2B; animation: sacudir .42s ease-in-out; }
.ingreso-ayuda { margin: 22px 0 0; font-size: 13.5px; color: var(--neola-tinta-3); line-height: 1.55; }
.ingreso-ayuda strong { color: var(--neola-tinta-2); }
.ingreso-pie { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding-top: 28px; font-size: 12.5px; color: var(--neola-tinta-3); }

@media (max-width: 920px) {
  .ingreso { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ingreso-escena { padding: 14px 16px 34px; gap: 0; }
  .ingreso-escena-cabeza, .ingreso-escena-texto, .ingreso-canales { display: none; }
  .ingreso-escena-mapa .escena { max-width: 400px; max-height: 230px; }
  .ingreso-acceso { position: relative; margin-top: -24px; border-radius: 24px 24px 0 0; padding: 30px 20px 20px; }
  .ingreso-marca-movil { display: inline-flex; }
  .ingreso-caja { margin: 0; }
  .ingreso-caja h1 { font-size: 26px; }
}

/* ===================================================================== */
/* Portada                                                                 */
/* ===================================================================== */
.pagina-portada { background: #fff; }
.portada-cabeza {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.portada-cabeza.con-sombra { border-bottom-color: var(--neola-borde-suave); }
.portada-cabeza-fila { display: flex; align-items: center; gap: 24px; height: 72px; }
.portada-cabeza .marca { font-size: 17px; }
.portada-nav { display: flex; gap: 6px; margin-left: auto; }
.portada-nav a { color: var(--neola-tinta-2); font-weight: 700; font-size: 15px; text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.portada-nav a:hover { color: var(--neola-tinta); background: var(--neola-fondo); }

.portada-heroe {
  position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 110px);
  background:
    radial-gradient(60% 60% at 85% 20%, rgba(63, 108, 223, .12), transparent 70%),
    radial-gradient(40% 50% at 10% 90%, rgba(231, 139, 0, .08), transparent 70%);
}
.portada-heroe-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.portada-heroe h1 { font-size: clamp(36px, 5vw, 62px); line-height: 1.04; letter-spacing: -.035em; margin: 18px 0 20px; font-weight: 800; max-width: 14ch; }
.portada-heroe-texto > p { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--neola-tinta-2); margin: 0 0 32px; max-width: 52ch; }
.portada-acciones { display: flex; flex-wrap: wrap; gap: 12px; }
.portada-puntos { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.portada-puntos li { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--neola-tinta-2); }
.portada-puntos li::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--neola-exito-suave) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E9E5A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Teléfono de muestra */
.portada-telefono { position: relative; display: grid; place-items: center; padding: 20px 0; }
.telefono {
  position: relative; width: min(340px, 82vw); aspect-ratio: 9 / 18.6; border-radius: 48px; padding: 12px;
  background: linear-gradient(145deg, #222D45, #0E1628); box-shadow: var(--neola-sombra-alta), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
  transform: rotate(-2deg); animation: flotar 7s ease-in-out infinite;
}
.telefono-isla { position: absolute; top: 22px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 20px; background: #0B1220; z-index: 3; }
.telefono-pantalla { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: #F4F6FB; display: flex; flex-direction: column; }
.telefono-barra { display: flex; justify-content: space-between; align-items: flex-end; padding: 58px 20px 10px; font-size: 13px; color: var(--neola-tinta-2); }
.telefono-barra b { color: var(--neola-tinta); font-size: 13px; }
.telefono-mapa { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 6px; }
.telefono-mapa .escena { width: 112%; max-width: none; margin-left: -6%; }
.telefono-mapa .escena text { font-size: 15px; }
.telefono-hoja {
  display: grid; gap: 6px; padding: 12px 20px 26px; background: #fff; border-radius: 26px 26px 0 0;
  box-shadow: 0 -10px 30px rgba(20, 33, 61, .08);
}
.hoja-asa { justify-self: center; width: 40px; height: 5px; border-radius: 5px; background: var(--neola-borde); margin-bottom: 6px; }
.telefono-hoja strong { font-size: 18px; letter-spacing: -.01em; }
.hoja-eta { color: var(--neola-tinta-2); font-size: 14px; font-weight: 600; }
.hoja-pasos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 6px; }
.hoja-pasos i { height: 6px; border-radius: 6px; background: var(--neola-borde-suave); }
.hoja-pasos i.hecho { background: var(--neola-azul); }
.hoja-pasos i.activo { background: linear-gradient(90deg, var(--neola-azul) 0 50%, var(--neola-borde-suave) 50%); background-size: 200% 100%; animation: avance 2.4s ease-in-out infinite; }
.hoja-moto { display: flex; align-items: center; gap: 12px; padding-top: 6px; }
.hoja-moto b { display: block; font-size: 14.5px; }
.hoja-moto small { display: block; color: var(--neola-tinta-3); font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.hoja-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--neola-azul-suave); color: var(--neola-azul-oscuro); font-weight: 800; flex: none; }
.flotante {
  position: absolute; display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px;
  background: #fff; box-shadow: var(--neola-sombra-alta); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.flotante-1 { top: 14%; left: -2%; animation: flotar 6s ease-in-out -1.5s infinite; }
.flotante-2 { bottom: 16%; right: -3%; animation: flotar 6.5s ease-in-out -3s infinite; }
.punto { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.punto-azul { background: var(--neola-azul); box-shadow: 0 0 0 4px var(--neola-azul-suave); }
.punto-verde { background: var(--neola-exito); box-shadow: 0 0 0 4px var(--neola-exito-suave); }

/* Secciones */
.portada-seccion { padding: clamp(64px, 9vw, 120px) 0; }
.portada-seccion-suave { background: var(--neola-fondo); }
.seccion-cabeza { max-width: 720px; margin-bottom: 48px; }
.seccion-cabeza h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -.03em; margin: 14px 0 16px; font-weight: 800; }
.seccion-cabeza p { margin: 0; font-size: 17.5px; line-height: 1.6; color: var(--neola-tinta-2); }

.flujo { display: grid; grid-template-columns: 1fr 64px 1.05fr 64px 1fr; align-items: center; gap: 0; }
.flujo-grupo { display: grid; gap: 12px; }
.flujo-tarjeta {
  display: grid; gap: 4px; padding: 18px 20px; border-radius: 18px; background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--neola-borde-suave), var(--neola-sombra);
}
.flujo-tarjeta b { font-size: 16px; }
.flujo-tarjeta small { color: var(--neola-tinta-3); font-size: 13.5px; font-weight: 600; }
.flujo-centro {
  display: grid; justify-items: center; text-align: center; gap: 10px; padding: 34px 24px; border-radius: 26px; color: #fff;
  background: radial-gradient(120% 120% at 100% 0%, #3F6CDF, #1E3874 70%); box-shadow: 0 24px 50px rgba(43, 85, 200, .32);
}
.flujo-logo { height: 30px; width: auto; color: #fff; }
.flujo-centro b { font-size: 20px; letter-spacing: -.01em; }
.flujo-centro small { color: rgba(255, 255, 255, .75); font-size: 13.5px; font-weight: 600; line-height: 1.5; max-width: 26ch; }
.flujo-flecha { position: relative; height: 2px; margin: 0 8px; background: repeating-linear-gradient(90deg, var(--neola-naranja) 0 8px, transparent 8px 16px); background-size: 32px 2px; animation: flujo 1s linear infinite; }
.flujo-flecha span { position: absolute; right: -4px; top: -5px; border: 6px solid transparent; border-left: 8px solid var(--neola-naranja); }

.funciones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.funcion { padding: 28px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--neola-borde-suave); transition: transform .25s var(--neola-curva), box-shadow .25s; }
.funcion:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1.5px var(--neola-borde-suave), var(--neola-sombra); }
.funcion-icono { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--neola-azul-suave); color: var(--neola-azul-oscuro); margin-bottom: 20px; }
.funcion:nth-child(3n + 2) .funcion-icono { background: var(--neola-naranja-suave); color: #B86E00; }
.funcion-icono svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.funcion h3 { margin: 0 0 10px; font-size: 19px; letter-spacing: -.01em; }
.funcion p { margin: 0; color: var(--neola-tinta-2); font-size: 15.5px; line-height: 1.6; }

.marcas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.marca-tarjeta { display: grid; border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--neola-tinta); background: #fff; box-shadow: inset 0 0 0 1.5px var(--neola-borde-suave); transition: transform .25s var(--neola-curva), box-shadow .25s; }
.marca-tarjeta:hover { transform: translateY(-4px); box-shadow: var(--neola-sombra-alta); }
.marca-tarjeta-cabeza { display: grid; place-items: center; height: 150px; background: radial-gradient(120% 120% at 100% 0%, var(--color-marca), var(--color-marca-oscuro)); padding: 24px; }
.marca-tarjeta-cabeza img { max-height: 92px; width: auto; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18)); }
.marca-tarjeta-inicial { font-size: 54px; font-weight: 800; color: #fff; }
.marca-tarjeta-cuerpo { display: grid; gap: 6px; padding: 20px 22px 22px; }
.marca-tarjeta-cuerpo b { font-size: 18px; }
.marca-tarjeta-cuerpo small { color: var(--neola-tinta-2); font-size: 14.5px; line-height: 1.5; }
.marca-tarjeta-ir { margin-top: 8px; font-weight: 800; font-size: 14.5px; color: var(--color-marca-oscuro); }

.portada-cierre { padding: 0 0 clamp(64px, 9vw, 110px); }
.portada-cierre-caja {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: clamp(32px, 5vw, 56px); border-radius: 30px; color: #fff;
  background: radial-gradient(90% 140% at 100% 0%, rgba(63, 108, 223, .6), transparent 60%), linear-gradient(150deg, #14213D, #1E3874);
}
.portada-cierre h2 { margin: 0 0 10px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.025em; line-height: 1.1; }
.portada-cierre p { margin: 0; color: rgba(255, 255, 255, .75); font-size: 16.5px; line-height: 1.6; max-width: 56ch; }

.portada-pie { border-top: 1px solid var(--neola-borde-suave); padding: 28px 0; font-size: 14px; color: var(--neola-tinta-3); }
.portada-pie-fila { display: flex; align-items: center; gap: 14px 28px; flex-wrap: wrap; }
.marca-pie { font-size: 14px; }
.portada-pie nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.portada-pie a { color: var(--neola-tinta-2); font-weight: 700; text-decoration: none; }
.portada-pie a:hover { color: var(--neola-azul); }

/* Aparición al desplazarse (ver paginas.js) */
.js .revelar { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--neola-curva), transform .7s var(--neola-curva); }
.js .revelar.visible { opacity: 1; transform: none; }
@media print { .js .revelar { opacity: 1; transform: none; } }

@media (max-width: 1020px) {
  .portada-heroe-grid { grid-template-columns: 1fr; }
  .portada-heroe h1 { max-width: 18ch; }
  .flujo { grid-template-columns: 1fr; gap: 0; }
  .flujo-flecha { width: 2px; height: 44px; margin: 8px auto; background: repeating-linear-gradient(180deg, var(--neola-naranja) 0 8px, transparent 8px 16px); background-size: 2px 32px; animation-name: flujo-vertical; }
  .flujo-flecha span { right: auto; left: -5px; top: auto; bottom: -6px; border: 6px solid transparent; border-top: 8px solid var(--neola-naranja); }
  .funciones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .portada-nav { display: none; }
  .portada-cabeza-fila { justify-content: space-between; height: 64px; }
  .funciones { grid-template-columns: 1fr; }
  .flotante { font-size: 12.5px; padding: 10px 12px; }
  .flotante-1 { left: 0; }
  .flotante-2 { right: 0; }
  .portada-pie nav { margin-left: 0; }
}

@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes sacudir { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes flotar { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes avance { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes flujo { to { background-position: 32px 0; } }
@keyframes flujo-vertical { to { background-position: 0 32px; } }
