/* ==========================================================================
   La portada: lo que comparten la pantalla de inicio y «Acerca de».

   El mundo del que sale es el del propio documento: papel de seguridad
   (guilloche.js), la zona de lectura mecanica en monoespaciado y el ocre de la
   cedula amarilla junto a la tinta azul de la nueva. Usa los colores de
   estilo.css -el mismo azul, el mismo papel, en claro y en oscuro- y solo
   agrega lo que aqui es nuevo. Todo lleva el prefijo pt- para no chocar con la
   pantalla de revisar, que carga esta hoja pero no la usa.
   ========================================================================== */

:root {
  --pt-guilloche:     rgba(47, 75, 184, .13);
  --pt-letra-portada: "Bricolage Grotesque", var(--fuente-tit);
  --pt-letra-texto:   "Public Sans", var(--fuente);
  --pt-letra-mrz:     "IBM Plex Mono", var(--fuente-dato);
  /* la cedula amarilla: el ocre para texto, y el vivo para rellenos y bordes */
  --pt-ocre:          #8a5a06;
  --pt-ocre-vivo:     #d9a02b;
  /* la rampa del camino: interpolada en OKLab entre el papel y el azul, y
     validada en claro y en oscuro (es la misma del tablero) */
  --pt-paso-1: #9cb0e4;  --pt-paso-2: #7e97da;  --pt-paso-3: #627fcf;
  --pt-paso-4: #4765c4;  --pt-paso-5: #2f4bb8;
}

html[data-tema="oscuro"] {
  --pt-guilloche:     rgba(139, 166, 255, .17);
  --pt-ocre:          #f2c161;
  --pt-ocre-vivo:     #f0b840;
  --pt-paso-1: #45547c;  --pt-paso-2: #56679b;  --pt-paso-3: #677cbc;
  --pt-paso-4: #7991dd;  --pt-paso-5: #8ba6ff;
}

/* ---------------------------------------------------------- la portada --- */
.pt-portada {
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; border-radius: 16px; border: 1px solid var(--borde-suave);
  background: linear-gradient(180deg, var(--papel), var(--papel-2));
  box-shadow: var(--sombra);
}
.pt-guilloche { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  pointer-events: none; }
.pt-portada-cuerpo {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.2rem 2rem; align-items: end; padding: 1.7rem 1.9rem 1.5rem;
}

.pt-ceja {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0;
  font-family: var(--pt-letra-mrz); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--texto-2);
}
.pt-ceja i { width: 6px; height: 6px; border-radius: 50%; background: var(--verde); flex: none; }

.pt-titular {
  margin: .7rem 0 0; font-family: var(--pt-letra-portada); font-weight: 800;
  font-size: clamp(1.6rem, 3.1vw, 2.35rem); line-height: 1.04; letter-spacing: -.025em;
  color: var(--texto); text-wrap: balance;
}
/* font-weight: inherit porque estilo.css aligera todo <em> -el «opcional» de
   los formularios-, y aqui el azul tiene que pesar lo mismo que el resto */
.pt-titular em { font-style: normal; font-weight: inherit; color: var(--azul); }
.pt-entrada { margin: .6rem 0 0; font-family: var(--pt-letra-texto); font-size: .9rem;
  color: var(--texto-2); max-width: 44ch; line-height: 1.5; }
.pt-entrada a, .pt-mas { color: var(--azul); font-weight: 600; text-decoration: none; }
.pt-entrada a:hover, .pt-mas:hover { text-decoration: underline; }
.pt-mas { display: inline-block; margin-top: .6rem; font-family: var(--pt-letra-texto); font-size: .82rem; }

/* las cifras de quien lo usa */
.pt-cifras {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0;
  border: 1px solid var(--borde-suave); border-radius: 12px; overflow: hidden;
  background: var(--borde-suave);
}
.pt-cifras > div {
  background: color-mix(in srgb, var(--papel) 88%, transparent);
  padding: .7rem .85rem;
}
.pt-cifras dt { font-family: var(--pt-letra-texto); font-size: .72rem; color: var(--texto-2); }
.pt-cifras dd {
  margin: .15rem 0 0; font-family: var(--pt-letra-portada); font-weight: 800;
  font-size: 1.45rem; letter-spacing: -.025em; line-height: 1.05; color: var(--texto);
  font-variant-numeric: tabular-nums;
}
.pt-cifras dd small { font-family: var(--pt-letra-texto); font-weight: 500; font-size: .72rem;
  letter-spacing: 0; color: var(--suave); margin-left: .2rem; }

