:root {
    --bg: #f8fafc;
    --bg-alt: #ffffff;
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --accent: #059669;
    --accent-light: #10b981;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
    --gradient: linear-gradient(135deg, #1e40af, #059669);
    --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; }

/* NAV */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    z-index: 900;
    transition: height 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.nav.scrolled {
    height: 60px;
    border-color: var(--border);
    box-shadow: var(--shadow);
}
.logo {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
}
.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(30, 64, 175, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(30, 64, 175, 0.35); }
.btn-outline {
    background: var(--bg-alt);
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-nav { padding: 10px 22px; font-size: 14px; }

/* HERO SPLIT */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: calc(var(--nav-h) + 40px) 5% 60px;
    position: relative;
}
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: orbFloat 12s ease-in-out infinite;
}
.hero-orb-1 { width: 400px; height: 400px; background: #93c5fd; top: -100px; right: 10%; }
.hero-orb-2 { width: 350px; height: 350px; background: #6ee7b7; bottom: 0; left: 5%; animation-delay: -4s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -30px); }
}
.hero-copy, .hero-preview { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #ecfdf5;
    color: var(--accent);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid #a7f3d0;
}
.hero h1 {
    font-size: clamp(36px, 4.5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text);
}
.hero h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}
.hero-stat strong { display: block; font-size: 24px; font-weight: 800; color: var(--primary); }
.hero-stat span { font-size: 13px; color: var(--text-muted); }

