/* Portada pública de Links MNA Solutions. Usa los tokens de app.css (modo noche incluido). */
html:has(.portada-saas) { overflow-x: clip; }
.portada-saas { background: var(--bg); overflow-x: clip; }
.portada-saas main { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 48px; }
:root { --cian: #01adf8; --medianoche: #011229; }

/* Aparecer al hacer scroll (portada.js agrega .ver) */
.rev { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1); transition-delay: calc(var(--d, 0) * 90ms); }
.rev.ver { opacity: 1; transform: none; }

/* ------------------------------------------------------------ barra */
.pt-barra { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.pt-barra.pegada { border-bottom-color: var(--linea); }
.pt-barra > * { max-width: 1200px; }
.pt-barra .marca { padding: 0; }
.pt-nav { display: flex; align-items: center; gap: 6px; }
.pt-nav > a:not(.btn) { color: var(--texto-2); text-decoration: none; font-weight: 500; padding: 10px 12px; border-radius: 8px; }
.pt-nav > a:not(.btn):hover { color: var(--texto); background: var(--card-2); }

/* ------------------------------------------------------------ hero */
.pt-hero { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center; padding: 56px 0 48px; min-height: 560px; }
.pt-fondo { position: absolute; inset: -120px -10% 0; pointer-events: none; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: flotar 14s ease-in-out infinite; }
.blob.b1 { width: 520px; height: 520px; left: 30%; top: 0; background: var(--pri); opacity: .22; }
.blob.b2 { width: 420px; height: 420px; right: 18%; top: 120px; background: var(--cian); opacity: .22; animation-delay: -5s; }
.blob.b3 { width: 320px; height: 320px; left: 48%; top: 320px; background: #7c3aed; opacity: .12; animation-delay: -9s; }
html[data-theme="dark"] .blob { opacity: .28; }
@keyframes flotar { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -26px) scale(1.06); } }

.pt-etiqueta { display: inline-flex; align-items: center; gap: 6px; color: var(--pri); font-weight: 600; font-size: .88rem; margin: 0 0 14px; background: var(--pri-suave); padding: 5px 12px; border-radius: 999px; }
.pt-etiqueta .ico { width: 16px; height: 16px; }
.pt-hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); font-weight: 900; letter-spacing: -.035em; line-height: 1.04; margin: 0 0 18px; }
.grad { background: linear-gradient(92deg, var(--pri), var(--cian) 60%, var(--pri)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: deslizar 6s linear infinite; }
@keyframes deslizar { to { background-position: -200% 0; } }
.pt-bajada { font-size: 1.12rem; color: var(--texto-2); max-width: 54ch; margin: 0; line-height: 1.55; }
.pt-hero .acciones { justify-content: flex-start; margin-top: 26px; gap: 10px; }
.btn.grande { min-height: 54px; padding: 0 24px; font-size: 1rem; border-radius: 14px; }
.btn.brillo { position: relative; overflow: hidden; box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--pri) 70%, transparent); }
.btn.brillo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%); background-size: 60% 100%; background-repeat: no-repeat; background-position: -160% 0; animation: brillo-btn 3.6s ease-in-out infinite; }
@keyframes brillo-btn { 0% { background-position: -160% 0; } 55%, 100% { background-position: 260% 0; } }
.pt-garantias { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; padding: 0; color: var(--muted); font-size: .9rem; }
.pt-garantias li { display: inline-flex; align-items: center; gap: 6px; }
.pt-garantias .ico { width: 16px; height: 16px; color: var(--ok); }

