/* =============================================
   ARCHIVO: assets/css/landing.css
   Landing pública e-videncia
   ✅ Responsivo (mobile-first)
   ✅ Variables consistentes con login.php
   ✅ PWA-ready (safe-area, touch targets)
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:    #4F46E5;
    --primary-d:  #3730a3;
    --secondary:  #10B981;
    --accent:     #6366f1;
    --bg-dark:    #0f1a2e;
    --bg-mid:     #1a2d4a;
    --card-bg:    #ffffff;
    --text:       #1e293b;
    --text-light: #f8fafc;
    --muted:      #64748b;
    --border:     #e2e8f0;
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --shadow-card: 0 4px 24px rgba(0,0,0,.10);
    --shadow-feat: 0 8px 32px rgba(79,70,229,.12);
    --max-w:      1100px;
    --nav-h:      64px;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ─── FONDO ANIMADO ─────────────────────────── */
#bg-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(99,120,255,.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,120,255,.10) 1px, transparent 1px);
    background-size: 44px 44px;
}

#bg-particles {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}

#bg-lines {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

/* ─── CONTAINER ─────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
    position: relative; z-index: 1;
}

/* ─── NAVBAR ────────────────────────────────── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(15,26,46,.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding-top: env(safe-area-inset-top);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto; padding: 0 1.25rem;
    height: var(--nav-h);
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
}

.nav-brand {
    display: flex; align-items: center; gap: .6rem;
    text-decoration: none; flex-shrink: 0;
}
.nav-logo { width: 36px; height: 36px; object-fit: contain; }
.nav-name {
    font-size: 1.2rem; font-weight: 800;
    color: #fff; letter-spacing: -.4px;
}

.nav-links {
    display: none;
    list-style: none; gap: 1.75rem;
}
.nav-links a {
    color: rgba(255,255,255,.75); text-decoration: none;
    font-size: .9rem; font-weight: 500;
    transition: color .2s;
}
.nav-links a:hover { color: #fff; }

.nav-actions { display: flex; align-items: center; gap: .75rem; }

.btn-install {
    background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.4);
    color: #10B981; border-radius: 9999px;
    padding: .4rem 1rem; font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: background .2s;
}
.btn-install:hover { background: rgba(16,185,129,.25); }

.btn-login-nav {
    background: var(--primary); color: #fff;
    padding: .5rem 1.25rem; border-radius: 9999px;
    font-size: .88rem; font-weight: 700;
    text-decoration: none; white-space: nowrap;
    transition: background .2s, transform .1s;
    min-height: 44px; display: inline-flex; align-items: center;
}
.btn-login-nav:hover { background: var(--primary-d); transform: translateY(-1px); }

/* Burger */
.nav-burger {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: .5rem; min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center;
}
.nav-burger span {
    display: block; width: 22px; height: 2px;
    background: rgba(255,255,255,.8); border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú móvil */
.nav-mobile {
    display: none; flex-direction: column; gap: .25rem;
    padding: .75rem 1.25rem 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
    color: rgba(255,255,255,.8); text-decoration: none;
    font-size: .95rem; padding: .6rem .5rem;
    border-radius: var(--radius-sm);
    transition: background .2s;
}
.nav-mobile a:hover { background: rgba(255,255,255,.07); }
.btn-login-mobile {
    margin-top: .5rem;
    background: var(--primary) !important; color: #fff !important;
    text-align: center; border-radius: 9999px !important;
    padding: .7rem 1rem !important; font-weight: 700;
}

/* ─── HERO ──────────────────────────────────── */
.hero {
    min-height: calc(100vh - var(--nav-h));
    display: flex; align-items: center;
    padding: 4rem 0 5rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(79,70,229,.35) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(16,185,129,.25) 0%, transparent 50%);
}

