/*
  Página principal pública (/inicio). Usa los tokens de site.css; aquí no hay colores literales.
  Animaciones: aparición al hacer scroll (.reveal), contadores y carrusel (js/inicio.js).
*/
.lp { background: var(--app-bg); min-height: 100vh; overflow-x: hidden; }
.lp main { position: relative; }
.lp main::before {
    content: '';
    position: absolute;
    inset: -200px 0 auto;
    height: 900px;
    background:
        radial-gradient(ellipse 50% 40% at 15% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
        radial-gradient(ellipse 40% 35% at 85% 20%, color-mix(in srgb, var(--purple) 14%, transparent), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ── Barra superior ───────────────────────────────────────────── */
.lp-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px clamp(16px, 4vw, 48px);
    transition: background .25s, border-color .25s, backdrop-filter .25s;
    border-bottom: 1px solid transparent;
}
.lp-top.is-scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-color: var(--border); }
.lp-top .brand { padding: 0; border: 0; }
.lp-nav { display: flex; gap: 22px; margin-left: auto; }
.lp-nav a { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500; }
.lp-nav a:hover { color: var(--text); }
@media (max-width: 760px) { .lp-nav { display: none; } .lp-top > .lp-btn { margin-left: auto; } }

/* ── Botones ──────────────────────────────────────────────────── */
.lp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    border-radius: var(--radius-l);
    font-weight: 700;
    text-decoration: none;
    transition: transform .15s, box-shadow .2s, filter .2s, border-color .2s;
}
.lp-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lp-btn--primary { background: var(--accent-gradient); color: var(--on-accent); box-shadow: 0 0 22px var(--glow); }
.lp-btn--primary:hover { color: var(--on-accent); transform: translateY(-2px); filter: brightness(1.08); }
.lp-btn--ghost { border: 1px solid var(--border); color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.lp-btn--ghost:hover { color: var(--text); border-color: var(--accent); }

/* ── Portada ──────────────────────────────────────────────────── */
.lp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 5vw, 64px);
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(36px, 7vw, 88px) clamp(16px, 4vw, 48px) 48px;
}
@media (max-width: 960px) { .lp-hero { grid-template-columns: minmax(0, 1fr); } }
.lp-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); animation: lp-pulse 2s infinite; }
.lp-hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.08; font-weight: 700; margin: 0 0 18px; text-wrap: balance; }
.lp-grad { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lead { color: var(--muted); font-size: 1.06rem; line-height: 1.65; margin: 0 0 28px; max-width: 60ch; }
.lp-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-note { color: var(--muted); font-size: .84rem; margin: 14px 0 0; }

/* Informe de ejemplo */
.lp-mock {
    position: relative;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--hud-panel);
    box-shadow: 0 30px 80px rgb(0 0 0 / 45%), 0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
}
/* Flota una vez que terminó de aparecer (la animación pisa el transform de .reveal). */
.lp-mock.is-visible { animation: lp-float 7s ease-in-out .8s infinite; }
.lp-mock::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; border-radius: 14px 14px 0 0; background: var(--accent-gradient); }
.lp-mock__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.lp-mock__eyebrow { display: block; color: var(--accent); font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.lp-mock__site { font-size: 1.5rem; }
.lp-mock__code { color: var(--muted); font-family: var(--mono); font-size: .72rem; }
.lp-mock__indices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lp-idx { position: relative; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-l); background: color-mix(in srgb, var(--bg) 55%, transparent); }
.lp-idx > span { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.lp-idx b { display: block; margin: 6px 0 10px; font-family: var(--mono); font-size: 1.9rem; line-height: 1; }
.lp-idx b small { font-size: .78rem; color: var(--muted); margin-left: 2px; }
.c-low { color: var(--low); }
.c-accent { color: var(--accent); }
.lp-badge { position: absolute; top: 10px; right: 10px; padding: 1px 8px; border-radius: 999px; font-size: .68rem; font-style: normal; font-weight: 700; }
.lp-badge--low { color: var(--low); border: 1px solid color-mix(in srgb, var(--low) 50%, transparent); background: color-mix(in srgb, var(--low) 12%, transparent); }
.lp-risk { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--low) 0 25%, var(--medium) 25% 50%, var(--high) 50% 75%, var(--critical) 75%); }
.lp-risk i { position: absolute; top: -4px; width: 3px; height: 14px; border-radius: 2px; background: var(--text); box-shadow: 0 0 8px var(--text); }
.lp-bar { height: 6px; border-radius: 3px; background: var(--surface-raised); overflow: hidden; }
.lp-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }
.lp-bar--ok i { background: var(--accent-gradient); }
.lp-mock__findings { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.lp-mock__findings li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    background: color-mix(in srgb, var(--bg) 45%, transparent);
    font-size: .86rem;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity .5s, transform .5s;
}
.lp-mock.is-visible .lp-mock__findings li { opacity: 1; transform: none; }
.lp-mock.is-visible .lp-mock__findings li:nth-child(2) { transition-delay: .15s; }
.lp-mock.is-visible .lp-mock__findings li:nth-child(3) { transition-delay: .3s; }
.lp-mock.is-visible .lp-mock__findings li:nth-child(4) { transition-delay: .45s; }
.lp-mock__findings span { flex: 1; min-width: 0; }
.lp-mock__findings em { color: var(--muted); font-size: .72rem; font-style: normal; }
.sev { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sev--high { background: var(--high); box-shadow: 0 0 8px var(--high); }
.sev--medium { background: var(--medium); }
.sev--low { background: var(--low); }
.lp-mock__foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); color: var(--muted); font-family: var(--mono); font-size: .72rem; }
@media (max-width: 520px) { .lp-mock__indices { grid-template-columns: 1fr; } .lp-badge { top: 12px; } }

