/* ===================================================================
   LEX · Landing Page — Tokens y estilos globales
   =================================================================== */

:root {
    --bg: #f5f5f0;
    --surface: #fff;
    --surface2: #f0efe8;
    --border: #d4d0c8;
    --text: #1a1a2e;
    --muted: #5b6472;
    --accent: #1e3a5f;
    --accent2: #2d5a87;
    --highlight: #c0392b;
    --highlight2: #a93226;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #b03a2e;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
    --radius: 12px;
    --radius-lg: 20px;
    --font: 'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent2); text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---- NAV ---- */
header.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(245,245,240,.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand .logo {
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--accent); color: #fff;
    display: grid; place-items: center;
    font-weight: 900; letter-spacing: .5px;
}
.brand .sub { font-size: .72rem; color: var(--muted); font-weight: 500; line-height: 1.1; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--text); font-weight: 600; font-size: .92rem; }
.nav-links a:hover { color: var(--accent2); }
.lang-toggle { display: flex; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.lang-toggle button {
    border: none; background: var(--surface); padding: 5px 12px;
    font-size: .8rem; cursor: pointer; font-weight: 600; color: var(--muted);
}
.lang-toggle button.active { background: var(--accent); color: #fff; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-block; padding: 12px 22px; border-radius: 10px;
    font-weight: 700; font-size: .95rem; cursor: pointer;
    border: none; transition: transform .08s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--highlight); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--highlight2); }
.btn-navy { background: var(--accent); color: #fff; }
.btn-navy:hover { background: var(--accent2); }
.btn-ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent2); }
.btn-ghost:hover { background: var(--accent2); color: #fff; }
.btn-block { width: 100%; text-align: center; }

/* ---- HERO ---- */
section.hero {
    padding: 80px 20px 60px;
    background: radial-gradient(1200px 500px at 50% -10%, #e3ebf5, transparent 70%);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 50px;
    align-items: center;
    text-align: left;
}
.hero-copy { text-align: left; }
.hero-copy .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 6px 14px;
    font-size: .8rem; font-weight: 600; color: var(--accent2);
}
.hero h1 {
    font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.12;
    font-weight: 900; margin: 22px auto 18px 0; max-width: 820px;
    letter-spacing: -.5px;
}
.hero h1 em { font-style: normal; color: var(--highlight); }
.hero .lead {
    font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted);
    max-width: 640px; margin: 0 0 30px;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.model-chips { display: flex; gap: 10px; margin-top: 34px; flex-wrap: wrap; }
.model-chip {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 8px 16px;
    font-size: .82rem; color: var(--muted); font-weight: 600;
}
.model-chip b { color: var(--accent); font-size: 1.05rem; }

/* ---- HERO MOCKUP ANIMADO ---- */
.hero-mockup {
    position: relative;
    perspective: 1200px;
}
.mock-window {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: rotateY(-4deg) rotateX(2deg);
    transition: transform .4s;
}
.mock-window:hover { transform: rotateY(0) rotateX(0); }
.mock-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}
.mock-bar .dot {
    width: 11px; height: 11px; border-radius: 50%;
    display: inline-block;
}
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.mock-title {
    margin-left: 10px;
    font-size: .72rem; color: var(--muted);
    font-family: 'Menlo', 'Consolas', monospace;
}
.mock-body {
    display: grid; grid-template-columns: 1.2fr 1fr;
    gap: 0;
    min-height: 280px;
}
.mock-doc {
    padding: 18px;
    font-size: .82rem;
    line-height: 1.7;
    color: var(--text);
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.doc-line { margin-bottom: 8px; font-family: 'Menlo', 'Consolas', monospace; }
.doc-line-2, .doc-line-3, .doc-line-4 { color: var(--muted); }
.tok-name { background: #fdecea; padding: 1px 5px; border-radius: 4px; color: #b03a2e; font-weight: 600; }
.tok-id { background: #1a1a2e; color: #fff; padding: 1px 5px; border-radius: 4px; letter-spacing: 2px; }
.tok-addr, .tok-extra { background: #fef5e7; padding: 1px 5px; border-radius: 4px; color: #b7791f; }
.muted { color: var(--muted); }
.doc-firewall {
    margin-top: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    background: #eafaf1; border: 1px solid var(--success);
    border-radius: 8px; padding: 5px 10px;
    font-size: .7rem; font-weight: 700; color: #1e8449;
}
.mock-ai {
    padding: 18px;
    display: flex; flex-direction: column; gap: 10px;
    background: var(--bg);
}
.ai-bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: .8rem;
    color: var(--text);
    box-shadow: var(--shadow);
    animation: bubble-in .6s ease-out;
}
.ai-bubble-2 { animation-delay: .4s; opacity: 0; animation-fill-mode: forwards; }
.ai-tag {
    display: block;
    font-size: .65rem; font-weight: 700;
    color: var(--accent2); text-transform: uppercase;
    letter-spacing: .5px; margin-bottom: 4px;
}
.ai-pulse {
    height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--highlight), var(--accent2), var(--success));
    background-size: 200% 100%;
    animation: pulse-bar 2.4s infinite;
}
@keyframes pulse-bar {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes bubble-in {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}
.mock-floater {
    position: absolute; bottom: -18px; left: -18px;
    background: var(--accent);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: .82rem; font-weight: 700;
    box-shadow: var(--shadow-lg);
    transform: rotate(-3deg);
}

/* ---- HOW IT WORKS ---- */
.what {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
    margin-top: 40px;
}
.what-step {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 22px;
    box-shadow: var(--shadow); text-align: left;
}
.what-ic {
    flex: 0 0 42px; width: 42px; height: 42px;
    border-radius: 12px; background: var(--surface2);
    display: grid; place-items: center; font-size: 1.3rem;
}
.what-step h3 { font-size: 1rem; margin-bottom: 4px; }
.what-step p { font-size: .88rem; color: var(--muted); }

.how-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: 0;
    margin-top: 44px;
    align-items: start;
}
.how-step {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}
.step-num {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--highlight); color: #fff;
    font-size: .8rem; font-weight: 900;
    display: grid; place-items: center;
}
.step-icon { font-size: 2rem; margin: 10px 0 12px; }
.how-step h3 { font-size: 1rem; margin-bottom: 8px; }
.how-step p { font-size: .85rem; color: var(--muted); }
.how-arrow {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--muted);
    padding: 0 8px;
}

