:root {
  --bg: #06040f;
  --bg2: #0d0920;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --purple: #7c3aed;
  --purple-l: #a78bfa;
  --purple-xl: #c4b5fd;
  --gold: #f59e0b;
  --gold-l: #fcd34d;
  --green: #22c55e;
  --text: #f8f7ff;
  --muted: #9a97b0;
  --muted2: #c0bcce;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.02; margin: 0; letter-spacing: 0.005em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-family: var(--head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.grad { background: linear-gradient(100deg, var(--purple-l), var(--gold-l)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 3px; border-radius: 6px; }

/* ── Botones ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--head); font-weight: 800; font-size: 19px; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; border: 0; cursor: pointer;
  padding: 15px 28px; border-radius: 12px; min-height: 52px;
  background: linear-gradient(135deg, var(--purple), #9b5cff);
  color: #fff; box-shadow: 0 10px 34px -10px rgba(124, 58, 237, 0.9);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(124, 58, 237, 1); }
.btn--ghost { background: transparent; border: 1px solid var(--border); box-shadow: none; color: var(--text); }
.btn--ghost:hover { border-color: var(--purple-l); box-shadow: none; }
.btn--sm { font-size: 16px; padding: 10px 18px; min-height: 42px; border-radius: 10px; }

/* ── Navegación ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(6, 4, 15, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.nav__logo img { height: 28px; width: auto; }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a:not(.btn) { text-decoration: none; font-size: 15px; color: var(--muted2); transition: color 0.2s; }
.nav__links a:not(.btn):hover { color: #fff; }
@media (max-width: 860px) { .nav__links a:not(.btn) { display: none; } }

/* ── Hero ── */
.hero { position: relative; padding: 130px 0 70px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.38), transparent);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; left: -15%; bottom: -30%; width: 50vw; height: 50vw; max-width: 600px; max-height: 600px;
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.12), transparent); pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(46px, 7vw, 86px); font-weight: 900; text-transform: uppercase; margin: 16px 0 22px; }
.hero__lead { font-size: clamp(18px, 2.1vw, 21px); color: var(--muted2); max-width: 540px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero__for { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: 14px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 99px; color: var(--muted2); background: var(--surface); }
.hero__phone { display: flex; justify-content: center; position: relative; }
.hero__phone .phone { transform: rotate(3deg); }
.chip {
  position: absolute; background: rgba(20, 14, 42, 0.92); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: center;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.8); animation: float 6s ease-in-out infinite; z-index: 3;
}
.chip b { display: block; font-size: 14px; }
.chip small { color: var(--muted); font-size: 12px; }
.chip--a { left: -2%; top: 18%; }
.chip--b { right: -4%; bottom: 14%; animation-delay: -3s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (max-width: 920px) {
  .hero { padding-top: 104px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .chip--a { left: 0; } .chip--b { right: 0; }
}
@media (max-width: 460px) { .chip { display: none; } .hero__cta .btn { width: 100%; } }

/* ── Secciones ── */
section { padding: 92px 0; position: relative; }
.sec-head { max-width: 720px; margin-bottom: 52px; }
.sec-head h2 { font-size: clamp(36px, 5vw, 58px); font-weight: 900; text-transform: uppercase; margin: 12px 0 16px; }
.sec-head p { color: var(--muted2); font-size: 18px; }
.alt { background: linear-gradient(180deg, var(--bg2), var(--bg)); }

/* Problema */
.pain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pain article { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 26px; }
.pain .ico { font-size: 26px; margin-bottom: 12px; }
.pain h3 { font-size: 26px; font-weight: 800; margin-bottom: 8px; text-transform: uppercase; }
.pain p { color: var(--muted2); font-size: 16px; }
@media (max-width: 860px) { .pain { grid-template-columns: 1fr; } }

/* Funciones: pestañas + teléfono */
.showcase { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center; }
.tabs { display: flex; flex-direction: column; gap: 10px; }
.tab {
  text-align: left; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 16px; padding: 18px 20px; cursor: pointer; font: inherit; transition: border-color 0.2s, background 0.2s;
}
.tab h3 { font-size: 24px; font-weight: 800; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.tab p { color: var(--muted2); font-size: 15.5px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.35s ease, opacity 0.3s, margin 0.3s; }
.tab[aria-selected="true"] { border-color: var(--purple-l); background: rgba(124, 58, 237, 0.14); }
.tab[aria-selected="true"] p { max-height: 160px; opacity: 1; margin-top: 8px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.demo-note { text-align: center; font-size: 13px; color: var(--muted); margin-top: 22px; }
@media (max-width: 920px) {
  .showcase { grid-template-columns: 1fr; gap: 28px; }
  .stage { order: -1; min-height: 0; }
  .tabs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .tab { flex: 0 0 82%; scroll-snap-align: start; }
  .tab p { max-height: 160px; opacity: 1; margin-top: 8px; }
}

/* Para quién */
.who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.who article { border: 1px solid var(--border); border-radius: 22px; padding: 30px; background: linear-gradient(170deg, rgba(124, 58, 237, 0.13), var(--surface) 55%); display: flex; flex-direction: column; }
.who .tag { font-family: var(--head); font-weight: 700; letter-spacing: 0.16em; font-size: 13px; text-transform: uppercase; color: var(--gold); }
.who h3 { font-size: 34px; font-weight: 900; text-transform: uppercase; margin: 10px 0 12px; }
.who p.lead { color: var(--muted2); font-size: 16px; margin-bottom: 18px; }
.who ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.who li { position: relative; padding-left: 28px; font-size: 15.5px; color: var(--text); }
.who li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
@media (max-width: 920px) { .who { grid-template-columns: 1fr; } }

/* Cómo funciona */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps article { position: relative; padding: 30px 26px; border-left: 2px solid var(--purple); background: var(--surface); border-radius: 0 18px 18px 0; counter-increment: s; }
.steps article::before { content: "0" counter(s); font-family: var(--head); font-weight: 900; font-size: 54px; color: var(--purple-l); line-height: 1; display: block; margin-bottom: 8px; }
.steps h3 { font-size: 26px; text-transform: uppercase; font-weight: 800; margin-bottom: 8px; }
.steps p { color: var(--muted2); font-size: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Seguridad */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.trust div { border: 1px solid var(--border); border-radius: 16px; padding: 22px; background: var(--surface); }
.trust b { display: block; font-family: var(--head); font-size: 22px; text-transform: uppercase; margin: 6px 0; }
.trust p { color: var(--muted2); font-size: 15px; }
@media (max-width: 920px) { .trust { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .trust { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; display: grid; gap: 10px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 22px; }
summary { cursor: pointer; list-style: none; padding: 20px 0; font-family: var(--head); font-weight: 800; font-size: 23px; text-transform: uppercase; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font-size: 28px; transition: rotate 0.25s; }
details[open] summary::after { rotate: 45deg; }
details p { padding: 0 0 20px; color: var(--muted2); font-size: 16.5px; }

/* Demo / formulario */
.demo { padding: 100px 0; }
.demo .box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
  border: 1px solid var(--border); border-radius: 28px; padding: clamp(24px, 5vw, 56px);
  background: radial-gradient(120% 120% at 0% 0%, rgba(124, 58, 237, 0.28), var(--bg2) 60%);
}
.demo h2 { font-size: clamp(38px, 5vw, 60px); font-weight: 900; text-transform: uppercase; margin: 12px 0 16px; }
.demo .copy p { color: var(--muted2); font-size: 18px; margin-bottom: 22px; }
.demo ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.demo li { padding-left: 28px; position: relative; }
.demo li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
@media (max-width: 920px) { .demo .box { grid-template-columns: 1fr; gap: 32px; } }

.custom-ml-form { width: 100%; }
.custom-ml-form .form-row { margin-bottom: 14px; }
.custom-ml-form input, .custom-ml-form select, .custom-ml-form textarea {
  width: 100%; background: rgba(0, 0, 0, 0.42); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px;
  color: var(--text); font-family: var(--body); font-size: 16px; padding: 14px 16px; outline: none; transition: border-color 0.2s;
}
.custom-ml-form textarea { min-height: 96px; resize: vertical; }
.custom-ml-form input::placeholder, .custom-ml-form textarea::placeholder { color: rgba(255, 255, 255, 0.5); }
.custom-ml-form select { color: rgba(255, 255, 255, 0.78); appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 1em; }
.custom-ml-form select option { color: #111; }
.custom-ml-form input:focus, .custom-ml-form select:focus, .custom-ml-form textarea:focus { border-color: var(--purple-l); }
.custom-ml-form .btn { width: 100%; margin-top: 4px; }
.custom-ml-form .loading { display: none; }
.form-legal { font-size: 13px; color: var(--muted); margin-top: 14px; text-align: center; }
.form-legal a { color: var(--purple-xl); }
.row-success { display: none; text-align: center; padding: 20px 0; }
.row-success h3 { font-size: 34px; text-transform: uppercase; margin-bottom: 8px; }
.row-success p { color: var(--muted2); margin-bottom: 18px; }

/* Pie de página */
footer { border-top: 1px solid var(--border); padding: 54px 0 100px; background: #040309; }
.foot { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
.foot img { height: 30px; width: auto; margin-bottom: 16px; }
.foot h4 { font-family: var(--head); font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.foot p, .foot a { color: var(--muted2); font-size: 15px; text-decoration: none; display: block; margin-bottom: 8px; }
.foot a:hover { color: #fff; }
.legend { margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.legend strong { color: var(--muted2); font-weight: 600; }
@media (max-width: 780px) { .foot { grid-template-columns: 1fr; } }

/* Barra móvil fija */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(6, 4, 15, 0.95) 40%); display: none; transform: translateY(120%); transition: transform 0.3s; }
.sticky-cta.show { transform: none; }
.sticky-cta .btn { width: 100%; }
@media (max-width: 760px) { .sticky-cta { display: block; } }

/* Aparición */
.reveal { opacity: 0; translate: 0 22px; transition: opacity 0.7s, translate 0.7s; }
.reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: none; transition: none; }
  .chip, .pane.on { animation: none; }
}


/* ── Marco de teléfono con capturas reales del CRM ── */
.phone {
  width: 280px; border-radius: 42px; padding: 9px; flex: none; position: relative;
  background: linear-gradient(160deg, #3a3354, #14102a); border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.phone::before { content: ""; position: absolute; top: 16px; left: 50%; translate: -50% 0; width: 84px; height: 22px; background: #000; border-radius: 99px; z-index: 5; }
.scr { border-radius: 34px; overflow: hidden; background: #07070f; }
.scr .status { height: 40px; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 24px 6px; font-size: 11.5px; font-weight: 600; color: #f1effa; background: #0b0818; }
.scr img { display: block; width: 100%; height: auto; }

/* Escenario de funciones */
.stage { position: relative; display: flex; justify-content: center; min-height: 560px; }
.stage::before { content: ""; position: absolute; inset: 4% 0; background: radial-gradient(closest-side, rgba(124, 58, 237, 0.4), transparent); pointer-events: none; }
.pane { display: none; position: relative; gap: 22px; align-items: flex-start; justify-content: center; }
.pane.on { display: flex; animation: pop 0.45s ease both; }
.pane .phone { width: 250px; }
.pane .phone.second { margin-top: 56px; }
.tab ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.4s ease, opacity 0.3s, margin 0.3s; }
.tab li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--muted2); }
.tab li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.tab[aria-selected="true"] ul { max-height: 200px; opacity: 1; margin-top: 10px; }
@media (max-width: 920px) {
  .stage { min-height: 0; min-width: 0; width: 100%; }
  .showcase > * { min-width: 0; }
  .pane.on { flex: 1 1 100%; min-width: 0; max-width: none; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; justify-content: flex-start; padding: 6px var(--gutter) 14px; margin: 0 calc(var(--gutter) * -1); width: calc(100% + var(--gutter) * 2); -webkit-overflow-scrolling: touch; }
  .pane .phone { width: min(74vw, 270px); scroll-snap-align: center; }
  .pane .phone.second { margin-top: 0; }
  .tab ul { max-height: 200px; opacity: 1; margin-top: 10px; }
}

/* Cuadrícula «Y además» */
.grid-feat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-feat > div { border: 1px solid var(--border); border-radius: 18px; padding: 24px; background: var(--surface); }
.grid-feat span { font-size: 28px; display: block; margin-bottom: 10px; }
.grid-feat h3 { font-size: 23px; font-weight: 800; text-transform: uppercase; margin-bottom: 6px; }
.grid-feat p { color: var(--muted2); font-size: 15px; }
@media (max-width: 960px) { .grid-feat { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid-feat { grid-template-columns: 1fr; } }

/* Teléfono del hero */
.hero__phone .phone { width: 290px; transform: rotate(3deg); }

/* Móvil: cada función con su captura debajo, en orden (sin pestañas) */
.feat-list { display: none; }
@media (max-width: 920px) {
  .showcase { display: none; }
  .feat-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .feat { min-width: 0; }
  .feat h3 { font-size: 30px; font-weight: 900; text-transform: uppercase; margin-bottom: 10px; }
  .feat > p { color: var(--muted2); font-size: 16.5px; margin-bottom: 12px; }
  .feat ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 7px; }
  .feat li { position: relative; padding-left: 24px; font-size: 15.5px; color: var(--text); }
  .feat li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
  .feat-shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--gutter) 14px; margin: 0 calc(var(--gutter) * -1); -webkit-overflow-scrolling: touch; }
  .feat-shots .phone { width: min(78vw, 290px); scroll-snap-align: center; }
  .swipe-hint { display: block; text-align: center; font-size: 13px; color: var(--muted); margin-top: 2px; }
}

/* Ventana emergente de «Solicitar demo» */
.cta-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; justify-content: center; min-height: 100%; }
.cta-col .btn { width: 100%; max-width: 360px; }
.demo-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(6, 4, 15, 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn 0.2s ease both; }
.demo-modal[hidden] { display: none; }
.demo-modal__panel { position: relative; width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); overflow-y: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 24px; padding: 30px 26px 24px; background: radial-gradient(120% 90% at 0% 0%, rgba(124, 58, 237, 0.3), var(--bg2) 60%); box-shadow: 0 40px 90px -30px #000; animation: pop 0.3s ease both; }
.demo-modal__panel h2 { font-size: 38px; font-weight: 900; text-transform: uppercase; margin-bottom: 6px; padding-right: 36px; }
.demo-modal__sub { color: var(--muted2); font-size: 15.5px; margin-bottom: 18px; }
.demo-modal__close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.demo-modal__close:hover { border-color: var(--purple-l); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 520px) { .demo-modal { align-items: flex-end; padding: 0; } .demo-modal__panel { border-radius: 24px 24px 0 0; max-height: 94dvh; padding: 26px 18px 20px; } .demo-modal__panel h2 { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) { .demo-modal, .demo-modal__panel { animation: none; } }
