/* ═══════════════════════════════════════════════════════════════════
   AC1 — Landing page
   Hoja de estilos única. Orden: tokens → base → utilidades →
   componentes → secciones → responsive.
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────────────── 1. Tokens ─────────────────── */
:root {
  /* Paleta de marca. Es la misma que la del producto (`nexo_ft/DESIGN.md` §2.1):
     el naranja de AC1, y nada más. El degradado dejó de ser indigo → violeta →
     cian y pasó a ser monocromo, y eso no lo empobrece: uno de tres familias
     distintas dice «paleta bonita»; uno de tres escalones de la misma dice AC1.

     Estos tres tonos son SOLO los topes del degradado y los bordes, así que no
     cambian con el tema: una marca que se repinta al conmutar deja de ser una
     marca. El acento que sí varía —el de texto y foco— es `--acento`. */
  --brand-1: #f97316;
  --brand-2: #ea580c;
  --brand-3: #c2410c;

  --grad: linear-gradient(120deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));

  /* Tipografía */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  /* Espaciado y radios */
  /* Alineados con la escala del producto (§3.2): chip 8 · control 12 ·
     tarjeta 14 · banda 19. */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 14px;
  --r-xl: 19px;
  --container: 1200px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px;
}

/* El acento de TEXTO y de foco, y los semánticos, sí cambian con el tema, y no
   es un capricho: medido, ningún naranja sirve para los dos fondos. `#FDBA74`
   da 11,73:1 sobre el negro azulado y 1,46 sobre el papel claro — invisible.
   Por eso viven en los bloques de tema y no en `:root`. */

/* Tema oscuro (por defecto) */
:root,
[data-theme="dark"] {
  --bg: #070a12;
  --bg-alt: #0b1020;

  --acento: #fdba74;      /* 11,73:1 sobre el fondo — texto y anillo de foco */
  --acento-2: #9baabf;    /*  8,38:1 — el frío del producto, para distinguir */
  --ok: #16a34a;          /*  6,00:1 */
  --warn: #f97316;        /*  7,06:1 — el aviso ES la marca (§2.4) */
  --err: #fb7185;         /*  7,35:1 */
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf7;
  --text-muted: #98a4bd;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  --glass: rgba(9, 13, 24, 0.72);
  color-scheme: dark;
}

[data-theme="light"] {
  /* El papel del producto (§2.3), no un gris neutro. */
  --bg: #e9eff7;
  --bg-alt: #fafcff;

  --acento: #c2410c;      /* 4,48:1 sobre el papel */
  --acento-2: #4f5e73;    /* 5,71:1 */
  --ok: #15803d;          /* 4,34:1 */
  --warn: #c2410c;        /* 4,48:1 */
  --err: #be123c;         /* 5,43:1 */
  --surface: rgba(15, 23, 42, 0.025);
  --surface-2: rgba(15, 23, 42, 0.05);
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.2);
  --text: #0f172a;
  --text-muted: #55617a;
  --shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.25);
  --glass: rgba(255, 255, 255, 0.78);
  color-scheme: light;
}

/* ─────────────────── 2. Base ─────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-1);
  color: #fff;
  padding: 12px 18px;
  z-index: 999;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* ─────────────────── 3. Utilidades ─────────────────── */
.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}
.container--narrow { width: min(100% - 40px, 820px); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
}

.dot-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ─────────────────── 4. Botones ─────────────────── */
.btn {
  --btn-py: 12px;
  --btn-px: 22px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: var(--btn-py) var(--btn-px);
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), opacity 0.25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
  background: var(--grad);
  background-size: 180% 180%;
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(249, 115, 22, 0.75);
}
.btn--primary:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 18px 40px -12px rgba(249, 115, 22, 0.9);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: var(--surface-2); transform: translateY(-2px); }