/* ── Cifras ───────────────────────────────────────────────────── */
.lp-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 1200px;
    margin: 16px auto 0;
    padding: 0 clamp(16px, 4vw, 48px);
    gap: 14px;
}
.lp-stats > div { padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--surface) 75%, transparent); }
.lp-stats b { display: block; font-family: var(--mono); font-size: 2.2rem; line-height: 1; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-stats span { display: block; margin-top: 8px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
@media (max-width: 860px) { .lp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Secciones ────────────────────────────────────────────────── */
.lp-section { max-width: 1200px; margin: 0 auto; padding: clamp(56px, 9vw, 104px) clamp(16px, 4vw, 48px) 0; scroll-margin-top: 60px; }
.lp-section__head { max-width: 680px; margin-bottom: 32px; }
.lp-section__head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.15; margin: 0 0 10px; text-wrap: balance; }
.lp-section__head p:not(.lp-kicker) { color: var(--muted); margin: 0; }

.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
@media (max-width: 860px) { .lp-steps { grid-template-columns: 1fr; } }
.lp-steps li {
    position: relative;
    padding: 26px 22px 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--hud-panel);
    transition: transform .2s, border-color .2s;
}
.lp-steps li:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.lp-steps__n { position: absolute; top: 18px; right: 20px; font-family: var(--mono); font-size: 2rem; font-weight: 700; color: color-mix(in srgb, var(--accent) 22%, transparent); }
.lp-steps svg { width: 40px; height: 40px; padding: 9px; border-radius: 10px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; background: var(--accent-soft); }
.lp-steps h3 { font-size: 1.1rem; margin: 16px 0 8px; }
.lp-steps p { color: var(--muted); margin: 0; line-height: 1.55; font-size: .93rem; }

/* ── Carrusel ─────────────────────────────────────────────────── */
.lp-carousel { position: relative; }
.lp-carousel__track { display: grid; }
.lp-slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateX(30px) scale(.98); transition: opacity .6s, transform .6s, visibility .6s; }
.lp-slide.is-active { opacity: 1; visibility: visible; transform: none; }
.lp-slide.is-leaving { transform: translateX(-30px) scale(.98); }
.lp-slide figcaption { max-width: 760px; margin: 22px auto 0; text-align: center; color: var(--muted); line-height: 1.6; }
.lp-slide figcaption b { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: 4px; }

