/* ======================================================================
   WayGPS — Landing institucional
   Tokens de marca según Manual de Marca Rev.2 (Abril 2026).
   3 primarios: Azul (identidad) · Violeta (UI/app) · Verde (acción).
====================================================================== */

:root {
  /* === PRIMARIOS === */
  --brand-primary: #003366;          /* Azul Oscuro · identidad corporativa */
  --brand-primary-600: #002a54;
  --brand-primary-800: #001c3a;

  --brand-accent: #00A651;           /* Verde Vibrante · acción / confirmación */
  --brand-accent-600: #008f45;
  --brand-accent-700: #00783a;

  /* === FAMILIA VIOLETA · UI / Navegación / App (Rev.2) === */
  --violet-900: #2E2C8A;             /* Texto sobre fondo violeta oscuro */
  --violet-800: #3F3DAA;             /* Bordes de énfasis, focus */
  --violet-700: #4A47C0;             /* Inicio de gradientes */
  --violet-600: #5C5AC8;             /* ★ Violeta Principal — referencia */
  --violet-400: #7B79D8;             /* Hover, variantes activas */
  --violet-300: #9C8FD8;             /* Malva suave, gradientes */
  --violet-200: #C5C2EC;             /* Bordes suaves, separadores */
  --violet-50:  #EEEDF9;             /* Fondos de highlight, selección */

  --brand-violet: var(--violet-600);
  --brand-violet-hover: var(--violet-400);
  --brand-violet-strong: var(--violet-800);

  /* === GRADIENTES OFICIALES (Rev.2) === */
  --gradient-login: linear-gradient(135deg, #4A47C0 0%, #7B79D8 50%, #9C8FD8 100%);
  --gradient-nav:   linear-gradient(180deg, #4A47C0 0%, #7B79D8 100%);

  /* === NEUTROS · paleta violácea (Rev.2) === */
  --n-0:   #FFFFFF;
  --n-50:  #F5F5F8;                  /* ★ Gris Superficie Cards */
  --n-100: #F0EFF8;                  /* ★ Gris Violáceo · fondos UI */
  --n-200: #ECECF2;                  /* borde neutro casi imperceptible (leve tinte violáceo) */
  --n-250: #C5C2EC;                  /* divisor violáceo (Rev.2) — uso puntual cuando se necesita marcar */
  --n-300: #D9D9D9;                  /* gris puro legacy (bordes neutros) */
  --n-400: #999999;                  /* Gris Medio · textos secundarios */
  --n-700: #4D4D4D;                  /* Gris Oscuro · textos primarios */
  --n-900: #1A1F2B;                  /* derivada para texto fuerte */

  /* === SOPORTE — sólidos === */
  --ok:   #4CAF50;
  --err:  #F44336;
  --warn: #FF9800;
  --info: #2196F3;

  /* === SOPORTE — versiones suaves (cards de estado, Rev.2) === */
  --ok-soft:   #E8F5E9;
  --ok-border: #A5D6A7;
  --err-soft:  #FFEBEE;
  --err-border:#EF9A9A;
  --warn-soft: #FFF3E0;
  --warn-border:#FFCC80;
  --info-soft: #E3F2FD;
  --info-border:#90CAF9;

  /* === SISTEMA === */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 4px rgba(0,0,0,.04);
  --shadow-md: 0 4px 14px rgba(46, 44, 138, 0.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 24px 48px rgba(46, 44, 138, 0.14), 0 6px 16px rgba(0, 51, 102, 0.08);

  --container: 1200px;
  --gutter: 24px;

  --ease: cubic-bezier(.2,.8,.2,1);
}

/* ============ RESET MÍNIMO ============ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section[id] { scroll-margin-top: 88px; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  color: var(--n-900);
  background: var(--n-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-accent-700); }
button { font-family: inherit; }

/* Foco accesible — violeta de UI según Rev.2 */
:focus-visible {
  outline: 3px solid rgba(92, 90, 200, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--brand-primary); color: #fff;
  padding: 10px 14px; border-radius: var(--radius-sm); z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { left: 16px; }

/* ============ TIPOGRAFÍA ============ */
h1, h2, h3, h4 { font-family: 'Inter', sans-serif; color: var(--n-900); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem); line-height: 1.2; font-weight: 700; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
h4 { font-size: .95rem; line-height: 1.3; font-weight: 600; }
p  { margin: 0 0 1em; color: var(--n-700); }

.body-l { font-size: 1.125rem; line-height: 1.7; color: var(--n-700); }
.lead   { font-size: 1.125rem; line-height: 1.65; color: var(--n-700); max-width: 58ch; }
.lead.light { color: rgba(255,255,255,.85); }
.h-light { color: var(--n-0); }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--brand-primary);
  background: rgba(92, 90, 200, .08);
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.eyebrow-light {
  color: var(--n-0);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
}
.accent { color: var(--brand-accent); }
.accent-violet { color: var(--brand-violet); }

/* Gradiente tipográfico — incorpora los 3 primarios Rev.2 */
.grad {
  background: linear-gradient(100deg, var(--brand-primary) 0%, var(--brand-violet) 55%, var(--brand-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ LAYOUT ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: 96px 0; }
.section-alt { background: var(--n-100); }
.section-dark {
  background: linear-gradient(180deg, var(--brand-primary) 0%, var(--brand-primary-800) 100%);
  color: var(--n-0);
}
.section-dark p { color: rgba(255,255,255,.8); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head .lead { margin: 12px auto 0; }

/* ============ BOTONES ============ */
.btn {
  --bg: var(--brand-accent);
  --fg: #fff;
  --bd: var(--brand-accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg); color: var(--fg);
  border: 1.5px solid var(--bd);
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem;
  cursor: pointer; text-decoration: none;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
  line-height: 1;
  min-height: 44px; /* target accesible */
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 166, 81, .24); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 10px 16px; font-size: .875rem; min-height: 38px; }
.btn-block { width: 100%; }

.btn-primary { --bg: var(--brand-accent); --bd: var(--brand-accent); --fg: #fff; }
.btn-primary:hover { --bg: var(--brand-accent-600); --bd: var(--brand-accent-600); color: #fff; }

/* Botón violeta · acceso a la app, acción "UI" (Rev.2) */
.btn-violet { --bg: var(--brand-violet); --bd: var(--brand-violet); --fg: #fff; }
.btn-violet:hover { --bg: var(--violet-800); --bd: var(--violet-800); color: #fff; }
.btn-violet:hover { box-shadow: 0 8px 22px rgba(92, 90, 200, .32); }

.btn-ghost {
  --bg: transparent; --fg: var(--brand-primary); --bd: var(--brand-primary);
}
.btn-ghost:hover { --bg: var(--brand-primary); --fg: #fff; --bd: var(--brand-primary); box-shadow: 0 8px 22px rgba(0, 51, 102, .18); }

.section-dark .btn-ghost, .cta-final .btn-ghost {
  --fg: #fff; --bd: rgba(255,255,255,.7);
}

/* ============ HEADER / NAV ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-header.scrolled {
  background: rgba(255,255,255,.96);
  border-bottom-color: var(--n-200);
  box-shadow: var(--shadow-sm);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--brand-primary); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -.01em;
}
.brand-icon { border-radius: 8px; }
.brand-text { color: var(--brand-primary); font-weight: 500; }
.brand-text strong { color: var(--brand-accent); font-weight: 700; }

.nav-primary ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-primary a {
  color: var(--n-700); font-weight: 500; font-size: .95rem;
  padding: 8px 2px; position: relative;
}
/* Indicador activo en nav usa violeta (rol UI definido en Rev.2 para nav app) */
.nav-primary a::after {
  content: ""; position: absolute; left: 0; bottom: 2px; height: 2px; width: 0;
  background: var(--brand-violet); transition: width .25s var(--ease);
}
.nav-primary a:hover { color: var(--brand-violet); }
.nav-primary a:hover::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--n-200);
  background: rgba(255, 255, 255, 0.8);
  color: var(--brand-violet);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--violet-300);
  background: var(--violet-50);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--brand-primary);
  margin: 4px 0; transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 16px var(--gutter) 24px;
  background: #fff;
  border-top: 1px solid var(--n-200);
}
.nav-mobile a {
  color: var(--n-700); font-weight: 500;
  padding: 14px 0; border-bottom: 1px solid var(--n-200);
}
.nav-mobile a:hover { color: var(--brand-violet); }
.nav-mobile a.btn { border-bottom: 0; margin-top: 8px; }
.nav-mobile a.btn:hover { color: #fff; }

/* ============ HERO · ver bloque "HERO EN VIVO" ============ */
.trust-bar {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 20px 28px;
  color: var(--n-700); font-size: .9rem;
}
.trust-bar li { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-accent); box-shadow: 0 0 0 4px rgba(0,166,81,.16); }

/* Chrome de ventana (usado en el visual de marca blanca) */
.mock-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  background: var(--gradient-nav); /* gradiente nav oficial Rev.2 */
  border-bottom: 1px solid var(--violet-800);
}
.mock-chrome span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.35);
}
.mock-chrome span:nth-child(1) { background: #ff5f57; }
.mock-chrome span:nth-child(2) { background: #febc2e; }
.mock-chrome span:nth-child(3) { background: #28c840; }
.mock-url {
  margin-left: 16px; font-size: .8rem; color: #fff;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  padding: 4px 10px; flex: 1; text-align: center;
  font-weight: 500;
}
.chip {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; color: var(--n-700);
  background: var(--n-50); border: 1px solid var(--n-200);
}
/* chip-accent = acción primaria → mantiene verde (acción positiva) */
.chip-accent {
  background: rgba(0, 166, 81, .12); color: var(--brand-accent-700); border-color: rgba(0, 166, 81, .25);
}
/* chip-violet = chip de UI / sugerencia de IA */
.chip-violet {
  background: var(--violet-50); color: var(--violet-800); border-color: var(--violet-300);
}

/* ============ SPLIT ============ */
.split {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
}
.split-copy h2 { margin-bottom: 16px; }

.split-visual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.stat-card {
  background: #fff; border: 1px solid var(--n-200); border-radius: var(--radius-md);
  padding: 24px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 6px;
  min-height: 124px;
}
.stat-card:nth-child(3) { grid-column: span 2; }
.stat-num { font-size: 2.5rem; font-weight: 700; color: var(--brand-primary); line-height: 1; letter-spacing: -.02em; }
.stat-accent .stat-num { color: var(--brand-accent); }
.stat-violet .stat-num { color: var(--brand-violet); }
.stat-label { color: var(--n-700); font-size: .95rem; }

/* ============ PAIN GRID ============ */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.pain {
  background: #fff; border: 1px solid var(--n-200);
  border-radius: var(--radius-md); padding: 24px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.pain:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--violet-300); }
/* pain-icon en Violeta (Rev.2): los "dolores" son lo que SofIA / la app detectan
   y operan — coherente con el rol UI del violeta */
.pain-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--violet-50); color: var(--brand-violet);
  border: 1px solid var(--violet-300);
  display: grid; place-items: center; margin-bottom: 14px;
}
.pain-icon svg { width: 22px; height: 22px; }
.pain h3 { margin-bottom: 6px; color: var(--n-900); }
.pain p { margin: 0; color: var(--n-700); font-size: .95rem; }

/* ============ CAPACIDADES ============ */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.cap-card {
  background: #fff; border: 1px solid var(--n-200);
  border-radius: var(--radius-md); padding: 28px;
  position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
/* Barra superior animada en Verde Vibrante (Rev.2) — capacidades = soluciones */
.cap-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-accent) 0%, var(--brand-accent-600) 100%);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.cap-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--ok-border); }
.cap-card:hover::before { transform: scaleX(1); }
/* cap-icon en Verde Vibrante: cada capacidad es una solución activa */
.cap-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--ok-soft); color: var(--brand-accent);
  border: 1px solid var(--ok-border);
  display: grid; place-items: center; margin-bottom: 16px;
}
.cap-icon svg { width: 26px; height: 26px; }
.cap-card h3 { margin-bottom: 6px; }
.cap-card p { margin: 0; color: var(--n-700); font-size: .95rem; }

