/* Portada de bienvenida · Lima Resiliente (portada.js). Va encima del visor: el mapa 3D carga detrás mientras se lee. */
#portada { position: fixed; inset: 0; z-index: 30; overflow-y: auto; color: #e9eef5; font-family: 'Segoe UI', Inter, system-ui, sans-serif;
  transition: opacity .55s ease, visibility .55s; }
#portada.sale { opacity: 0; visibility: hidden; pointer-events: none; }
#portada .p-fondo { position: fixed; inset: 0; background: #0b1424 url('portada_fondo.jpg') 62% center / cover no-repeat;
  animation: p-zoom 40s ease-in-out infinite alternate; }
@keyframes p-zoom { from { transform: scale(1.02) } to { transform: scale(1.09) } }
#portada .p-velo { position: fixed; inset: 0;
  background: linear-gradient(100deg, rgba(6, 13, 26, .93) 0%, rgba(6, 13, 26, .78) 38%, rgba(6, 13, 26, .30) 66%, rgba(6, 13, 26, .14) 100%),
              linear-gradient(0deg, rgba(6, 13, 26, .55) 0%, rgba(6, 13, 26, 0) 35%); }
/* mientras la portada está abierta, los paneles del visor (que carga detrás) no se ven */
body.con-portada .panel, body.con-portada #andi_btn, body.con-portada #andi_burbuja, body.con-portada #chat,
body.con-portada .cesium-viewer-bottom, body.con-portada .cesium-viewer-fullscreenContainer { visibility: hidden; }
#portada .p-cont { position: relative; min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 460px);
  gap: 48px; align-items: center; padding: 48px clamp(24px, 6vw, 96px); box-sizing: border-box; }

