/* Dilvert — sitio público (landing, cómo funciona, precio). Limpio y simple. */
:root {
  --bg: #FBFAF8;
  --cream: #F5F0E8;
  --ink: #201A13;
  --muted: #6E665B;
  --accent: #D4420A;
  --wa: #25D366;
  --line: rgba(32,26,19,0.10);
  --card: #FFFFFF;
  --shadow: 0 1px 3px rgba(32,26,19,.06), 0 10px 30px rgba(32,26,19,.05);
  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; line-height: 1;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .15s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #b8380a; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(32,26,19,.04); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn.block { width: 100%; }

/* Nav */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,250,248,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.brand-ico { width: 24px; height: 24px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a.muted { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav-links a.muted:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
@media (max-width: 760px) { .nav-links a.muted { display: none; } }

/* Sections */
section { padding: 86px 0; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); }
.center { text-align: center; }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head .lead { margin-top: 14px; }
.band { background: var(--cream); }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 15px; margin-top: 26px; }
.link-more:hover { gap: 9px; }

/* Hero */
.hero { padding-top: 72px; padding-bottom: 56px; text-align: center; }
.hero .lead { max-width: 620px; margin: 22px auto 0; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: 13.5px; color: var(--muted); display:flex; gap:7px; align-items:center; justify-content:center; }
.page-hero { padding-top: 64px; padding-bottom: 8px; text-align: center; }
.page-hero .lead { max-width: 640px; margin: 18px auto 0; }

/* Demo: chat -> ficha */
.demo { margin: 52px auto 0; max-width: 880px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: center; }
.demo-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; text-align: left; }
.demo-arrow { padding: 0 18px; color: var(--accent); }
.chat-label, .ficha-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.bubble { font-size: 14px; padding: 9px 13px; border-radius: 14px; margin-bottom: 8px; max-width: 85%; }
.bubble.them { background: var(--cream); border-bottom-left-radius: 4px; }
.bubble.me { background: var(--wa); color: #073b1e; margin-left: auto; border-bottom-right-radius: 4px; }
.ficha-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ficha-row:last-child { border-bottom: 0; }
.ficha-row span:first-child { color: var(--muted); }
.ficha-row span:last-child { font-weight: 600; }
@media (max-width: 760px) { .demo { grid-template-columns: 1fr; gap: 14px; } .demo-arrow { transform: rotate(90deg); padding: 0; margin: 0 auto; } }

/* Seguimiento highlight */
.seg { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.seg ul { list-style: none; margin-top: 22px; display: grid; gap: 14px; }
.seg li { display: flex; gap: 12px; font-size: 16px; }
.seg li .tick { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.seg-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.seg-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.count { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.count .n { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.count .l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.count.red .n { color: var(--accent); }
.count.green .n { color: #1a8a4f; }
.seg-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.seg-item .who { font-weight: 600; font-size: 14px; }
.seg-item .sub { font-size: 12.5px; color: var(--muted); }
.pill { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pill.wait { background: rgba(212,66,10,.1); color: var(--accent); }
.copybtn { font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background:#fff; }
@media (max-width: 820px) { .seg { grid-template-columns: 1fr; gap: 30px; } }

/* Steps (landing) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step .num { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.step p { color: var(--muted); margin-top: 8px; font-size: 15px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feature .ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(212,66,10,.1); color: var(--accent); display:flex; align-items:center; justify-content:center; margin-bottom: 14px; }
.feature p { color: var(--muted); font-size: 14.5px; margin-top: 7px; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }

/* Flow (cómo funciona) — vertical timeline */
.flow { max-width: 720px; margin: 0 auto; display: grid; gap: 18px; }
.flow-step { display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.flow-step .n { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.flow-step h3 { margin-bottom: 6px; }
.flow-step p { color: var(--muted); font-size: 15px; }
.flow-step .tag { display:inline-block; margin-top:10px; font-size: 12px; font-weight: 600; color: var(--accent); background: rgba(212,66,10,.08); padding: 4px 10px; border-radius: 999px; }

/* Callout */
.callout { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; text-align: center; max-width: 720px; margin: 0 auto; }

/* Pricing teaser (landing) */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 0 auto; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; }
.plan.pro { border-color: rgba(212,66,10,.45); box-shadow: 0 0 0 1px rgba(212,66,10,.25), var(--shadow); }
.plan .tier { font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.plan.pro .tier { color: var(--accent); }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 2px; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan .desc { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.plan ul { list-style: none; display: grid; gap: 10px; margin-bottom: 22px; }
.plan li { display: flex; gap: 10px; font-size: 14.5px; }
.plan li .tick { color: var(--accent); flex-shrink: 0; }
.plan li.off { color: var(--muted); }
.plan li.off .tick { color: var(--muted); opacity: .5; }
.plan .btn { margin-top: auto; }

/* Comparison table (/precio) */
.compare { max-width: 860px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 16px 18px; text-align: left; font-size: 15px; border-top: 1px solid var(--line); }
.compare thead th { border-top: 0; vertical-align: bottom; }
.compare th.col, .compare td.col { text-align: center; width: 26%; }
.compare thead .tier { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.compare thead .pro .tier { color: var(--accent); }
.compare thead .price { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.compare thead .price small { font-size: 12px; font-weight: 500; color: var(--muted); display:block; }
.compare td.feat { color: var(--ink); font-weight: 500; }
.compare .yes { color: #1a8a4f; font-weight: 700; }
.compare .no { color: var(--muted); opacity: .6; }
.compare .pro-col { background: rgba(212,66,10,.04); }
.compare tfoot td, .compare .cta-row td { border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .compare th, .compare td { padding: 12px 10px; font-size: 13.5px; }
  .compare thead .price { font-size: 18px; }
}

/* Integraciones (marquee) */
.integrations { padding: 64px 0; overflow: hidden; }
.marquee { position: relative; overflow: hidden; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
/* gap va como margin en cada chip (incluido el último) para que el loop a -50%
   caiga exacto sobre la segunda copia y gire infinito sin saltos. */
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.chip { display: inline-flex; align-items: center; gap: 11px; white-space: nowrap; margin-right: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 22px; box-shadow: var(--shadow); }
.chip img { height: 26px; width: 26px; object-fit: contain; display: block; }
.chip span { font-weight: 600; font-size: 15px; color: var(--ink); }
.integrations-note { display: inline-block; margin-top: 32px; font-size: 14px; font-weight: 600;
  color: var(--accent); background: rgba(212,66,10,.08); padding: 9px 18px; border-radius: 999px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}

/* Agendar llamada (modal) */
.call-overlay { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center;
  padding: 22px; background: rgba(32,26,19,.45); backdrop-filter: blur(6px); }
.call-overlay.open { display: flex; animation: callFade .2s ease; }
@keyframes callFade { from { opacity: 0; } to { opacity: 1; } }
.call-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: 0 20px 60px rgba(32,26,19,.18); padding: 30px;
  animation: callPop .25s cubic-bezier(.16,1,.3,1); }
@keyframes callPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.call-card h3 { font-size: 22px; letter-spacing: -.02em; }
.call-card .sub { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.call-field { margin-top: 16px; }
.call-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.call-field input { width: 100%; height: 46px; border: 1px solid var(--input); border-radius: 12px;
  padding: 0 14px; font-size: 15px; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.call-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,66,10,.12); }
.call-card .btn { width: 100%; margin-top: 20px; }
.call-error { color: #b8380a; font-size: 13px; margin-top: 12px; min-height: 0; }
.call-close { position: absolute; }
.call-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.call-x { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.call-x:hover { background: rgba(32,26,19,.05); color: var(--ink); }
.call-note { display: flex; align-items: center; gap: 7px; justify-content: center; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.call-success { text-align: center; padding: 8px 0; }
.call-success .ok { width: 54px; height: 54px; border-radius: 50%; background: rgba(26,138,79,.12); color: #1a8a4f;
  display: flex; align-items: center; justify-content: center; margin: 4px auto 16px; }
.call-success h3 { font-size: 20px; }
.call-success p { color: var(--muted); font-size: 14.5px; margin-top: 8px; }

/* Final CTA */
.final { text-align: center; }
.final .btn { margin-top: 26px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.foot-links { display: flex; gap: 20px; }
.foot-links a:hover { color: var(--ink); }

/* Reveal (progressive enhancement) */
html.js .reveal { opacity: 0; transform: translateY(14px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
