/* Landing de Legal IA (Components/Pages/Home.razor + Layout/LandingLayout.razor).
   Se apoya en el Bootstrap recompilado con la paleta de marca; aquí solo va lo que Bootstrap no
   da: ritmo de secciones, tarjetas, botones, tipografía del landing y el reproductor diferido.
   Todo lleva prefijo lp- (o cuelga de .lp-root) para no afectar al resto de la app.

   Sistema visual: dos fondos que se alternan (blanco y .alt, un lavanda casi neutro) y el degradé
   de marca solo en tres momentos (.lp-tint: hero, "Qué incluye" y CTA final). Un solo radio, una
   sola sombra y un solo hover para todas las tarjetas. */

.lp-root {
    --lp-font-heading: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --lp-ink: #192039;
    --lp-primary: #6657e8;
    --lp-accent: #0ca99c;
    --lp-soft: #f4f5ff;
    --lp-line: rgba(25, 32, 57, .1);
    --lp-radius: .875rem;
    --lp-shadow: 0 1px 2px rgba(25, 32, 57, .05);
    --lp-shadow-hover: 0 6px 16px -8px rgba(25, 32, 57, .18);
    --bs-emphasis-color: var(--lp-ink);
    --bs-body-color: var(--lp-ink);
    --bs-primary: var(--lp-primary);
    --bs-primary-text-emphasis: var(--lp-primary);
    --lp-dark-1: #14101f;
    --lp-dark-2: #241a3d;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 1.0625rem;
    line-height: 1.65;
}

html:has(.lp-root) {
    scroll-padding-top: 6rem;
    scroll-behavior: smooth;
}

/* ---------- Header ---------- */
.lp-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--lp-line);
}

.lp-header .fs-5 { font-family: var(--lp-font-heading); }

.lp-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
    transition: color .15s ease;
}

.lp-nav a:hover { color: var(--bs-body-color); }

/* ---------- Secciones ---------- */
.lp-section { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
.lp-section.alt { background: var(--lp-soft); }

.lp-tint {
    background: var(--lp-soft);
    border-block: 1px solid var(--lp-line);
}

.lp-head { max-width: 46rem; margin-bottom: 2.5rem; }

.lp-eyebrow {
    margin-bottom: .75rem;
    font-family: var(--lp-font-heading);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--bs-primary-text-emphasis);
}

.lp-h1,
.lp-h2 {
    font-family: var(--lp-font-heading);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--bs-emphasis-color);
}

.lp-h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem); }
.lp-h2 { font-size: clamp(1.75rem, 1.2rem + 1.7vw, 2.5rem); margin-bottom: 0; }

.lp-lead {
    max-width: 46rem;
    margin-top: 1rem;
    font-size: 1.1875rem;
    line-height: 1.65;
    color: var(--bs-secondary-color);
}

.lp-footnote {
    max-width: 46rem;
    margin: 2rem 0 0;
    font-size: .9375rem;
    color: var(--bs-secondary-color);
}

.lp-grad {
    color: var(--lp-primary);
}

/* ---------- Hero ---------- */
.lp-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}


/* ---------- Tarjetas ---------- */
.lp-card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border: 1px solid var(--lp-line);
    border-radius: var(--lp-radius);
    background: #fff;
    box-shadow: var(--lp-shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.lp-card:hover {
    transform: translateY(-2px);
    border-color: rgba(102, 87, 232, .35);
    box-shadow: var(--lp-shadow-hover);
}

.lp-card-title {
    margin: 0 0 .5rem;
    font-family: var(--lp-font-heading);
    font-size: 1.1875rem;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--bs-emphasis-color);
}

.lp-card-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--bs-secondary-color);
}

/* Tarjeta con video arriba: el video ocupa todo el ancho de la tarjeta */
.lp-card-media { padding: 0; overflow: hidden; }
.lp-card-media .lp-video { border: 0; border-radius: 0; }
.lp-card-media .lp-card-body { padding: 1.5rem 1.75rem 1.75rem; }

