/* =====================================================================
   XIREXON — web pública (07). Piel = 02-DESIGN-SYSTEM:
   negro + blanco + azul de marca (#3b82f6 dark / #2563EB light).
   Fuentes self-hosted (CSP, sin CDN). Sin lila/gradientes genéricos.
   ===================================================================== */

/* ---- Fuentes self-hosted ---- */
@font-face { font-family: "Geist"; src: url("fonts/geist-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* ---- Tokens (02 §1) ---- */
:root, [data-theme="dark"] {
  --bg: #0A0A0B; --bg-2: #111113; --bg-3: #1A1A1E; --elev: #18181C;
  --border: #2A2A2F; --border-strong: #3A3A42;
  --text: #F2F2F3; --text-2: #8A8A94; --muted: #4A4A54;
  --accent: #3b82f6; --accent-hover: #2563EB; --accent-active: #1D4ED8;
  --accent-soft: rgba(59,130,246,.12); --ring: rgba(59,130,246,.35);
  --success: #16A34A; --warning: #D97706; --error: #DC2626;
  --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
  --shadow-md: 0 4px 12px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.3);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.6);
  --font-display: "Geist", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
}
[data-theme="light"] {
  --bg: #FAFAFA; --bg-2: #FFFFFF; --bg-3: #F4F4F5; --elev: #FFFFFF;
  --border: #E4E4E7; --border-strong: #C8C8CD;
  --text: #09090B; --text-2: #71717A; --muted: #A1A1AA;
  --accent: #2563EB; --accent-hover: #1D4ED8; --accent-active: #1E40AF;
  --accent-soft: rgba(37,99,235,.09); --ring: rgba(37,99,235,.30);
  --shadow-md: 0 6px 20px rgba(10,10,11,.08), 0 1px 3px rgba(10,10,11,.04);
  --shadow-lg: 0 20px 45px rgba(10,10,11,.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; font-size: 15px; }
.logo img { width: 28px; height: 28px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }
.nav-links .theme-btn { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); }
.nav-links .theme-btn:hover { background: var(--bg-3); color: var(--text); }
@media (max-width: 720px) { .nav-links a.hide-m { display: none; } }

/* ---- Botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 24px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { background: var(--accent-active); transform: none; }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text); background: var(--bg-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; border-radius: 8px; }

/* ---- Hero ---- */
.hero { position: relative; padding: 96px 0 80px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
.hero-inner { position: relative; max-width: 780px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
h1 {
  margin: 0 0 20px; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 5.4vw, 58px); line-height: 1.08; letter-spacing: -.025em;
}
h1 .hl { color: var(--accent); }
.hero-sub { max-width: 620px; font-size: clamp(16px, 2vw, 19px); color: var(--text-2); margin: 0 0 34px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.trustbar { display: flex; flex-wrap: wrap; gap: 10px 26px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); }
.trustbar span { display: inline-flex; align-items: center; gap: 7px; }
.trustbar b { color: var(--text); font-weight: 600; }

/* ---- Secciones ---- */
section { padding: 76px 0; }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
h2 { margin: 0 0 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; letter-spacing: -.02em; }
.sec-sub { color: var(--text-2); font-size: 17px; margin: 0; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Problema / dolor ---- */
.pain-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.pain {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 24px;
}
.pain .ico { font-size: 22px; margin-bottom: 12px; }
.pain h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.pain p { margin: 0; font-size: 14.5px; color: var(--text-2); }

/* ---- Cómo funciona ---- */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: step; }
.step {
  position: relative; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px 24px 24px;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent);
  display: inline-block; background: var(--accent-soft); border-radius: 8px;
  padding: 4px 10px; margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.step p { margin: 0; font-size: 14.5px; color: var(--text-2); }

/* ---- Mockups del dashboard ---- */
.mock-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.mock-tab {
  padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--border); color: var(--text-2); background: var(--bg-2);
}
.mock-tab.active { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in oklab, var(--accent) 40%, transparent); }
.mock-stage {
  position: relative; border: 1px solid var(--border); border-radius: var(--r-xl);
  background: var(--bg-2); box-shadow: var(--shadow-lg); overflow: hidden; cursor: pointer;
}
.mock-stage::after {
  content: "Pruébalo en tu cuenta →";
  position: absolute; inset: 0; display: grid; place-items: center;
  background: color-mix(in oklab, var(--bg) 55%, transparent);
  color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 18px;
  opacity: 0; transition: opacity .18s ease;
}
.mock-stage:hover::after, .mock-stage:focus-visible::after { opacity: 1; }
.mock-pane { display: none; padding: 22px; min-height: 320px; }
.mock-pane.active { display: block; }
.mock-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }

/* mini kanban */
.mk-board { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 10px; overflow-x: auto; }
.mk-col { background: var(--bg-3); border-radius: 10px; overflow: hidden; min-width: 140px; }
.mk-head { padding: 8px 10px; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 12px; display: flex; justify-content: space-between; }
.mk-head .n { font-family: var(--font-mono); opacity: .85; }
.mk-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; }
.mk-card { background: var(--bg-2); border: 1px solid var(--border); border-top: 3px solid var(--mkc, var(--accent)); border-radius: 8px; padding: 9px; font-size: 11.5px; }
.mk-card b { display: block; font-size: 12px; }
.mk-card span { color: var(--text-2); font-family: var(--font-mono); font-size: 10px; }
@media (max-width: 720px) { .mk-board { grid-template-columns: repeat(5, 150px); } }