/* izquierda: nombre y explicación */
#portada .p-marca { max-width: 640px; animation: p-izq .7s ease both; }
#portada .p-logo { width: 84px; height: auto; animation: p-flota 5s ease-in-out infinite; filter: drop-shadow(0 6px 18px rgba(0,0,0,.4)); }
@keyframes p-flota { 0%, 100% { transform: translateY(0) rotate(0) } 50% { transform: translateY(-6px) rotate(8deg) } }
#portada h1 { margin: 18px 0 0; font-size: clamp(40px, 5.6vw, 68px); line-height: 1.02; font-weight: 800; letter-spacing: -.5px; }
#portada .p-sub { margin-top: 10px; font-size: clamp(18px, 2vw, 24px); font-weight: 300; color: #8fdcf0; letter-spacing: .2px; }
#portada .p-franja { width: 180px; height: 4px; border-radius: 2px; margin: 22px 0 20px;
  background: linear-gradient(90deg, #FCCC00, #78C03C, #3C9C48, #24849C, #24A8C0, #009CE4); }
#portada .p-desc { font-size: clamp(15px, 1.35vw, 18px); line-height: 1.6; color: #c8d3e0; margin: 0; font-weight: 300; }
#portada .p-desc b { color: #fff; font-weight: 600; }
#portada .p-cifras { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 14px 30px; margin-top: 30px; }
@media (max-width: 1250px) { #portada .p-cifras { grid-template-columns: repeat(2, auto); } }
#portada .p-cifra b { display: block; font-size: 30px; font-weight: 800; color: #fff; line-height: 1.1; }
#portada .p-cifra span { font-size: 12.5px; color: #9fb0c4; letter-spacing: .3px; }
#portada .p-cifras:empty { display: none; }

/* derecha: tarjeta */
#portada .p-tarjeta { background: #fff; color: #12233b; border-radius: 18px; padding: 30px 30px 22px; box-shadow: 0 24px 60px rgba(0,0,0,.45);
  animation: p-der .7s .1s ease both; position: relative; }
@keyframes p-izq { from { opacity: 0; transform: translateX(-24px) } to { opacity: 1; transform: none } }
@keyframes p-der { from { opacity: 0; transform: translateX(24px) } to { opacity: 1; transform: none } }
#portada .p-tarjeta::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #FCCC00, #78C03C, #3C9C48, #24849C, #24A8C0, #009CE4); }
#portada .p-cab { display: flex; align-items: center; gap: 14px; }
#portada .p-andi { width: 54px; height: 66px; flex: none; }
#portada h2 { margin: 0; font-size: 24px; font-weight: 800; color: #0f2640; }
#portada .p-cab p { margin: 3px 0 0; font-size: 13.5px; color: #5d6d82; }
#portada .p-resumen { margin: 20px 0; padding: 18px 0; border-top: 1px solid #e3e9ef; border-bottom: 1px solid #e3e9ef; }
#portada .p-resumen > p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #24364d; }
#portada .p-resumen ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
#portada .p-resumen li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.45; color: #4b5c71; }
#portada .p-resumen li i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
#portada .p-esc { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 12px; border-radius: 10px;
  background: #eef7fb; border: 1px solid #cfe8f2; font-size: 13px; color: #1f4f68; }
#portada .p-esc b { color: #0f2640; }
#portada .p-esc svg { width: 20px; height: 20px; flex: none; fill: none; stroke: #009CE4; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#portada .p-entrar { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 18px; border: 0;
  border-radius: 12px; cursor: pointer; font: inherit; font-size: 16.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #009CE4, #24849C); box-shadow: 0 10px 24px rgba(0,156,228,.35); transition: transform .15s, box-shadow .15s, filter .15s; }
#portada .p-entrar:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(0,156,228,.45); filter: brightness(1.05); }
#portada .p-entrar:focus-visible { outline: 3px solid #FCCC00; outline-offset: 3px; }
#portada .p-entrar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* ingreso con credenciales */
#portada .p-login { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
#portada .p-login[hidden], #portada .p-sesion[hidden] { display: none; }
#portada .p-campo { position: relative; }
#portada .p-campo input { width: 100%; box-sizing: border-box; padding: 12px 42px; border: 1px solid #d5dee7; border-radius: 10px; background: #f6f9fb;
  font: inherit; font-size: 14.5px; color: #12233b; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
#portada .p-campo input::placeholder { color: #8a99ab; }
#portada .p-campo input:focus { background: #fff; border-color: #009CE4; box-shadow: 0 0 0 3px rgba(0,156,228,.15); }
#portada .p-campo .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: #8a99ab; pointer-events: none; }
#portada .p-campo:focus-within .ic { fill: #009CE4; }
#portada .p-ver { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; border-radius: 6px; display: flex; color: #8a99ab; }
#portada .p-ver:hover { color: #009CE4; } #portada .p-ver:focus-visible { outline: 2px solid #009CE4; }
#portada .p-ver svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#portada .p-opc { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
#portada .p-chk { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #4b5c71; cursor: pointer; user-select: none; }
#portada .p-chk input { width: 15px; height: 15px; accent-color: #009CE4; }
#portada .p-olv { font-size: 11.5px; color: #24849C; text-align: right; max-width: 55%; line-height: 1.3; }
#portada .p-err { background: #fdecea; border: 1px solid #f5c2bd; color: #a8261b; padding: 9px 12px; border-radius: 8px; font-size: 13px; text-align: center; }
#portada .p-err:empty { display: none; }
#portada .p-sesion { margin-bottom: 14px; font-size: 13px; color: #4b5c71; text-align: center; }
#portada .p-sesion b { color: #0f2640; }
#portada .p-sesion button { background: none; border: 0; padding: 0; font: inherit; color: #24849C; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#portada .p-entrar:disabled { opacity: .7; cursor: wait; transform: none; }
#portada .p-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
#portada .p-carga { margin-top: 10px; text-align: center; font-size: 12px; color: #6b7b8f; min-height: 16px; }
#portada .p-carga.ok { color: #3C9C48; }
#portada .p-aviso { margin: 16px 0 0; font-size: 11.5px; line-height: 1.5; color: #7a8899; text-align: center; }
#portada .p-pie { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e3e9ef; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; font-size: 11.5px; color: #7a8899; flex-wrap: wrap; }
#portada .p-pie img { height: 26px; width: auto; display: block; }
#portada .p-pie .por { display: flex; align-items: center; gap: 8px; }

@media (max-width: 960px) {
  #portada .p-cont { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px 28px; align-content: start; }
  #portada .p-velo { background: linear-gradient(180deg, rgba(6, 13, 26, .92) 0%, rgba(6, 13, 26, .78) 60%, rgba(6, 13, 26, .6) 100%); }
  #portada .p-tarjeta { max-width: 520px; width: 100%; box-sizing: border-box; justify-self: center; padding: 26px 20px 18px; }
  #portada .p-logo { width: 64px; }
  #portada .p-cifra b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { #portada *, #portada { animation: none !important; transition: none !important; } }

/* botón para volver a ver la portada (en el título del visor) */
#acerca_btn { background: none; border: 0; padding: 0; margin-left: 10px; color: var(--suave); font: inherit; font-size: 12px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; }
#acerca_btn:hover { color: var(--texto); }