.btn--sm { --btn-py: 9px; --btn-px: 18px; font-size: 0.88rem; }
.btn--lg { --btn-py: 15px; --btn-px: 30px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

.btn__arrow {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Estado "cargando" para botones */
.btn.is-loading .btn__label { opacity: 0; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); transform: translateY(-2px); }
.icon-btn svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ─────────────────── 5. Barra de progreso de scroll ─────────────────── */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  transition: width 0.1s linear;
}

/* ─────────────────── 6. Nav ─────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 150;
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
              backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 34px; height: 34px; }
.brand__text {
  font-weight: 800;
  font-size: 1.32rem;
  letter-spacing: -0.03em;
}
.brand__accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav__links { display: flex; gap: 4px; }
.nav__links a {
  position: relative;
  padding: 8px 13px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--text); background: var(--surface); }

.nav__actions { display: flex; align-items: center; gap: 10px; }

.icon-sun, .icon-moon { position: absolute; transition: opacity 0.3s, transform 0.4s var(--ease); }
[data-theme="dark"] .icon-sun { opacity: 1; transform: none; }
[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(-70deg) scale(0.5); }
[data-theme="light"] .icon-sun { opacity: 0; transform: rotate(70deg) scale(0.5); }
[data-theme="light"] .icon-moon { opacity: 1; transform: none; }
#themeToggle { position: relative; overflow: hidden; }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0 10px;
}
.nav__burger span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.2s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────────── 7. Hero ─────────────────── */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 72px) 0 0;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  top: -280px; left: 50%;
  width: 1100px; height: 800px;
  translate: -50% 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(249, 115, 22, 0.34), transparent 60%),
    radial-gradient(circle at 70% 50%, rgba(253, 186, 116, 0.22), transparent 62%),
    radial-gradient(circle at 55% 75%, rgba(234, 88, 12, 0.24), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  to { transform: translate(-3%, 4%) scale(1.08); }
}
.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.6;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding-bottom: 72px;
}

.hero__title {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  margin: 22px 0 20px;
  font-weight: 800;
}
.hero__title .grad-text { display: block; }

.hero__sub {
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  color: var(--text-muted);
  max-width: 56ch;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 26px; }

.hero__proof { list-style: none; padding: 0; display: grid; gap: 9px; }
.hero__proof li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.hero__proof svg {
  width: 17px; height: 17px; flex: none;
  fill: none; stroke: var(--ok); stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ─────────────────── 8. Ventana de demo ─────────────────── */
.window {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.window__dots { display: flex; gap: 6px; }
.window__dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-strong);
}
.window__dots i:first-child { background: #ff5f57; }
.window__dots i:nth-child(2) { background: #febc2e; }
.window__dots i:nth-child(3) { background: #28c840; }
.window__title {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: auto;
}
.window__body { padding: 20px; display: grid; gap: 14px; }

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
}
.badge--live { color: var(--ok); border-color: rgba(22, 163, 74, 0.35); background: rgba(22, 163, 74, 0.1); }
.badge--ok { color: var(--ok); border-color: rgba(22, 163, 74, 0.35); background: rgba(22, 163, 74, 0.1); }
.badge--warn { color: var(--warn); border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.1); }

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cufe-input {
  width: 100%;
  resize: vertical;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.8;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.cufe-input:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.cufe-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.76rem;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.chip b { color: var(--text); }
.chip--ok b { color: var(--ok); }
.chip--warn b { color: var(--warn); }
.chip--err b { color: var(--err); }

.progress { display: grid; gap: 8px; }
.progress__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.79rem;
  color: var(--text-muted);
}
.progress__track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.progress__track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad);
  transition: width 0.3s var(--ease);
}