.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.35);
    color: #10B981; border-radius: 9999px;
    padding: .35rem 1rem; font-size: .8rem; font-weight: 600;
    margin-bottom: 1.75rem;
}
.badge-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #10B981; animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(.7); }
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 800; color: #fff;
    line-height: 1.12; letter-spacing: -.03em;
    margin-bottom: 1.25rem;
}
.gradient-text {
    background: linear-gradient(135deg, #10B981, #6366f1);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: clamp(.95rem, 2vw, 1.15rem);
    color: rgba(255,255,255,.7); max-width: 560px;
    margin-bottom: 2.25rem; line-height: 1.7;
}

.hero-ctas {
    display: flex; flex-wrap: wrap; gap: .85rem;
    margin-bottom: 3rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; text-decoration: none;
    padding: .85rem 2rem; border-radius: 9999px;
    font-size: 1rem; font-weight: 700;
    transition: opacity .2s, transform .15s;
    min-height: 48px; display: inline-flex; align-items: center;
}
.btn-primary:hover { opacity: .9; transform: translateY(-2px); }
.btn-primary--full { width: 100%; justify-content: center; }

.btn-ghost {
    background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.2);
    color: #fff; text-decoration: none;
    padding: .85rem 2rem; border-radius: 9999px;
    font-size: 1rem; font-weight: 600;
    transition: background .2s, transform .15s;
    min-height: 48px; display: inline-flex; align-items: center;
}
.btn-ghost:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }

.hero-stats {
    display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem;
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.5rem; font-weight: 800; color: #fff; }
.stat span   { font-size: .78rem; color: rgba(255,255,255,.55); }
.stat-div    { width: 1px; height: 36px; background: rgba(255,255,255,.15); }

/* ─── SECCIONES ─────────────────────────────── */
.section {
    padding: 5rem 0;
    background: #f8fafc;
    position: relative; z-index: 1;
}
.section--dark { background: var(--bg-mid); }
.section--cta  { background: var(--bg-dark); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800; color: var(--text);
    letter-spacing: -.02em; margin: .5rem 0 .75rem;
}
.section-header p { color: var(--muted); max-width: 520px; margin: 0 auto; }
.section-header--light h2 { color: #fff; }
.section-header--light p  { color: rgba(255,255,255,.65); }

.section-tag {
    display: inline-block;
    background: rgba(79,70,229,.1); border: 1px solid rgba(79,70,229,.25);
    color: var(--primary); border-radius: 9999px;
    padding: .25rem .9rem; font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: .75rem;
}
.section-tag--light {
    background: rgba(16,185,129,.15); border-color: rgba(16,185,129,.35);
    color: #10B981;
}

/* ─── FEATURES GRID ─────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 1.75rem 1.5rem;
    transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-feat);
}
.feature-card--highlight {
    border-color: rgba(79,70,229,.3);
    background: linear-gradient(135deg, rgba(79,70,229,.04), rgba(16,185,129,.03));
}

.feat-icon { font-size: 2rem; margin-bottom: .85rem; }
.feature-card h3 {
    font-size: 1.05rem; font-weight: 700; color: var(--text);
    margin-bottom: .5rem;
}
.feature-card p { font-size: .9rem; color: var(--muted); line-height: 1.6; }

.link-mas {
    color: var(--primary); font-weight: 700;
    text-decoration: none; border-bottom: 1.5px solid rgba(79,70,229,.35);
    transition: color .2s, border-color .2s;
}
.link-mas:hover { color: var(--secondary); border-color: var(--secondary); }

/* ─── NOTA LEGAL COMPARATIVA ────────────────── */
.compare-legal {
    margin-top: .6rem; font-size: .72rem;
    color: rgba(255,255,255,.3); text-align: center;
    font-style: italic;
}

/* ─── DIFERENCIADORES ÚNICOS ────────────────── */
.diff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.diff-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 1.75rem 1.5rem;
    transition: transform .2s, box-shadow .2s;
}
.diff-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-feat); }

.diff-card--primary {
    border-color: rgba(79,70,229,.35);
    background: linear-gradient(135deg, rgba(79,70,229,.04), rgba(16,185,129,.03));
    grid-column: span 2;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 1rem;
}
.diff-card--primary .diff-icon { grid-row: 1; grid-column: 1; font-size: 2.2rem; align-self: start; }
.diff-card--primary h3         { grid-row: 1; grid-column: 2; }
.diff-card--primary p          { grid-row: 2; grid-column: 2; }
.diff-card--primary .diff-detail { grid-row: 3; grid-column: 2; }