/* ------------------------------------------ la zona de lectura mecanica --- */
.pt-mrz {
  overflow: hidden; white-space: nowrap; user-select: none;
  font-family: var(--pt-letra-mrz); font-size: .7rem; letter-spacing: .2em;
  color: var(--suave); border-top: 1px solid var(--borde-suave);
  background: color-mix(in srgb, var(--papel-2) 80%, transparent);
  padding: .5rem 1.9rem;
}
.pt-mrz span { display: inline-block; padding-right: 1.4rem; }

/* ---------------------------------------------------- la cedula dibujada --- */
/* La de plantillas/_cedula.html, que llevan el inicio y «Acerca de». Los
   recuadros aparecen uno detras de otro y una franja la recorre una vez, como
   si se estuviera leyendo. */
.pt-cedula {
  position: relative; padding: 14px; border-radius: 14px; background: var(--papel);
  border: 1px solid var(--borde); box-shadow: var(--sombra);
}
.pt-cedula svg { display: block; width: 100%; height: auto; }
.pt-cedula-fondo { fill: var(--papel-2); stroke: var(--borde); }
.pt-foto { fill: var(--papel); stroke: var(--borde); }
.pt-silueta { fill: var(--borde); stroke: none; }
.pt-cedula text { stroke: none; }
.pt-t-rotulo { font-family: var(--pt-letra-mrz); font-size: 9px; letter-spacing: 1.2px; fill: var(--suave); }
.pt-t-titulo { font-family: var(--pt-letra-portada); font-size: 15px; font-weight: 800; fill: var(--texto); }
.pt-t-dato { font-family: var(--pt-letra-texto); font-size: 15px; font-weight: 600; fill: var(--texto); }
.pt-t-grande { font-size: 19px; }
.pt-t-chico { font-size: 14px; }
.pt-t-nota { font-family: var(--pt-letra-mrz); font-size: 7.5px; letter-spacing: .8px; }
.pt-t-bien { fill: var(--azul); }
.pt-t-ojo { fill: var(--pt-ocre); }
.pt-marco { fill: none; stroke-width: 1.4; stroke-dasharray: 4 3; animation: pt-aparece .5s ease-out both; }
.pt-marco-bien { stroke: var(--azul); }
.pt-marco-ojo { stroke: var(--pt-ocre-vivo); }
.pt-marco:nth-of-type(2) { animation-delay: .9s; }
.pt-marco:nth-of-type(3) { animation-delay: 1.1s; }
.pt-marco:nth-of-type(4) { animation-delay: 1.3s; }
.pt-marco:nth-of-type(5) { animation-delay: 1.5s; }
@keyframes pt-aparece { from { opacity: 0; } to { opacity: 1; } }
.pt-barrido {
  position: absolute; left: 8px; right: 8px; height: 90px; border-radius: 14px; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--azul) 22%, transparent), transparent);
  animation: pt-barre 2.4s cubic-bezier(.4, 0, .2, 1) .25s 1 forwards; opacity: 0;
}
@keyframes pt-barre {
  0% { top: 6px; opacity: 0; }
  15%, 85% { opacity: .85; }
  100% { top: calc(100% - 96px); opacity: 0; }
}
/* el codigo de barras del reverso, dibujado con rayas */
.pt-pdf417 {
  height: 22px; border-radius: 3px; opacity: .5;
  background-image: repeating-linear-gradient(90deg,
    var(--texto) 0 1px, transparent 1px 3px, var(--texto) 3px 5px, transparent 5px 6px,
    var(--texto) 6px 7px, transparent 7px 10px, var(--texto) 10px 13px, transparent 13px 14px);
}

@media (max-width: 760px) {
  .pt-portada-cuerpo { grid-template-columns: 1fr; padding: 1.3rem 1.2rem; }
  .pt-mrz { padding-inline: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-marco { animation: none; }
  .pt-barrido { display: none; }
}