/* ============ SOFIA · paleta violeta = identidad de la IA en la app ============ */
.sofia-section {
  background:
    radial-gradient(60% 60% at 90% 10%, rgba(92, 90, 200, .08) 0%, transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(0, 51, 102, .05) 0%, transparent 70%),
    #fff;
}
.sofia-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px;
  align-items: center; margin-bottom: 48px;
}
.sofia-avatar-wrap {
  position: relative; display: grid; place-items: center;
  padding: 32px 0;
}
.sofia-glow {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 90, 200, .28), rgba(92, 90, 200, 0) 65%);
  filter: blur(10px);
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: .85; }
}
.sofia-avatar-img {
  position: relative;
  width: 280px; height: 280px; object-fit: cover;
  border-radius: 50%;
  background: var(--gradient-login);
  box-shadow: var(--shadow-lg), 0 0 0 8px rgba(255,255,255,.8);
  border: 4px solid var(--brand-violet);
}
.sofia-tag {
  position: absolute; bottom: 16px;
  background: #fff; padding: 8px 14px;
  border-radius: 999px; box-shadow: var(--shadow-md);
  font-size: .85rem; font-weight: 600; color: var(--violet-800);
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--n-200);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand-violet);
  box-shadow: 0 0 0 0 rgba(92, 90, 200, 0.7);
  animation: live 1.6s infinite;
}
@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(92, 90, 200, .7); }
  70% { box-shadow: 0 0 0 10px rgba(92, 90, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(92, 90, 200, 0); }
}