/* ---- USE CASES ---- */
.uc-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
    margin-top: 44px;
}
.uc-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform .15s;
}
.uc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.uc-card-pop { border-color: var(--highlight); box-shadow: var(--shadow-lg); }
.uc-role {
    font-weight: 800; font-size: 1.05rem; margin-bottom: 12px;
    color: var(--accent);
}
.uc-card p { color: var(--muted); font-size: .92rem; margin-bottom: 18px; flex: 1; }
.uc-metric {
    background: var(--surface2); border-radius: 10px;
    padding: 12px 16px;
    display: flex; align-items: baseline; gap: 8px;
}
.uc-metric b { font-size: 1.4rem; color: var(--highlight); font-weight: 900; }
.uc-metric span { font-size: .85rem; color: var(--muted); }

/* ---- TRUST BADGES ---- */
.trust-section { padding: 36px 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
.trust-row {
    display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; align-items: center;
}
.trust-badge {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: .82rem;
}
.trust-ic { font-size: 1.4rem; }
.trust-badge b { display: block; color: var(--text); font-weight: 800; }
.trust-badge span { color: var(--muted); font-size: .78rem; }

/* ---- STAT STRIP ---- */
.strip {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 18px; padding: 34px 20px 14px; text-align: center;
}
.strip .stat b { display: block; font-size: 1.6rem; color: var(--accent); font-weight: 900; }
.strip .stat span { font-size: .82rem; color: var(--muted); }

/* ---- SECTIONS ---- */
section.section { padding: 70px 20px; }
.section h2 {
    font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 900;
    text-align: center; letter-spacing: -.4px;
}
.section .kick {
    text-align: center; color: var(--highlight); font-weight: 700;
    font-size: .85rem; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 10px;
}
.section .lead { color: var(--muted); text-align: center; max-width: 580px; margin: 14px auto 0; }

/* ---- FEATURES GRID ---- */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 44px; }
.feat {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 26px;
    box-shadow: var(--shadow); transition: transform .15s;
}
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feat .ic {
    width: 46px; height: 46px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 16px;
}
.feat h3 { font-size: 1.12rem; margin-bottom: 8px; }
.feat p { font-size: .92rem; color: var(--muted); }