/* PREVIEW PANEL */
.preview-wrap {
    background: var(--bg-alt);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    animation: previewIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
@keyframes previewIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
.preview-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 6px;
    gap: 4px;
}
.preview-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s;
}
.preview-tab.active {
    background: var(--bg-alt);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.preview-body { padding: 20px; min-height: 340px; position: relative; }
.preview-pane {
    position: absolute;
    inset: 20px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s, transform 0.35s;
    pointer-events: none;
}
.preview-pane.active { opacity: 1; transform: none; pointer-events: auto; }

/* Mock POS */
.mock-pos-header { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.mock-pos-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}
.mock-pos-total {
    margin-top: 16px;
    padding: 14px;
    background: var(--gradient);
    color: #fff;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

/* Mock Inventario */
.mock-inv-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    align-items: center;
}
.mock-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.mock-badge.ok { background: #ecfdf5; color: #059669; }
.mock-badge.low { background: #fef3c7; color: #d97706; }

/* Mock Reportes (contabilidad style) */
.mock-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.mock-kpi {
    padding: 10px;
    border-radius: 10px;
    color: #fff;
    font-size: 11px;
}
.mock-kpi strong { display: block; font-size: 14px; margin-top: 4px; }
.mock-kpi.green { background: linear-gradient(135deg, #059669, #10b981); }
.mock-kpi.red { background: linear-gradient(135deg, #dc2626, #ef4444); }
.mock-kpi.blue { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.mock-report-list { display: flex; flex-direction: column; gap: 6px; }
.mock-report-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}
.mock-report-item i { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }

/* SECTIONS */
section { padding: 90px 5%; }
.section-head { text-align: center; max-width: 600px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.section-head p { color: var(--text-muted); font-size: 17px; }
.section-alt { background: var(--bg-alt); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.feature-card {
    background: var(--bg-alt);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #93c5fd;
}
.feature-icon {
    width: 52px; height: 52px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px; margin-bottom: 18px;
}
.feature-card h3 { font-size: 20px; margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: 15px; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* COMPARISON */
.compare-wrap {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-alt);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.compare-wrap table { width: 100%; border-collapse: collapse; }
.compare-wrap th, .compare-wrap td { padding: 18px 22px; text-align: left; font-size: 15px; }
.compare-wrap th { background: #f1f5f9; font-weight: 600; }
.compare-wrap tr:not(:last-child) td { border-bottom: 1px solid var(--border); }
.compare-wrap .bad { color: #dc2626; }
.compare-wrap .good { color: #059669; font-weight: 500; }

/* TESTIMONIALS CAROUSEL */
.testimonials-carousel {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 48px;
}
.testimonials-viewport {
    overflow: hidden;
}
.testimonials-track {
    display: flex;
    gap: 24px;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.testimonial-card {
    flex: 0 0 calc(33.333% - 16px);
    background: var(--bg-alt);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--border);
    min-width: 0;
    box-shadow: var(--shadow);
}
.stars { color: #fbbf24; margin-bottom: 12px; letter-spacing: 2px; }
.testimonial-card p { color: var(--text-muted); font-style: italic; margin-bottom: 18px; font-size: 15px; line-height: 1.6; }
.author { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.author-info h4 { font-size: 15px; margin-bottom: 2px; }
.author-info span { font-size: 13px; color: var(--text-muted); }
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    border-radius: 50%;
    cursor: pointer;
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
    z-index: 2;
}
.carousel-btn:hover { background: #fff; box-shadow: var(--shadow); }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}
.carousel-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.carousel-dot.active { background: var(--primary); transform: scale(1.15); }

/* PRICING */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}
.pricing-card {
    background: var(--bg-alt);
    padding: 36px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.pricing-card.popular {
    border: 2px solid var(--primary);
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}
.pricing-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.pricing-card.popular:hover { transform: scale(1.03) translateY(-8px); }
.price-tag {
    font-size: 44px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 16px 0 4px;
}
.pricing-card ul { list-style: none; text-align: left; margin: 24px 0; }
.pricing-card ul li {
    padding: 9px 0;
    color: var(--text-muted);
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}
.pricing-card ul li i { color: var(--accent); margin-right: 8px; }

/* CTA */
.cta-box {
    max-width: 800px;
    margin: 0 auto;
    background: var(--gradient);
    padding: 56px 40px;
    border-radius: 20px;
    text-align: center;
    color: #fff;
    box-shadow: 0 20px 60px rgba(30, 64, 175, 0.25);
}
.cta-box h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 14px; }
.cta-box p { opacity: 0.9; margin-bottom: 24px; font-size: 17px; }
.cta-box .btn-outline { background: #fff; border-color: #fff; }

/* FOOTER */
footer {
    padding: 36px 5%;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border);
}
footer a { color: var(--primary); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* LEGAL PAGES */
.legal-body { background: var(--bg); }
.legal-page { padding: 100px 5% 48px; min-height: 60vh; }
.legal-container {
    max-width: 780px;
    margin: 0 auto;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 44px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}
.legal-container h1 {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}
.legal-updated {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}
.legal-container section {
    margin-bottom: 16px;
}
.legal-container section:last-child {
    margin-bottom: 0;
}
.legal-container h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--primary);
}
.legal-container p,
.legal-container li {
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 15px;
    margin: 0 0 6px;
}
.legal-container p:last-child,
.legal-container ul:last-child {
    margin-bottom: 0;
}
.legal-container ul {
    padding-left: 1.25rem;
    margin: 0 0 6px;
}
.legal-container li { margin-bottom: 4px; }
.legal-container li:last-child { margin-bottom: 0; }
.nav .logo { text-decoration: none; color: inherit; }
@media (max-width: 640px) {
    .legal-container { padding: 28px 22px; }
    .legal-page { padding-top: 88px; }
}

/* WHATSAPP FAB */
.wa-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px; height: 56px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
    z-index: 800;
    text-decoration: none;
    animation: waPulse 2.5s ease-in-out infinite;
}
@keyframes waPulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 6px 32px rgba(37, 211, 102, 0.65), 0 0 0 8px rgba(37, 211, 102, 0.15); }
}

/* LOGIN DRAWER */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.login-drawer {
    position: fixed;
    top: 0; right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--bg-alt);
    z-index: 1200;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}
.login-drawer.open { transform: translateX(0); }
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
}
.drawer-header h3 { font-size: 22px; font-weight: 800; }
.drawer-close {
    width: 40px; height: 40px;
    border: none;
    background: #f1f5f9;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
    transition: background 0.2s;
}
.drawer-close:hover { background: #e2e8f0; color: var(--text); }
.drawer-body { padding: 28px; flex: 1; overflow-y: auto; }
.drawer-body p.sub { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.input-wrap { position: relative; }
.input-wrap i.left {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
}
.input-wrap input {
    width: 100%;
    padding: 14px 14px 14px 42px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: var(--bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    background: #fff;
}
.input-wrap input[type="password"] { padding-right: 44px; }
.toggle-pw {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 14px; color: var(--text-muted); }
.form-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.btn-login-submit {
    width: 100%;
    padding: 15px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}
.btn-login-submit:hover:not(:disabled) { transform: translateY(-1px); }
.btn-login-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.login-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}
.login-alert.show { display: flex; align-items: center; gap: 8px; }
.login-alert.error { background: #fef2f2; color: #991b1b; border-left: 3px solid #dc2626; }
.login-alert.success { background: #ecfdf5; color: #065f46; border-left: 3px solid #059669; }
.drawer-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* PROGRESS BAR */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: var(--gradient);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s;
}

@media (max-width: 992px) {
    .hero { grid-template-columns: 1fr; text-align: center; padding-top: calc(var(--nav-h) + 24px); }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-cta, .hero-stats { justify-content: center; }
    .nav-links { display: none; }
    .testimonial-card { flex: 0 0 calc(50% - 12px); }
    .pricing-card.popular { transform: none; }
}
@media (max-width: 576px) {
    .hero-stats { flex-direction: column; gap: 16px; align-items: center; }
    .login-drawer { max-width: 100%; }
    .testimonials-carousel { padding: 0 36px; }
    .testimonial-card { flex: 0 0 100%; }
    .carousel-btn { width: 32px; height: 32px; font-size: 12px; }
}
