/* =========================================================================
   KOMPAI · LANDING
   ========================================================================= */
:root {
    --primary: #0F766E;
    --primary-dark: #134E4A;
    --primary-light: #F0FDFA;
    --primary-soft: #CCFBF1;
    --accent: #F59E0B;
    --accent-dark: #D97706;
    --text: #0F172A;
    --text-soft: #475569;
    --border: #E2E8F0;
    --bg: #FFFFFF;
    --bg-soft: #F8FAFC;
    --wa: #25D366;
    --chat-bg: #ECE5DD;
    --chat-out: #DCF8C6;
    --radius: 18px;
    --shadow: 0 10px 30px -12px rgba(15, 23, 42, .25);
    --shadow-lg: 0 30px 60px -20px rgba(15, 23, 42, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(760px, 100% - 32px); }
.accent { color: var(--primary); }

/* BOTONES */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    border: 0; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none;
    padding: .8rem 1.4rem; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn--sm { padding: .55rem 1rem; font-size: .9rem; }
.btn--lg { padding: 1rem 1.7rem; font-size: 1.02rem; }
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 10px 20px -10px var(--primary); }
.btn--primary:hover { background: var(--primary-dark); }
.btn--ghost { background: transparent; color: var(--primary-dark); border: 2px solid var(--border); }
.btn--ghost:hover { border-color: var(--primary); }
.btn--accent { background: var(--accent); color: var(--text); }
.btn--accent:hover { background: #FBBF24; }

/* NAVEGACIÓN */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav__links a { text-decoration: none; color: var(--text-soft); font-weight: 600; font-size: .95rem; }
.nav__links a:hover { color: var(--primary); }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; margin-left: auto; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }
.mobile-menu { display: flex; flex-direction: column; gap: .4rem; padding: 0 16px 16px; }
.mobile-menu a:not(.btn) { padding: .7rem 0; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-menu .btn { margin-top: .6rem; }
.mobile-menu[hidden] { display: none; }

.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; }
.brand--footer img { height: 36px; }
.brand__mark {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
    font-weight: 800; font-size: 1.15rem; box-shadow: inset 0 -3px 0 var(--accent);
}
.brand__name { font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; }

/* PORTADA */
.hero {
    position: relative; overflow: hidden; padding: 72px 0 96px;
    background:
        radial-gradient(900px 500px at 85% 10%, rgba(20, 184, 166, .16), transparent 60%),
        radial-gradient(700px 400px at 0% 100%, rgba(245, 158, 11, .12), transparent 60%);
}
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.pill {
    display: inline-block; padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.2rem;
    background: var(--primary-light); color: var(--primary-dark); font-weight: 700; font-size: .85rem;
    border: 1px solid var(--primary-soft);
}
.lead { font-size: 1.15rem; color: var(--text-soft); max-width: 560px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1.4rem; }
.hero__checks { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; list-style: none; padding: 0; margin: 0; color: var(--text-soft); font-weight: 600; font-size: .93rem; }
.hero__checks li::before { content: '✓'; color: var(--primary); font-weight: 800; margin-right: .4rem; }