.sofia-benefits { display: grid; gap: 16px; }
/* Cards de SofIA: borde sutil + acento violeta concentrado en la barra izquierda */
.sofia-card {
  background: #fff; border: 1px solid var(--n-200);
  border-radius: var(--radius-md); padding: 24px 26px;
  border-left: 4px solid var(--brand-violet);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.sofia-card:hover { transform: translateX(4px); box-shadow: var(--shadow-md); border-left-color: var(--violet-800); }
.sofia-card h3 { margin-bottom: 6px; color: var(--violet-800); }
.sofia-card p { margin: 0; font-size: .98rem; }

.use-cases {
  background: #fff; border: 1px solid var(--n-200);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}
.use-cases-title { color: var(--violet-800); margin-bottom: 18px; font-size: 1.1rem; }
.use-cases .chip {
  padding: 8px 14px;
  font-size: .85rem;
  font-weight: 500;
}
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--n-50); color: var(--n-700);
  border: 1px solid var(--n-200);
  font-size: .9rem; font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.chips li:hover {
  background: var(--violet-50);
  color: var(--violet-800);
  border-color: var(--violet-300);
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-violet); }

/* Chat peek — demo conversación SofIA */
.chat-peek {
  margin-top: 28px; background: #fff;
  border: 1px solid var(--n-200);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md); max-width: 520px; margin-left: auto; margin-right: auto;
}
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--gradient-nav);
  font-size: .85rem; font-weight: 600; color: #fff;
}
.chat-header img { border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); }
.chat-header .pulse-dot { margin-left: auto; }
.pulse-dot {
  display: block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-accent);
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.3); }
}
.chat-messages { padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.chat-msg {
  max-width: 78%; padding: 10px 14px; border-radius: 16px;
  font-size: .88rem; line-height: 1.5;
}
.chat-msg.user {
  align-self: flex-end; background: var(--violet-50);
  border-bottom-right-radius: 4px; font-style: italic; color: var(--violet-900);
}
.chat-msg.sofia {
  align-self: flex-start; background: var(--n-50);
  border-bottom-left-radius: 4px; color: var(--n-700);
}
.chat-msg.sofia strong { color: var(--violet-800); }
.chat-msg.chat-action {
  background: transparent; padding: 0;
}

.sofia-anchor {
  text-align: center; padding: 32px 0 0;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.anchor-phrase {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  background: var(--gradient-login);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.02em; margin: 0;
}

/* ============ BENEFICIOS ============ */
.bene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.bene {
  background: #fff; border: 1px solid var(--n-200);
  border-radius: var(--radius-md); padding: 28px;
  text-align: left;
}
/* bene-num · alterna verde (acción) y violeta (UI/IA) — patrón Rev.2 */
.bene-num {
  display: inline-block; margin-bottom: 12px;
  font-size: 2rem; font-weight: 700; letter-spacing: -.02em;
  color: var(--brand-accent);
}
.bene:nth-child(2n) .bene-num { color: var(--brand-violet); }
.bene p { margin: 0; font-size: .95rem; color: var(--n-700); }
.bene strong { color: var(--n-900); }
.fine-print { text-align: center; margin-top: 24px; color: var(--n-400); font-size: .82rem; }

/* ============ SECTORES ============ */
.sector-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.sector {
  background: #fff; border: 1px solid var(--n-200);
  border-radius: var(--radius-md); padding: 24px;
  text-align: center;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.sector:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--violet-300); }
.sector-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  display: grid; place-items: center;
  color: var(--brand-primary);
  background: rgba(0, 51, 102, .06);
  border-radius: 12px;
}
.sector-icon svg { width: 28px; height: 28px; }
.sector h3 { margin: 0 0 6px; font-size: 1rem; color: var(--n-900); }
.sector p { margin: 0; color: var(--n-700); font-size: .95rem; }