/* mini inbox */
.mi { display: grid; grid-template-columns: 220px 1fr; gap: 14px; min-height: 260px; }
.mi-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.mi-item { display: flex; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 12.5px; align-items: center; }
.mi-item:last-child { border-bottom: 0; }
.mi-item.active { background: var(--accent-soft); }
.mi-av { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-3); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 10px; border: 2px solid var(--accent); flex-shrink: 0; }
.mi-item small { display: block; color: var(--text-2); font-size: 11px; }
.mi-chat { border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; }
.bubble.in { background: var(--bg-3); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.out { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble .who { display: block; font-family: var(--font-mono); font-size: 9.5px; opacity: .7; margin-bottom: 2px; }
@media (max-width: 720px) { .mi { grid-template-columns: 1fr; } .mi-list { display: none; } }

/* mini métricas */
.mm { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.mm-tile { background: var(--bg-3); border-radius: 10px; padding: 16px; }
.mm-tile .k { font-size: 11.5px; color: var(--text-2); }
.mm-tile .v { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mm-tile .v small { font-size: 12px; color: var(--success); margin-left: 6px; }

/* etiqueta disponible-desde */
.avail { display: inline-block; margin-top: 12px; font-family: var(--font-mono); font-size: 11.5px; color: var(--warning); background: color-mix(in oklab, var(--warning) 12%, transparent); border-radius: 999px; padding: 4px 12px; }

/* ---- Planes ---- */
.plans-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: end; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 0;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 26px 24px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.plan.reco { border-color: color-mix(in oklab, var(--accent) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 45%, transparent), var(--shadow-md); }
.plan .badge-reco {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: 12px; padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.plan h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.plan .price { margin: 10px 0 4px; font-family: var(--font-display); font-weight: 700; font-size: 40px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 14px; color: var(--text-2); font-weight: 500; letter-spacing: 0; }
.plan .tagline { font-size: 13px; color: var(--text-2); min-height: 38px; }
.plan ul { list-style: none; margin: 16px 0 22px; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li::before { content: "✓"; color: var(--success); font-weight: 700; flex-shrink: 0; }
.plan li.beta::before { content: "◐"; color: var(--warning); }
.plan .cta { margin-top: auto; }
.plan .soon { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-align: center; margin-top: 8px; }

/* tabla comparativa */
.cmp-wrap { overflow-x: auto; margin-top: 44px; border: 1px solid var(--border); border-radius: var(--r-lg); }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.cmp th, .cmp td { padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--border); }
.cmp th:first-child, .cmp td:first-child { text-align: left; }
.cmp thead th { background: var(--bg-3); font-family: var(--font-display); font-weight: 600; }
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp td { font-variant-numeric: tabular-nums; }
.cmp .reco-col { color: var(--accent); font-weight: 600; }

/* ---- Empresas ---- */
.biz {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 30px;
}
.biz p { margin: 0; color: var(--text-2); max-width: 560px; }
.biz h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 20px; }
.biz .btn { margin-left: auto; }
@media (max-width: 720px) { .biz .btn { margin-left: 0; } }

/* ---- FAQ ---- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 4px; font-family: var(--font-display); font-weight: 600; font-size: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 4px 18px; color: var(--text-2); font-size: 14.5px; }

/* ---- Lead form ---- */
.lead-card {
  max-width: 620px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 30px; box-shadow: var(--shadow-md);
}
.lead-card h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 22px; }
.lead-card > p { margin: 0 0 20px; color: var(--text-2); font-size: 14.5px; }
.f-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .f-row { grid-template-columns: 1fr; } }
.f-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.f-field label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.f-field input, .f-field select {
  height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-3); color: var(--text); font-size: 14.5px;
}
.f-field input:focus, .f-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); background: var(--bg-2); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); margin: 4px 0 18px; }
.consent input { margin-top: 3px; accent-color: var(--accent); }
.consent a { color: var(--accent); text-decoration: underline; }
.f-msg { margin-top: 14px; font-size: 13.5px; border-radius: 10px; padding: 12px 14px; display: none; }
.f-msg.ok { display: block; background: color-mix(in oklab, var(--success) 12%, transparent); color: var(--success); }
.f-msg.err { display: block; background: color-mix(in oklab, var(--error) 12%, transparent); color: var(--error); }
/* honeypot fuera de vista (no display:none — algunos bots lo detectan) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 44px 0 60px; color: var(--text-2); font-size: 13.5px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 24px 60px; justify-content: space-between; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--text); }
.site-footer .legal { margin-top: 26px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

/* ---- Métricas animadas (honestas: capacidades, no cifras inventadas) ---- */
.caps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.cap { text-align: center; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 18px; }
.cap .big { font-family: var(--font-display); font-weight: 700; font-size: 36px; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.cap .lbl { font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
