/* ==========================================================================
   pefactura.pe — hoja de estilos única (sin frameworks). Rediseño del 2026-12-02 (pedido del propietario): el mismo esquema de lunexa.pe y
   lunexo.pe (barra sólida pegada arriba, héroe con curvas, bolitas y olas, fondo con efecto en cada sección, botón píldora con resplandor y
   botón sólido, pie con olas), pero con los colores de PeFactura: azul de marca #1b18a1, azul medio #0072c6, celeste #09b5e1, azul marino
   #182752, naranja #ff5722 / #cf2d01 y rojo #c41a03 del logo.
   Reglas para tocarlo sin perder el 100 de PageSpeed (README.md):
    1. Un solo archivo, sin librerías. Si una regla no la usa ninguna página, se borra.
    2. Lo que se mueve sin parar anima SOLO transform, translate u opacity.
    3. TODA animación vive en el § 15, dentro de @media (prefers-reduced-motion: no-preference): con movimiento reducido todo queda quieto y
       completo. Nada de lo que se ve al abrir la página empieza oculto (.espera la pone js/sitio.js solo a lo que está fuera de pantalla).
    4. Cero style= y cero JavaScript en línea (la CSP del servidor es default-src 'self').
    5. Contraste ≥ 4,5:1 en el peor caso (se mide con _fuente/pruebas/contraste.js). Detrás del texto del héroe, curvas y bolitas suman muy poco
       blanco/celeste: si se sube su opacidad, correr la prueba.
    6. Colores solo por variables (§ 1). Una variable nueva de texto o de fondo se agrega a pruebas/contraste.js.
   Índice: 0 letra · 1 variables · 2 base · 3 utilidades y fondo de cada sección · 4 cabecera y mega menú · 5 botones · 6 migas · 7 héroe y portada
           8 texto · 9 tarjetas · 10 preguntas · 11 listas, pasos, planes, tablas · 12 franja de cierre y pie · 13 formulario, ruta en el sistema, prosa
           14 ejemplos de comprobantes · 15 movimiento · 16 la landing de la API y el portal /docs/
   ========================================================================== */

/* 0. Letra: Plus Jakarta Sans variable alojada aquí. font-display: optional = si no llegó a tiempo se queda el respaldo y nada salta (CLS 0).
   «Jakarta respaldo» es Arial con las métricas de Plus Jakarta Sans (README: «Letra»). */
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fuentes/plus-jakarta-sans.woff2") format("woff2-variations"), url("../fuentes/plus-jakarta-sans.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: optional; }
@font-face { font-family: "Jakarta respaldo"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); size-adjust: 103.2%; ascent-override: 100.6%; descent-override: 21.5%; line-gap-override: 0%; }

