:root {
  --bg: #ffffff;
  --bg-alt: #f4f6fb;
  --ink: #0f1b3d;
  --ink-2: #3c4766;
  --muted: #66708c;
  --line: #e2e6f0;
  --card: #ffffff;
  --brand: #0f1b3d;
  --accent: #19b86a;
  --accent-ink: #ffffff;
  --accent-soft: #e3f8ee;
  --hl: #19b86a;
  --dark: #0f1b3d;
  --dark-2: #182754;
  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(15, 27, 61, .28);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1226;
    --bg-alt: #101a35;
    --ink: #eef1f8;
    --ink-2: #c4cbe0;
    --muted: #8f9abb;
    --line: #22305a;
    --card: #131e3d;
    --accent: #3ee08f;
    --accent-ink: #062615;
    --accent-soft: #123827;
    --hl: #3ee08f;
    --dark: #070d1c;
    --dark-2: #121c3a;
    --shadow: 0 18px 50px -20px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { 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", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .tabs button:focus-visible, summary:focus-visible, .menu-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-wa { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px -10px var(--accent); }
.btn-wa:hover { box-shadow: 0 14px 30px -10px var(--accent); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.ico { width: 20px; height: 20px; flex: none; }
.ico-md { width: 26px; height: 26px; color: var(--accent); }
.ico-lg { width: 34px; height: 34px; color: var(--accent); }

/* Navegación */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.logo b { font-weight: 800; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.menu-btn { display: none; background: none; border: 0; padding: 10px; margin-left: 4px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Hero */
.hero { padding: 72px 0 84px; background:
  radial-gradient(800px 400px at 85% 10%, var(--accent-soft), transparent 70%),
  radial-gradient(600px 300px at 0% 100%, color-mix(in srgb, var(--accent-soft) 60%, transparent), transparent 70%); }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
h1 { font-size: clamp(40px, 6vw, 66px); font-weight: 800; }
.hl { color: var(--hl); }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); margin: 22px 0 30px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.checks li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 6px; }

.hero-demo { position: relative; padding-bottom: 150px; }
.phone { background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; max-width: 380px; margin-left: auto; }
.phone-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--brand); color: #fff; }
.phone-top small { display: block; opacity: .7; font-size: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #062615; display: grid; place-items: center; font-weight: 800; }
.chat { padding: 18px 16px 22px; display: flex; flex-direction: column; gap: 10px; min-height: 300px; background: var(--bg-alt); }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; opacity: 0; transform: translateY(8px); animation: in .45s ease forwards; }
.msg.in { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--accent-soft); color: var(--ink); border-bottom-right-radius: 4px; }
.msg:nth-child(1) { animation-delay: .2s; }
.msg:nth-child(2) { animation-delay: 1s; }
.msg:nth-child(3) { animation-delay: 1.9s; }
.msg:nth-child(4) { animation-delay: 2.7s; }
@keyframes in { to { opacity: 1; transform: none; } }

.lead-card {
  position: absolute; left: 0; bottom: 0; width: 270px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px;
  box-shadow: var(--shadow); font-size: 13.5px;
  opacity: 0; transform: translateY(12px); animation: in .5s ease 3.5s forwards;
}
.lc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--muted); }
.lead-card > b { font-size: 16px; display: block; margin-bottom: 8px; }
.lc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border-top: 1px dashed var(--line); color: var(--ink-2); }
.lc-row span:first-child { color: var(--muted); }
.lc-next { margin-top: 8px; padding: 8px 10px; background: var(--bg-alt); border-radius: 10px; font-weight: 600; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill-new { background: var(--accent-soft); color: var(--accent); }
.pill-hot { background: #ffe9d6; color: #b4530a; }
.pill-mid { background: #e5ebff; color: #3651c9; }
.bar { display: inline-block; width: 90px; height: 7px; border-radius: 9px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }

/* Franja */
.band { background: var(--dark); color: #fff; padding: 46px 0; }
.band-in { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center; }
.band-in > p { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.3; font-weight: 600; }
.band-in > p b { color: var(--hl); }
.band-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.band-items b { display: block; margin-bottom: 4px; }
.band-items span { color: #b9c2dc; font-size: 14px; }

/* Secciones */
.sec { padding: 96px 0; }
.sec-alt { background: var(--bg-alt); }
.sec-head { max-width: 720px; margin-bottom: 48px; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.sub { color: var(--ink-2); font-size: 18px; margin-top: 16px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 800; margin-bottom: 16px; }
.steps h3, .channel h3, .feat h3, .plan h3 { font-size: 19px; margin-bottom: 8px; }
.steps p, .channel p, .feat p { color: var(--ink-2); font-size: 15px; }

.channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.channel { padding: 26px; border-radius: var(--radius); background: var(--bg-alt); }
.channel .ico-lg { margin-bottom: 14px; }

/* Giros */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tabs button {
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tab-panel { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 40px; }
.giro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.giro h3 { font-size: 26px; margin-bottom: 10px; }
.giro > div > p { color: var(--ink-2); margin-bottom: 18px; }
.quote { background: var(--bg-alt); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.quote p { padding: 12px 16px; border-radius: 16px; font-size: 15px; max-width: 92%; }
.q-in { background: var(--card); border: 1px solid var(--line); align-self: flex-start; }
.q-out { background: var(--accent-soft); align-self: flex-end; }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list li { position: relative; padding-left: 28px; color: var(--ink-2); }
.list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2319b86a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }
.list-light li { color: #c9d1e6; }

/* Funciones */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); transition: border-color .15s, transform .15s; }
.feat:hover { border-color: var(--accent); transform: translateY(-2px); }
.feat .ico-md { margin-bottom: 14px; }

/* Oscura */
.sec-dark { background: var(--dark); color: #fff; }
.sec-dark .sub { color: #c9d1e6; margin-bottom: 24px; }
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.panel-mock { background: var(--dark-2); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; padding: 10px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.pm-row { display: grid; grid-template-columns: 1.3fr 1fr .8fr; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; font-size: 14px; }
.pm-row + .pm-row { border-top: 1px solid rgba(255,255,255,.06); }
.pm-row small { display: block; color: #8f9abb; font-size: 12px; }
.pm-head { color: #8f9abb; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.pm-row .bar { background: rgba(255,255,255,.12); width: 100%; }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 32px 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); }
.plan h3 { font-size: 24px; margin: 0; }
.plan-for { color: var(--muted); margin-top: -10px; }
.plan .list { flex: 1; }
.plan-top { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan-badge { position: absolute; top: -13px; left: 28px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.note { margin-top: 28px; color: var(--muted); font-size: 15px; max-width: 820px; }

/* Línea de tiempo */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: t; }
.timeline li { counter-increment: t; padding-top: 22px; border-top: 3px solid var(--line); position: relative; }
.timeline li::before { content: counter(t, decimal-leading-zero); position: absolute; top: -15px; left: 0; background: var(--bg-alt); padding-right: 10px; color: var(--accent); font-weight: 800; font-size: 14px; }
.timeline li:first-child { border-color: var(--accent); }
.timeline b { display: block; font-size: 18px; margin-bottom: 6px; }
.timeline span { color: var(--ink-2); font-size: 15px; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 30px 18px 0; font-weight: 700; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 24px; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-2); }

/* CTA final */
.final { padding: 0 0 96px; }
.final-in { background: linear-gradient(135deg, var(--brand), #1c3a7a); color: #fff; border-radius: 32px; padding: 64px 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.final-in p { color: #c9d1e6; font-size: 18px; max-width: 36em; margin-bottom: 8px; }

/* Pie */
.foot { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 14px; }
.foot-in { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 32px; align-items: center; }
.logo-foot { font-size: 18px; color: var(--ink); }
.foot nav { display: flex; gap: 18px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot small { grid-column: 1 / -1; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(0,0,0,.45); cursor: pointer;
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .msg, .lead-card { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Tableta */
@media (max-width: 980px) {
  .hero-in, .split, .band-in, .giro { grid-template-columns: 1fr; }
  .hero-demo { max-width: 460px; margin: 0 auto; width: 100%; }
  .steps, .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .grid, .plans, .channels { grid-template-columns: repeat(2, 1fr); }
  .plans .plan-top { order: -1; grid-column: 1 / -1; }
}

/* Móvil */
@media (max-width: 760px) {
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav-cta { margin-left: auto; }
  .menu-btn { display: block; }
  .nav-in { gap: 12px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 44px 0 56px; }
  .sec { padding: 64px 0; }
  .band-items, .steps, .timeline, .grid, .plans, .channels { grid-template-columns: 1fr; }
  .plans .plan-top { grid-column: auto; }
  .tab-panel { padding: 24px 20px; }
  .phone { margin: 0 auto; }
  .lead-card { position: relative; width: auto; margin: -24px 12px 0; }
  .hero-demo { padding-bottom: 0; }
  .final-in { padding: 44px 22px; border-radius: 24px; }
  .foot-in { grid-template-columns: 1fr; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 20px; padding: 0 16px 4px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; }
  .pm-row { grid-template-columns: 1.2fr 1fr; }
  .pm-row > :last-child { display: none; }
  .btn-lg { width: 100%; }
}
@media (max-width: 380px) {
  .nav-cta { display: none; }
  .menu-btn { margin-left: auto; }
}