.diff-icon { font-size: 2rem; margin-bottom: .85rem; }
.diff-card h3 {
    font-size: 1rem; font-weight: 700; color: var(--text);
    margin-bottom: .5rem;
}
.diff-card p { font-size: .88rem; color: var(--muted); line-height: 1.6; }

.diff-detail {
    margin-top: .85rem; font-size: .78rem; font-weight: 600;
    color: var(--primary);
    background: rgba(79,70,229,.08); border-radius: 6px;
    padding: .4rem .75rem; display: inline-block;
}

/* ─── RUBROS / PLANTILLAS ───────────────────── */
.rubros-grid {
    display: flex; flex-wrap: wrap; gap: .65rem;
    margin-bottom: 2rem;
}

.rubro-pill {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.82);
    border-radius: 9999px;
    padding: .45rem 1rem;
    font-size: .82rem; font-weight: 500;
    transition: background .2s, border-color .2s;
    cursor: default;
}
.rubro-pill:hover {
    background: rgba(79,70,229,.25);
    border-color: rgba(79,70,229,.5);
    color: #fff;
}

.rubros-cta {
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between;
    gap: 1rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-md); padding: 1.5rem 1.75rem;
}
.rubros-cta-text {
    font-size: .92rem; color: rgba(255,255,255,.75); line-height: 1.6;
}
.rubros-cta-text strong { color: #fff; display: block; margin-bottom: .2rem; }

/* ─── COMPARATIVA ───────────────────────────── */
.compare-wrap { max-width: 820px; margin: 0 auto; }
.compare-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }

.compare-table {
    width: 100%; border-collapse: collapse;
    background: rgba(255,255,255,.05);
    border-radius: var(--radius-md); overflow: hidden;
    font-size: .88rem;
}
.compare-table th {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.6); font-weight: 600;
    padding: .85rem 1rem; text-align: left;
    white-space: nowrap;
}
.compare-table td {
    padding: .9rem 1rem; color: rgba(255,255,255,.8);
    border-top: 1px solid rgba(255,255,255,.06);
}
.compare-highlight td {
    background: rgba(79,70,229,.18);
    color: #fff; font-weight: 500;
}
.td-green { color: #10B981; font-size: .82rem; }
.td-muted { color: rgba(255,255,255,.45); font-size: .82rem; }
.badge-rec {
    display: inline-block; margin-left: .5rem;
    background: #10B981; color: #fff;
    font-size: .7rem; font-weight: 700;
    padding: .15rem .55rem; border-radius: 9999px;
    vertical-align: middle;
}

.compare-note {
    margin-top: 1.25rem; font-size: .88rem;
    color: rgba(255,255,255,.6); text-align: center;
}
.compare-note strong { color: #10B981; }

/* ─── PRECIOS ───────────────────────────────── */
.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem; margin-bottom: 3rem;
    align-items: start;
}

.price-card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 2rem 1.75rem;
    position: relative;
    transition: transform .2s, box-shadow .2s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.price-card--featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79,70,229,.10);
}

.price-popular {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; font-size: .75rem; font-weight: 700;
    padding: .25rem 1rem; border-radius: 9999px;
    white-space: nowrap;
}

.price-tier {
    font-size: .75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: var(--primary); margin-bottom: .35rem;
}
.price-range-label {
    font-size: .85rem; color: var(--muted); margin-bottom: 1rem;
}
.price-amount {
    font-size: 2rem; font-weight: 800; color: var(--text);
    line-height: 1.1; margin-bottom: .35rem;
}
.price-amount span { font-size: .9rem; font-weight: 400; color: var(--muted); }
.price-iva { font-size: .78rem; color: var(--muted); margin-bottom: 1.25rem; }

.price-features {
    list-style: none; margin-bottom: 1.25rem;
}
.price-features li {
    font-size: .88rem; color: var(--text);
    padding: .3rem 0;
    border-bottom: 1px solid var(--border);
}
.price-features li:last-child { border-bottom: none; }

.price-min {
    font-size: .76rem; color: var(--muted);
    margin-bottom: 1.25rem;
}