/* ---- PRICING ---- */
.pricing { margin-top: 46px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; align-items: stretch; }
.plan {
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px;
    display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow);
}
.plan.featured { border-color: var(--highlight); box-shadow: var(--shadow-lg); }
.plan .tag {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--highlight); color: #fff; font-size: .7rem; font-weight: 800;
    letter-spacing: 1px; text-transform: uppercase; padding: 5px 14px;
    border-radius: 20px; white-space: nowrap;
}
.plan .pname { font-weight: 800; font-size: 1.15rem; }
.plan .pdesc { color: var(--muted); font-size: .85rem; margin-top: 4px; min-height: 42px; }
.plan .price { margin: 18px 0 6px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan .price .amount { font-size: 2.4rem; font-weight: 900; line-height: 1; }
.plan .price .cur { color: var(--muted); font-size: .95rem; font-weight: 600; }
.plan .price .per { color: var(--muted); font-size: .8rem; }
.plan .price .amount.contact-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent);
    background: var(--surface2);
    padding: 8px 14px;
    border-radius: 10px;
    line-height: 1.2;
}
.plan ul { list-style: none; margin: 18px 0 24px; flex: 1; }
.plan li {
    font-size: .88rem; color: var(--text); padding: 7px 0 7px 26px;
    position: relative; border-top: 1px solid var(--surface2);
}
.plan li:first-child { border-top: none; }
.plan li::before { content: "✓"; position: absolute; left: 2px; color: var(--success); font-weight: 800; }
.plan li.no { opacity: .45; }
.plan li.no::before { content: "–"; color: var(--muted); }
.pricing-note { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 22px; }

/* ---- PRIVACY ---- */
.privacy {
    background: var(--accent); color: #eaf0f7;
    border-radius: var(--radius-lg); padding: 46px;
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 34px;
    align-items: center; box-shadow: var(--shadow-lg);
}
.privacy h2 { color: #fff; text-align: left; font-size: clamp(1.5rem, 3.5vw, 2rem); }
.privacy p { color: #cfdae7; margin-top: 12px; font-size: .95rem; }
.privacy .chip-list { display: grid; gap: 12px; }
.privacy .chip {
    display: flex; gap: 12px; align-items: flex-start;
    background: rgba(255,255,255,.07); border-radius: 14px; padding: 16px;
}
.privacy .chip b { display: block; color: #fff; font-size: .95rem; }
.privacy .chip span { color: #c7d3e2; font-size: .84rem; }

/* ---- FORMS ---- */
.forms { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 44px; }
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow);
}
.card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.card .cd { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .8rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.field input, .field select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border);
    border-radius: 10px; font-size: .95rem; font-family: var(--font); background: var(--bg);
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent2); border-color: transparent; }
.msg {
    margin-top: 14px; font-size: .9rem; font-weight: 600;
    border-radius: 10px; padding: 12px 14px; display: none;
}
.msg.ok { display: block; background: #eafaf1; color: #1e8449; border: 1px solid var(--success); }
.msg.err { display: block; background: #fdecea; color: #b03a2e; border: 1px solid var(--danger); }
.hint { font-size: .78rem; color: var(--muted); margin-top: 8px; }

/* ---- FOOTER ---- */
footer { margin-top: 60px; border-top: 1px solid var(--border); background: var(--surface2); }
.foot-inner {
    max-width: 1120px; margin: 0 auto; padding: 32px 20px;
    display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
    justify-content: space-between; color: var(--muted); font-size: .84rem;
}
.foot-inner .brand { color: var(--text); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- MOBILE ---- */
@media (max-width: 1100px) {
    .how-grid {
        grid-template-columns: 1fr 1fr;
    }
    .how-arrow { display: none; }
}
@media (max-width: 1050px) {
    .feat-grid, .pricing { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .strip { grid-template-columns: repeat(2, 1fr); }
    .what { grid-template-columns: 1fr; }
    .feat-grid, .pricing, .uc-grid { grid-template-columns: 1fr; }
    .privacy, .forms { grid-template-columns: 1fr; }
    .how-grid { grid-template-columns: 1fr; }
    .how-arrow { display: none; }
    .nav-links a.link { display: none; }
    .hero { padding: 60px 20px 50px; }
    .hero-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .hero-copy { text-align: center; }
    .hero-copy h1 { margin-left: auto; margin-right: auto; }
    .hero .cta-row { justify-content: center; }
    .model-chips { justify-content: center; }
    .mock-window { transform: none; }
    .plan.featured { order: -1; }
    .trust-row { gap: 12px; }
    .trust-badge { flex: 1 1 140px; }
}
@media (max-width: 560px) {
    .strip { grid-template-columns: repeat(2, 1fr); }
    .brand .sub { display: none; }
    .mock-body { grid-template-columns: 1fr; }
    .mock-doc { border-right: none; border-bottom: 1px solid var(--border); }
}