/* Demo del celular */
.pt-hero-demo { position: relative; display: flex; justify-content: center; align-items: center; min-height: 560px; }
.pt-tel { position: relative; width: 272px; aspect-ratio: 9 / 18.5; border-radius: 40px; background: #0b0f1a; padding: 10px; box-shadow: 0 30px 60px -20px rgba(1, 18, 41, .55), inset 0 0 0 2px #2a3140; animation: tel-flota 7s ease-in-out infinite; }
@keyframes tel-flota { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(-1.5deg); } }
.pt-muesca { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; border-radius: 999px; background: #0b0f1a; z-index: 2; }
.pt-tel-pantalla { height: 100%; border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 54px 16px 20px; background: linear-gradient(170deg, #0b2a4a 0%, #0069e7 60%, #01adf8 130%); color: #fff; }
.pt-av { width: 68px; height: 68px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #0069e7; font-weight: 900; font-size: 1.2rem; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.pt-nombre { font-size: 1rem; font-weight: 800; margin-top: 2px; }
.pt-bio { font-size: .72rem; opacity: .9; text-align: center; margin-bottom: 2px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-redes-mini { display: flex; gap: 8px; margin-bottom: 6px; }
.pt-redes-mini .ico { width: 18px; height: 18px; }
.pt-btn { position: relative; width: 100%; min-height: 42px; border-radius: 12px; background: #fff; color: #0b2a4a; font-size: .78rem; font-weight: 700; display: flex; align-items: center; gap: 8px; padding: 0 12px; box-shadow: 0 3px 10px rgba(0, 0, 0, .18); transition: transform .18s ease; }
.pt-btn .ico { width: 16px; height: 16px; flex: none; color: #0069e7; }
.pt-btn.tocado { transform: scale(.96); }
.pt-btn.tocado::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--cian); transform: translate(-50%, -50%); animation: onda .7s ease-out forwards; }
@keyframes onda { to { width: 150px; height: 150px; opacity: 0; } }

/* Íconos de redes que mandan clics al celular */
.pt-redes-vuelan { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 14px; z-index: 3; }
.red-ori { width: 44px; height: 44px; border-radius: 14px; background: var(--card); border: 1px solid var(--linea); box-shadow: var(--sombra); display: grid; place-items: center; color: var(--texto-2); animation: red-flota 5s ease-in-out infinite; animation-delay: calc(var(--i) * -.9s); transition: transform .2s ease, color .2s ease, box-shadow .2s ease; }
.red-ori .ico { width: 22px; height: 22px; }
.red-ori.activa { color: var(--pri); transform: scale(1.15); box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--pri) 60%, transparent); }
@keyframes red-flota { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* Fichas «+1 · Instagram» que viajan del ícono al celular */
.pt-chips { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.chip-vuela { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--texto); color: var(--card); font-size: .76rem; font-weight: 700; white-space: nowrap; box-shadow: var(--sombra-alta); animation: chip-viaja 1.1s cubic-bezier(.3, .8, .4, 1) forwards; --dx: 120px; --dy: -40px; }
.chip-vuela .ico { width: 14px; height: 14px; }
@keyframes chip-viaja { 0% { opacity: 0; transform: translate(0, 0) scale(.8); } 15% { opacity: 1; transform: translate(0, 0) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.9); } }

/* Tarjetas flotantes */
.pt-flota { position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; z-index: 3; animation: tel-flota 8s ease-in-out infinite; border-radius: 16px; }
.pt-flota-clics { right: -2%; top: 3%; animation-delay: -3s; min-width: 190px; }
.pt-flota-fuente { right: 0; bottom: 5%; animation-delay: -1.5s; }
.pt-flota .kpi-val { font-size: 1.9rem; }
.pt-flota .delta { font-size: .8rem; }
.pt-flota .delta .ico { width: 14px; height: 14px; vertical-align: -2px; }
.pt-flota .delta.sube { color: var(--ok); }
.pt-chispa { width: 100%; height: 32px; margin-top: 6px; }
.pt-chispa polyline { fill: none; stroke: var(--pri); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 300; stroke-dashoffset: 300; animation: trazar 1.6s .4s ease-out forwards; }
@keyframes trazar { to { stroke-dashoffset: 0; } }
.pt-ultimo { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--texto-2); }
.pt-ultimo .ico { width: 18px; height: 18px; color: var(--pri); }
.pt-ultimo.cambia { animation: pop .4s ease; }
@keyframes pop { 0% { transform: scale(.92); opacity: .4; } 100% { transform: none; opacity: 1; } }
.kpi-val.sube-num { animation: pop .35s ease; }

/* ------------------------------------------------------------ franja de redes */
.pt-franja { text-align: center; padding: 8px 0 24px; }
.pt-franja p { margin: 0 0 14px; color: var(--muted); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.pt-redes-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; }
.pt-redes-lista li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--linea); color: var(--texto-2); font-weight: 600; font-size: .9rem; transition: transform .15s ease, color .15s ease, border-color .15s ease; }
.pt-redes-lista li:hover { transform: translateY(-2px); color: var(--pri); border-color: var(--pri); }
.pt-redes-lista .ico { width: 18px; height: 18px; }