.btn-price {
    display: block; width: 100%;
    text-align: center; text-decoration: none;
    padding: .8rem; border-radius: 9999px;
    font-size: .92rem; font-weight: 700;
    border: 2px solid var(--primary); color: var(--primary);
    transition: background .2s, color .2s;
    min-height: 48px; display: flex; align-items: center; justify-content: center;
}
.btn-price:hover { background: var(--primary); color: #fff; }
.btn-price--featured {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; border-color: transparent;
}
.btn-price--featured:hover { opacity: .9; }

/* Addons */
.addons-wrap {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 2rem 1.75rem;
}
.addons-title {
    font-size: 1rem; font-weight: 700; color: var(--text);
    margin-bottom: 1.25rem;
}
.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem; margin-bottom: 1rem;
}
.addon-item {
    display: flex; flex-direction: column; gap: .3rem;
    background: #f8fafc; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .9rem 1rem;
}
.addon-label { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.addon-qty   { font-size: .9rem; color: var(--text); font-weight: 500; }
.addon-price { font-size: .88rem; color: var(--primary); font-weight: 700; margin-top: .25rem; }
.addon-price--free  { color: #10B981; }
.addon-price--quote { color: var(--muted); font-style: italic; }

.addons-note {
    font-size: .8rem; color: var(--muted); margin-top: .75rem;
}
.addons-note a { color: var(--primary); text-decoration: none; }
.addons-note a:hover { text-decoration: underline; }

/* ─── CTA FINAL ─────────────────────────────── */
.cta-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.cta-text h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800; color: #fff;
    margin: .5rem 0 .75rem;
}
.cta-text p { color: rgba(255,255,255,.65); line-height: 1.7; margin-bottom: 1.75rem; }

.cta-contacts { display: flex; flex-direction: column; gap: .75rem; }
.cta-contact-btn {
    display: flex; align-items: center; gap: .6rem;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.85); text-decoration: none;
    padding: .85rem 1.25rem; border-radius: var(--radius-sm);
    font-size: .92rem; font-weight: 500;
    transition: background .2s;
    min-height: 48px;
}
.cta-contact-btn:hover { background: rgba(255,255,255,.13); }
.cta-contact-btn--wa {
    background: rgba(37,211,102,.12); border-color: rgba(37,211,102,.3);
    color: #4ade80;
}
.cta-contact-btn--wa:hover { background: rgba(37,211,102,.2); }

.cta-login-card {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-lg); padding: 2.5rem 2rem;
    text-align: center; display: flex; flex-direction: column;
    align-items: center; gap: 1rem;
}
.cta-login-card img { border-radius: 50%; }
.cta-card-label { color: rgba(255,255,255,.75); font-size: .9rem; }
.cta-card-note  { font-size: .78rem; color: rgba(255,255,255,.4); line-height: 1.6; }

/* ─── FOOTER ────────────────────────────────── */
.footer {
    background: #060d1a; padding: 2rem 0;
    position: relative; z-index: 1;
    padding-bottom: env(safe-area-inset-bottom);
}
.footer-inner {
    display: flex; flex-wrap: wrap;
    justify-content: space-between; align-items: center;
    gap: 1rem; margin-bottom: 1rem;
}
.footer-brand {
    display: flex; flex-direction: column; gap: .2rem;
}
.footer-tagline { font-size: .75rem; color: rgba(255,255,255,.4); }
.footer-links {
    display: flex; gap: 1.5rem;
}
.footer-links a {
    font-size: .82rem; color: rgba(255,255,255,.5);
    text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: rgba(255,255,255,.8); }
.footer-copy { font-size: .75rem; color: rgba(255,255,255,.3); }

/* ─── RESPONSIVE ────────────────────────────── */
@media (min-width: 768px) {
    .nav-links { display: flex; }
    .nav-burger { display: none; }
    .cta-wrap { grid-template-columns: 1fr 340px; }
}

@media (max-width: 480px) {
    .hero { padding: 2.5rem 0 3rem; }
    .hero-stats { gap: 1rem; }
    .stat-div   { display: none; }
    .price-card { padding: 1.5rem 1.25rem; }
    .addons-wrap { padding: 1.5rem 1.1rem; }
    .cta-login-card { padding: 1.75rem 1.25rem; }
    .diff-card--primary {
        grid-column: span 1;
        display: block;
    }
    .diff-card--primary .diff-icon { margin-bottom: .85rem; }
    .rubros-cta { flex-direction: column; text-align: center; }
}