/* ============ TRUST ============ */
.trust-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.trust {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-md);
  padding: 28px;
  backdrop-filter: blur(4px);
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.trust:hover { transform: translateY(-2px); background: rgba(255,255,255,.10); }
.trust-icon {
  width: 46px; height: 46px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(0, 166, 81, .2);
  color: var(--brand-accent);
  margin-bottom: 14px;
}
.trust-icon svg { width: 24px; height: 24px; }
.trust h3 { color: #fff; margin-bottom: 6px; font-size: 1.05rem; }
.trust p { color: rgba(255,255,255,.75); margin: 0; font-size: .95rem; }

/* ============ CTA FINAL + FORM ============ */
.cta-final {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-800) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
/* Halos decorativos: leve violeta (UI) + verde (acción) — sutiles */
.cta-final::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 100% 0%, rgba(92, 90, 200, .22), transparent 60%),
    radial-gradient(40% 40% at 0% 100%, rgba(0, 166, 81, .12), transparent 60%);
  pointer-events: none;
}
.cta-grid {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: center;
}
.cta-copy h2 { margin-bottom: 16px; }
.cta-copy .lead { margin-bottom: 24px; }
.bullets {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.bullets li {
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: .9rem; font-weight: 500;
}
.bullets li::before { content: "✓  "; color: var(--brand-accent); font-weight: 700; }

.cta-form {
  background: #fff; color: var(--n-900);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-lg);
}
.cta-form h3 { color: var(--brand-primary); margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--n-700); margin-bottom: 6px; }
.field .opt { color: var(--n-400); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--n-200); border-radius: var(--radius-sm);
  background: #fff; color: var(--n-900);
  font: inherit; font-size: .95rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
/* Focus de campos: violeta (rol UI) — coherente con foco accesible global Rev.2 */
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-violet);
  box-shadow: 0 0 0 3px rgba(92, 90, 200, .22);
}
.field textarea { resize: vertical; min-height: 84px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-disclaimer { font-size: .8rem; color: var(--n-400); text-align: center; margin: 12px 0 0; }

.form-status {
  margin-top: 16px; padding: 0; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500;
}
/* Versiones suaves de soporte definidas en Rev.2 */
.form-status.is-success {
  padding: 12px 14px;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-border);
}
.form-status.is-error {
  padding: 12px 14px;
  background: var(--err-soft);
  color: var(--err);
  border: 1px solid var(--err-border);
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--brand-primary-800); color: rgba(255,255,255,.75);
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand-footer { color: #fff; margin-bottom: 14px; }
.brand-footer .brand-text { color: #fff; }
.brand-footer .brand-text strong { color: var(--brand-accent); }
.footer-brand p { color: rgba(255,255,255,.7); font-size: .95rem; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: rgba(255,255,255,.7); font-size: .95rem; }
.footer-col a:hover { color: var(--brand-accent); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px 24px;
  padding-top: 20px; color: rgba(255,255,255,.55); font-size: .85rem;
}
.footer-attribution { color: rgba(255,255,255,.5); font-size: .8rem; }
.footer-attribution a {
  color: rgba(255,255,255,.72);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.25);
  text-underline-offset: 2px;
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}
.footer-attribution a:hover {
  color: #fff;
  text-decoration-color: rgba(255,255,255,.7);
}
.social { display: flex; gap: 14px; }
.social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #fff;
  display: grid; place-items: center;
  transition: background .2s var(--ease);
}
.social a:hover { background: var(--brand-accent); color: #fff; }

/* ============ REVEAL (animaciones suaves) ============ */
.reveal {
  opacity: 0; transform: translateY(10px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ CONSISTENCIA CROMÁTICA (Capacidades -> SofIA/Seguridad) ============ */
/* SofIA = paleta violeta (UI/IA) */
#sofia .eyebrow-light {
  color: var(--violet-800);
  background: var(--violet-50);
  border: 1px solid var(--violet-200);
}
#sofia .accent { color: var(--brand-violet); }

#sofia .section-head h2,
#seguridad .section-head h2 {
  letter-spacing: -.01em;
}

#seguridad .eyebrow-light {
  color: var(--n-0);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ DARK MODE — coherente con Rev.2 (modo oscuro de la familia violeta) ============ */
html[data-theme="dark"] {
  --brand-primary: #8fb7ff;
  --brand-primary-600: #7fa9f6;
  --brand-primary-800: #0e1728;
  --brand-accent: #35d17a;
  --brand-accent-600: #2bb06a;
  --brand-accent-700: #22995b;

  /* Familia violeta en modo oscuro (escala invertida en uso, según informe Rev.2) */
  --violet-900: #1a1850;
  --violet-800: #2E2C8A;
  --violet-700: #3F3DAA;
  --violet-600: #7B79D8;          /* texto principal en dark */
  --violet-400: #9C8FD8;          /* hover en dark */
  --violet-300: #C5C2EC;
  --violet-200: #2c2f55;
  --violet-50:  #1a1d3a;

  --brand-violet: var(--violet-600);
  --brand-violet-hover: var(--violet-400);
  --brand-violet-strong: #b5b3ee;

  --gradient-login: linear-gradient(135deg, #2E2C8A 0%, #4A47C0 50%, #7B79D8 100%);
  --gradient-nav:   linear-gradient(180deg, #2E2C8A 0%, #4A47C0 100%);

  --n-0: #0a1120;
  --n-50: #0e1426;
  --n-100: #111a2d;
  --n-200: #24324d;
  --n-300: #2a3a55;
  --n-400: #8ea0bf;
  --n-700: #b7c7e0;
  --n-900: #f3f7ff;

  --ok-soft: rgba(76, 175, 80, .15);
  --ok-border: rgba(76, 175, 80, .35);
  --err-soft: rgba(244, 67, 54, .12);
  --err-border: rgba(244, 67, 54, .32);
  --warn-soft: rgba(255, 152, 0, .12);
  --warn-border: rgba(255, 152, 0, .32);
  --info-soft: rgba(33, 150, 243, .12);
  --info-border: rgba(33, 150, 243, .32);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .25);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-lg: 0 30px 56px rgba(0, 0, 0, .45), 0 10px 24px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(75% 90% at 90% 0%, rgba(123, 121, 216, .12), transparent 60%),
    radial-gradient(60% 80% at 10% 100%, rgba(53, 209, 122, .06), transparent 60%),
    var(--n-0);
}

html[data-theme="dark"] .site-header {
  background: rgba(10, 17, 32, .86);
}

html[data-theme="dark"] .site-header.scrolled {
  background: rgba(10, 17, 32, .96);
  border-bottom-color: var(--n-200);
}

html[data-theme="dark"] .theme-toggle {
  background: rgba(17, 26, 45, .9);
  border-color: var(--violet-200);
  color: var(--violet-600);
}
html[data-theme="dark"] .theme-toggle:hover {
  background: var(--violet-50);
  border-color: var(--violet-600);
}

html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }



html[data-theme="dark"] .sofia-section {
  background:
    radial-gradient(60% 60% at 90% 10%, rgba(123, 121, 216, .18) 0%, transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(143, 183, 255, .10) 0%, transparent 70%),
    #0b1426;
}



html[data-theme="dark"] .nav-mobile,
html[data-theme="dark"] .mock-window,
html[data-theme="dark"] .mock-url,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .pain,
html[data-theme="dark"] .cap-card,
html[data-theme="dark"] .sofia-card,
html[data-theme="dark"] .use-cases,
html[data-theme="dark"] .bene,
html[data-theme="dark"] .sector,
html[data-theme="dark"] .cta-form {
  background: var(--n-100);
}

html[data-theme="dark"] .chat-peek {
  background: #141c2e;
  border-color: rgba(123, 121, 216, .28);
  box-shadow: var(--shadow-lg);
}
html[data-theme="dark"] .chat-messages {
  background: #141c2e;
}
html[data-theme="dark"] .chat-msg.user {
  background: rgba(74, 71, 192, .45);
  color: #e8e7f9;
}
html[data-theme="dark"] .chat-msg.sofia {
  background: rgba(255, 255, 255, .06);
  color: #d4d2f0;
}
html[data-theme="dark"] .chat-msg.sofia strong {
  color: #fff;
}
html[data-theme="dark"] .chat-peek .chip {
  background: rgba(255, 255, 255, .06);
  color: #c7d4ea;
  border-color: rgba(255, 255, 255, .12);
}
html[data-theme="dark"] .chat-peek .chip-accent {
  background: rgba(53, 209, 122, .15);
  color: var(--brand-accent);
  border-color: rgba(53, 209, 122, .35);
}
html[data-theme="dark"] .sofia-bubble {
  background: #141c2e;
  border-color: rgba(123, 121, 216, .28);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .5), 0 0 0 1px rgba(123, 121, 216, .08);
}
html[data-theme="dark"] .sofia-bubble img {
  border-color: var(--violet-400);
}
html[data-theme="dark"] .sofia-bubble .bubble strong {
  color: #c5c2ec;
}
html[data-theme="dark"] .sofia-bubble .bubble-msg.user-msg {
  background: rgba(74, 71, 192, .45);
  color: #e8e7f9;
}
html[data-theme="dark"] .sofia-bubble .bubble-msg.sofia-msg {
  background: rgba(255, 255, 255, .06);
  color: #d4d2f0;
}
html[data-theme="dark"] .sofia-bubble .bubble-msg.sofia-msg strong {
  color: #fff;
}
html[data-theme="dark"] .sofia-bubble .bubble-meta {
  color: #8ea0bf;
}
html[data-theme="dark"] .sofia-bubble .chip {
  background: rgba(255, 255, 255, .06);
  color: #c7d4ea;
  border-color: rgba(255, 255, 255, .12);
}
html[data-theme="dark"] .sofia-bubble .chip-accent {
  background: rgba(53, 209, 122, .15);
  color: var(--brand-accent);
  border-color: rgba(53, 209, 122, .35);
}