.doc-list { list-style: none; padding: 0; display: grid; gap: 6px; max-height: 190px; overflow-y: auto; }
.doc-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  animation: rowIn 0.45s var(--ease) both;
}
@keyframes rowIn {
  from { opacity: 0; transform: translateX(-10px); }
}
.doc-row__id { font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted); }
.doc-row__state { font-size: 0.72rem; font-weight: 600; }
.doc-row.is-pending .doc-row__state { color: var(--text-muted); }
.doc-row.is-working .doc-row__state { color: var(--acento); }
.doc-row.is-done .doc-row__state { color: var(--ok); }
.doc-row.is-error .doc-row__state { color: var(--err); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex: none; }
.doc-row.is-working .dot { background: var(--acento); animation: pulse 1.2s infinite; }
.doc-row.is-done .dot { background: var(--ok); }
.doc-row.is-error .dot { background: var(--err); }
.dot--ok { background: var(--ok); }
.dot--warn { background: var(--warn); }

.demo-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  animation: rowIn 0.5s var(--ease) both;
}
.demo-summary div { text-align: center; }
.demo-summary b { display: block; font-size: 1.28rem; font-weight: 700; }
.demo-summary span { font-size: 0.72rem; color: var(--text-muted); }

.demo-note {
  margin-top: 12px;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
}