/* ------------------------------------------------------------ secciones */
.pt-seccion { padding: 56px 0 24px; }
.pt-cab { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.pt-cab .sub { font-size: 1.05rem; line-height: 1.55; }
.pt-h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; margin: 0 0 10px; line-height: 1.12; }

/* Tablero de demostración */
.pt-tablero { border: 1px solid var(--linea); border-radius: 20px; background: var(--card); box-shadow: 0 30px 80px -40px rgba(1, 18, 41, .45); overflow: hidden; }
.pt-tab-barra { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--linea); background: var(--card-2); }
.pt-pto { width: 11px; height: 11px; border-radius: 50%; }
.pt-pto.r { background: #ff5f57; } .pt-pto.a { background: #febc2e; } .pt-pto.v { background: #28c840; }
.pt-tab-titulo { margin-left: 10px; font-size: .85rem; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-vivo { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--ok); }
.pt-vivo i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); animation: late 1.6s ease-out infinite; }
@keyframes late { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.pt-tab-cuerpo { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.pt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pt-kpi { background: var(--card-2); border: 1px solid var(--linea); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.pt-kpi b { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pt-kpi .delta.sube { color: var(--ok); }
.pt-kpi .delta .ico { width: 14px; height: 14px; vertical-align: -2px; }
.pt-tab-grilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pt-panel { border: 1px solid var(--linea); border-radius: 14px; padding: 16px; }
.pt-panel h3 { margin: 0 0 14px; font-size: 1rem; }
.pt-panel h3 .sub { font-weight: 500; font-size: .85rem; }
.pt-panel-ancho { grid-column: 1 / -1; }
.pt-barras, .pt-apiladas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pt-barras li, .pt-apiladas li { display: grid; grid-template-columns: 132px minmax(0, 1fr) 52px; align-items: center; gap: 10px; font-size: .88rem; }
.pt-barras .et, .pt-apiladas .et { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-barras .et .ico { width: 16px; height: 16px; flex: none; }
.pt-barras b, .pt-apiladas b { text-align: right; font-variant-numeric: tabular-nums; }
.barra { display: flex; height: 12px; border-radius: 999px; background: var(--card-2); overflow: hidden; gap: 2px; }
.barra i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--pri); transition: width 1.1s cubic-bezier(.22, 1, .36, 1); }
.barra.apilada i { border-radius: 0; }
.barra.apilada i:first-child { border-radius: 999px 0 0 999px; }
.barra.apilada i:last-child { border-radius: 0 999px 999px 0; }
.pt-tablero .s1, .pt-leyenda .s1 { background: #2a78d6; }
.pt-tablero .s2, .pt-leyenda .s2 { background: #eb6834; }
.pt-tablero .s3, .pt-leyenda .s3 { background: #0f9d8a; }
.pt-tablero .s4, .pt-leyenda .s4 { background: #8a6bd6; }
html[data-theme="dark"] .pt-tablero .s1, html[data-theme="dark"] .pt-leyenda .s1 { background: #3987e5; }
html[data-theme="dark"] .pt-tablero .s2, html[data-theme="dark"] .pt-leyenda .s2 { background: #d95926; }
.pt-leyenda { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; font-size: .8rem; color: var(--muted); }
.pt-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.pt-leyenda i { width: 10px; height: 10px; border-radius: 3px; }
.pt-calor { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.pt-calor .d { font-size: .72rem; color: var(--muted); font-weight: 600; }
.pt-calor .h { font-size: .68rem; color: var(--muted); text-align: center; }
.pt-calor .c { aspect-ratio: 1; border-radius: 3px; background: var(--card-2); transform: scale(.6); opacity: 0; transition: transform .4s ease, opacity .4s ease, background .3s ease; transition-delay: calc(var(--k) * 6ms); }
.pt-calor.ver .c { transform: none; opacity: 1; }
.pt-insight { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--pri-suave); color: var(--texto); font-size: .9rem; }
.pt-insight .ico { width: 18px; height: 18px; color: var(--pri); flex: none; }

/* Pasos */
.pt-pasos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: paso; }
.pt-pasos li { position: relative; padding: 26px 22px 22px; }
.pt-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--pri), var(--cian)); color: #fff; font-weight: 900; font-size: 1.1rem; margin-bottom: 14px; box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--pri) 70%, transparent); }
.pt-pasos h3 { margin: 0 0 6px; font-size: 1.1rem; }
.pt-pasos p { margin: 0; color: var(--texto-2); }
.pt-code { display: block; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--card-2); border: 1px dashed var(--linea-fuerte); font-size: .82rem; color: var(--texto-2); overflow-wrap: anywhere; }
.pt-code b { color: var(--pri); }

/* Funciones */
.pt-funciones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pt-funcion { transition: transform .2s ease, box-shadow .2s ease, opacity .6s ease; }
.pt-funcion.ver:hover { transform: translateY(-4px); box-shadow: var(--sombra-alta); }
.pt-funcion > .ico { width: 28px; height: 28px; color: var(--pri); margin-bottom: 10px; }
.pt-funcion h3 { margin: 0 0 6px; font-size: 1.02rem; }
.pt-funcion p { margin: 0; color: var(--texto-2); font-size: .94rem; }

/* CTA final */
.pt-cta { padding: 40px 0 16px; }
.pt-cta-caja { position: relative; overflow: hidden; text-align: center; padding: 56px 24px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, #011229 0%, #0b2a4a 35%, #0069e7 100%); box-shadow: 0 40px 80px -40px rgba(0, 105, 231, .6); }
.pt-cta-caja::before { content: ""; position: absolute; width: 480px; height: 480px; right: -160px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(1, 173, 248, .55), transparent 65%); animation: flotar 10s ease-in-out infinite; }
.pt-cta-caja h2 { position: relative; font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: -.025em; margin: 0 0 10px; }
.pt-cta-caja p { position: relative; margin: 0; font-size: 1.1rem; opacity: .9; }
.pt-cta .acciones { position: relative; margin-top: 26px; }
.pt-btn-blanco { background: #fff; border-color: #fff; color: #0b2a4a; }
.pt-btn-blanco:hover { background: #e6f0fd; border-color: #e6f0fd; }
.pt-btn-borde { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.pt-btn-borde:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

.pt-pie { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; max-width: 1200px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 48px) 40px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--linea); }
.pt-pie > span { display: inline-flex; align-items: center; gap: 6px; }
.pt-pie .ico { width: 16px; height: 16px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .pt-hero { grid-template-columns: 1fr; gap: 12px; padding-top: 28px; min-height: 0; text-align: center; }
  .pt-hero .acciones { justify-content: center; }
  .pt-garantias { justify-content: center; }
  .pt-bajada { margin: 0 auto; }
  .pt-hero-demo { min-height: 600px; margin-top: 12px; }
  .pt-tab-grilla { grid-template-columns: 1fr; }
  .pt-pasos, .pt-funciones { grid-template-columns: 1fr; }
  .pt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .pt-nav > a:not(.btn) { display: none; }
  .pt-barra .logo-h { height: 24px; }
  .pt-barra .marca-app { display: none; }
  .pt-nav .btn { padding: 0 12px; min-height: 40px; }
  .pt-hero h1 { font-size: 2.1rem; }
  .pt-hero-demo { min-height: 540px; transform: scale(.88); transform-origin: top center; margin-bottom: -40px; }
  .pt-redes-vuelan { left: -6px; gap: 10px; }
  .red-ori { width: 38px; height: 38px; }
  .pt-flota-clics { right: -6px; top: 6%; min-width: 150px; padding: 10px 12px; }
  .pt-flota .kpi-val { font-size: 1.5rem; }
  .pt-flota-fuente { right: -4px; bottom: 4%; padding: 10px 12px; }
  .pt-tab-cuerpo { padding: 14px; }
  .pt-barras li, .pt-apiladas li { grid-template-columns: 96px minmax(0, 1fr) 44px; font-size: .82rem; }
  .pt-calor .h { font-size: .55rem; }
  .pt-calor { gap: 2px; grid-template-columns: 26px repeat(24, minmax(0, 1fr)); }
  .pt-cta-caja { padding: 40px 18px; border-radius: 20px; }
  .pt-seccion { padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .rev { opacity: 1; transform: none; transition: none; }
  .blob, .pt-tel, .pt-flota, .red-ori, .grad, .btn.brillo::after, .pt-vivo i, .pt-cta-caja::before { animation: none; }
  .pt-chispa polyline { stroke-dashoffset: 0; animation: none; }
  .barra i, .pt-calor .c { transition: none; }
  .pt-calor .c { transform: none; opacity: 1; }
}
.pt-pie a { color: var(--texto-2); }