/* 1. Variables (el esquema de lunexa). Contrastes sobre blanco: --tinta 18,5:1, --tinta-suave 7,6:1, --marca 12,6:1; sobre --fondo-suave: --tinta-suave 7,1:1 */
:root {
    --tinta: #12131c;
    --tinta-suave: #494e63;
    --linea: #e0e5f1;
    --linea-fuerte: #c8cee0;
    --fondo: #ffffff;
    --fondo-suave: #f5f7fc;
    --fondo-tinte: #e6f0fb;
    --marca: #1b18a1;
    --marca-osc: #13117a;
    --marca-viva: #0072c6;
    --marca-clara: #a8dcff;
    --celeste: #09b5e1;
    --plumon: #ffd8c8;
    --naranja: #ff5722;
    --naranja-osc: #c52a00;
    --rojo: #c41a03;
    --verde: #15803d;
    --noche: #182752;
    --noche-2: #101c3e;
    --sobre-noche: #e8eeff;
    --sobre-noche-suave: #bcc8ea;
    --hero: linear-gradient(to left, #0090e4 0, #0a72d1 8%, #1b18a1 100%);          /* el del sitio original: el texto va a la izquierda, en la zona oscura */
    --hero-movil: linear-gradient(to left, #0a62b2, #1b18a1);                       /* en celular el texto ocupa todo el ancho: termina antes */
    --franja: linear-gradient(135deg, #0a58a8 0%, #1b33b0 45%, #1b18a1 100%);
    --degradado: linear-gradient(120deg, #1b18a1, #0f3fb8 55%, #0072c6);
    --naranja-grad: linear-gradient(to left, #cf2d01 0, #fd4a1c 100%);               /* el botón «Contáctenos» del sitio original */
    --boton-naranja: linear-gradient(to left, #c52a00, #dd3405);                    /* el mismo, más oscuro, para texto chico (blanco ≥ 4,5:1) */
    --naranja-titulo: #e64a19;                                                        /* títulos de sección: texto grande en negrita (3:1), 3,9:1 sobre blanco */
    --r-sm: 6px;
    --r: 10px;
    --r-lg: 14px;
    --sombra: 0 1px 2px rgba(18, 19, 28, .05), 0 12px 28px -14px rgba(27, 24, 161, .22);
    --sombra-alta: 0 2px 4px rgba(18, 19, 28, .05), 0 26px 48px -18px rgba(27, 24, 161, .34);
    --cab: 72px;
    --olas-alto: clamp(48px, 7vw, 100px);
    --ease: cubic-bezier(.2, .8, .2, 1);
    --resorte: cubic-bezier(.34, 1.56, .64, 1);
    /* Nombres anteriores: los siguen usando la landing de la API y el portal /docs/ (assets/api/estilos.css y docs/assets/docs.css, que no son de esta carpeta) */
    --azul: var(--marca);
    --azul-fuerte: var(--marca);
    --cielo: var(--marca-clara);
    --suave: var(--tinta-suave);
    --texto: var(--tinta-suave);
    --papel: #ffffff;
    --niebla: var(--fondo-suave);
    --letra: var(--fuente);
    --fuente: "Plus Jakarta Sans", "Jakarta respaldo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    interpolate-size: allow-keywords;
    color-scheme: light;
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--cab) + 16px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--fondo); color: var(--tinta); font-family: var(--fuente); font-size: clamp(1rem, .96rem + .2vw, 1.0625rem); line-height: 1.65; }
h1, h2, h3, h4 { margin: 0 0 .6em; color: var(--tinta); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.8vw, 2.4rem); }
h3 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; }
p, ul, ol { margin: 0 0 1em; }
:where(a) { color: var(--marca); text-decoration: none; }
a:hover { color: var(--marca-osc); }
/* Enlaces dentro de un texto: subrayados, para distinguirse por algo más que el color */
:where(p a, li a, td a, dd a, aside a):where(:not([class])) { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
::selection { background: var(--plumon); color: var(--tinta); }
:focus-visible { outline: 3px solid var(--marca-viva); outline-offset: 3px; border-radius: 6px; }
img, svg { max-width: 100%; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ancho { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left)); }
@media (min-width: 768px) { .ancho { padding-inline: 1.5rem; } }
.saltar { position: absolute; left: 12px; top: -80px; z-index: 100; padding: .75rem 1.1rem; border-radius: var(--r-sm); background: var(--tinta); color: #fff; font-weight: 700; }
.saltar:focus { top: 12px; color: #fff; }

/* 3. Utilidades y fondo de cada sección (pedido del propietario: «dale efectos CSS a cada sección»). Sin HTML extra: es el ::before de la sección,
   detrás del contenido y recortado a ella (overflow: clip). Secciones blancas: dos curvas muy suaves que asoman por dos esquinas y se mecen
   (se alternan las esquinas). Secciones .bloque-niebla: bolitas que suben sin fin. Azul de 8 % como máximo: el texto conserva su contraste. */
.bloque { padding-block: clamp(3rem, 7vw, 5rem); }
@supports (overflow: clip) {
    .bloque { position: relative; isolation: isolate; overflow: clip; }
    .bloque::before { content: ""; position: absolute; z-index: -1; inset: -3rem; pointer-events: none; --c1: min(15rem, 36vw); --c2: min(24rem, 58vw);
        background: radial-gradient(circle at 100% 0, rgba(27, 24, 161, .05) 0 var(--c1), rgba(27, 24, 161, .026) calc(var(--c1) + 1px) var(--c2), transparent calc(var(--c2) + 1px)),
            radial-gradient(circle at 0 100%, rgba(0, 114, 198, .05) 0 calc(var(--c1) * .85), rgba(0, 114, 198, .026) calc(var(--c1) * .85 + 1px) calc(var(--c2) * .85), transparent calc(var(--c2) * .85 + 1px)); }
    .bloque:nth-of-type(4n)::before, .bloque:nth-of-type(4n+1)::before {
        background: radial-gradient(circle at 0 0, rgba(27, 24, 161, .05) 0 var(--c1), rgba(27, 24, 161, .026) calc(var(--c1) + 1px) var(--c2), transparent calc(var(--c2) + 1px)),
            radial-gradient(circle at 100% 100%, rgba(0, 114, 198, .05) 0 calc(var(--c1) * .85), rgba(0, 114, 198, .026) calc(var(--c1) * .85 + 1px) calc(var(--c2) * .85), transparent calc(var(--c2) * .85 + 1px)); }
    .bloque-niebla::before, .bloque-niebla:nth-of-type(4n)::before, .bloque-niebla:nth-of-type(4n+1)::before { inset: 0 0 -360px; will-change: transform;
        background: radial-gradient(circle at 60px 40px, rgba(0, 114, 198, .08) 0 8px, transparent 9px), radial-gradient(circle at 330px 250px, rgba(27, 24, 161, .07) 0 10px, transparent 11px),
            radial-gradient(circle at 440px 140px, rgba(255, 255, 255, .95) 0 6px, transparent 7px), radial-gradient(circle at 190px 320px, rgba(255, 255, 255, .9) 0 4px, transparent 5px);
        background-size: 520px 360px; }
}
.bloque-niebla { background: var(--fondo-suave); }
.bloque-cabeza { max-width: 44rem; margin: 0 auto 2.5rem; text-align: center; }
.bloque-cabeza h2 { margin-bottom: .75rem; color: var(--naranja-titulo); }
.bloque-cabeza p:not(.antetitulo) { color: var(--tinta-suave); font-size: 1.1rem; }
.bloque-cabeza > :last-child { margin-bottom: 0; }
/* Etiqueta sobre los títulos */
.antetitulo { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1rem; padding: .3rem .9rem; border-radius: 50px; background: var(--fondo-tinte); color: var(--marca); font-size: .85rem; font-weight: 800; letter-spacing: .02em; }
.entrada { max-width: 44rem; font-size: 1.15rem; color: var(--tinta-suave); }
.centro { text-align: center; }
.centro .entrada, .centro > p { margin-inline: auto; }
.nota { font-size: .95rem; color: var(--tinta-suave); }
.rejilla-2, .rejilla-3, .rejilla-4 { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .rejilla-3 { grid-template-columns: repeat(2, 1fr); } .rejilla-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .rejilla-3 { grid-template-columns: repeat(3, 1fr); } .rejilla-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; align-items: center; } }
@media (min-width: 1100px) { .rejilla-4 { grid-template-columns: repeat(4, 1fr); } }
/* Las olas del pie se montan sobre el final de la última sección: se le suma su alto para que no tapen nada */
main > :last-child:not(.cta)::after { content: ""; display: block; height: var(--olas-alto); }

/* 4. Cabecera y menús, al estilo del sitio original de pefactura.pe (pedido del propietario, 2026-12-02). NO va pegada: está SOBRE el degradado azul de la primera
   sección (position: absolute) y se va al bajar. Tres piezas: la línea fina con WhatsApp, correo y horario arriba a la derecha; el logo en un bloque redondeado
   azul → celeste que sobresale a la izquierda; y la barra azul marino con el menú, con «Contáctenos» (naranja, radio chico) que sobresale a la derecha.
   Cada grupo es un <details name="mega">: abre sin JavaScript (js/sitio.js agrega hover, Escape, clic fuera, foco y la flechita). Mega menú rediseñado el 2026-12-02
   («no se entiende bien y no es moderno»): caja blanca redondeada con sombra y flechita blanca; columnas con título chico en mayúsculas; cada enlace es una tarjeta
   con nombre en negrita y su descripción en gris (y su ícono en un cuadrito si lo trae); Guías del sistema como franja de chips; pie con «Todos los…» y WhatsApp.
   En celular, la caja azul marino con el logo y la hamburguesa y un popover con acordeón (sin descripciones).
   Contrastes: blanco sobre #182752 14,5:1; #ff5722 sobre #182752 4,6:1 (grupo activo); #c2410c sobre #f5f7fc 4,9:1 (enlace del panel con el mouse);
   #494e63 sobre #f5f7fc 7,9:1 (descripciones). */
:root { --cab-alto: 112px; }
.cab { position: absolute; top: 0; left: 0; right: 0; z-index: 50; }
.cab > .ancho { max-width: 1250px; }
.cab-in { position: relative; padding-top: .9rem; }
.cab-arriba { display: none; }
.cab-barra { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding: .5rem .5rem .5rem 1rem; border-radius: 8px; background: var(--noche); }
.marca { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; color: #fff; font-size: 1.5rem; font-weight: 500; letter-spacing: -.01em; text-decoration: none; }
.marca:hover { color: #fff; }
.marca-ic { width: 40px; height: 40px; transition: rotate .5s var(--resorte); }
.marca:hover .marca-ic { rotate: -12deg; }
.marca-nombre { color: var(--naranja); }
.marca b { color: #fff; font-weight: 500; }
.burger { margin-left: auto; width: 48px; height: 48px; display: grid; place-items: center; border: 1.5px solid rgba(255, 255, 255, .45); border-radius: var(--r-sm); background: transparent; color: #fff; cursor: pointer; }
.burger .ic { grid-area: 1 / 1; width: 24px; height: 24px; }
.burger-cerrar { display: none; }
.cab:has(.nav:popover-open) .burger-menu { display: none; }
.cab:has(.nav:popover-open) .burger-cerrar { display: block; }
.nav-lista { list-style: none; margin: 0; padding: 0; }
.mega > summary, .nav-enlace { display: flex; align-items: center; justify-content: space-between; gap: .35rem; min-height: 48px; color: #fff; font-weight: 500; text-decoration: none; }
.mega > summary { list-style: none; cursor: pointer; }
.mega > summary::-webkit-details-marker { display: none; }
.mega-flecha { width: .7em; height: .7em; transition: rotate .3s var(--resorte); }
.mega[open] .mega-flecha { rotate: 180deg; }
.mega-titulo { display: flex; align-items: center; gap: .45rem; margin: 0 0 .5rem; padding: 0 .6rem; color: var(--tinta-suave); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mega-titulo .ic { width: 15px; height: 15px; color: var(--naranja-osc); }
.mega-col ul, .mega-chips { list-style: none; margin: 0; padding: 0; }
.mega-link { display: flex; align-items: flex-start; gap: .75rem; padding: .55rem .6rem; border-radius: 10px; color: var(--tinta); text-decoration: none; transition: background-color .2s; }
.mega-texto { min-width: 0; }
.mega-nombre { display: flex; align-items: center; gap: .4rem; font-size: .95rem; font-weight: 700; line-height: 1.3; transition: color .2s; }
.mega-desc { display: block; margin-top: .15rem; color: var(--tinta-suave); font-size: .84rem; font-weight: 500; line-height: 1.4; }
.mega-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--fondo-tinte); color: var(--marca); transition: background-color .2s, color .2s; }
.mega-ic .ic { width: 20px; height: 20px; }
.mega-link:hover, .mega-link:focus-visible { background: var(--fondo-suave); }
.mega-link:hover .mega-nombre, .mega-link:focus-visible .mega-nombre, .mega-link[aria-current="page"] .mega-nombre { color: #c2410c; }
.mega-link:hover .mega-ic, .mega-link:focus-visible .mega-ic { background: var(--naranja-grad); color: #fff; }
.mega-banda { display: grid; gap: .75rem; }
.mega-banda-titulo { color: var(--tinta); text-decoration: none; }
.mega-banda-titulo .ic { width: 1em; height: 1em; }
.mega-banda-titulo:hover .mega-nombre { color: #c2410c; }
.mega-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.mega-chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 34px; padding: .25rem .75rem .25rem .6rem; border: 1px solid var(--linea); border-radius: 999px; background: #fff; color: var(--tinta); font-size: .86rem; font-weight: 600; text-decoration: none; transition: border-color .2s, color .2s; }
.mega-chip .ic { width: 16px; height: 16px; color: var(--marca); }
.mega-chip:hover, .mega-chip[aria-current="page"] { border-color: var(--naranja); color: #c2410c; }
.mega-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.25rem; }
.mega-ayuda { display: inline-flex; align-items: center; gap: .5rem; min-height: 36px; color: var(--tinta-suave); font-size: .9rem; text-decoration: none; }
.mega-ayuda .ic { color: var(--verde); }
.mega-ayuda b { color: var(--tinta); }
.mega-ayuda:hover b { text-decoration: underline; text-underline-offset: .2em; }
.mega-todos { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.mega-todos a { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; color: var(--marca); font-size: .92rem; font-weight: 700; text-decoration: none; transition: color .2s, gap .2s; }
.mega-todos a:hover { gap: .55rem; color: #c2410c; }
.mega-todos .ic { width: 1em; height: 1em; }
.nav-contacto { display: grid; gap: .1rem; margin: .75rem 0 0; font-size: .92rem; }
.nav-contacto a, .nav-contacto span { display: inline-flex; align-items: center; gap: .5rem; min-height: 36px; color: #fff; }
.nav-contacto a { text-decoration: underline; text-underline-offset: .2em; }
.boton-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1rem; border-radius: 5px; background: var(--naranja-grad); color: #fff; font-size: 1.2rem; font-weight: 800; text-decoration: none; white-space: nowrap; transition: transform .25s; }
.boton-cta:hover, .boton-cta[aria-current] { background: linear-gradient(to left, #fd4a1c 0, #cf2d01 100%); color: #fff; transform: translateY(-2px); }
.cab :focus-visible { outline-color: #fff; }
.mega-panel :focus-visible { outline-color: var(--marca-viva); }
/* Celular y tableta: la caja azul marino y, debajo, el menú como popover con los grupos en acordeón */
@media (max-width: 991.98px) {
    .nav[popover] { position: fixed; top: 5.6rem; left: 16px; right: 16px; bottom: auto; width: auto; max-height: calc(100vh - 6.5rem); max-height: calc(100dvh - 6.5rem); margin: 0; padding: .5rem 1rem 1rem; border: 0; border-radius: 12px; background: var(--noche); color: #fff; overflow-y: auto; box-shadow: 0 24px 48px -16px rgba(5, 10, 40, .6); }
    .nav-item { border-bottom: 1px solid rgba(255, 255, 255, .16); }
    .mega > summary, .nav-enlace { padding: .5rem .25rem; font-size: 1.1rem; }
    .mega-panel { padding: 0 0 .75rem; }
    .mega-titulo { margin: .6rem 0 .2rem; padding: 0 .5rem; color: var(--sobre-noche-suave); font-size: .78rem; }
    .mega-titulo .ic { color: var(--sobre-noche-suave); }
    .mega-link { align-items: center; padding: .4rem .5rem; color: #fff; }
    .mega-desc { display: none; }
    .mega-ic { width: 30px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .1); color: #fff; }
    .mega-ic .ic { width: 17px; height: 17px; }
    .mega-link:hover, .mega-link:focus-visible { background: rgba(255, 255, 255, .1); }
    .mega-link:hover .mega-nombre, .mega-link:focus-visible .mega-nombre { color: #fff; }
    .mega-link[aria-current="page"] .mega-nombre { color: var(--marca-clara); }
    .mega-banda { margin: .6rem 0 0; padding: .6rem .5rem .7rem; border-radius: 10px; background: rgba(255, 255, 255, .06); }
    .mega-banda-titulo, .mega-banda-titulo:hover .mega-nombre { color: #fff; }
    .mega-chip { border-color: rgba(255, 255, 255, .28); background: transparent; color: #fff; }
    .mega-chip .ic { color: var(--marca-clara); }
    .mega-chip:hover, .mega-chip[aria-current="page"] { border-color: var(--marca-clara); color: #fff; }
    .mega-pie { padding: .4rem .5rem 0; }
    .mega-ayuda { display: none; }
    .mega-todos a, .mega-todos a:hover { color: var(--marca-clara); }
    .nav-acciones { display: grid; margin-top: 1rem; }
    .nav-acciones .boton-cta { width: 100%; }
}
/* Escritorio: la línea de contacto, el menú en línea y los paneles que cuelgan de la barra */
@media (min-width: 992px) {
    :root { --cab-alto: 140px; }
    .cab-in { padding-top: 0; }
    .cab-arriba { display: flex; justify-content: flex-end; align-items: center; height: 43px; font-size: .875rem; }
    .cab-arriba > * { display: inline-flex; align-items: center; gap: .35rem; padding: 0 25px; color: #fff; line-height: 1; }
    .cab-arriba > * + * { border-left: 1px solid #fff; }
    .cab-arriba > :last-child { padding-right: 0; }
    .cab-arriba a { font-size: 1rem; text-decoration: none; }
    .cab-arriba a:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
    .burger, .nav-contacto { display: none; }
    .nav[popover] { display: flex; position: static; inset: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: visible; flex: 1; align-items: center; justify-content: flex-end; }
    .nav-lista { display: flex; align-items: center; gap: .1rem; }
    .nav-item { position: static; }
    .mega > summary, .nav-enlace { padding: .6rem .6rem; font-size: 1rem; white-space: nowrap; transition: color .2s; }
    .mega > summary:hover, .mega[open] > summary, .nav-enlace:hover, .nav-actual > .mega > summary, .nav-actual > .nav-enlace { color: var(--naranja); }
    .nav-acciones { margin-left: .9rem; }
    .boton-cta { min-height: 44px; font-size: 1.1rem; }
    .mega-panel { position: absolute; left: 0; right: 0; top: calc(100% + .75rem); z-index: 60; }
    .mega-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -1rem; height: 1rem; }
    .mega-panel.mega-angosto { left: auto; width: 40rem; }
    .mega-panel.con-flecha::after { content: ""; position: absolute; z-index: 1; top: -7px; left: calc(var(--flecha) - 7px); width: 14px; height: 14px; border-top-left-radius: 3px; background: #fff; box-shadow: -1px -1px 0 rgba(16, 36, 100, .08); transform: rotate(45deg); }
    .mega-caja { overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(16, 36, 100, .08), 0 32px 70px -24px rgba(10, 24, 80, .5); }
    .mega-cuerpo { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 0 1rem; padding: 1.4rem 1.25rem 1.1rem; }
    .mega-2 { --n: 2; }
    .mega-3 { --n: 3; }
    .mega-4 { --n: 4; }
    .mega-col { min-width: 0; }
    .mega-banda { grid-template-columns: 14rem minmax(0, 1fr); align-items: center; gap: 1.25rem; margin: 0 1.25rem 1.25rem; padding: 1rem 1.25rem; border-radius: 12px; background: var(--fondo-tinte); }
    .mega-banda-titulo .mega-nombre { font-size: 1rem; }
    .mega-pie { padding: .55rem 1.85rem; border-top: 1px solid var(--linea); background: var(--fondo-suave); }
}
@media (min-width: 1200px) {
    :root { --cab-alto: 150px; }
    .cab-arriba { margin-right: 86px; }
    .cab-barra { min-height: 70px; margin-right: 86px; padding: 0; }
    .cab .marca { align-self: stretch; width: 352px; margin: -25px 0 -18px; padding-left: 58px; border-radius: 10px; background-image: linear-gradient(to left, #09b5e1 0, #1b18a1 100%); font-size: 2rem; }
    .cab .marca-ic { width: 50px; height: 50px; }
    .mega > summary, .nav-enlace { padding: .6rem .75rem; font-size: 1.125rem; }
    .nav-acciones { margin: 0 -86px 0 .9rem; }
    .boton-cta { min-height: 55px; padding: 0 20px; font-size: 1.25rem; }
}

/* 5. Botones, como los del sitio original: el de acción lleva el degradado naranja #cf2d01 → #fd4a1c, texto blanco en negrita (grande: 3:1 basta, 4,5:1 sobre #cf2d01)
   y radio chico; el secundario es azul marino o de contorno con el mismo radio. Nada de píldoras ni resplandores. */
.boton { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: 0 1.5rem; border: 1px solid transparent; border-radius: 5px; font: inherit; font-size: 1.05rem; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: transform .25s, box-shadow .25s, background-color .25s, border-color .25s, color .25s; }
.boton > span { display: inline-flex; align-items: center; gap: .5rem; }
.boton .ic { transition: transform .25s; }
.boton:hover .ic:last-child:not(:first-child) { transform: translateX(4px); }
.boton:hover { transform: translateY(-2px); }
.boton-grande { min-height: 56px; padding: 0 1.75rem; }
.boton-chico { min-height: 44px; padding: 0 1.15rem; font-size: 1rem; }
.boton-naranja { background: var(--naranja-grad); color: #fff; font-size: 1.2rem; }
.boton-naranja:hover { background: linear-gradient(to left, #fd4a1c 0, #cf2d01 100%); color: #fff; box-shadow: 0 12px 22px -14px #cf2d01; }
.boton-chico.boton-naranja { background: var(--boton-naranja); font-size: 1rem; }
.boton-azul { background: var(--noche); color: #fff; }
.boton-azul:hover { background: var(--noche-2); color: #fff; box-shadow: 0 12px 22px -14px var(--noche); }
.boton-claro { border-color: var(--linea-fuerte); background: #fff; color: var(--tinta); }
.boton-claro:hover { border-color: var(--marca); color: var(--marca); }
.boton-linea { border-color: var(--marca); background: transparent; color: var(--marca); }
.boton-linea:hover { background: var(--fondo-tinte); color: var(--marca-osc); }

/* 6. Migas: dentro del héroe, sobre el mismo azul, centradas (el generador las pone: construir.js › conHeroe) */
.migas { margin: 0 0 1rem; font-size: .9rem; }
.migas ol { display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem .45rem; margin: 0; padding: 0; list-style: none; }
.migas li { color: #fff; }
.migas li + li::before { content: "›"; margin-right: .45rem; color: var(--sobre-noche-suave); }
.migas a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: .2em; }
.migas a:hover { color: #fff; text-decoration-color: #fff; }
.migas [aria-current] { color: #fff; font-weight: 700; }

/* 7. Héroe: la portada (.heroe) y la portadilla de cada página interior (.portadilla) comparten el mismo fondo: el degradado de marca del sitio original (#1b18a1 a la
   izquierda → #0090e4 a la derecha; el texto va a la izquierda, en la zona oscura, y los últimos píxeles de la derecha son el celeste que no se apaga), bolitas de colores
   discretas que suben y las tres olas del borde inferior, del color de la sección que sigue. La cabecera (§ 4) va encima, por eso el héroe lleva el alto de ella arriba.
   El generador pone el fondo (construir.js › FONDO_HERO). La portada ocupa el alto de la pantalla (cabecera + héroe = 100svh, con min-height: crece si no cabe).
   En celular, donde el texto ocupa todo el ancho, el degradado termina antes (#0a62b2). Peor punto para el texto: pruebas/contraste.js. */
.heroe, .portadilla { position: relative; isolation: isolate; overflow: hidden; padding-block: calc(var(--cab-alto) + 1rem) calc(clamp(1.75rem, 3.5vw, 2.75rem) + var(--olas-alto)); background: var(--hero); color: #fff; text-align: center; }
@media (max-width: 600px) { .heroe, .portadilla { background: var(--hero-movil); } }
.heroe-portada { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; text-align: left; }
.hero-fondo { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-puntos { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.hero-puntos::before, .hero-puntos::after, .hero-puntos > span { content: ""; position: absolute; top: 0; left: 0; pointer-events: none; will-change: transform; }
.hero-puntos > span { right: -640px; bottom: -420px; background-image: radial-gradient(circle at 120px 300px, rgba(109, 74, 255, .6) 0 5px, transparent 6px), radial-gradient(circle at 470px 90px, rgba(255, 255, 255, .07) 0 4px, transparent 5px), radial-gradient(circle at 560px 360px, rgba(109, 74, 255, .6) 0 6px, transparent 7px); background-size: 640px 420px; }
.hero-puntos::before { right: 0; bottom: -360px; background-image: radial-gradient(circle at 60px 40px, rgba(255, 255, 255, .07) 0 8px, transparent 9px), radial-gradient(circle at 330px 250px, rgba(9, 181, 225, .15) 0 10px, transparent 11px), radial-gradient(circle at 440px 140px, rgba(109, 74, 255, .5) 0 5px, transparent 6px); background-size: 520px 360px; }
.hero-puntos::after { right: 0; bottom: -240px; background-image: radial-gradient(circle at 90px 60px, rgba(255, 201, 40, .75) 0 2px, transparent 3px), radial-gradient(circle at 330px 250px, rgba(255, 255, 255, .07) 0 2.5px, transparent 3.5px); background-size: 460px 360px; }
.hero-olas { position: absolute; z-index: -1; left: 0; right: 0; bottom: -1px; height: var(--olas-alto); overflow: hidden; pointer-events: none; }
.ola { position: absolute; left: 0; bottom: 0; width: 200%; max-width: none; height: 100%; }
.ola-2 { height: 80%; }
.ola-3 { height: 62%; }
.hero-olas .ola-1 { fill: #fff; fill-opacity: .14; }
.hero-olas .ola-2 { fill: var(--fondo); fill-opacity: .6; }
.hero-olas .ola-3 { fill: var(--fondo); }
:is(.heroe, .portadilla):has(+ .bloque-niebla) .hero-olas :is(.ola-2, .ola-3) { fill: var(--fondo-suave); }
.heroe h1, .portadilla h1 { color: #fff; }
.portadilla h1 { max-width: 56rem; margin: 0 auto .75rem; font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem); }
.portadilla .entrada { max-width: 44rem; margin: 0 auto; color: #fff; }
.portadilla .fecha, .portadilla .fiction-note { margin: .75rem auto 0; color: #fff; }
.portadilla :focus-visible, .heroe :focus-visible { outline-color: #fff; }
.portadilla p:has(> .boton) { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 1.5rem 0 0; }
.portadilla .antetitulo { display: none; }
/* La parte resaltada del titular: degradado de texto que se desliza dos veces y se queda quieto (el de la primera versión de lunexa). Sobre el héroe azul usa claros
   de la marca (blanco → celeste claro → naranja muy claro → blanco); en las secciones blancas, los azules de la marca. */
.degradado { background: linear-gradient(100deg, #fff 0%, #a8dcff 40%, #ffd8c8 70%, #fff 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.bloque .degradado { background-image: linear-gradient(100deg, var(--marca-osc) 0%, var(--marca) 40%, var(--marca-viva) 70%, var(--marca-osc) 100%); }
.etiqueta { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; color: #fff; font-size: clamp(1.05rem, 1rem + .5vw, 1.4rem); }
.heroe h1 { margin: 0 0 1rem; font-size: clamp(2.05rem, 1.2rem + 2.9vw, 3.1rem); line-height: 1.1; }
.heroe-lead { margin: 0 0 1.75rem; color: #fff; font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); }
.heroe-botones { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin: 0; }
.heroe-botones .boton-azul { border: 1px solid rgba(255, 255, 255, .3); }
/* Rediseño del 2026-12-02 («otra forma»): antetítulo en píldora de vidrio, tres puntos con check bajo los botones y, a la derecha, la ventana inclinada en 3D
   sobre un halo celeste con un anillo punteado, con dos tarjetas flotantes que cuentan la misma venta (la boleta aceptada y el stock que bajó). */
.heroe-portada .etiqueta { margin-bottom: 1rem; }
.etiqueta-pildora { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem 1rem .4rem .8rem; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: clamp(.95rem, .9rem + .3vw, 1.1rem); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.heroe-puntos-check { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 2rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid rgba(255, 255, 255, .2); list-style: none; color: #fff; font-size: .9rem; font-weight: 600; }
.heroe-puntos-check li { display: inline-flex; align-items: center; gap: .45rem; }
.heroe-puntos-check .ic { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #7ee2a8; }
.heroe-escena { position: relative; }
.heroe-escena::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 118%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgba(9, 181, 225, .42) 0%, rgba(9, 181, 225, .12) 45%, transparent 68%); pointer-events: none; }
.heroe-escena::after { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 92%; aspect-ratio: 1; translate: -50% -50%; border: 1.5px dashed rgba(255, 255, 255, .22); border-radius: 50%; pointer-events: none; }
.flota { position: absolute; z-index: 2; display: flex; align-items: center; gap: .65rem; padding: .65rem 1rem .65rem .65rem; border-radius: 14px; background: #fff; color: var(--tinta); box-shadow: 0 18px 40px -14px rgba(8, 10, 60, .55); font-size: .85rem; line-height: 1.3; }
.flota b, .flota small { display: block; }
.flota b { font-weight: 800; }
.flota small { color: var(--tinta-suave); font-size: .8rem; font-weight: 600; }
.flota-ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; }
.flota-ic .ic { width: 20px; height: 20px; }
.flota-sunat { left: -1.5rem; bottom: 1.5rem; }
.flota-sunat .flota-ic { background: #dcfce7; color: var(--verde); }
.flota-stock { right: -1rem; top: -1.75rem; }
.flota-stock .flota-ic { background: var(--fondo-tinte); color: var(--marca); }
@media (max-width: 767.98px) { .flota, .heroe-escena::after { display: none; } }
@media (max-width: 991.98px) { .heroe-puntos-check { justify-content: center; } }
@media (min-width: 992px) and (max-width: 1099.98px) { .heroe-puntos-check { justify-content: flex-start; } }
@media (min-width: 1100px) {
    .heroe-escena { perspective: 1600px; }
    .heroe .ventana { transform: rotateY(-11deg) rotateX(4deg); transform-origin: 40% 50%; transition: transform .6s var(--ease); }
    .heroe-imagen:hover .ventana { transform: none; }
    .flota-sunat { left: -2.75rem; bottom: 2rem; }
    .flota-stock { right: -.5rem; top: -2rem; }
}
.heroe-rejilla { display: grid; gap: 2.5rem; align-items: center; width: 100%; }
.heroe-imagen { width: 100%; max-width: 560px; margin-inline: auto; text-align: left; }
@media (max-width: 991.98px) { .heroe-portada { text-align: center; } .heroe-portada .etiqueta, .heroe-botones { justify-content: center; } }
/* Acción principal del héroe: el botón redondo de WhatsApp con sus anillos que laten (el «play» del sitio original) y su texto al lado */
.heroe-wa { display: inline-flex; align-items: center; gap: 1rem; min-height: 64px; color: #fff; text-align: left; text-decoration: none; }
.heroe-wa:hover { color: #fff; }
.heroe-wa-circulo { position: relative; isolation: isolate; display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #25a244; transition: scale .25s var(--resorte); }
.heroe-wa-circulo::before, .heroe-wa-circulo::after { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: 50%; background: rgba(255, 255, 255, .3); transform: scale(1.4); }
.heroe-wa-circulo::after { transform: scale(1.8); background: rgba(255, 255, 255, .16); }
.heroe-wa:hover .heroe-wa-circulo { scale: 1.08; }
.heroe-wa-circulo .ic { width: 34px; height: 34px; }
.heroe-wa-texto b, .heroe-wa-texto small { display: block; }
.heroe-wa-texto b { font-size: 1.1rem; font-weight: 800; line-height: 1.3; }
.heroe-wa-texto small { font-size: .92rem; }
.heroe-wa:hover .heroe-wa-texto b { text-decoration: underline; text-underline-offset: .2em; }
/* Portada en escritorio: el texto a la izquierda y la maqueta a la derecha, reducida con «zoom» (la ventana entera se achica, con su letra) */
@supports (zoom: 1) {
    @media (min-width: 1100px) {
        .heroe-rejilla { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 2.5rem; }
        .heroe-imagen { max-width: none; margin: 0; }
        .heroe .ventana { zoom: .68; }
    }
    @media (min-width: 1280px) { .heroe .ventana { zoom: .8; } }
}
@media (min-width: 992px) and (max-width: 1099.98px) { .heroe-portada .etiqueta, .heroe-botones { justify-content: flex-start; } .heroe-portada { text-align: left; } }
.ventana { overflow: hidden; border: 1px solid var(--linea); border-radius: var(--r-lg); background: #fff; color: var(--tinta); box-shadow: 0 40px 80px -30px rgba(8, 10, 60, .55); }
.ventana-barra { display: flex; align-items: center; gap: .45rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--linea); background: var(--fondo-suave); }
.ventana-barra span { width: 11px; height: 11px; border-radius: 50%; }
.ventana-barra span:nth-child(1) { background: #ff5f57; }
.ventana-barra span:nth-child(2) { background: #febc2e; }
.ventana-barra span:nth-child(3) { background: #28c840; }
.ventana-barra b { margin-left: .75rem; color: var(--tinta-suave); font-size: .85rem; font-weight: 700; }
.pos { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.25rem; padding: 1.25rem; }
.pos-buscar { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; padding: .7rem 1rem; border-radius: .8rem; background: var(--fondo-suave); color: var(--tinta-suave); font-size: .9rem; }
.pos-fila { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; padding: .75rem .25rem; border-bottom: 1px solid var(--linea); font-size: .9rem; }
.pos-fila b { font-weight: 700; }
.pos-fila span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; }
.pos-cant { display: inline-grid; place-items: center; min-width: 2rem; padding: .15rem .45rem; border-radius: .5rem; background: var(--fondo-tinte); color: var(--marca); font-weight: 800; font-size: .82rem; }
.pos-ticket { display: flex; flex-direction: column; gap: .55rem; padding: 1.1rem; border-radius: 1rem; background: var(--fondo-suave); font-size: .9rem; }
.pos-tipo { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .3rem; }
.pos-tipo span { padding: .3rem .6rem; white-space: nowrap; border-radius: 50px; background: #fff; color: var(--tinta-suave); font-weight: 700; font-size: .8rem; box-shadow: 0 0 0 1px var(--linea); }
.pos-tipo .activo { background: var(--degradado); color: #fff; box-shadow: none; }
.pos-linea { display: flex; justify-content: space-between; color: var(--tinta-suave); font-variant-numeric: tabular-nums; }
.pos-total { display: flex; justify-content: space-between; margin-top: .3rem; padding-top: .7rem; border-top: 1px dashed var(--linea-fuerte); font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pos-cobrar { margin-top: .5rem; padding: .8rem; border-radius: 5px; background: var(--boton-naranja); color: #fff; font-weight: 800; text-align: center; }
@media (max-width: 767.98px) { .pos { grid-template-columns: 1fr; padding: 1rem; } }
/* Primera sección de la portada: lo que antes ocupaba el héroe (el texto largo, las viñetas y el teléfono) */
.portada-contacto { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.5rem; margin: 2.25rem 0 0; }
.portada-contacto small { color: var(--tinta-suave); font-size: .95rem; }
.portada-contacto b { color: var(--tinta); }
.nota.centro { margin-top: 1.75rem; }
.lead { max-width: 46rem; margin: 0 auto 2rem; color: var(--tinta-suave); font-size: 1.2rem; text-align: center; }

/* 8. Texto */
.prosa { max-width: 780px; font-size: 1.05rem; }
.prosa h2 { margin: 2.5rem 0 1rem; font-size: 1.6rem; }
.prosa h3 { margin: 1.75rem 0 .6rem; }
.prosa > h2:first-child { margin-top: 0; }
.prosa ul:not([class]), .prosa ol:not([class]) { padding-left: 1.4rem; }
.prosa li + li { margin-top: .45rem; }
.lista-check { list-style: none; padding: 0; }
.lista-check li { position: relative; margin-bottom: .6em; padding-left: 2rem; }
.lista-check li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #dcfce7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.500l4 4 8-9' fill='none' stroke='%2315803d' stroke-width='2.600' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.aviso { margin: 0 0 1.5rem; padding: 1.25rem 1.5rem; border-left: 4px solid var(--marca); border-radius: var(--r-sm); background: var(--fondo-tinte); color: var(--tinta); }
.aviso p { color: var(--tinta); }
.aviso > :last-child { margin-bottom: 0; }
.fecha { margin: 1rem 0 0; color: var(--tinta-suave); font-size: .9rem; }
.fuentes { color: var(--tinta-suave); font-size: .94rem; }
.fuentes a { overflow-wrap: anywhere; }
.volver { margin-top: 2rem; text-align: center; font-weight: 700; }
.volver a { text-decoration: none; }
.volver a::after { content: " →"; }

/* 9. Tarjetas: blancas, con sombra azulada. Al pasar el mouse suben y les crece por abajo una barra naranja; la ficha del ícono pasa a azul lleno. */
.tarjetas { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin: 0 0 1.5rem; padding: 0; list-style: none; }
@media (min-width: 768px) { .tarjetas { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .tarjetas { grid-template-columns: repeat(3, 1fr); } .tarjetas:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tarjetas:is(:has(> :nth-child(4):last-child), :has(> :nth-child(8):last-child)) { grid-template-columns: repeat(4, 1fr); } }
.tarjeta, .caja, .pasos > li { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--linea); border-radius: var(--r-lg); background: #fff; box-shadow: var(--sombra); transition: transform .3s, box-shadow .3s, border-color .3s; }
.caja { padding: 1.75rem; }
.caja > :last-child { margin-bottom: 0; }
.tarjeta::after, .caja-luz::after, .pasos > li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--naranja); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s; pointer-events: none; }
.tarjeta:hover, .caja-luz:hover, .pasos > li:hover { transform: translateY(-6px); border-color: var(--marca-clara); box-shadow: var(--sombra-alta); }
.tarjeta:hover::after, .tarjeta:focus-within::after, .caja-luz:hover::after, .pasos > li:hover::after { transform: scaleX(1); }
.caja h3 { margin: 1.1rem 0 .5rem; }
.caja h3:first-child { margin-top: 0; }
.caja p:not([class]) { color: var(--tinta-suave); }
.caja-icono { margin: 0; line-height: 0; }
.caja-icono .ic, .tarjeta-ic { width: 52px; height: 52px; padding: 13px; border-radius: 15px; background: var(--fondo-tinte); color: var(--marca); transition: background-color .3s, color .3s; }
.caja:hover .caja-icono .ic, .tarjeta:hover .tarjeta-ic { background: var(--marca); color: #fff; }
.tarjeta-enlace { display: flex; flex-direction: column; gap: .5rem; height: 100%; padding: 1.75rem; border-radius: inherit; color: inherit; text-decoration: none; }
.tarjeta-enlace:hover { color: inherit; }
.tarjeta-ic { margin-bottom: .75rem; }
.tarjeta-titulo { color: var(--tinta); font-size: 1.2rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.tarjeta-texto { flex: 1; color: var(--tinta-suave); }
.tarjeta-ir { display: inline-flex; align-items: center; gap: .4rem; margin-top: .5rem; color: var(--marca); font-weight: 700; }
.tarjeta-ir .ic { transition: transform .3s; }
.tarjeta:hover .tarjeta-ir .ic { transform: translateX(5px); }
/* La franja azul: sus cajas son de vidrio claro sobre el degradado (blanco ≥ 6,8:1) */
.bloque-noche { background: var(--franja); color: #fff; }
.bloque-noche h2, .bloque-noche h3, .bloque-noche .bloque-cabeza h2 { color: #fff; }
.bloque-noche .bloque-cabeza p:not(.antetitulo) { color: var(--sobre-noche); }
.bloque-noche .caja p:not([class]) { color: #fff; }
.bloque-noche .antetitulo { background: rgba(255, 255, 255, .12); color: #fff; }
.bloque-noche a:not(.boton) { color: #fff; }
.bloque-noche .caja { border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .09); box-shadow: none; color: #fff; }
.bloque-noche .caja-icono .ic { background: rgba(255, 255, 255, .16); color: #fff; }
.bloque-noche .caja:hover .caja-icono .ic { background: #fff; color: var(--marca); }
.bloque-noche .centro { margin: 2rem 0 0; }
.bloque-noche .entrada, .bloque-noche .lead { color: #fff; }
.bloque-noche .pasos > li { border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .09); box-shadow: none; }
.bloque-noche .pasos h3, .bloque-noche .pasos p, .bloque-noche .api-step-detail { color: #fff; }
.bloque-noche .pasos > li::before { background: #fff; color: var(--marca); }
.bloque-noche .boton-claro { border-color: rgba(255, 255, 255, .7); background: transparent; color: #fff; }
.bloque-noche .boton-claro:hover { background: rgba(255, 255, 255, .14); color: #fff; }
@supports (overflow: clip) {
    .bloque.bloque-noche:nth-of-type(n)::before { inset: -3rem; background: radial-gradient(circle at 100% 0, rgba(255, 255, 255, .07) 0 min(15rem, 36vw), rgba(255, 255, 255, .035) calc(min(15rem, 36vw) + 1px) min(24rem, 58vw), transparent calc(min(24rem, 58vw) + 1px)),
        radial-gradient(circle at 0 100%, rgba(255, 255, 255, .06) 0 min(13rem, 30vw), transparent calc(min(13rem, 30vw) + 1px)); will-change: auto; }
}
.bloque-noche:focus-within a:focus-visible { outline-color: #fff; }

/* 10. Preguntas: cada una es un <details> visible para el buscador, con su número automático y el «+» que se vuelve «×» */
.preguntas { display: grid; gap: .85rem; margin: 0 0 1.5rem; counter-reset: faq; }
.pregunta { counter-increment: faq; border: 1px solid var(--linea); border-radius: var(--r); background: #fff; transition: border-color .25s, box-shadow .25s; }
.pregunta:hover { border-color: var(--marca-clara); }
.pregunta[open] { border-color: var(--marca); box-shadow: var(--sombra); }
.pregunta summary { display: flex; align-items: center; gap: 1rem; min-height: 60px; padding: .75rem 1.25rem; list-style: none; cursor: pointer; font-weight: 700; line-height: 1.4; }
.pregunta summary::-webkit-details-marker { display: none; }
.pregunta summary::before { content: counter(faq, decimal-leading-zero); content: counter(faq, decimal-leading-zero) / ""; flex: none; color: var(--marca); font-weight: 800; font-variant-numeric: tabular-nums; }
.pregunta summary::after { content: "+"; content: "+" / ""; flex: none; margin-left: auto; color: var(--marca-viva); font-size: 1.7rem; line-height: 1; transition: transform .3s; }
.pregunta[open] > summary::after { transform: rotate(45deg); }
.pregunta summary:hover { color: var(--marca); }
.pregunta > div { padding: 0 1.25rem 1.1rem 3.6rem; color: var(--tinta-suave); }
.pregunta > div > :last-child { margin-bottom: 0; }
@supports (selector(::details-content)) {
    .pregunta::details-content { block-size: 0; overflow: clip; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete; }
    .pregunta[open]::details-content { block-size: auto; }
}
@media (max-width: 575.98px) { .pregunta summary { gap: .75rem; padding: .75rem 1rem; } .pregunta > div { padding: 0 1rem 1.1rem 3rem; } }
/* Título que va justo antes de las preguntas: un «?» azul delante */
h2:has(+ .preguntas) { display: flex; align-items: center; gap: .8rem; }
h2:has(+ .preguntas)::before { content: "?"; content: "?" / ""; flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--degradado); color: #fff; font-size: 1.2rem; font-weight: 800; line-height: 1; }

/* 11. Pasos numerados, planes, tablas y fichas */
.pasos { list-style: none; padding: 0; counter-reset: paso; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin-bottom: 1.5rem; }
.pasos > li { counter-increment: paso; padding: 1.75rem; }
.pasos > li::before { content: counter(paso); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1.1rem; border-radius: 50%; background: var(--degradado); color: #fff; font-weight: 800; font-size: 1.15rem; }
.pasos > li > :last-child { margin-bottom: 0; }
.pasos h3 { margin-bottom: .5rem; }
.pasos p { color: var(--tinta-suave); }
.planes { display: grid; gap: 1.5rem; margin-bottom: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 2rem; }
.plan-destacado { border: 2px solid var(--marca); box-shadow: var(--sombra-alta); }
.plan-etiqueta { align-self: flex-start; margin-bottom: .75rem; padding: .25rem .75rem; border-radius: 50px; background: var(--degradado); color: #fff; font-size: .8rem; font-weight: 800; }
.plan-precio { margin-bottom: .4rem; font-size: 2rem; font-weight: 800; line-height: 1.1; }
.plan-precio small { color: var(--tinta-suave); font-size: 1rem; font-weight: 700; }
.plan .lista-check { flex: 1; margin-top: 1rem; }
.tabla-marco { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--linea); border-radius: var(--r); background: #fff; }
.tabla-marco:focus-visible { outline-offset: 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
caption { padding: .85rem 1rem; text-align: left; font-weight: 800; }
th, td { padding: .8rem 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--linea); }
thead th { border-top: 0; background: var(--fondo-suave); font-weight: 800; white-space: nowrap; }
tbody tr { transition: background-color .2s; }
tbody tr:hover { background: var(--fondo-suave); }
/* Fichas (zonas de una ciudad, guías del sistema): tarjetas con una barra de color que baja al pasar el mouse */
.fichas { display: grid; gap: 1rem; margin: 1.25rem 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.fichas li { position: relative; overflow: hidden; padding: 1.2rem 1.5rem; border: 1px solid var(--linea); border-radius: var(--r); background: #fff; box-shadow: var(--sombra); transition: transform .3s, border-color .3s; }
.fichas li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--naranja); transform: scaleY(0); transform-origin: 50% 0; transition: transform .4s var(--ease); }
.fichas li:hover { transform: translateX(4px); border-color: var(--marca-clara); }
.fichas li:hover::before { transform: none; }
.fichas strong { display: block; margin-bottom: .2rem; }
.cinta { overflow: hidden; padding: 1rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cinta-pista { display: flex; gap: .6rem; width: max-content; margin: 0; padding: 0; list-style: none; }
.cinta li { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border: 1px solid var(--linea); border-radius: 50px; background: #fff; color: var(--tinta); font-weight: 700; font-size: .95rem; white-space: nowrap; }
.cinta .ic { color: var(--marca); }

/* 12. Franja de cierre (llamado a la acción): a todo lo ancho, en el azul de la marca, con texto blanco y dos curvas quietas (su ::before y su ::after).
   Va pegada al pie: las olas del pie suben sobre ella, por eso suma su alto abajo. */
.cta { padding: 0; }
.cta-caja { position: relative; isolation: isolate; overflow: hidden; padding: clamp(3.5rem, 8vw, 5.5rem) 16px calc(clamp(2.75rem, 6vw, 4.5rem) + var(--olas-alto)); background: var(--franja); color: #fff; text-align: center; }
.cta-caja::before, .cta-caja::after { content: ""; position: absolute; z-index: -1; aspect-ratio: 1; border-radius: 50%; pointer-events: none; }
.cta-caja::before { width: 46rem; right: -17rem; top: -31rem; background: rgba(255, 255, 255, .08); }
.cta-caja::after { width: 40rem; left: -18rem; bottom: -30rem; background: rgba(255, 255, 255, .06); }
.cta-titulo { max-width: 48rem; margin: 0 auto .75rem; color: #fff; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); }
.cta-caja p { max-width: 40rem; margin-inline: auto; color: #fff; font-size: 1.12rem; }
.cta-botones { display: flex; flex-wrap: wrap; gap: .85rem; justify-content: center; margin: 2rem auto 0 !important; }
.cta .boton-claro { border-color: rgba(255, 255, 255, .7); background: transparent; color: #fff; }
.cta .boton-claro:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.cta :focus-visible { outline-color: #fff; }
/* Pie azul marino. Arriba lleva las tres olas (construir.js › OLAS), del color del pie con tres transparencias: se montan sobre el final de la
   sección de arriba (la franja azul o una sección clara). */
.pie { position: relative; color: var(--sobre-noche); }
.pie-olas { position: relative; z-index: 1; height: var(--olas-alto); margin-top: calc(-1 * var(--olas-alto)); margin-bottom: -1px; overflow: hidden; pointer-events: none; }
.pie-olas .ola-1 { fill: var(--noche); fill-opacity: .3; }
.pie-olas .ola-2 { fill: var(--noche); fill-opacity: .55; }
.pie-olas .ola-3 { fill: var(--noche); }
.pie-cuerpo { position: relative; padding-block: clamp(2rem, 4vw, 3rem) 2rem; background: var(--noche); }
.pie-grid { display: grid; gap: 2.5rem; }
.pie-marca p { max-width: 24rem; margin: 1rem 0; }
.pie-contacto { list-style: none; margin: 0; padding: 0; }
.pie-contacto a, .pie-contacto span { display: inline-flex; align-items: center; gap: .55rem; min-height: 36px; color: #fff; font-weight: 600; }
.pie-contacto .ic { color: var(--marca-clara); }
.pie-contacto a:hover span, .pie-contacto a:hover { text-decoration: underline; text-underline-offset: .2em; }
.pie-cols { display: grid; gap: 1.75rem 1.5rem; grid-template-columns: repeat(2, 1fr); }
.pie-titulo { margin: 0 0 .6rem; color: var(--sobre-noche-suave); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pie ul { list-style: none; margin: 0; padding: 0; }
.enlace-sub { position: relative; display: inline-flex; align-items: center; min-height: 36px; color: #fff; font-size: .92rem; text-decoration: none; background: linear-gradient(var(--marca-clara), var(--marca-clara)) no-repeat 0 calc(50% + .85em) / 0 2px; transition: background-size .3s; }
.enlace-sub:hover, .enlace-sub:focus-visible { color: #fff; background-size: 100% 2px; }
.pie :focus-visible { outline-color: var(--marca-clara); }
.pie-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .16); font-size: .9rem; }
.pie-legal p { margin: 0; color: var(--sobre-noche); }
.pie-legal strong { color: #fff; }
.subir { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; color: #fff; font-weight: 700; text-decoration: none; transition: background-color .25s, transform .25s; }
.subir:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: translateY(-3px); }
.subir-ic { rotate: -90deg; }
@media (min-width: 640px) { .pie-cols { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .pie-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); } .pie-cols { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 601px) { .pie-legal { padding-right: 76px; } }   /* que el botón flotante de WhatsApp no tape «Volver arriba» */
/* Botón flotante de WhatsApp: sobrio (sin ondas), chico en el celular */
.wa-flotante { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--verde); color: #fff; box-shadow: 0 8px 20px rgba(10, 80, 40, .4); transition: transform .2s; }
.wa-flotante:hover { color: #fff; transform: scale(1.08); }
.wa-flotante .ic { width: 28px; height: 28px; }
@media (max-width: 600px) { .wa-flotante { right: 10px; bottom: 10px; width: 44px; height: 44px; box-shadow: 0 4px 12px rgba(10, 80, 40, .35); } .wa-flotante .ic { width: 24px; height: 24px; } .pie-legal { padding-bottom: 52px; } }
body:has(.nav:popover-open) .wa-flotante { display: none; }

/* 13. Formulario de contacto, ruta en el sistema («En PeFacturaPos: Inventario › Kardex», la pone el marcador {{menu:…}}) y contacto */
.formulario { display: grid; gap: 1.1rem; }
.campo { display: grid; gap: .4rem; }
.campo label { font-weight: 700; }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 48px; padding: .75rem .9rem; border: 1px solid #8a90a8; border-radius: .8rem; background: #fff; color: var(--tinta); font: inherit; transition: border-color .2s, box-shadow .2s; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 3px solid color-mix(in srgb, var(--marca-viva) 45%, transparent); border-color: var(--marca); }
.campo textarea { min-height: 110px; resize: vertical; }
.contacto-lista { list-style: none; padding: 0; display: grid; gap: .5rem; }
.contacto-lista li { display: flex; align-items: center; gap: .6rem; }
.contacto-lista a { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 700; text-decoration: none; }
.ruta-sistema { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: .35rem .75rem; border-radius: .8rem; background: var(--fondo-tinte); font-size: .95rem; line-height: 1.4; }
.ruta-sistema-titulo { display: inline-flex; align-items: center; gap: 6px; color: var(--tinta-suave); font-weight: 700; }
.ruta-sistema .ic { color: var(--marca); }
.ruta-sistema b { padding: 2px 9px; border-radius: .5rem; background: #fff; color: var(--marca); font-weight: 800; box-shadow: 0 0 0 1px var(--linea); }
.ruta-sep { color: var(--rojo); font-weight: 800; }
.lista-menus { list-style: none; padding: 0; display: grid; gap: .75rem; }
.lista-menus li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: .9rem 1rem; border: 1px solid var(--linea); border-radius: var(--r); background: #fff; }
.lista-menus .nota { flex-basis: 100%; }
.lista-menus .ruta-sistema-titulo { display: none; }

/* 14. Ejemplos de comprobantes (/ejemplos/, casos de don Pepe): comprobante dibujado, historia y línea de tiempo. Nada se anima. Las tablas del
   comprobante van dentro de .tabla-marco: en el celular se desplazan sin ensanchar la página. */
.fiction-note { max-width: 70ch; margin: 10px 0 0; color: var(--tinta-suave); font-size: .92rem; }
.story { margin-bottom: 1.3em; padding: 20px 22px; border: 1px solid var(--linea); border-radius: var(--r); background: var(--fondo-suave); }
.story > :last-child { margin-bottom: 0; }
.invoice { margin: 0 0 1.6em; padding: clamp(14px, 3vw, 26px); border: 1px solid var(--linea-fuerte); border-radius: var(--r-lg); background: #fff; box-shadow: var(--sombra); font-size: .95rem; line-height: 1.5; }
.invoice p { margin: 0; }
.invoice-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 2px solid var(--linea); }
.invoice-name { color: var(--tinta); font-size: 1.05rem; font-weight: 800; }
.invoice-id { min-width: 190px; padding: 10px 14px; border: 2px solid var(--rojo); border-radius: 12px; text-align: center; }
.invoice-type { color: var(--rojo); font-weight: 800; letter-spacing: .03em; }
.invoice-number { font-weight: 800; font-variant-numeric: tabular-nums; }
.invoice-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px 20px; margin: 0 0 14px; }
.invoice-data div { min-width: 0; }
.invoice-data dt { color: var(--tinta-suave); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.invoice-data dd { margin: 0; overflow-wrap: anywhere; }
.invoice .tabla-marco { margin-bottom: 14px; border-radius: 12px; }
.invoice table { font-size: .92rem; }
.invoice th, .invoice td { padding: 9px 12px; }
.amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.invoice-sum { width: auto; min-width: min(100%, 320px); margin: 0 0 14px auto; }
.invoice-sum th { color: var(--tinta-suave); font-weight: 700; }
.invoice-sum .invoice-total th, .invoice-sum .invoice-total td { border-top: 2px solid var(--tinta); color: var(--tinta); font-weight: 800; }
.invoice-legends { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--fondo-suave); font-size: .9rem; list-style: none; }
.invoice-legends li + li { margin-top: 4px; }
.invoice-caption { color: var(--tinta-suave); font-size: .88rem; }
@media (max-width: 560px) { .invoice-head { grid-template-columns: 1fr; } .invoice-id { min-width: 0; } }
.timeline { list-style: none; margin: 0 0 1.4em; padding: 0; }
.timeline > li { position: relative; padding: 0 0 26px 42px; }
.timeline > li::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: -8px; width: 2px; background: var(--linea); }
.timeline > li:last-child::before { display: none; }
.timeline > li::after { content: ""; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--rojo); box-shadow: 0 0 0 4px #ffe4e6; }
.timeline > li > :last-child { margin-bottom: 0; }
.timeline-step { margin: 0 0 4px; color: var(--rojo); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* 15. Movimiento. Todo lo que se anima está aquí, y solo cuando el usuario NO pidió movimiento reducido (con «reducir movimiento» todo queda quieto
   y completo). Solo transform, translate y opacity: corren en el compositor, no en el hilo principal. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    /* Héroe de la portada: el anillo punteado gira despacio y las tarjetas flotantes suben y bajan, cada una a su ritmo */
    .heroe-escena::after { animation: anillo-gira 60s linear infinite; }
    .flota { animation: flota 5s ease-in-out infinite alternate; }
    .flota-stock { animation-duration: 6s; animation-delay: -2.5s; }
    /* Mega menú: la caja entra subiendo un poco al abrir */
    .mega[open] .mega-caja { animation: mega-entra .22s var(--ease); }
    ::view-transition-group(root) { animation-duration: .25s; }
    /* Botón redondo de WhatsApp del héroe: dos anillos que laten (transform y opacity) */
    .heroe-wa-circulo::before, .heroe-wa-circulo::after { transform: none; background: rgba(255, 255, 255, .3); animation: onda-heroe 2s linear infinite; }
    .heroe-wa-circulo::after { animation-delay: 1s; }
    /* Fondo de cada sección: las curvas se mecen y las bolitas de las secciones suaves suben un mosaico (bucle sin salto) */
    .bloque::before { animation: fondo-mece 24s ease-in-out infinite alternate; }
    .bloque:nth-of-type(even)::before { animation-duration: 31s; animation-delay: -9s; }
    .bloque-niebla::before, .bloque-niebla:nth-of-type(even)::before { animation: puntos-suben-360 46s linear infinite; }
    /* Olas del héroe y del pie: cada capa a su ritmo y la del medio al revés. Cada dibujo mide el doble: -50 % empalma sin costura */
    .ola { animation: ola 20s linear infinite; }
    .ola-1 { animation-duration: 28s; animation-delay: -8s; }
    .ola-2 { animation-duration: 19s; animation-direction: reverse; }
    .ola-3 { animation-duration: 13s; animation-delay: -4s; }
    /* Bolitas del héroe: cada capa se desplaza justo un mosaico (bucle sin salto); las chicas además titilan */
    .hero-puntos > span { animation: puntos-diagonal 90s linear infinite; }
    .hero-puntos::before { animation: puntos-suben-360 38s linear infinite; }
    .hero-puntos::after { animation: puntos-suben-240 24s linear infinite, puntos-titilan 3s ease-in-out infinite alternate; }
    .cinta-pista { animation: cinta 40s linear infinite; }
    .cinta:hover .cinta-pista { animation-play-state: paused; }
    /* Titular con degradado de texto: se desliza dos veces y queda quieto */
    .degradado { animation: desliza 6s ease-in-out 2 both; }
    /* Aparecer con fundido lo que está debajo de la pantalla (js/sitio.js pone .espera con IntersectionObserver) */
    .aparece { transition: opacity .6s ease, translate .6s ease, transform .3s, box-shadow .3s, border-color .3s; }
    .aparece.espera { opacity: 0; translate: 0 26px; }
    .rejilla-3 > .aparece:nth-child(3n+2), .tarjetas > .aparece:nth-child(3n+2), .rejilla-4 > .aparece:nth-child(2) { transition-delay: .08s, .08s, 0s, 0s, 0s; }
    .rejilla-3 > .aparece:nth-child(3n), .tarjetas > .aparece:nth-child(3n), .rejilla-4 > .aparece:nth-child(3) { transition-delay: .16s, .16s, 0s, 0s, 0s; }
    /* Scroll vinculado (solo si el navegador lo soporta): barra de progreso de lectura */
    @supports (animation-timeline: scroll()) {
        body::before { content: ""; position: fixed; z-index: 60; top: 0; left: 0; width: 100%; height: 3px; pointer-events: none; background: var(--naranja); transform-origin: 0 50%; transform: scaleX(0); animation: progreso linear both; animation-timeline: scroll(root); }
    }
    @keyframes anillo-gira { to { rotate: 360deg; } }
    @keyframes flota { from { translate: 0 0; } to { translate: 0 -10px; } }
    @keyframes mega-entra { from { opacity: 0; transform: translateY(8px); } }
    @keyframes fondo-mece { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(1.25rem, -1rem, 0) scale(1.06); } }
    @keyframes ola { to { transform: translateX(-50%); } }
    @keyframes puntos-diagonal { to { transform: translate3d(-640px, -420px, 0); } }
    @keyframes puntos-suben-360 { to { transform: translate3d(0, -360px, 0); } }
    @keyframes puntos-suben-240 { to { transform: translate3d(0, -240px, 0); } }
    @keyframes puntos-titilan { from { opacity: 1; } to { opacity: .55; } }
    @keyframes cinta { to { transform: translateX(-50%); } }
    @keyframes progreso { to { transform: scaleX(1); } }
    @keyframes onda-heroe { from { transform: scale(1); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
    @keyframes desliza { from { background-position: 0 0; } to { background-position: 100% 0; } }
}

/* 16. La landing de la API (/api-facturacion-electronica/) y el portal /docs/. Sus páginas las generan scripts/generar-landing.js y generar-api.js desde landing/
   (no son de esta carpeta): toman de aquí la cabecera, el pie y esta hoja, y traen su capa propia (assets/api/estilos.css, docs/assets/docs.css), que se carga DESPUÉS.
   Por eso las reglas de abajo van con más especificidad (body.api-page …) y están aquí: ajustan esas páginas al diseño del sitio sin tocar su HTML.
   · Letra: esas páginas precargan Manrope (no Plus Jakarta Sans); con font-display: optional una letra que no se precarga no llega a tiempo. Se usa Manrope en ellas.
   · En ellas la cabecera va en el flujo, con su propio fondo azul (la sub-barra de la API o del portal queda fija debajo al bajar) y no sobre el héroe.
   · Su héroe (.heroe) y las portadillas no traen el fondo del § 7 en el HTML: las olas (quietas) se dibujan con ::after.
   · La ventana de código del héroe es oscura (VS Code Dark Modern); el resto del portal y de la landing, clara (Light Modern). */
@font-face { font-family: "Manrope"; src: url("../fuentes/manrope-latin.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: optional; }
@font-face { font-family: "Manrope respaldo"; src: local("Arial"), local("Liberation Sans"), local("Helvetica Neue"), local("Helvetica"); size-adjust: 101%; ascent-override: 105.55%; descent-override: 29.7%; line-gap-override: 0%; }
body.api-page { --fuente: "Manrope", "Manrope respaldo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body.api-page .cab { position: relative; padding-bottom: 1.5rem; background: var(--hero); }
body.api-page :is(.heroe, .portadilla) { padding-top: clamp(1.25rem, 3vw, 2.25rem); }
body.api-page .boton-wa { background: var(--naranja-grad); color: #fff; font-size: 1.2rem; }
body.api-page .boton-wa:hover { background: linear-gradient(to left, #fd4a1c 0, #cf2d01 100%); color: #fff; }
/* Barra de la API: sub-barra azul marino oscuro bajo la cabecera, fija al bajar, sin sombra propia; el botón es de línea (el naranja ya está arriba) */
body.api-page .api-bar { background: var(--noche-2); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 1px solid rgba(255, 255, 255, .12); }
body.api-page .api-bar:not(.api-bar-light) .api-bar-nav a { color: var(--sobre-noche); }
body.api-page .api-bar:not(.api-bar-light) .api-bar-nav a:hover, body.api-page .api-bar:not(.api-bar-light) .api-bar-nav a[aria-current] { background: rgba(255, 255, 255, .12); color: #fff; }
body.api-page .api-bar:not(.api-bar-light) .api-bar-cta { border: 1px solid rgba(255, 255, 255, .55); border-radius: 5px; background: transparent; color: #fff; box-shadow: none; }
body.api-page .api-bar:not(.api-bar-light) .api-bar-cta:hover { background: rgba(255, 255, 255, .14); color: #fff; }
body.api-page .api-bar-light { background: rgba(255, 255, 255, .96); }
body.api-page .api-bar :focus-visible { outline-color: var(--marca-clara); }
body.api-page .api-bar-light :focus-visible { outline-color: var(--marca-viva); }
/* Héroe y portadillas sin el fondo del § 7 en su HTML: las olas al borde inferior (quietas; el color es el de la sección que sigue) */
:is(.heroe, .portadilla):not(:has(> .hero-fondo))::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: -1px; height: var(--olas-alto); pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' fill-opacity='.14' d='M0 45C240 2 480 2 720 45S1200 88 1440 45V100H0Z'/%3E%3Cpath fill='%23fff' fill-opacity='.6' d='M0 52C240 90 480 90 720 52S1200 14 1440 52V100H0Z'/%3E%3Cpath fill='%23fff' d='M0 60C120 40 240 40 360 60S600 80 720 60S960 40 1080 60S1320 80 1440 60V100H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
:is(.heroe, .portadilla):not(:has(> .hero-fondo)):has(+ .bloque-niebla)::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' fill-opacity='.14' d='M0 45C240 2 480 2 720 45S1200 88 1440 45V100H0Z'/%3E%3Cpath fill='%23f5f7fc' fill-opacity='.6' d='M0 52C240 90 480 90 720 52S1200 14 1440 52V100H0Z'/%3E%3Cpath fill='%23f5f7fc' d='M0 60C120 40 240 40 360 60S600 80 720 60S960 40 1080 60S1320 80 1440 60V100H0Z'/%3E%3C/svg%3E"); }
/* Héroe de la landing: texto a la izquierda y la ventana de código a la derecha (en celular, apilados y centrados) */
body.api-page .api-hero { padding-top: 0; padding-bottom: calc(1.5rem + var(--olas-alto)); }
.api-hero-grid { display: grid; align-items: center; padding-block: clamp(1rem, 2.5vw, 1.75rem) 1.5rem; }
.api-hero .antetitulo { background: var(--marca-clara); color: #0e2a6a; }
.api-hero h1 { margin: .9rem 0 1rem; font-size: clamp(2rem, 1.2rem + 2.8vw, 3.1rem); line-height: 1.1; }
.api-hero .entrada { max-width: none; margin: 0 0 1.5rem; color: #fff; }
.api-hero .heroe-botones .boton { min-height: 56px; padding: 0 1.75rem; }
.api-hero .heroe-botones .boton-claro { border: 1px solid rgba(255, 255, 255, .3); border-radius: 14px; background: var(--noche); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 26px -14px rgba(16, 28, 62, .7); }
.api-hero .heroe-botones .boton-claro:hover { background: var(--noche-2); color: #fff; }
.api-hero .heroe-puntos { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; color: #fff; font-weight: 600; }
.api-hero .heroe-puntos .ic { color: var(--marca-clara); }
.api-hero .api-stat dt, .api-hero .api-hero-note { color: #fff; }
.api-hero .api-hero-note { padding-bottom: 0; }
.api-hero .api-stats { margin-bottom: 1rem; }
/* Portal en celular: el índice lateral es un cajón que su JavaScript saca del flujo al cargar; con scripting activado ya nace fuera del flujo (si no, al cargar empuja todo el contenido: CLS) */
@media (max-width: 1020px) and (scripting: enabled) {
    body.api-page .docs-sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 70; width: min(330px, 88vw); height: auto; border-right: 1px solid var(--linea); box-shadow: var(--sombra-alta); transform: translateX(-104%); visibility: hidden; }
}
body.api-page .api-crumbs ol, body.api-page .api-crumbs li { color: #fff; }
body.api-page .api-crumbs a { color: #fff; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: rgba(255, 255, 255, .45); }
body.api-page .api-form-submit { border-radius: 5px; background: var(--naranja-grad); color: #fff; font-size: 1.2rem; }
body.api-page .api-form-submit:hover { color: #fff; }
.api-hero-code { min-width: 0; text-align: left; }
@media (min-width: 981px) {
    .api-hero { text-align: left; }
    .api-hero .heroe-botones, .api-hero .heroe-puntos { justify-content: flex-start; }
}
/* La ventana de código del héroe: oscura (VS Code Dark Modern), con el código alineado a la izquierda */
.api-hero-code { --code-bg: #1f1f1f; --code-bar: #181818; --code-edge: #2b2b2b; --code-text: #cccccc; --code-gutter: #8b949e; --code-accent: #4da3ff; }
.api-hero-code .code-window { border-color: rgba(255, 255, 255, .22); }
.api-hero-code .code-title, .api-hero-code .code-tab[aria-selected="true"] { color: #fff; }
.api-hero-code .code-tab { color: #b4b4b4; }
.api-hero-code .code-tab:hover { color: #fff; background: #2a2a2a; }
.api-hero-code .copy-btn { color: #d4d4d4; background: #2b2b2b; border-color: #3c3c3c; }
.api-hero-code .copy-btn:hover { color: #fff; border-color: var(--code-accent); }
.api-hero-code .code-body + .code-body { border-top-color: #2b2b2b; }
.api-hero-code .tk-key, .api-hero-code .tk-var, .api-hero-code .tk-prop { color: #9cdcfe; }
.api-hero-code .tk-str { color: #ce9178; }
.api-hero-code .tk-num { color: #b5cea8; }
.api-hero-code .tk-lit, .api-hero-code .tk-sto { color: #569cd6; }
.api-hero-code .tk-ctl { color: #c586c0; }
.api-hero-code .tk-com { color: #6a9955; }
.api-hero-code .tk-fn { color: #dcdcaa; }
.api-hero-code .tk-type { color: #4ec9b0; }
.api-hero-code .tk-const, .api-hero-code .tk-flag { color: #4fc1ff; }
.api-hero-code :focus-visible { outline-color: var(--marca-clara); }

@media print { .pie-olas, .cab, .wa-flotante, .hero-fondo { display: none; } .aparece.espera { opacity: 1; translate: none; } }