.lp-devices { position: relative; max-width: 980px; margin: 0 auto; padding-right: clamp(40px, 9vw, 110px); }
.lp-browser { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 30px 70px rgb(0 0 0 / 45%); }
.lp-browser--wide { max-width: 1060px; margin: 0 auto; }
.lp-browser__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.lp-browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); opacity: .6; }
.lp-browser__bar span { margin-left: 10px; padding: 2px 12px; border-radius: 999px; background: var(--bg); color: var(--muted); font-family: var(--mono); font-size: .72rem; }
.lp-browser img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.lp-phone {
    position: absolute;
    right: 0;
    bottom: -24px;
    width: clamp(110px, 20%, 200px);
    padding: 8px;
    border: 1px solid var(--border-strong);
    border-radius: 26px;
    background: var(--bg);
    box-shadow: 0 24px 60px rgb(0 0 0 / 55%);
}
.lp-phone img { display: block; width: 100%; aspect-ratio: 9 / 18; object-fit: cover; object-position: top; border-radius: 19px; }

.lp-carousel__nav {
    position: absolute;
    top: 38%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface) 85%, transparent);
    color: var(--text);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: border-color .2s, transform .2s;
    z-index: 2;
}
.lp-carousel__nav:hover { border-color: var(--accent); transform: scale(1.06); }
.lp-carousel__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lp-carousel__nav--prev { left: 0; }
.lp-carousel__nav--next { right: 0; }
@media (max-width: 700px) { .lp-carousel__nav { display: none; } }
.lp-carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.lp-carousel__dots button { width: 44px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.lp-carousel__dots i { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--border-strong); overflow: hidden; position: relative; }
.lp-carousel__dots i::after { content: ''; position: absolute; inset: 0; width: 0; background: var(--accent); }
.lp-carousel__dots .is-active i::after { animation: lp-progress var(--lp-interval, 6s) linear forwards; }
.lp-carousel.is-paused .lp-carousel__dots .is-active i::after { animation-play-state: paused; }

/* Carrusel del informe: pestañas con nombre y capturas a su tamaño natural */
.lp-carousel--report { margin-bottom: 40px; }
.lp-carousel--report .lp-carousel__nav { top: 55%; }
.lp-carousel__dots--tabs { flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.lp-carousel__dots--tabs button {
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 7px 14px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 75%, transparent);
    color: var(--muted);
    font: inherit;
    font-size: .82rem;
    font-weight: 600;
    transition: border-color .2s, color .2s;
}
.lp-carousel__dots--tabs button:hover { color: var(--text); border-color: var(--border-strong); }
.lp-carousel__dots--tabs button.is-active { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: var(--accent-soft); }
.lp-carousel__dots--tabs i { height: 2px; background: transparent; }
.lp-browser--shot img { aspect-ratio: auto; object-fit: initial; height: auto; }

/* ── Contenido del informe────────────────────────────────────── */
.lp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lp-grid { grid-template-columns: 1fr; } }
.lp-grid article { padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--surface) 75%, transparent); transition: border-color .2s, transform .2s; }
.lp-grid article:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-3px); }
.lp-grid span { font-family: var(--mono); color: var(--accent); font-size: .8rem; }
.lp-grid h3 { font-size: 1rem; margin: 8px 0 6px; }
.lp-grid p { color: var(--muted); margin: 0; font-size: .88rem; line-height: 1.5; }

/* ── Llamado final y pie ──────────────────────────────────────── */
.lp-cta {
    max-width: 1100px;
    margin: clamp(56px, 9vw, 104px) auto 0;
    padding: clamp(36px, 6vw, 60px) 24px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(ellipse 60% 80% at 50% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
        var(--hud-panel);
}
.lp-cta h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 0 0 10px; }
.lp-cta p { color: var(--muted); margin: 0 0 24px; }
@media (max-width: 1148px) { .lp-cta { margin-left: 16px; margin-right: 16px; } }
.lp-foot { margin-top: 64px; padding: 22px; text-align: center; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); }

/* ── Animaciones ──────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes lp-pulse { 50% { opacity: .35; } }
@keyframes lp-float { 50% { transform: translateY(-8px); } }
@keyframes lp-progress { to { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
    .reveal, .lp-slide, .lp-mock__findings li { transition: none; }
    .lp-mock, .lp-dot { animation: none; }
    .reveal { opacity: 1; transform: none; }
}