/* ─────────────────── 9. Marquee ─────────────────── */
.marquee {
  position: relative;
  border-block: 1px solid var(--border);
  padding: 15px 0;
  overflow: hidden;
  background: var(--surface);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: scrollX 42s linear infinite;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track i { color: var(--acento); font-style: normal; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ─────────────────── 10. Secciones ─────────────────── */
.section { padding: 104px 0; position: relative; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section__head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section__title {
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  margin: 18px 0 14px;
}
.section__sub { color: var(--text-muted); font-size: 1.03rem; }

/* ─────────────────── 11. Problema ─────────────────── */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 20px;
}
.pain-card {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.pain-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%),
              rgba(249, 115, 22, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.pain-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.pain-card:hover::before { opacity: 1; }
.pain-card__num {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pain-card h3 { font-size: 1.1rem; margin: 10px 0 9px; }
.pain-card p { color: var(--text-muted); font-size: 0.92rem; }
.pain-card__tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--err);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.stat-band {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  padding: 36px 30px;
  border-radius: var(--r-xl);
  background: var(--grad);
  background-size: 200% 200%;
  animation: gradShift 12s ease infinite;
  color: #fff;
}
@keyframes gradShift {
  50% { background-position: 100% 50%; }
}
.stat { text-align: center; }
.stat b { display: block; font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -0.03em; }
.stat span { font-size: 0.9rem; opacity: 0.92; }

/* ─────────────────── 12. Steps ─────────────────── */
.steps { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; }

.steps__nav { display: grid; gap: 10px; position: sticky; top: calc(var(--nav-h) + 20px); }
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.step:hover { transform: translateX(4px); }
.step[aria-selected="true"] {
  background: var(--surface-2);
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}
.step__idx {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.83rem;
  font-weight: 700;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.step[aria-selected="true"] .step__idx { background: var(--grad); color: #fff; border-color: transparent; }
.step__label { font-size: 0.95rem; font-weight: 600; }

.step-panel {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
  padding: 32px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
}
.step-panel.is-active { display: grid; animation: panelIn 0.45s var(--ease) both; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
}
.step-panel h3 { font-size: 1.35rem; margin-bottom: 12px; }
.step-panel p { color: var(--text-muted); margin-bottom: 18px; }

.tick-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.tick-list li {
  position: relative;
  padding-left: 28px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.15);
  border: 1px solid rgba(22, 163, 74, 0.4);
}
.tick-list li::after {
  content: "";
  position: absolute;
  left: 5px; top: 10px;
  width: 6px; height: 3px;
  border-left: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.tick-list--lg li { font-size: 1rem; }

.code-block {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.85;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--border);
  overflow-x: auto;
}
.code-block--xml { font-size: 0.7rem; }
.c-dim { color: var(--text-muted); }
.c-hex { color: var(--acento); }
.c-ok { color: var(--ok); }
.c-warn { color: var(--warn); }
.c-err { color: var(--err); }
.c-tag { color: var(--acento); }
.c-attr { color: var(--acento-2); }
.c-str { color: var(--ok); }

.xml-viewer { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--bg); }
.xml-viewer__tabs { display: flex; border-bottom: 1px solid var(--border); }
.xml-viewer__tabs button {
  flex: 1;
  padding: 11px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.xml-viewer__tabs button.is-active {
  color: var(--text);
  border-bottom-color: var(--acento);
  background: var(--surface);
}
.xml-viewer__body { padding: 6px; }
.xml-viewer__body .code-block { border: none; background: transparent; }

.mini-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.mini-table th, .mini-table td { padding: 9px 12px; text-align: left; }
.mini-table th { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.mini-table td { text-align: right; font-variant-numeric: tabular-nums; }
.mini-table tbody tr + tr { border-top: 1px solid var(--border); }
.mini-table .is-total { font-weight: 700; }
.mini-table--ledger {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.mini-table--ledger thead th {
  background: var(--surface-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mini-table--ledger thead th + th { text-align: right; }
.mini-table--ledger td:first-child { text-align: left; font-size: 0.8rem; }

.visual-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.sync-rows { display: grid; gap: 8px; }
.sync-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.sync-row b { margin-left: auto; color: var(--text); font-family: var(--mono); font-size: 0.76rem; }

/* ─────────────────── 13. Módulos ─────────────────── */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-bottom: 36px; }
.filter {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.28s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.is-active { background: var(--grad); color: #fff; border-color: transparent; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.module-card {
  position: relative;
  padding: 26px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.module-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.module-card.is-hidden { display: none; }
.module-card.is-entering { animation: cardIn 0.45s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: scale(0.96) translateY(10px); } }

.module-card__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 1.25rem;
}
.module-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.module-card p { font-size: 0.9rem; color: var(--text-muted); }
.module-card__cat {
  display: inline-block;
  margin-top: 15px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--acento);
}

/* ─────────────────── 14. ROI ─────────────────── */
.roi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: stretch;
}
.roi__inputs,
.roi__result {
  padding: 32px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
}
.roi__inputs { background: var(--surface); }
.roi__result {
  background: var(--grad);
  background-size: 200% 200%;
  animation: gradShift 14s ease infinite;
  color: #fff;
  border-color: transparent;
  display: grid;
  align-content: start;
  gap: 20px;
  box-shadow: 0 26px 60px -26px rgba(249, 115, 22, 0.9);
}

.range-field { margin-bottom: 26px; }
.range-field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.range-field label b {
  font-size: 1.05rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  cursor: pointer;
  background-image: linear-gradient(var(--brand-1), var(--brand-3));
  background-repeat: no-repeat;
  background-size: var(--fill, 0%) 100%;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand-1);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.18); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand-1);
  cursor: pointer;
}

.roi__disclaimer { font-size: 0.8rem; color: var(--text-muted); line-height: 1.7; }

.roi__headline { text-align: center; }
.roi__headline span { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.roi__headline b {
  display: block;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 2px;
}
.roi__headline em { font-style: normal; opacity: 0.85; font-size: 0.92rem; }

.roi__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.roi-card {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-md);
  padding: 16px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.roi-card--wide { grid-column: 1 / -1; }
.roi-card b { display: block; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.roi-card span { font-size: 0.78rem; opacity: 0.9; }
.roi__result .btn--primary {
  background: #fff;
  color: #1e1b4b;
  box-shadow: none;
}
.roi__result .btn--primary:hover { background: #fff; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5); }
.roi__foot { font-size: 0.76rem; opacity: 0.8; text-align: center; }

/* ─────────────────── 15. Planes ─────────────────── */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 40px;
  font-size: 0.93rem;
  color: var(--text-muted);
}
.billing-toggle span.is-active { color: var(--text); font-weight: 600; }
.save-pill {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.14);
  color: var(--ok);
  border: 1px solid rgba(22, 163, 74, 0.3);
}
.switch {
  width: 52px; height: 28px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  padding: 3px;
  transition: background 0.3s var(--ease);
}
.switch[aria-checked="true"] { background: var(--grad); border-color: transparent; }
.switch__knob {
  display: block;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.32s var(--ease);
}
.switch[aria-checked="true"] .switch__knob { transform: translateX(24px); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.plan {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  gap: 18px;
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease), box-shadow 0.4s var(--ease);
}
.plan:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.plan--featured {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
    var(--grad) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 24px 56px -24px rgba(249, 115, 22, 0.65);
}
.plan__ribbon {
  position: absolute;
  top: -13px; left: 50%;
  translate: -50% 0;
  background: var(--grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan__name { font-size: 1.18rem; font-weight: 700; }
.plan__desc { font-size: 0.88rem; color: var(--text-muted); }
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.plan__price small { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.plan__price.is-custom { font-size: 1.6rem; }
.plan__features { list-style: none; padding: 0; display: grid; gap: 10px; }
.plan__features li {
  position: relative;
  padding-left: 26px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.plan__features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 700;
}
.plan__features li.is-off { opacity: 0.45; }
.plan__features li.is-off::before { content: "—"; color: var(--text-muted); }
.plans__foot { text-align: center; margin-top: 26px; font-size: 0.87rem; color: var(--text-muted); }
.plans__foot a { color: var(--acento); font-weight: 600; }

/* ─────────────────── 16. Testimonios ─────────────────── */
.testimonials { max-width: 860px; margin-inline: auto; }
.testimonials__viewport { overflow: hidden; border-radius: var(--r-xl); }
.testimonials__track { display: flex; transition: transform 0.55s var(--ease); }
.testimonial {
  flex: 0 0 100%;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.testimonial__quote { font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.6; }
.testimonial__quote::before { content: "«"; color: var(--acento); margin-right: 4px; }
.testimonial__quote::after { content: "»"; color: var(--acento); margin-left: 4px; }
.testimonial__author { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.testimonial__avatar {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  flex: none;
}
.testimonial__name { font-weight: 600; font-size: 0.95rem; }
.testimonial__role { font-size: 0.82rem; color: var(--text-muted); }

.testimonials__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
}
.testimonials__dots { display: flex; gap: 8px; }
.testimonials__dots button {
  width: 9px; height: 9px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: var(--border-strong);
  cursor: pointer;
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}
.testimonials__dots button.is-active { width: 26px; background: var(--grad); }

/* ─────────────────── 17. FAQ ─────────────────── */
.faq { display: grid; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s var(--ease);
}
.faq-item.is-open { border-color: var(--border-strong); }
.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.faq-item__icon {
  position: relative;
  width: 18px; height: 18px;
  flex: none;
}
.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 2px;
  background: var(--acento);
  border-radius: 2px;
  transition: transform 0.35s var(--ease);
}
.faq-item__icon::after { transform: rotate(90deg); }
.faq-item.is-open .faq-item__icon::after { transform: rotate(0deg); }
.faq-item__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.faq-item.is-open .faq-item__a { grid-template-rows: 1fr; }
.faq-item__a > div { overflow: hidden; }
.faq-item__a p {
  padding: 0 22px 22px;
  color: var(--text-muted);
  font-size: 0.93rem;
}
.faq__foot { text-align: center; margin-top: 28px; color: var(--text-muted); font-size: 0.9rem; }
.faq__foot a { color: var(--acento); font-weight: 600; }

/* ─────────────────── 18. CTA / formulario ─────────────────── */
.section--cta { overflow: hidden; border-top: 1px solid var(--border); }
.cta-glow {
  position: absolute;
  bottom: -320px; left: 50%;
  translate: -50% 0;
  width: 900px; height: 620px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.3), transparent 62%);
  filter: blur(28px);
  pointer-events: none;
}
.cta {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.cta .section__title { text-align: left; }
.cta .section__sub { margin-bottom: 24px; }
.cta__contactinfo { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 26px; }
.cta__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}
.cta__link:hover { color: var(--acento); }
.cta__link svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.lead-form {
  display: grid;
  gap: 16px;
  padding: 34px;
  border-radius: var(--r-xl);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.lead-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-field { display: grid; gap: 7px; }
.input-field label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.input-field .opt { font-weight: 400; opacity: 0.7; }
.input-field input,
.input-field select,
.input-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.input-field textarea { resize: vertical; }
.input-field input:focus,
.input-field select:focus,
.input-field textarea:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}
.input-field.has-error input,
.input-field.has-error select { border-color: var(--err); }
.error { color: var(--err); font-size: 0.76rem; min-height: 0; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}
.checkbox input { margin-top: 3px; accent-color: var(--brand-1); width: 16px; height: 16px; }
.checkbox a { color: var(--acento); text-decoration: underline; }

.lead-form__status { font-size: 0.87rem; text-align: center; min-height: 1.2em; }
.lead-form__status.is-ok { color: var(--ok); }
.lead-form__status.is-err { color: var(--err); }

/* ─────────────────── 19. Footer ─────────────────── */
.footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 56px 0 26px; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
}
.footer__brand p { margin-top: 14px; color: var(--text-muted); font-size: 0.88rem; max-width: 34ch; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 4px;
}
.footer__col a, .footer__muted { font-size: 0.88rem; color: var(--text-muted); transition: color 0.25s var(--ease); }
.footer__col a:hover { color: var(--acento); }
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─────────────────── 20. FAB WhatsApp ─────────────────── */
.fab-whatsapp {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 140;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 20px;
  border-radius: 999px;
  background: #25d366;
  color: #06251a;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 14px 34px -12px rgba(37, 211, 102, 0.8);
  transform: translateY(120px);
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.35s var(--ease), box-shadow 0.3s;
}
.fab-whatsapp.is-visible { transform: none; opacity: 1; }
.fab-whatsapp:hover { box-shadow: 0 18px 42px -12px rgba(37, 211, 102, 1); }
.fab-whatsapp svg {
  width: 21px; height: 21px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ─────────────────── 21. Responsive ─────────────────── */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; gap: 44px; }
  .hero__demo { max-width: 560px; }
  .steps { grid-template-columns: 1fr; }
  .steps__nav {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 1fr);
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .step { flex-direction: column; align-items: flex-start; gap: 8px; }
  .roi { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .plan--featured { order: -1; }
  .cta { grid-template-columns: 1fr; }
  .cta .section__title { text-align: center; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    gap: 2px;
    padding: 18px 20px 26px;
    background: var(--glass);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    transition: transform 0.4s var(--ease);
  }
  .nav__links.is-open { transform: none; }
  .nav__links a { padding: 13px 14px; font-size: 1rem; }
  .nav__burger { display: flex; }
  .nav__actions .btn { display: none; }
  .step-panel { grid-template-columns: 1fr; padding: 24px; }
  .section { padding: 76px 0; }
  .lead-form__row { grid-template-columns: 1fr; }
  .roi__cards { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .fab-whatsapp span { display: none; }
  .fab-whatsapp { padding: 15px; }
}

@media (max-width: 520px) {
  .container { width: min(100% - 28px, var(--container)); }
  .stat-band, .roi__inputs, .roi__result, .lead-form, .testimonial { padding: 24px 20px; }
  .demo-summary { grid-template-columns: 1fr; gap: 6px; }
  .demo-summary div { display: flex; justify-content: space-between; align-items: baseline; }
}

/* ─────────────────── 22. Accesibilidad: menos movimiento ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Scrollbar discreta */
.doc-list::-webkit-scrollbar,
.code-block::-webkit-scrollbar { width: 8px; height: 8px; }
.doc-list::-webkit-scrollbar-thumb,
.code-block::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}
