@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(fuentes/geist.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fuentes/geist-mono.woff2) format("woff2"); }

:root {
  --azul: #0b2c9c;
  --azul-oscuro: #071d6b;
  --azul-claro: #1c45c9;
  --rojo: #e3061b;
  --fondo: #ffffff;
  --fondo-2: #f3f5fa;
  --tinta: #0f1b3d;
  --tinta-2: #3a4560;
  --tenue: #6b7488;
  --linea: #e7eaf2;
  --linea-2: #d5dae6;
  --verde: #12804f;
  --ambar: #a35f00;
  --mal: #c4161c;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --marco: 1160px;
  --franjas: repeating-linear-gradient(90deg, var(--rojo) 0 3px, transparent 3px 8px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

[hidden] { display: none !important; }

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.logo { fill: currentColor; stroke: none; }

.marco { width: 100%; max-width: var(--marco); margin: 0 auto; padding: 0 32px; }

.mono { font-family: var(--mono); font-size: .88em; letter-spacing: -.01em; }

.rojo { color: var(--rojo); }

.antetitulo { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rojo); }

h1, h2, h3 { margin: 0; }

.titulo-seccion { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; color: var(--azul); }

.cabecera { position: sticky; top: 0; z-index: 10; background: var(--azul-oscuro); box-shadow: 0 6px 20px -8px rgba(7, 29, 107, .5); }
.cabecera__fila { display: flex; align-items: center; justify-content: center; height: 68px; }
.cabecera__logo img { display: block; height: 34px; width: auto; }

.cargando { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 140px; padding-bottom: 140px; color: var(--tenue); }
.cargando p { margin: 0; }
.cargando__punto { width: 10px; height: 10px; border-radius: 50%; background: var(--rojo); animation: latido 1s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .2; } }

.vacio { padding-top: 120px; padding-bottom: 140px; text-align: center; }
.vacio h1 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; color: var(--azul); margin-bottom: 14px; }
.vacio p { color: var(--tinta-2); max-width: 520px; margin: 0 auto; }