html[data-theme="dark"] .mock-chrome,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .chips li,
html[data-theme="dark"] .bullets li {
  background: rgba(255, 255, 255, .03);
}

html[data-theme="dark"] .mock-map {
  border-color: var(--n-200);
}

html[data-theme="dark"] .section-dark,
html[data-theme="dark"] .cta-final {
  background: linear-gradient(160deg, #0c1528 0%, #0a1120 100%);
}

html[data-theme="dark"] .section-head h2,
html[data-theme="dark"] .section-head h3,
html[data-theme="dark"] .sofia-card h3,
html[data-theme="dark"] .use-cases-title,
html[data-theme="dark"] .anchor-phrase {
  color: #ecf3ff;
}

html[data-theme="dark"] .section-head .lead,
html[data-theme="dark"] .sofia-card p,
html[data-theme="dark"] .use-cases .chips li {
  color: #c7d4ea;
}

html[data-theme="dark"] .h-light,
html[data-theme="dark"] .section-dark h2,
html[data-theme="dark"] .cta-final h2,
html[data-theme="dark"] .eyebrow-light {
  color: #f4f8ff;
}

html[data-theme="dark"] #sofia .eyebrow-light {
  color: #c5c2ec;
  background: rgba(123, 121, 216, .14);
  border-color: rgba(123, 121, 216, .35);
}

html[data-theme="dark"] .mock-chrome {
  border-bottom-color: var(--violet-700);
}
html[data-theme="dark"] .mock-body {
  background: var(--n-100);
}
html[data-theme="dark"] .kpi {
  background: rgba(255,255,255,.03);
  border-color: var(--violet-200);
}
html[data-theme="dark"] .kpi strong {
  color: #c5c2ec;
}

html[data-theme="dark"] #sofia .section-head .lead,
html[data-theme="dark"] #seguridad .section-head .lead {
  color: #c7d4ea;
}

html[data-theme="dark"] #seguridad .eyebrow-light {
  color: #f4f8ff;
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.18);
}