/* Ícono lineal discreto */
.lp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 1.25rem;
    border-radius: .75rem;
    background: rgba(102, 87, 232, .1);
    color: var(--bs-primary-text-emphasis);
    font-size: 1.25rem;
}

/* Número de paso */
.lp-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    font-family: var(--lp-font-heading);
    font-size: 1rem;
    font-weight: 600;
}

/* Pregunta de ejemplo del asistente */
.lp-prompt {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--lp-line);
    border-radius: var(--lp-radius);
    background: #fff;
    box-shadow: var(--lp-shadow);
    font-size: 1.0625rem;
    color: var(--bs-body-color);
}

.lp-prompt i { flex-shrink: 0; font-size: 1.125rem; color: var(--bs-primary-text-emphasis); }

/* ---------- Maquetas ilustrativas (hero y asistente) ---------- */
.lp-pill {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: .4rem 1rem;
    border-radius: 999px;
    background: rgba(102, 87, 232, .12);
    font-family: var(--lp-font-heading);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--lp-primary);
}

/* Captura dentro de una ventana de navegador */
.lp-browser {
    overflow: hidden;
    border: 1px solid var(--lp-line);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 20px 40px -24px rgba(25, 32, 57, .35);
}
.lp-browser-bar { display: flex; gap: .5rem; padding: .9rem 1.1rem; background: var(--lp-ink); }
.lp-browser-bar i { width: .65rem; height: .65rem; border-radius: 50%; background: #f87171; }
.lp-browser-bar i:nth-child(2) { background: #fbbf24; }
.lp-browser-bar i:nth-child(3) { background: #34d399; }
.lp-shot { display: block; width: 100%; height: auto; }
.lp-zoom-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.lp-zoom { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; border-radius: var(--lp-radius); background: transparent; cursor: zoom-out; }
.lp-zoom::backdrop { background: rgba(25, 32, 57, .75); }
.lp-zoom img { display: block; width: 96vw; height: 96vh; object-fit: contain; }

.lp-mini-title { margin: 0; font-family: var(--lp-font-heading); font-weight: 600; font-size: .9375rem; }
.lp-mini-text { margin: 0; font-size: .875rem; line-height: 1.45; color: var(--bs-secondary-color); }

.lp-mock {
    padding: 1.25rem;
    border: 1px solid var(--lp-line);
    border-radius: var(--lp-radius);
    background: #fff;
    box-shadow: var(--lp-shadow-hover);
    font-size: .9375rem;
}
.lp-mock-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin-bottom: 1rem; }
.lp-mock-head span { font-size: .8125rem; color: var(--bs-secondary-color); }
.lp-mock-kpi { padding: .75rem; border-radius: .625rem; background: var(--lp-soft); }
.lp-mock-kpi b { display: block; font-family: var(--lp-font-heading); font-size: 1.5rem; line-height: 1.1; color: var(--lp-primary); }
.lp-mock-kpi span { font-size: .8125rem; color: var(--bs-secondary-color); }
.lp-mock-sub { margin: 0 0 .5rem; font-size: .8125rem; font-weight: 600; color: var(--bs-secondary-color); }
.lp-mock-row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--lp-line); }
.lp-mock-row em { flex-shrink: 0; font-style: normal; font-size: .8125rem; font-weight: 600; color: #0a8a7f; }
.lp-bubble { max-width: 90%; margin-bottom: .75rem; padding: .75rem 1rem; border-radius: .75rem; background: var(--lp-soft); }
.lp-bubble-user { margin-left: auto; background: var(--lp-primary); color: #fff; }
.lp-chip { padding: .35rem .75rem; border: 1px solid var(--lp-line); border-radius: 999px; font-size: .8125rem; color: var(--bs-secondary-color); }

/* ---------- Botones ---------- */
.lp-btn {
    padding: .65rem 1.4rem;
    font-size: 1rem;
    font-weight: 500;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

.lp-btn.btn-sm { padding: .4rem 1rem; font-size: .9375rem; }
.lp-btn-lg { padding: .85rem 1.9rem; font-size: 1.0625rem; }

.lp-btn.btn-primary {
    --bs-btn-bg: var(--lp-primary);
    --bs-btn-border-color: var(--lp-primary);
    --bs-btn-hover-bg: #5648d6;
    --bs-btn-hover-border-color: #5648d6;
    --bs-btn-active-bg: #4c3fc4;
    --bs-btn-active-border-color: #4c3fc4;
}

.lp-btn-outline {
    border: 1px solid rgba(25, 32, 57, .2);
    background: #fff;
    color: var(--bs-body-color);
}

.lp-btn-outline:hover {
    border-color: var(--bs-primary);
    background: #fff;
    color: var(--bs-primary-text-emphasis);
}

/* ---------- Video diferido: YouTube solo se carga al hacer clic ---------- */
.lp-video {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--lp-line);
    border-radius: var(--lp-radius);
    background: linear-gradient(135deg, var(--lp-dark-1), var(--lp-dark-2));
}

.lp-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 1rem;
    border: 0;
    background: transparent;
    color: #eeeef2;
    text-align: center;
    cursor: pointer;
}

.lp-play-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--lp-primary);
    color: #fff;
    font-size: 1.75rem;
    transition: transform .15s ease;
}