.portada { position: relative; overflow: hidden; background: #fff; }
.portada::before { content: ""; position: absolute; right: -6%; top: -30%; width: 55%; height: 140%; background: radial-gradient(closest-side, rgba(28, 69, 201, .09), transparent); pointer-events: none; }
.portada__grilla { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; padding-top: 64px; padding-bottom: 72px; }

.estado { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 28px; padding: 6px 14px 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.estado__punto { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.estado[data-estado="valido"] { display: none; }
.estado[data-estado="revocado"], .estado[data-estado="error"] { background: var(--mal); }
.estado[data-estado="en_registro"] { background: var(--ambar); }
.estado[data-estado="en_registro"] .estado__punto { animation: latido 1.2s ease-in-out infinite; }

.portada__nombre { font-size: clamp(32px, 4.4vw, 54px); font-weight: 700; line-height: 1.04; letter-spacing: -.04em; color: var(--azul); text-wrap: balance; }
.portada__programa { margin: 22px 0 0; font-size: clamp(17px, 1.7vw, 21px); font-weight: 600; line-height: 1.35; letter-spacing: -.015em; color: var(--tinta); text-wrap: balance; }
.portada__estado-texto { margin: 18px 0 0; color: var(--tinta-2); font-size: 15px; max-width: 440px; }
.portada__estado-texto:empty { display: none; }

.ficha { margin: 28px 0 0; padding: 4px 20px; background: var(--fondo-2); border-radius: 16px; }
.ficha div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--linea-2); }
.ficha div:last-child { border-bottom: 0; }
.ficha dt { font-size: 13px; color: var(--tenue); }
.ficha dd { margin: 0; font-size: 14.5px; font-weight: 500; word-break: break-word; }

.copiar { appearance: none; display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 10px 16px; border: 1.5px solid var(--linea-2); border-radius: 999px; background: #fff; color: var(--azul); font: 600 14px/1 var(--sans); cursor: pointer; transition: border-color .2s, background .2s; }
.copiar:hover { border-color: var(--azul); background: #f5f7ff; }
.copiar svg { width: 16px; height: 16px; }

.portada__documento { position: relative; margin: 0; }
.portada__documento::before { content: ""; position: absolute; left: -22px; bottom: -22px; width: 46%; height: 64px; background: var(--franjas); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.portada__documento::after { content: ""; position: absolute; right: -22px; top: -22px; width: 120px; height: 120px; border-radius: 0 28px 0 0; background: var(--rojo); z-index: 0; }
.hoja { position: relative; z-index: 1; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 6px rgba(7, 29, 107, .08), 0 30px 60px -20px rgba(7, 29, 107, .4); }
.hoja > img { display: block; width: 100%; height: auto; }

.hoja__pdf { position: relative; background: #fff; }
.hoja__pdf canvas { display: block; width: 100%; height: auto; }
.hoja__pdf--cargando { aspect-ratio: 1.414 / 1; background: linear-gradient(100deg, #f1f3f8 30%, #e6e9f1 50%, #f1f3f8 70%); background-size: 300% 100%; animation: brillo 1.4s linear infinite; }
.hoja__pdf--abrible { cursor: zoom-in; }
@keyframes brillo { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.dialogo--visor { width: min(980px, calc(100vw - 24px)); }
.visor { display: grid; gap: 12px; max-height: calc(100vh - 140px); overflow: auto; padding: 4px; background: var(--fondo-2); border-radius: 10px; }
.visor canvas { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 2px 8px rgba(15, 27, 61, .12); }

.hoja__tipografica { background: #fff; aspect-ratio: 1.414 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8% 10%; border-radius: 10px; border: 1px solid var(--linea); outline: 1px solid var(--linea); outline-offset: -8px; }
.hoja__tipografica img { height: 26px; width: auto; margin-bottom: 7%; }
.hoja__titulo { font-size: clamp(22px, 2.6vw, 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--rojo); }
.hoja__otorgado { margin: 3% 0 1.5%; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--tenue); }
.hoja__nombre { font-size: clamp(15px, 1.6vw, 20px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--azul); padding: 0 0 2%; border-bottom: 1px solid var(--linea-2); min-width: 60%; }
.hoja__programa { margin-top: 3%; font-size: clamp(11px, 1vw, 13px); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--tinta-2); max-width: 90%; }
.hoja__fecha { margin-top: 4%; font-size: 12px; color: var(--tenue); }

.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.opciones { padding-top: 40px; padding-bottom: 72px; }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; max-width: 860px; margin: 0 auto; }
.tarjeta { --marca: var(--rojo); display: flex; flex-direction: column; align-items: center; text-align: center; }
.tarjeta--linkedin .tarjeta__icono { color: #0a66c2; }
.tarjeta--polygon .tarjeta__icono { color: #7b3fe4; }
.tarjeta--pdf .tarjeta__icono { color: #ec1c24; }
.tarjeta__icono { display: grid; place-items: center; margin-bottom: 12px; }
.tarjeta__icono svg { width: 30px; height: 30px; }
.tarjeta h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; color: var(--tinta); }
.tarjeta p { margin: 6px 0 16px; max-width: 240px; font-size: 13.5px; line-height: 1.5; color: var(--tenue); }
.tarjeta__acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: auto; }

.pildora { appearance: none; display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border: 1.5px solid var(--rojo); border-radius: 6px; background: var(--rojo); color: #fff; font: 600 14px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.pildora:hover { background: #c20517; border-color: #c20517; }
.pildora--borde { background: #fff; color: var(--rojo); }
.pildora--borde:hover { background: #fff1f2; color: #c20517; }
.pildora:focus-visible { outline: 2px solid var(--rojo); outline-offset: 2px; }
.copiar:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }


.dialogo { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 24px; border: 0; border-radius: 16px; color: var(--tinta); box-shadow: 0 24px 64px rgba(14, 26, 51, .24); }
.dialogo--ancho { width: min(760px, calc(100vw - 32px)); }
.dialogo::backdrop { background: rgba(14, 26, 51, .45); backdrop-filter: blur(2px); }
.dialogo[open] { animation: abrir .18s ease-out; }
@keyframes abrir { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dialogo__cabecera { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.dialogo__cabecera h2 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.dialogo__cerrar { appearance: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--fondo-2); color: var(--tinta-2); cursor: pointer; }
.dialogo__cerrar:hover { background: var(--linea); }
.dialogo__cerrar:focus { outline: none; }
.dialogo__cerrar:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }
.dialogo__cerrar svg { width: 18px; height: 18px; }
.dialogo__texto { margin: 0 0 20px; font-size: 14.5px; color: var(--tinta-2); }

.soltar { position: relative; display: flex; align-items: center; gap: 16px; padding: 20px; border: 1.5px dashed var(--linea-2); border-radius: 12px; cursor: pointer; transition: border-color .2s, background .2s; }
.soltar:hover, .soltar--activo { border-color: var(--tinta); background: var(--fondo-2); }
.soltar:focus-within { outline: 2px solid var(--tinta); outline-offset: 3px; }
.soltar input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.soltar__icono { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--fondo-2); color: var(--tinta-2); }
.soltar__icono svg { width: 20px; height: 20px; }
.soltar strong { font-weight: 600; }
.soltar small { color: var(--tenue); font-size: 13px; }

.resultado-pdf { margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 600; }
.resultado-pdf[data-resultado="ok"] { color: var(--verde); background: #ecf6f0; }
.resultado-pdf[data-resultado="mal"] { color: var(--mal); background: #fbeceb; }
.resultado-pdf small { display: block; margin-top: 6px; font: 400 12px/1.5 var(--mono); color: var(--tenue); word-break: break-all; }

.tecnico { margin: 0; border-top: 1px solid var(--linea); }
.tecnico div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--linea); }
.tecnico dt { font-size: 13px; color: var(--tenue); }
.tecnico dd { margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; word-break: break-all; color: var(--tinta-2); }
.tecnico a { color: var(--tinta); text-decoration: underline; text-decoration-color: var(--linea-2); text-underline-offset: 3px; }
.tecnico a:hover { text-decoration-color: var(--tinta); }

.veredicto { display: flex; align-items: center; gap: 14px; margin: 4px 0 20px; padding: 16px 18px; border-radius: 12px; background: var(--fondo-2); }
.veredicto strong { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.veredicto div span { font-size: 13px; color: var(--tenue); }
.veredicto__icono { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--linea-2); }
.veredicto__icono svg { width: 20px; height: 20px; stroke-width: 2.6; }
.veredicto[data-estado="valido"] { background: #ecf6f0; }
.veredicto[data-estado="valido"] strong { color: var(--verde); }
.veredicto[data-estado="valido"] .veredicto__icono { background: var(--verde); }
.veredicto[data-estado="revocado"], .veredicto[data-estado="error"] { background: #fbeceb; }
.veredicto[data-estado="revocado"] strong, .veredicto[data-estado="error"] strong { color: var(--mal); }
.veredicto[data-estado="revocado"] .veredicto__icono, .veredicto[data-estado="error"] .veredicto__icono { background: var(--mal); }
.veredicto[data-estado="en_registro"] { background: #fdf5e7; }
.veredicto[data-estado="en_registro"] strong { color: var(--ambar); }
.veredicto[data-estado="en_registro"] .veredicto__icono { background: var(--ambar); }

.detalle { margin: 0 0 8px; }
.detalle div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.detalle div:first-child { border-top: 1px solid var(--linea); }
.detalle dt { font-size: 13px; color: var(--tenue); }
.detalle dd { margin: 0; font-size: 14.5px; font-weight: 500; word-break: break-word; }
.detalle dd small { display: block; font-weight: 400; color: var(--tenue); font-size: 13px; }
.detalle dd .mono { font-weight: 400; font-size: 12.5px; word-break: break-all; }
.detalle a { color: var(--tinta); text-decoration: underline; text-decoration-color: var(--linea-2); text-underline-offset: 3px; }
.detalle__insignia { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--verde); }
.detalle__insignia svg { width: 14px; height: 14px; stroke-width: 2.4; }
.detalle__titulo { display: block !important; padding: 18px 0 6px !important; border-bottom: 0 !important; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--tenue); }

.detalle-tecnico { margin-top: 16px; }
.detalle-tecnico summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--tinta-2); padding: 6px 0; }
.detalle-tecnico .tecnico { margin-top: 10px; }

.pie { position: relative; overflow: hidden; background: var(--azul-oscuro); color: rgba(255, 255, 255, .78); }
.pie::after { content: ""; position: absolute; right: 0; top: 0; width: 220px; height: 6px; background: var(--rojo); }
.pie::before { content: ""; position: absolute; right: 220px; top: 0; width: 180px; height: 6px; background: var(--franjas); -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000); }
.pie__fila { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 36px; padding-bottom: 40px; }
.pie img { height: 30px; width: auto; }
.pie p { margin: 0; font-size: 13px; max-width: 520px; text-align: right; }

.portada__grilla > *, .opciones { animation: aparecer .6s cubic-bezier(.2, .7, .2, 1) both; }
.portada__documento { animation-delay: .06s; }
.opciones { animation-delay: .1s; }
@keyframes aparecer { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 960px) {
  .portada__grilla { grid-template-columns: 1fr; gap: 48px; padding-top: 48px; padding-bottom: 56px; }
  .portada__documento { order: -1; margin: 0 14px 0 8px; }
}

@media (max-width: 600px) {
  .marco { padding: 0 20px; }
  .cabecera__fila { height: 60px; }
  .cabecera__logo img { height: 30px; }
  .portada__grilla { padding-top: 40px; }
  .portada__documento::after { width: 80px; height: 80px; right: -14px; top: -14px; border-radius: 0 20px 0 0; }
  .portada__documento::before { left: -14px; bottom: -14px; height: 44px; }
  .ficha { padding: 4px 16px; }
  .ficha div, .tecnico div, .detalle div { grid-template-columns: 1fr; gap: 2px; }
  .opciones { padding-top: 32px; padding-bottom: 56px; }
  .tarjetas { gap: 36px; }
  .dialogo { padding: 20px; }
  .pie__fila { flex-direction: column; align-items: flex-start; }
  .pie p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