html[data-theme="dark"] #seguridad .section-head h2 {
  color: #f4f8ff;
}

html[data-theme="dark"] #seguridad .trust h3 {
  color: #f4f8ff;
}

html[data-theme="dark"] #seguridad .trust p {
  color: rgba(239, 246, 255, .82);
}

html[data-theme="dark"] .section-dark p,
html[data-theme="dark"] .cta-copy .lead.light {
  color: rgba(239, 246, 255, .82);
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea {
  background: #0d1629;
  color: var(--n-900);
  border-color: var(--violet-200);
}
html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field select:focus,
html[data-theme="dark"] .field textarea:focus {
  border-color: var(--violet-600);
  box-shadow: 0 0 0 3px rgba(123, 121, 216, .25);
}

html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder {
  color: var(--n-400);
}

html[data-theme="dark"] .section-alt {
  background: #0d1628;
}

html[data-theme="dark"] .site-footer {
  background: #070d19;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .split, .sofia-grid, .cta-grid { grid-template-columns: 1fr; gap: 40px; }
  .sofia-avatar-wrap { order: -1; }
  .sofia-avatar-img { width: 220px; height: 220px; }
  .sofia-glow { width: 280px; height: 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-primary { display: none; }
  .nav-toggle { display: block; }
  .nav-mobile {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 120;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    box-shadow: var(--shadow-md);
  }
  .nav-mobile.is-open { display: flex; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
  .nav-wrap { height: 76px; }
  .nav-cta { gap: 8px; }
  .brand { gap: 8px; }
  .brand-text { font-size: 1.12rem; }
  .nav-mobile { max-height: calc(100dvh - 76px); }
  .theme-toggle { width: 38px; height: 38px; }
  .chat-peek { max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 14px; }
  .field-row { grid-template-columns: 1fr; }
  .cta-form { padding: 24px; }
}

@media (max-width: 640px) {
  .nav-cta .btn-sm {
    padding: 9px 10px;
    font-size: .76rem;
    min-height: 36px;
  }
  .brand-icon {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 430px) {
  .nav-cta .btn-sm { display: none; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .stat-card:nth-child(3) { grid-column: span 1; }
  .split-visual { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .cap-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .pain-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* =====================================================================
   HERO EN VIVO — mapa nocturno con la flota moviéndose (live-map.js)
   El hero es oscuro en los dos temas: el mapa es el protagonista.
===================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(660px, 100vh, 940px);
  display: flex;
  padding: 72px 0 0;
  background: #021a33;
  color: #fff;
}
html[data-theme="dark"] .hero { background: #021a33; }

.live-map {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; display: block;
  touch-action: pan-y;
}
.live-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 21, 41, .97) 0%, rgba(2, 21, 41, .9) 30%, rgba(2, 21, 41, .4) 50%, rgba(2, 21, 41, 0) 62%),
    linear-gradient(180deg, rgba(2, 21, 41, .55) 0%, rgba(2, 21, 41, 0) 16%, rgba(2, 21, 41, 0) 84%, rgba(2, 21, 41, .55) 100%);
}

.hero-grid {
  position: relative; z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  pointer-events: none; /* deja pasar el mouse al mapa */
}
.hero-copy {
  pointer-events: auto;
  align-self: center;
  max-width: 580px;
  padding: 48px 0 72px;
}
.hero-copy h1 { color: #fff; margin-bottom: 22px; }
.grad-live {
  display: block;
  background: linear-gradient(95deg, #35d17a 0%, #7fdcab 35%, #b5b3ee 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy .lead {
  color: rgba(234, 241, 255, .82);
  font-size: 1.15rem;
  max-width: 52ch;
  margin-bottom: 30px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero .trust-bar { color: rgba(234, 241, 255, .78); }
.hero .dot { background: #35d17a; box-shadow: 0 0 0 4px rgba(53, 209, 122, .18); }

.eyebrow-live {
  display: inline-flex; align-items: center; gap: 8px;
  color: #d9f7e6;
  background: rgba(53, 209, 122, .12);
  border: 1px solid rgba(53, 209, 122, .35);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: #35d17a;
  animation: live-green 1.6s infinite;
}
@keyframes live-green {
  0% { box-shadow: 0 0 0 0 rgba(53, 209, 122, .7); }
  70% { box-shadow: 0 0 0 9px rgba(53, 209, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 209, 122, 0); }
}

/* Botones extra */
.btn-lg { padding: 16px 26px; font-size: 1rem; min-height: 52px; }
.btn-ghost-light { --bg: rgba(255, 255, 255, .04); --fg: #fff; --bd: rgba(255, 255, 255, .45); }
.btn-ghost-light:hover { --bg: rgba(255, 255, 255, .12); --bd: #fff; color: #fff; box-shadow: none; }
.btn-outline-violet { --bg: transparent; --fg: var(--brand-violet); --bd: var(--violet-200); }
.btn-outline-violet:hover { --bg: var(--violet-50); --bd: var(--brand-violet); color: var(--brand-violet); box-shadow: none; }
.hero .btn-primary:hover { box-shadow: 0 10px 28px rgba(53, 209, 122, .35); }

/* Escenario del mapa: panel de estado + alertas */
.hero-stage { position: relative; min-height: 540px; }
.live-panel {
  pointer-events: auto;
  position: absolute; top: 44px; left: 0;
  width: 320px;
  background: rgba(6, 30, 58, .74);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(143, 183, 255, .2);
  border-radius: 14px;
  padding: 14px 16px 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.live-panel-head {
  display: flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(234, 241, 255, .88);
  margin-bottom: 10px;
}
.live-sim {
  margin-left: auto;
  font-size: .64rem; letter-spacing: .06em;
  color: rgba(234, 241, 255, .55);
  border: 1px solid rgba(234, 241, 255, .22);
  border-radius: 999px; padding: 2px 8px;
}
.live-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.live-stat {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px; padding: 8px 10px;
}
.live-stat strong {
  display: block; font-size: 1.55rem; line-height: 1.1; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.live-stat strong.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.22); } }
.live-stat span { font-size: .7rem; color: rgba(234, 241, 255, .66); white-space: nowrap; }
.st-transito strong { color: #35d17a; }
.st-detenido strong { color: #ff6b61; }
.st-sin strong { color: #a9b8d3; }
.live-hint { margin: 10px 0 0; font-size: .72rem; color: rgba(234, 241, 255, .5); }

.live-toasts {
  pointer-events: auto;
  position: absolute; right: 0; bottom: 44px;
  width: min(340px, 100%);
  display: flex; flex-direction: column; gap: 10px;
}
.live-toast {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff;
  border-radius: 12px;
  border-left: 4px solid #5C5AC8;
  padding: 10px 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
  animation: toast-in .45s var(--ease) both;
}
.live-toast img {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #4A47C0 0%, #7B79D8 50%, #9C8FD8 100%);
  border: 2px solid #5C5AC8;
}
.live-toast p { margin: 0; font-size: .84rem; line-height: 1.4; color: #1A1F2B; }
.live-toast b { color: #2E2C8A; font-weight: 600; }
.live-toast small { display: block; margin-top: 2px; font-size: .7rem; color: #7a8399; }
.live-toast.tone-transito { border-left-color: #00A651; }
.live-toast.tone-detenido { border-left-color: #F44336; }
.live-toast.tone-sin { border-left-color: #8ea0bf; }
.live-toast.tone-warn { border-left-color: #FF9800; }
.live-toast.is-leaving { animation: toast-out .35s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(18px); } }

/* Popup que sigue al móvil seleccionado */
.live-popup {
  position: absolute; left: 0; top: 0; z-index: 3;
  pointer-events: none;
  transform: translate3d(-400px, -400px, 0);
  opacity: 0; transition: opacity .3s var(--ease);
}
.live-popup.is-ready { opacity: 1; }
.live-popup-inner {
  transform: translate(-50%, calc(-100% - 20px));
  background: rgba(6, 30, 58, .94);
  border: 1px solid rgba(181, 179, 238, .4);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: .76rem; line-height: 1.45; color: rgba(234, 241, 255, .9);
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
  position: relative;
}
.live-popup-inner::after {
  content: ""; position: absolute; left: 50%; bottom: -6px;
  width: 10px; height: 10px; transform: translateX(-50%) rotate(45deg);
  background: rgba(6, 30, 58, .94);
  border-right: 1px solid rgba(181, 179, 238, .4);
  border-bottom: 1px solid rgba(181, 179, 238, .4);
}
.live-popup-inner b { display: block; color: #fff; font-size: .84rem; }
.lp-state { font-weight: 600; }
.lp-transito { color: #35d17a; }
.lp-detenido { color: #ff6b61; }
.lp-sin { color: #a9b8d3; }
.lp-meta { display: block; color: rgba(234, 241, 255, .55); font-size: .7rem; }

/* Header: dos botones */
.nav-cta .btn-sm { min-height: 40px; }

/* =====================================================================
   CÓMO EMPEZAR
===================================================================== */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
  counter-reset: none; position: relative;
}
.step {
  position: relative;
  background: #fff; border: 1px solid var(--n-200);
  border-radius: var(--radius-md); padding: 28px;
}
.step-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-accent); color: #fff;
  font-weight: 700; margin-bottom: 16px;
  box-shadow: 0 0 0 6px rgba(0, 166, 81, .12);
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; font-size: .95rem; }
html[data-theme="dark"] .step { background: var(--n-100); }

/* =====================================================================
   MARCA BLANCA
===================================================================== */
.wl-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.wl-copy h2 { margin-bottom: 16px; }
.wl-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.wl-list li { position: relative; padding-left: 30px; color: var(--n-700); }
.wl-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: .72rem; font-weight: 700;
  color: var(--brand-violet); background: var(--violet-50); border: 1px solid var(--violet-200);
}
.wl-list strong { color: var(--n-900); }
.wl-window {
  background: #fff; border: 1px solid var(--n-200);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  max-width: 460px; margin-left: auto;
}
.wl-window .mock-url b { font-weight: 700; }
.wl-login {
  padding: 36px 40px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: linear-gradient(180deg, var(--violet-50) 0%, #fff 70%);
}
.wl-logo {
  width: 120px; height: 56px; border-radius: 12px;
  display: grid; place-items: center;
  border: 2px dashed var(--violet-300); color: var(--brand-violet);
  font-weight: 700; font-size: .8rem; letter-spacing: .14em; background: #fff;
}
.wl-name { margin: 0 0 6px; font-weight: 600; color: var(--n-900); }
.wl-field { width: 100%; height: 40px; border-radius: 8px; border: 1.5px solid var(--n-200); background: #fff; }
.wl-btn {
  width: 100%; height: 42px; border-radius: 8px; margin-top: 4px;
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: .9rem;
  background: var(--brand-violet);
}
.wl-powered { margin: 6px 0 0; font-size: .72rem; color: var(--n-400); }
html[data-theme="dark"] .wl-window { background: var(--n-100); }
html[data-theme="dark"] .wl-login { background: linear-gradient(180deg, rgba(123, 121, 216, .12) 0%, var(--n-100) 70%); }
html[data-theme="dark"] .wl-logo,
html[data-theme="dark"] .wl-field { background: rgba(255, 255, 255, .03); }

/* Beneficios sin cifras: el título va en lugar del número */
.bene-num { font-size: 1.2rem; line-height: 1.3; }

/* Seguridad: 6 cards en 3 columnas, sin huérfanas */
@media (min-width: 900px) {
  .trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =====================================================================
   WHATSAPP FLOTANTE (se activa desde config.js)
===================================================================== */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 18px 0 14px;
  border-radius: 999px;
  background: #25D366; color: #fff; font-weight: 600; font-size: .95rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.wa-float[hidden] { display: none; }
.wa-float svg { width: 26px; height: 26px; }
.wa-float:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0, 0, 0, .3); }

/* =====================================================================
   RESPONSIVE — hero en vivo y bloques nuevos
===================================================================== */
@media (max-width: 1180px) {
  .nav-primary ul { gap: 16px; }
  .nav-primary a { font-size: .9rem; }
}

@media (max-width: 1024px) {
  .wl-grid { grid-template-columns: 1fr; gap: 40px; }
  .wl-window { margin: 0 auto; }
}

@media (max-width: 899px) {
  .hero { min-height: 0; padding-top: 76px; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { max-width: none; padding: 36px 0 12px; }
  .hero-copy .lead { font-size: 1.05rem; margin-bottom: 26px; }
  .hero-stage { min-height: 440px; }
  .live-shade {
    background:
      linear-gradient(180deg,
        rgba(2, 21, 41, .96) 0%,
        rgba(2, 21, 41, .9) var(--shade-stop, 55%),
        rgba(2, 21, 41, 0) calc(var(--shade-stop, 55%) + 14%)),
      linear-gradient(0deg, rgba(2, 21, 41, .6) 0%, rgba(2, 21, 41, 0) 18%);
  }
  .live-panel { top: 10px; left: 0; right: 0; width: auto; padding: 10px 12px; }
  .live-stat strong { font-size: 1.3rem; }
  .live-hint { display: none; }
  .live-toasts { left: 0; right: 0; width: auto; bottom: 16px; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-cta .nav-login { display: none; }
}

@media (max-width: 480px) {
  .hero-ctas .btn { width: 100%; }
  .nav-cta .nav-demo { display: none; }
  .live-stat span { font-size: .64rem; }
  .wl-login { padding: 28px 22px 22px; }
  .wa-float span { display: none; }
  .wa-float { padding: 0; width: 56px; justify-content: center; }
}

/* Cards en carrusel horizontal en el celular (menos scroll vertical) */
@media (max-width: 640px) {
  .scroll-row {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 14px;
    scroll-padding: 0 var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .scroll-row::-webkit-scrollbar { display: none; }
  .scroll-row > * {
    flex: 0 0 80%;
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

/* Popup: oculto sobre el texto (celular) o dado vuelta si choca con panel / header */
.live-popup.is-off { opacity: 0; }
.live-popup.is-flip .live-popup-inner { transform: translate(-50%, 22px); }
.live-popup.is-flip .live-popup-inner::after {
  bottom: auto; top: -6px;
  border-right: 0; border-bottom: 0;
  border-left: 1px solid rgba(181, 179, 238, .4);
  border-top: 1px solid rgba(181, 179, 238, .4);
}

/* Header oscuro mientras estás sobre el hero; vuelve a blanco al scrollear */
.site-header:not(.scrolled):not(.menu-open) {
  background: rgba(2, 26, 51, .55);
  border-bottom-color: rgba(255, 255, 255, .06);
}
.site-header:not(.scrolled):not(.menu-open) .brand-text { color: #fff; }
.site-header:not(.scrolled):not(.menu-open) .nav-primary a { color: rgba(234, 241, 255, .82); }
.site-header:not(.scrolled):not(.menu-open) .nav-primary a:hover { color: #fff; }
.site-header:not(.scrolled):not(.menu-open) .nav-primary a::after { background: #b5b3ee; }
.site-header:not(.scrolled):not(.menu-open) .theme-toggle {
  background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); color: #c5c2ec;
}
.site-header:not(.scrolled):not(.menu-open) .btn-outline-violet {
  --fg: #e3e2ff; --bd: rgba(197, 194, 236, .45);
}
.site-header:not(.scrolled):not(.menu-open) .btn-outline-violet:hover { --bg: rgba(255, 255, 255, .08); color: #fff; }
.site-header:not(.scrolled):not(.menu-open) .nav-toggle span { background: #fff; }

@media (max-width: 899px) {
  .live-shade {
    background:
      linear-gradient(180deg,
        rgba(2, 21, 41, .86) 0%,
        rgba(2, 21, 41, .8) var(--shade-stop, 55%),
        rgba(2, 21, 41, 0) calc(var(--shade-stop, 55%) + 12%)),
      linear-gradient(0deg, rgba(2, 21, 41, .55) 0%, rgba(2, 21, 41, 0) 16%);
  }
  .hero-stage { min-height: 400px; }
}
@media (max-width: 600px) {
  .hero-copy { padding: 26px 0 16px; }
  .hero .trust-bar { display: none; }
  .hero-ctas { flex-wrap: nowrap; margin-bottom: 0; }
  .hero-ctas .btn { flex: 1 1 0; width: auto; padding: 14px 10px; font-size: .95rem; min-height: 50px; }
  .hero-copy .lead { font-size: 1rem; }
}
.nowrap { white-space: nowrap; }
.live-popup-inner { transform: translate(calc(-50% + var(--dx, 0px)), calc(-100% - 20px)); }
.live-popup-inner::after { left: calc(50% - var(--dx, 0px)); }
.live-popup.is-flip .live-popup-inner { transform: translate(calc(-50% + var(--dx, 0px)), 22px); }
@media (max-width: 380px) {
  .hero h1 { font-size: 1.8rem; }
}
.footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
/* El popup queda por debajo del panel y de las alertas de SofIA */
.live-popup { z-index: 1; }

/* Logo del header más grande (ícono en SVG, nítido en cualquier tamaño) */
.brand { gap: 12px; }
.brand-icon { width: 52px; height: 52px; border-radius: 0; }
.site-header .brand-text { font-size: 1.5rem; }
@media (max-width: 768px) {
  .brand-icon { width: 46px; height: 46px; }
  .site-header .brand-text { font-size: 1.3rem; }
}

/* Segunda línea del título en blanco */
.grad-live { background: none; color: #fff; -webkit-text-fill-color: #fff; }