/* MAQUETA DEL TELÉFONO */
.hero__visual { position: relative; justify-self: center; }
.phone {
    width: 320px; border-radius: 38px; padding: 12px; background: #0F172A; box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
}
.phone__top {
    display: flex; align-items: center; gap: .7rem; padding: 14px 16px; color: #fff;
    background: #075E54; border-radius: 28px 28px 0 0;
}
.phone__top strong { display: block; font-size: .95rem; }
.phone__top small { opacity: .8; font-size: .75rem; }
.phone__avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; font-size: 1.1rem; }
.chat { display: flex; flex-direction: column; gap: .55rem; padding: 16px 12px 22px; background: var(--chat-bg); border-radius: 0 0 28px 28px; min-height: 420px; }
.msg {
    position: relative; max-width: 86%; padding: .55rem .75rem 1.15rem; border-radius: 12px;
    font-size: .86rem; line-height: 1.4; box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
    opacity: 0; transform: translateY(8px); animation: pop .45s ease forwards;
}
.msg time { position: absolute; right: 8px; bottom: 3px; font-size: .64rem; color: #64748B; }
.msg--in { align-self: flex-start; background: #fff; border-top-left-radius: 3px; }
.msg--out { align-self: flex-end; background: var(--chat-out); border-top-right-radius: 3px; }
.msg__link { display: block; margin-top: .4rem; color: #027EB5; font-weight: 700; }
.msg--card { display: flex; flex-direction: column; gap: .1rem; }
.msg--card b { margin-top: .25rem; }
.chat .msg:nth-child(1) { animation-delay: .3s; }
.chat .msg:nth-child(2) { animation-delay: 1.1s; }
.chat .msg:nth-child(3) { animation-delay: 1.9s; }
.chat .msg:nth-child(4) { animation-delay: 2.7s; }
@keyframes pop { to { opacity: 1; transform: none; } }

.float-card {
    position: absolute; display: flex; align-items: center; gap: .5rem; white-space: nowrap;
    padding: .65rem 1rem; border-radius: 14px; background: #fff; box-shadow: var(--shadow);
    font-weight: 700; font-size: .85rem; opacity: 0; animation: pop .5s ease forwards;
}
.float-card--a { top: 70px; left: -110px; animation-delay: 2.2s; }
.float-card--b { top: 112px; right: -120px; animation-delay: 3.1s; }
.float-card--c { bottom: -22px; left: -70px; animation-delay: 3.6s; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--green { background: var(--wa); box-shadow: 0 0 0 4px rgba(37, 211, 102, .2); }

/* SECCIONES */
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--primary-dark); color: #fff; }
.section__head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section__sub { color: var(--text-soft); font-size: 1.08rem; margin: 0; }
.kicker { display: inline-block; margin-bottom: .7rem; color: var(--accent-dark); font-weight: 800; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.kicker--light { color: var(--accent); }
.lead--light { color: #CCFBF1; }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* DOLORES */
.pain { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.pain__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1rem; border-radius: 14px; background: #FEF3C7; font-size: 1.5rem; }
.pain p { color: var(--text-soft); margin: 0; }

/* PASOS */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; list-style: none; padding: 0; margin: 0; counter-reset: s; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--primary-light); border: 1px solid var(--primary-soft); }
.step__num {
    display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 800; font-size: 1.1rem;
}
.step p { color: var(--text-soft); margin: 0; }

/* SECTORES */
.sectors { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 28px; }
.sector-btn {
    display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1rem; border-radius: 999px;
    border: 1.5px solid var(--border); background: #fff; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
    transition: all .15s ease;
}
.sector-btn:hover { border-color: var(--primary); }
.sector-btn[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.sector-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sector-panel {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 28px;
    background: #fff; border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.sector-panel__item { padding: 20px; border-radius: 14px; background: var(--bg-soft); }
.sector-panel__item small { display: block; margin-bottom: .45rem; color: var(--accent-dark); font-weight: 800; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.sector-panel__item p { margin: 0; font-weight: 600; }
.sector-panel__item--quote p { font-style: italic; }

/* FUNCIONES */
.feature { padding: 26px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; transition: border-color .15s ease, transform .15s ease; }
.feature:hover { border-color: var(--primary); transform: translateY(-3px); }
.feature > span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: .9rem; border-radius: 13px; background: var(--primary-light); font-size: 1.4rem; }
.feature p { margin: 0; color: var(--text-soft); }

/* CONTADORES */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0 1.8rem; display: grid; gap: .55rem; }
.checklist li { position: relative; padding-left: 1.8rem; }
.checklist li::before {
    content: '✓'; position: absolute; left: 0; top: .1rem; display: grid; place-items: center;
    width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark);
    font-size: .75rem; font-weight: 800;
}
.checklist--light li::before { background: rgba(255, 255, 255, .15); color: var(--accent); }
.accountant-card { padding: 24px; border-radius: 24px; background: #fff; color: var(--text); box-shadow: var(--shadow-lg); }
.accountant-card__head { margin-bottom: .8rem; font-weight: 800; font-size: 1.1rem; }
.client-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--border); font-weight: 600; font-size: .93rem; }
.tag { padding: .25rem .65rem; border-radius: 999px; font-size: .75rem; white-space: nowrap; }
.tag--ok { background: #DCFCE7; color: #166534; }
.tag--warn { background: #FEF3C7; color: #92400E; }
.tag--info { background: #DBEAFE; color: #1E40AF; }

/* PLANES */
.plan { position: relative; display: flex; flex-direction: column; padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; }
.plan--featured { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.plan__badge { position: absolute; top: -13px; left: 24px; padding: .25rem .8rem; border-radius: 999px; background: var(--accent); font-size: .75rem; font-weight: 800; }
.plan__price { margin: 0; font-size: 1.9rem; font-weight: 800; color: var(--primary-dark); letter-spacing: -.02em; }
.plan__price small { font-size: .9rem; font-weight: 600; color: var(--text-soft); margin-left: .15rem; }
.plan__for { color: var(--text-soft); font-size: .92rem; }
.plan .checklist { margin-bottom: 0; font-size: .93rem; }

/* MISIONES */
.missions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; list-style: none; padding: 0; margin: 0; }
.mission { position: relative; padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); }
.mission::after { content: ''; position: absolute; top: 28px; right: 28px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px #FEF3C7; }
.mission__badge { display: inline-block; margin-bottom: .9rem; padding: .25rem .7rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 800; }
.mission p { margin: 0; color: var(--text-soft); }

/* CONFIANZA */
.trust__item { padding: 24px; border-radius: var(--radius); background: var(--primary-light); border: 1px solid var(--primary-soft); }
.trust__item > span { display: block; font-size: 1.6rem; margin-bottom: .6rem; }
.trust__item p { margin: 0; color: var(--text-soft); font-size: .95rem; }

/* PREGUNTAS */
.faq details { margin-bottom: 12px; padding: 0 22px; border-radius: 14px; background: #fff; border: 1px solid var(--border); }
.faq summary { padding: 18px 0; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--primary); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--text-soft); padding-bottom: 18px; margin: 0; }

/* LLAMADO FINAL */
.cta { text-align: center; background: linear-gradient(180deg, var(--primary-light), #fff); }
.cta__form {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; padding: 28px; text-align: left;
    background: #fff; border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.cta__form label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
.cta__form input[type="text"], .cta__form select {
    width: 100%; padding: .8rem .9rem; border: 1.5px solid var(--border); border-radius: 12px; font: inherit; background: #fff;
}
.cta__form input:focus, .cta__form select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.cta__consent { grid-column: 1 / -1; display: flex !important; align-items: flex-start; gap: .6rem !important; font-weight: 500 !important; color: var(--text-soft); }
.cta__consent input { margin-top: .3rem; accent-color: var(--primary); }
.cta__form .btn { grid-column: 1 / -1; }
.cta__error { grid-column: 1 / -1; margin: 0; color: #B91C1C; font-weight: 600; text-align: center; }
.cta__error--ok { color: var(--primary-dark); }
/* CAMPO TRAMPA: FUERA DE LA PANTALLA (NO display:none, QUE ALGUNOS BOTS DETECTAN) */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* PIE */
.footer { padding: 40px 0; background: var(--text); color: #CBD5E1; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer p { margin: 0; }
.footer__small { font-size: .85rem; color: #94A3B8; }
.brand--footer .brand__name { color: #fff; }

/* BOTÓN FLOTANTE DE WHATSAPP */
.wa-float {
    position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; place-items: center;
    width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff;
    box-shadow: 0 12px 24px -8px rgba(37, 211, 102, .7); transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* ASÍ SE VE KOMPAI (CAPTURAS) */
.showcase__tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 32px; }
.showcase__panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); gap: 44px; align-items: center; }
.showcase__panel[hidden] { display: none; }
.showcase__copy h3 { font-size: 1.55rem; }
.showcase__copy p { color: var(--text-soft); font-size: 1.05rem; }
.browser { margin: 0; overflow: hidden; border-radius: 14px; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-lg); }
.browser__bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #CBD5E1; }
.browser img { width: 100%; height: auto; }
.phones { display: flex; justify-content: center; gap: 28px; }
.phone-shot { margin: 0; width: min(270px, 46%); text-align: center; }
.phone-shot img { width: 100%; height: auto; border-radius: 30px; border: 8px solid var(--text); box-shadow: var(--shadow-lg); }
.phone-shot figcaption { margin-top: 14px; font-weight: 700; color: var(--text-soft); font-size: .92rem; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .hero__inner, .split { grid-template-columns: 1fr; }
    .hero__visual { margin-top: 24px; }
    .steps, .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3, .sector-panel { grid-template-columns: 1fr 1fr; }
    .missions { grid-template-columns: 1fr; }
    .showcase__panel { grid-template-columns: 1fr; gap: 28px; }
    .showcase__copy { order: 2; }
}
@media (max-width: 760px) {
    .nav__links, .nav__inner > .btn { display: none; }
    .nav__toggle { display: block; }
    .hero { padding: 48px 0 72px; }
    .section { padding: 72px 0; }
    .steps, .grid--3, .grid--4, .sector-panel, .cta__form, .missions { grid-template-columns: 1fr; }
    .phone { width: min(300px, 100%); transform: none; }
    .float-card--a { left: -8px; top: -18px; }
    .float-card--b { right: -8px; top: -18px; left: auto; }
    .float-card--a { display: none; }
    .float-card--c { left: -8px; bottom: -18px; }
    .showcase__tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none; }
    .showcase__tabs .sector-btn { flex-shrink: 0; }
    .phones { gap: 14px; }
    .phone-shot img { border-width: 5px; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .msg, .float-card { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}
