/* ================= Color de marca (el azul del botón de la landing) =================
   Un solo sitio para cambiarlo: --brand y sus variantes. Bootstrap 5.3 trae los colores compilados
   en cada componente, así que se redefinen aquí los que usa la app. */
:root {
    --brand: #2350e6; --brand-rgb: 35, 80, 230; --brand-600: #1a3fc0; --brand-700: #15339c; --brand-soft: #eaf0ff;
    --bs-primary: var(--brand); --bs-primary-rgb: var(--brand-rgb);
    --bs-primary-text-emphasis: var(--brand-700); --bs-primary-bg-subtle: var(--brand-soft); --bs-primary-border-subtle: #b9c9fb;
    --bs-link-color: var(--brand); --bs-link-color-rgb: var(--brand-rgb);
    --bs-link-hover-color: var(--brand-600); --bs-link-hover-color-rgb: 26, 63, 192;
    --bs-focus-ring-color: rgba(var(--brand-rgb), .25);
}
.btn-primary {
    --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600);
    --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700);
    --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
    --bs-btn-focus-shadow-rgb: var(--brand-rgb);
}
.btn-outline-primary {
    --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand);
    --bs-btn-active-bg: var(--brand-600); --bs-btn-active-border-color: var(--brand-600);
    --bs-btn-disabled-color: var(--brand); --bs-btn-disabled-border-color: var(--brand);
    --bs-btn-focus-shadow-rgb: var(--brand-rgb);
}
.btn-lg.btn-primary { box-shadow: 0 8px 20px -10px rgba(var(--brand-rgb), .7); }
.form-control:focus, .form-select:focus { border-color: rgba(var(--brand-rgb), .55); box-shadow: 0 0 0 .25rem rgba(var(--brand-rgb), .18); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: rgba(var(--brand-rgb), .55); box-shadow: 0 0 0 .25rem rgba(var(--brand-rgb), .18); }
.form-switch .form-check-input:focus:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2392a8f5'/%3e%3c/svg%3e");
}
.btn-check:checked + .btn-outline-primary { color: #fff; }
.dropdown-item:active { background-color: var(--brand); }
/* Marca: mismo icono azul que la landing */
.app-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; color: #0b1220; text-decoration: none; letter-spacing: -.01em; }
.app-brand:hover { color: #0b1220; }
.app-brand-mark { width: 1.85rem; height: 1.85rem; border-radius: .55rem; background: var(--brand); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; }
.app-brand-lg { font-size: 1.25rem; }
.app-brand-lg .app-brand-mark { width: 2.2rem; height: 2.2rem; font-size: 1.1rem; }
.border-primary { border-color: var(--brand) !important; }

:root { --app-bg: #f6f7f9; }
body { background: var(--app-bg); -webkit-tap-highlight-color: transparent; }
body.guest { background: #fff; }
.app-container { max-width: 640px; }
.min-w-0 { min-width: 0; }

/* Login / registro centrados en pantalla */
.auth-box { max-width: 380px; margin: 8vh auto 0; }

/* Tarjetas de documentos */
.doc-card { border: 1px solid #e9ecef; border-radius: .9rem; }
.doc-card .btn-sm { padding-top: .5rem; padding-bottom: .5rem; border-radius: .6rem; }
.doc-card.is-new { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .15); }

/* Botón flotante "+" */
.fab {
    position: fixed; right: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom));
    width: 3.75rem; height: 3.75rem; font-size: 1.6rem;
    display: flex; align-items: center; justify-content: center; z-index: 1030;
}
body:has(.fab) main { padding-bottom: 6rem !important; }

/* Formulario */
.form-control, .btn-lg { border-radius: .75rem; }
textarea.autosize { min-height: 10rem !important; resize: none; overflow: hidden; }
/* Barra inferior fija de los formularios: fondo opaco y por encima de las etiquetas flotantes (z-index 2 en Bootstrap),
   de borde a borde del contenedor para que no asome el formulario por los lados. */
.sticky-submit {
    position: sticky; bottom: 0; z-index: 20;
    margin: 0 -.75rem; padding: .75rem .75rem calc(.75rem + env(safe-area-inset-bottom));
    background: rgba(246, 247, 249, .97);
    -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid #e3e6ec; box-shadow: 0 -8px 18px -12px rgba(11, 18, 32, .25);
}
body.guest .sticky-submit { background: rgba(255, 255, 255, .97); }

/* Selector de tipo de cuenta en el registro */
.type-option { height: 100%; padding: .9rem .5rem; border-radius: .9rem; font-size: .9rem; line-height: 1.2; }

/* Formulario DeCA */
#deca-form .card { border: 1px solid #e9ecef; border-radius: .9rem; }
.shipment { background: #fff; }

/* Resultados del buscador de la agenda */
.contact-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 1040; margin-top: .25rem; max-height: 22rem; overflow-y: auto; border-radius: .75rem; }

/* Textos legales */
.legal h2 { font-size: 1rem; font-weight: 700; margin-top: 1.5rem; }
.legal { font-size: .95rem; }

/* ================= Landing (móvil primero) ================= */
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
    font-weight: 200 800; font-style: normal; font-display: swap;
}
.landing {
    --ink: #0b1220; --text: #3d4658; --muted: #6b7385; --line: #e6e9f0;
    --brand-ink: #0e1d4d; /* --brand, --brand-600 y --brand-soft vienen de :root */
    --accent: #ffb020; --ok: #12a150; --tint: #f6f8fc;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text); background: #fff; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
.landing h1, .landing h2, .landing h3 { color: var(--ink); }
.lp-container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.lp-narrow { max-width: 720px; }

/* Navegación */
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding-top: calc(1rem + env(safe-area-inset-top)); padding-bottom: 1rem; }
.lp-brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.lp-brand-mark { width: 2rem; height: 2rem; border-radius: .6rem; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.lp-nav-login { font-weight: 700; color: var(--brand); text-decoration: none; padding: .5rem 1rem; border-radius: 999px; background: var(--brand-soft); }

/* Portada */
.lp-hero { background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(35, 80, 230, .16), transparent 60%),
    radial-gradient(40rem 24rem at -10% 10%, rgba(255, 176, 32, .12), transparent 60%),
    linear-gradient(#f7f9ff, #fff); padding-bottom: 2.5rem; }
.lp-hero-grid { display: grid; gap: 2.25rem; padding-top: .75rem; }
.lp-pill { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 700; color: var(--brand-ink);
    background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .85rem; box-shadow: 0 1px 2px rgba(11, 18, 32, .05); }
.lp-pill-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(18, 161, 80, .18); }
.lp-h1 { font-size: clamp(2.35rem, 10.5vw, 3.9rem); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; margin: 1.1rem 0 1rem; }
.lp-mark { background: linear-gradient(transparent 62%, rgba(255, 176, 32, .55) 62%, rgba(255, 176, 32, .55) 92%, transparent 92%); }
.lp-sub { font-size: 1.1rem; line-height: 1.55; color: var(--text); margin: 0; max-width: 34rem; }

.lp-actions { display: grid; gap: .65rem; margin-top: 1.75rem; }
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3.6rem; padding: 0 1.5rem;
    border-radius: 1rem; font-weight: 700; font-size: 1.1rem; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.lp-btn:active { transform: scale(.98); }
.lp-btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -8px rgba(35, 80, 230, .65); }
.lp-btn-primary:hover { background: var(--brand-600); color: #fff; }
.lp-btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.lp-btn-ghost:hover { border-color: #cfd5e2; color: var(--ink); }
.lp-btn-white { background: #fff; color: var(--brand-ink); }
.lp-btn-white:hover { color: var(--brand); }
.lp-btn-ghost-dark { color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.lp-btn-ghost-dark:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.lp-trust { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .88rem; font-weight: 600; color: var(--muted); }
.lp-trust i { color: var(--ok); margin-right: .25rem; font-size: 1rem; }

/* Móvil con la app */
.lp-hero-visual { position: relative; display: flex; justify-content: center; padding: .5rem 0 1rem; }
.lp-phone { position: relative; width: min(18.5rem, 82vw); border-radius: 2.6rem; background: #0b1220; padding: .7rem;
    box-shadow: 0 40px 80px -30px rgba(14, 29, 77, .55), 0 0 0 1px rgba(255, 255, 255, .06) inset; }
.lp-phone-notch { position: absolute; top: .95rem; left: 50%; transform: translateX(-50%); width: 5.5rem; height: 1.35rem; border-radius: 1rem; background: #0b1220; z-index: 2; }
.lp-screen { background: var(--tint); border-radius: 2rem; padding: 2.6rem .9rem 1rem; display: grid; gap: .7rem; }
.lp-app-top { display: flex; align-items: center; justify-content: space-between; }
.lp-app-title { font-weight: 800; color: var(--ink); font-size: .92rem; }
.lp-app-chip { font-size: .68rem; font-weight: 700; color: #fff; background: var(--ink); border-radius: 999px; padding: .2rem .55rem; }
.lp-app-card { background: #fff; border-radius: 1rem; padding: .8rem .9rem; border: 1px solid var(--line); }
.lp-app-route { font-weight: 800; color: var(--ink); font-size: 1rem; }
.lp-app-route i { color: var(--brand); font-size: .85rem; }
.lp-app-meta { font-size: .76rem; color: var(--muted); margin-top: .2rem; }
.lp-app-qr { background: #fff; border-radius: 1rem; border: 1px solid var(--line); padding: .85rem; display: grid; justify-items: center; gap: .45rem; }
.lp-app-qr svg { width: 7.5rem; height: 7.5rem; }
.lp-app-qr span { font-size: .72rem; font-weight: 700; color: var(--muted); }
.lp-app-buttons { display: grid; gap: .45rem; }
.lp-app-wa, .lp-app-ghost { display: flex; align-items: center; justify-content: center; gap: .4rem; border-radius: .8rem; padding: .62rem; font-size: .8rem; font-weight: 700; }
.lp-app-wa { background: #1faa59; color: #fff; }
.lp-app-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.lp-float { position: absolute; display: inline-flex; align-items: center; gap: .4rem; background: #fff; border-radius: .9rem; padding: .55rem .8rem;
    font-size: .82rem; font-weight: 600; color: var(--ink); box-shadow: 0 14px 30px -12px rgba(14, 29, 77, .35); border: 1px solid var(--line); }
.lp-float i { color: var(--brand); font-size: 1.05rem; }
/* Móvil: en las esquinas del teléfono, sin tapar la pantalla. */
.lp-float-1 { top: -.4rem; left: .25rem; }
.lp-float-2 { bottom: -.2rem; right: .25rem; }
@media (min-width: 640px) {
    .lp-float-1 { top: 22%; left: calc(50% - 13rem); }
    .lp-float-2 { top: auto; bottom: 16%; right: calc(50% - 13rem); }
}
.lp-float-2 i { color: var(--ok); }

/* Cifras */
.lp-stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.lp-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.lp-stats-grid > div { padding: 1.25rem .25rem; }
.lp-stats-grid > div + div { border-left: 1px solid var(--line); }
.lp-stats strong { display: block; font-size: 1.55rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.lp-stats span { font-size: .78rem; color: var(--muted); font-weight: 600; }

/* Secciones */
.lp-section { padding: 3.75rem 0; }
.lp-section-tint { background: var(--tint); }
.lp-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin: 0 0 .5rem; }
.lp-h2 { font-size: clamp(1.75rem, 7vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin: 0 0 .9rem; }
.lp-h3 { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .15rem; }
.lp-text { font-size: 1.05rem; color: var(--text); margin-bottom: 1.5rem; }
.lp-fine { font-size: .8rem; color: var(--muted); margin-top: .75rem; }

.lp-features { display: grid; gap: 1rem; margin-top: 1.75rem; }
.lp-feature { background: #fff; border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem; box-shadow: 0 1px 2px rgba(11, 18, 32, .04); }
.lp-feature h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; margin: 1rem 0 .4rem; }
.lp-feature p { margin: 0; line-height: 1.6; }
.lp-feature-icon { width: 3rem; height: 3rem; flex: 0 0 3rem; border-radius: .9rem; background: var(--brand-soft); color: var(--brand);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; }

/* Vídeo */
.lp-video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 1.25rem; overflow: hidden;
    background: radial-gradient(30rem 16rem at 70% 20%, #23347a, #0e1d4d 70%); cursor: pointer; box-shadow: 0 30px 60px -30px rgba(14, 29, 77, .6); }
.lp-video img, .lp-video iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.lp-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 4.75rem; height: 4.75rem; border-radius: 50%;
    background: #fff; color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; padding-left: .25rem;
    box-shadow: 0 0 0 .7rem rgba(255, 255, 255, .15); }
.lp-video-soon { cursor: default; }
.lp-video-label { position: absolute; left: 0; right: 0; bottom: 1rem; text-align: center; color: rgba(255, 255, 255, .8); font-weight: 600; font-size: .9rem; }
.lp-video-file { background: #000; cursor: auto; }

/* Pasos en línea de tiempo */
.lp-steps { list-style: none; counter-reset: step; padding: 0; margin: 1.75rem 0 0; }
.lp-steps li { counter-increment: step; position: relative; padding: 0 0 1.75rem 4rem; }
.lp-steps li:last-child { padding-bottom: 0; }
.lp-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.75rem; height: 2.75rem; border-radius: 50%;
    background: var(--brand); color: #fff; font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 .4rem var(--brand-soft); }
.lp-steps li:not(:last-child)::after { content: ""; position: absolute; left: 1.35rem; top: 3.25rem; bottom: .5rem; width: 2px; background: var(--line); }
.lp-steps h3 { font-size: 1.15rem; font-weight: 800; margin: .45rem 0 .25rem; }
.lp-steps p { margin: 0; line-height: 1.6; }

/* Normativa */
.lp-legal-card { background: #fff; border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem; }
.lp-legal-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.lp-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.lp-checks li { position: relative; padding-left: 2rem; line-height: 1.5; }
.lp-checks li::before { content: "\F26A"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: -.05rem; color: var(--ok); font-size: 1.2rem; }

/* Cierre */
.lp-final { padding: 4rem 0; color: #fff; background:
    radial-gradient(40rem 20rem at 100% 0%, rgba(255, 176, 32, .22), transparent 60%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-ink) 100%); }
.lp-on-dark { color: #fff !important; }
.lp-on-dark-muted { color: rgba(255, 255, 255, .8); margin: 0 auto; }
.lp-actions-center { max-width: 26rem; margin-left: auto; margin-right: auto; }

.lp-footer { padding: 1.75rem 0 calc(6.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: .88rem; }
.lp-footer .lp-container { display: grid; gap: .9rem; justify-items: center; text-align: center; }
.lp-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.25rem; }
.lp-footer a { color: var(--muted); text-decoration: none; }
.lp-footer a:hover { color: var(--ink); }
.lp-brand-small { font-size: 1rem; }
.lp-brand-small .lp-brand-mark { width: 1.7rem; height: 1.7rem; font-size: .85rem; }

/* Contenido SEO: guía, ficha de datos, preguntas frecuentes */
.lp-prose p { font-size: 1.04rem; line-height: 1.7; margin: 0 0 1rem; }
.lp-prose h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; margin: 1.75rem 0 .5rem; }
.lp-prose strong { color: var(--ink); font-weight: 700; }
.lp-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1.5rem; }
.lp-facts > div { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: .85rem 1rem; }
.lp-facts span { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lp-facts b { display: block; color: var(--ink); font-size: .95rem; margin-top: .15rem; line-height: 1.3; }
.lp-list { padding-left: 1.2rem; margin: 0 0 1rem; display: grid; gap: .4rem; line-height: 1.6; }
.lp-list li::marker { color: var(--brand); }
.lp-cta-inline { display: grid; gap: 1rem; margin-top: 2rem; padding: 1.25rem; border-radius: 1.25rem; background: var(--brand-soft); border: 1px solid #d6e0fd; }
.lp-cta-inline b { display: block; color: var(--brand-ink); font-size: 1.1rem; }
.lp-cta-inline span { color: var(--text); font-size: .95rem; }
.lp-faq { display: grid; gap: .6rem; margin-top: 1.5rem; }
.lp-faq details { background: #fff; border: 1px solid var(--line); border-radius: 1rem; }
.lp-faq summary { list-style: none; cursor: pointer; padding: 1rem 3rem 1rem 1.15rem; position: relative; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "\F282"; font-family: "bootstrap-icons"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
    color: var(--brand); transition: transform .2s ease; }
.lp-faq details[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.lp-faq summary h3 { font-size: 1.02rem; font-weight: 700; margin: 0; line-height: 1.4; }
.lp-faq details p { margin: 0; padding: 0 1.15rem 1.1rem; line-height: 1.65; }
@media (min-width: 640px) {
    .lp-facts { grid-template-columns: repeat(4, 1fr); }
    .lp-cta-inline { grid-template-columns: 1fr auto; align-items: center; }
}

/* Barra fija inferior (móvil) */
.lp-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .25s ease; }
.lp-sticky.is-visible { transform: none; }
.lp-sticky .lp-btn { width: 100%; }

/* Ordenador: dos columnas en la portada y tres en los beneficios */
@media (min-width: 640px) {
    .lp-actions { grid-template-columns: auto auto; justify-content: start; }
    .lp-actions-center { justify-content: center; }
}
@media (min-width: 992px) {
    .lp-hero { padding-bottom: 4.5rem; }
    .lp-hero-grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 3rem; padding-top: 2.5rem; }
    .lp-features { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
    .lp-section { padding: 5.5rem 0; }
    .lp-footer { padding-bottom: 2rem; }
    .lp-sticky { display: none; }
    .lp-float-1 { left: 0; }
    .lp-float-2 { right: 0; }
}
@media (prefers-reduced-motion: reduce) { .lp-sticky, .lp-btn { transition: none; } }