.lp-video-play:hover .lp-play-icono { transform: scale(1.08); }

.lp-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Footer ---------- */
.lp-footer {
    border-top: 1px solid var(--lp-line);
    background: var(--lp-soft);
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    html:has(.lp-root) { scroll-behavior: auto; }

    .lp-card,
    .lp-btn,
    .lp-play-icono { transition: none; }

    .lp-card:hover { transform: none; }
}

/* ---------- Franja de cierre y variante de pastilla ---------- */
.lp-band { padding: 1.75rem 2rem; border-radius: var(--lp-radius); background: var(--lp-soft); }
.lp-pill-teal { background: #e6f7f5; color: #0a8a7f; }
.lp-num.mb-0 { margin-bottom: 0; }

/* ---------- Chat de ventas (wwwroot/js/chat.js) ---------- */
.lp-chat-launcher { position: fixed; right: 1rem; bottom: 1rem; z-index: 1030; box-shadow: var(--lp-shadow-hover); }
.lp-chat-launcher[hidden], .lp-chat-panel[hidden] { display: none; }

.lp-chat-panel {
    position: fixed; z-index: 1030; inset: 0;
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border: 1px solid var(--lp-line);
}

@media (min-width: 576px) {
    .lp-chat-panel {
        inset: auto 1rem 1rem auto; width: 26rem; height: 40rem; max-height: calc(100dvh - 2rem);
        border-radius: var(--lp-radius); box-shadow: 0 12px 32px -12px rgba(25, 32, 57, .3);
    }
}

.lp-chat-head { display: flex; align-items: center; gap: .5rem; padding: .5rem .5rem .5rem 1rem; border-bottom: 1px solid var(--lp-line); }
.lp-chat-close { min-width: 44px; min-height: 44px; color: var(--bs-secondary-color); }
.lp-chat-log { flex: 1; display: flex; flex-direction: column; gap: .75rem; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; }
.lp-chat-form { border-top: 1px solid var(--lp-line); padding: .75rem; }
.lp-chat-form textarea { resize: none; max-height: 7rem; min-height: 44px; }
.lp-chat-send { flex-shrink: 0; width: 44px; height: 44px; }

.lp-chat-bot, .lp-chat-user { max-width: 92%; padding: .625rem .875rem; border-radius: var(--lp-radius); font-size: .9375rem; line-height: 1.5; }
.lp-chat-bot { align-self: flex-start; background: var(--lp-soft); }
.lp-chat-bot p { margin: 0 0 .5rem; }
.lp-chat-bot ul { margin: 0 0 .5rem; padding-left: 1.25rem; }
.lp-chat-bot > :last-child { margin-bottom: 0; }
.lp-chat-user { align-self: flex-end; max-width: 85%; background: var(--lp-primary); color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }

.lp-chat-chips { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.lp-chat-chip {
    min-height: 44px; padding: .25rem .625rem; text-align: left; font-size: .8125rem;
    color: var(--bs-secondary-color); background: transparent;
    border: 1px solid var(--lp-line); border-radius: 999px;
    transition: border-color .15s ease, color .15s ease;
}
.lp-chat-chip:hover:not(:disabled) { border-color: var(--lp-primary); color: var(--lp-ink); }
.lp-chat-chip:disabled { opacity: .5; cursor: not-allowed; }

/* Estimador de impacto: pasos numerados y preguntas en una sola columna */
.lp-impacto { max-width: 46rem; margin-inline: auto; counter-reset: pregunta; display: grid; gap: 1rem; }
.lp-impacto .lp-btn { justify-self: start; }
.lp-paso { border: 1px solid var(--bs-border-color); min-width: 0; }
.lp-paso legend + * { clear: left; }
.lp-paso legend { float: left; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; font: 600 1.05rem var(--bs-headings-font-family); margin-bottom: .5rem; }
.lp-paso legend small { flex-basis: 100%; font: 400 .875rem var(--bs-body-font-family); color: var(--bs-secondary-color); padding-left: 2.5rem; }
.lp-pregunta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem 0; border-top: 1px solid var(--bs-border-color); }
.lp-pregunta[hidden] { display: none; }
.lp-pregunta:not([hidden]) { counter-increment: pregunta; }
.lp-pregunta-texto { flex: 1 1 14rem; display: grid; }
.lp-pregunta-texto label::before { content: counter(pregunta) ". "; color: var(--bs-primary); font-weight: 600; }
.lp-pregunta-texto small { color: var(--bs-secondary-color); padding-left: 1.4rem; }
.lp-pregunta-campo { flex: 0 0 14rem; width: 14rem; }
.lp-pregunta-campo .input-group-text { flex-shrink: 0; }
.lp-resultado { max-width: 46rem; margin: 1rem auto 0; border-color: rgba(102, 87, 232, .3); }
.lp-totales { display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; }
.lp-total { margin: 0; display: flex; flex-direction: column; }
.lp-total strong { font: 700 2.25rem var(--lp-font-heading); }
.lp-total span { color: var(--bs-secondary-color); font-size: .9rem; }
.lp-total .lp-total-formula { font-size: .8rem; font-weight: 600; }
.lp-escenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; }
.lp-escenario { border-radius: .75rem; padding: .875rem 1rem; }
.lp-escenario p { margin: 0; }
.lp-escenario-tit { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lp-subtitulo { font: 600 1.15rem var(--lp-font-heading); margin: 0 0 .75rem; }
.lp-subtitulo-sec { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--lp-line); font-size: 1rem; }
.lp-escenario-h { font: 700 1.5rem var(--lp-font-heading); }
.lp-escenario-et { font-size: .75rem; opacity: .85; }
.lp-escenario-m { font: 700 1.5rem var(--lp-font-heading); margin-top: .75rem !important; padding-top: .5rem; border-top: 1px solid currentColor; }
.lp-escenario-neto { font-size: .85rem; font-weight: 700; margin-top: .5rem !important; }
.lp-plan { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--lp-line); font-weight: 600; }
.lp-escenario-a { background: #e3e6ff; color: #2b2f7a; }
.lp-escenario-b { background: #6657e8; color: #fff; }
.lp-escenario-c { background: #c9f1ea; color: #0b5d54; }
.lp-impacto-pie { max-width: 46rem; margin: 1.5rem auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.lp-impacto-pie > div { flex: 1 1 22rem; }
