/* ==========================================================================
   Involution — Landing
   Tokens de diseño + componentes. Sustituye a los estilos inline previos.
   ========================================================================== */

:root {
  /* Tipografía */
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', monospace;

  /* Colores de texto */
  --ink: #0a0a0a;
  --ink-soft: #333333;
  --body: #525252;
  --muted: #666666;
  --muted-2: #737373;
  --faint: #9a9a9a;

  /* Superficies y líneas */
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --line: #ededed;
  --line-2: #e5e5e5;
  --line-3: #f0f0f0;

  /* Oscuros */
  --dark: #0a0a0a;
  --darker: #070707;
  --footer-bg: #050505;

  /* Marca / acentos */
  --accent: #0a0a0a;
  --brand: #3155ff; /* Involution Blue (sistema Despliegue) */
  --brand-on-dark: #7590ff; /* Sobre negro el azul puro se queda en 3.6:1; este llega a 6.8:1 */
  /* Acento efectivo. Los contenedores oscuros lo reasignan más abajo, de modo
     que cada componente lo consume sin saber sobre qué fondo se dibuja. */
  --brand-ui: var(--brand);
  --red: #dc2626;
  --green: #10b981; /* Estado "en marcha". Es el emerald con el que el auditor da conforme en los vídeos */
  --wa: #25d366; /* Color propio de WhatsApp, ajeno a la marca */
  --wa-ink: #06341c;

  /* Layout */
  --maxw: 1180px;
  --section-pad-v: 96px;
  --radius: 14px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Superficies oscuras: el azul de marca pierde legibilidad sobre negro, así que
   aquí el acento pasa al tinte claro. */
.hero,
.panel,
.section--dark,
.card-dark,
.cta-box,
.mesh-demo,
.footer {
  --brand-ui: var(--brand-on-dark);
}

/* ------- Base ------- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.011em;
}
::selection {
  background: var(--ink);
  color: #fff;
}
img,
svg,
video {
  display: block;
}
a {
  color: inherit;
}

/* Sprite SVG oculto (definiciones de iconos) */
.svg-sprite {
  position: absolute;
}

/* Texto solo para lectores de pantalla */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Foco visible y accesible en todos los elementos interactivos */
:focus-visible {
  outline: 2px solid var(--brand-ui);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------- Animaciones ------- */
@keyframes revUp {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}
/* Halo del botón flotante de WhatsApp: sigue al verde del propio botón. */
@keyframes glowRing {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
}

.reveal {
  animation: revUp 0.7s ease both;
}
.reveal-sm {
  animation: revUp 0.6s ease both;
}
.reveal-lg {
  animation: revUp 0.8s ease both;
}
/* Animaciones ligadas al scroll (progressive enhancement) */
.on-scroll {
  animation: revUp 0.7s ease both;
  animation-timeline: view();
  animation-range: entry 0% cover 22%;
}
.on-scroll-sm {
  animation: revUp 0.6s ease both;
  animation-timeline: view();
  animation-range: entry 0% cover 18%;
}
.on-scroll-c {
  animation: revUp 0.7s ease both;
  animation-timeline: view();
  animation-range: entry 0% cover 25%;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ------- Layout helpers ------- */
.page {
  min-height: 100vh;
  overflow-x: hidden;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
}
.wrap-1080 {
  max-width: 1080px;
  margin: 0 auto;
}
.wrap-1040 {
  max-width: 1040px;
  margin: 0 auto;
}
.wrap-800 {
  max-width: 800px;
  margin: 0 auto;
}

.section {
  padding: var(--section-pad-v) 32px;
  border-top: 1px solid var(--line-3);
}
.section--soft {
  background: var(--bg-soft);
}
.section--dark {
  background: var(--dark);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.eyebrow--brand {
  color: var(--brand-ui);
}
.eyebrow--upper {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-head {
  margin-bottom: 56px;
}
.section-head--wide {
  max-width: 680px;
}
.section-head--md {
  max-width: 620px;
}
.section-head--center {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.h2 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 16px;
}
.h2-sm {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
}
.h2--flush {
  margin: 0;
}
.lead {
  font-size: 17px;
  color: var(--body);
  line-height: 1.55;
  margin: 0;
  font-weight: 430;
}
.lead--dark {
  color: #a3a3a3;
}

/* ------- Botones ------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 10px;
  transition:
    transform 0.15s,
    filter 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.btn-primary {
  background: #ffffff;
  color: #09090b;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.14);
}
.btn-primary:hover {
  background: #f4f4f5;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.22);
}
.btn-nav {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
  color: #09090b;
  background: #ffffff;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition:
    background 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}
.btn-nav:hover {
  background: #f4f4f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.btn-wa {
  background: var(--wa);
  color: var(--wa-ink);
}
.btn-wa:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.btn-outline {
  background: transparent;
  border: 1px solid #383838;
  color: #fff;
  font-weight: 500;
}
.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}
.btn-white {
  background: #fff;
  color: #09090b;
  font-size: 15.5px;
  padding: 15px 34px;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.ico {
  flex-shrink: 0;
}

/* ------- Nav ------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav__brand {
  display: flex;
  align-items: center;
}
/* 44px, no 52: el wordmark Despliegue va en Geist Bold y a igual altura pesa
   más que el logotipo anterior. Así el ancho y la mancha se mantienen. */
.nav__logo {
  height: 44px;
  width: auto;
}
.nav__logo-experiment {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav__logo-experiment-mark {
  width: 32px;
  height: 32px;
}
.nav__logo-experiment span {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.055em;
}
.logo-experiment-return {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 100;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 5, 5, 0.82);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.logo-experiment-return:hover {
  background: #3155ff;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav__link {
  font-size: 14px;
  color: var(--body);
  text-decoration: none;
  font-weight: 450;
  transition: color 0.15s;
}
.nav__link:hover {
  color: var(--ink);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav__tel {
  font-size: 14px;
  color: var(--body);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.nav__tel:hover {
  color: var(--ink);
}
.nav__wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--wa-ink);
  background: var(--wa);
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition:
    transform 0.15s,
    filter 0.15s;
}
.nav__wa:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

/* ------- Hero ------- */
.hero {
  position: relative;
  padding: 104px 32px 96px;
  background: var(--darker);
  color: #fff;
}
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.hero__glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07), transparent 62%);
  transform: translate(20%, -20%);
  transition: transform 0.35s cubic-bezier(0.2, 0.6, 0.2, 1);
  will-change: transform;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(7, 7, 7, 0.96) 0%,
    rgba(7, 7, 7, 0.8) 28%,
    rgba(7, 7, 7, 0.32) 55%,
    rgba(7, 7, 7, 0.08) 100%
  );
}
.hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--darker));
}
.hero__inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 52px;
}
/* Sin esto, el mínimo automático de un elemento de grid es su min-content y
   la columna no puede encogerse por debajo del contenido más ancho. */
.hero__grid > * {
  min-width: 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 16px 6px 12px;
  border: 1px solid rgba(77, 107, 255, 0.35);
  border-radius: 999px;
  background: rgba(77, 107, 255, 0.06);
  font-size: 13px;
  color: var(--brand-ui);
  font-weight: 500;
  margin-bottom: 26px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 16px rgba(77, 107, 255, 0.12);
}
.hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-ui);
  box-shadow: 0 0 10px var(--brand-ui);
  animation: pulse 1.6s ease infinite;
}
.hero__badge-txt {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.hero__title {
  font-size: 54px;
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  color: #fff;
}
.hero__lead {
  font-size: 18.5px;
  line-height: 1.55;
  color: #a8a8a8;
  max-width: 480px;
  margin: 0 0 32px;
  font-weight: 430;
}
.hero__cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hero__micro {
  font-size: 13px;
  color: var(--faint);
  margin: 0 0 36px;
}
.hero__micro a {
  color: #a8a8a8;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  border-top: 1px solid #383838;
  padding-top: 24px;
}
.stat__v {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}
.stat__k {
  font-size: 13px;
  color: var(--faint);
  margin-top: 3px;
}

/* Panel demo (hero derecha) */
.panel {
  margin: 0;
  border: 1px solid #1f1f1f;
  border-radius: var(--radius-lg);
  background: var(--dark);
  overflow: hidden;
  box-shadow: 0 34px 70px -34px rgba(10, 10, 10, 0.55);
}
.panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid #1a1a1a;
}
.dots {
  display: flex;
  gap: 6px;
}
.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2a2a2a;
}
.panel__title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: #6b6b6b;
}
.panel__live {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
}
.panel__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.8s ease infinite;
}
.panel__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #08080a;
}

/* ------- Infra provider ------- */
.infra {
  padding: 34px 32px 60px;
}
.infra__row {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.infra__label {
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0.02em;
}
.infra__chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px 8px 13px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04);
}
.infra__chip span {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

/* ------- Problema / respuesta ------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.card-dark {
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card-dark__lead {
  font-size: 19px;
  line-height: 1.5;
  margin: 0 0 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: #d4d4d4;
  line-height: 1.5;
}
.check__mark {
  color: var(--brand-ui);
  flex-shrink: 0;
}
.p-body {
  font-size: 17px;
  color: var(--body);
  line-height: 1.6;
  margin: 0;
}

/* ------- Nuestro por qué ------- */
.why {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  background: #fff;
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.why__glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(49, 85, 255, 0.06), transparent 70%);
  pointer-events: none;
}
.why__title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 24px;
  color: var(--ink);
}
.why__p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 20px;
  font-weight: 430;
}
.why__p:last-of-type {
  margin-bottom: 24px;
}
.why__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line-3);
  padding-top: 20px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted-2);
}
.why__foot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-ui);
}

/* ------- Gráfico de escalado (dentro de "Nuestro porqué") -------
   Forma de énfasis: una sola tinta de marca para la serie protagonista y gris de
   deénfasis para la de contexto. El gris queda por debajo del suelo de croma a
   propósito: no es un color categórico, es el fondo contra el que se lee el azul.
   Separación ΔE 22,8 bajo protanopia sobre blanco, y ambas series van rotuladas
   en el extremo, así que la identidad nunca depende solo del color. */
.scale {
  margin: 8px 0 28px;
  padding-top: 32px;
  border-top: 1px solid var(--line-3);
}
.scale__head {
  margin-bottom: 22px;
}
.scale__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--ink);
}
.scale__head {
  margin-bottom: 22px;
}
.scale__title {
  margin-bottom: 0;
}
.scale__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-bottom: 12px;
}

.scale__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.scale__key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
}
.scale__key-line {
  width: 18px;
  height: 2px;
  border-radius: 1px;
}
.scale__key-line--human {
  background: var(--muted-2);
}
.scale__key-line--mesh {
  background: var(--brand-ui);
}

/* El SVG estira al ancho del contenedor y, con relación 2:1, se come demasiado
   alto. El tope va a todo el bloque, no solo al gráfico, para que la leyenda y
   los pies no queden flotando sobre el vacío que deja el trazado. El filete
   superior de .scale se queda a ancho completo, haciendo de separador. */
.scale__head,
.scale__bar,
.scale__plot,
.scale__readout,
.scale__insight,
.scale__note {
  max-width: 100%;
}
.scale__plot {
  position: relative;
  touch-action: pan-y; /* el arrastre vertical sigue haciendo scroll */
}
.scale__svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--sans);
  font-size: 13px; /* única palanca de tamaño: el resto del texto va en em */
  overflow: visible;
}
.scale__plot:focus-visible {
  outline: 2px solid var(--brand-ui);
  outline-offset: 6px;
  border-radius: 8px;
}

.scale__grid {
  stroke: var(--line-3);
  stroke-width: 1;
}
.scale__axis {
  stroke: var(--line-2);
  stroke-width: 1;
}
.scale__tick text {
  font-size: 0.92em;
  fill: var(--faint);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.scale__axis-name {
  font-size: 0.92em;
  fill: var(--faint);
  font-family: var(--mono);
}

.scale__line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scale__line--human {
  stroke: var(--muted-2);
}
.scale__line--mesh {
  stroke: var(--brand-ui);
}

/* Anillo de 2px en el color de la superficie para que los puntos se lean
   allí donde la línea de la red se solapa con el eje. */
.scale__end,
.scale__dot {
  stroke: #fff;
  stroke-width: 2;
}
.scale__end--human,
.scale__dot--human {
  fill: var(--muted-2);
}
.scale__end--mesh,
.scale__dot--mesh {
  fill: var(--brand-ui);
}
/* El crosshair es una ayuda de lectura, no rejilla: tiene que verse. */
.scale__hair {
  stroke: var(--faint);
  stroke-width: 1;
}
/* El atributo hidden no aplica display:none dentro de un SVG: hay que decirlo. */
.scale__svg [hidden] {
  display: none;
}

.scale__endlabel text {
  fill: var(--muted-2);
  font-size: 0.95em;
}
.scale__endvalue {
  fill: var(--ink);
  font-size: 1.08em;
  font-weight: 600;
}
.scale__endvalue--mesh {
  fill: var(--ink);
}

/* El trazado entra dibujándose. El estado por defecto es el final, de modo que
   con "prefers-reduced-motion" (que anula toda animación) el gráfico se ve
   completo en lugar de vacío. */
.scale__line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.scale__end {
  opacity: 1;
}
.scale.is-drawing .scale__line {
  animation: scale-draw 1.5s cubic-bezier(0.33, 0.9, 0.3, 1) both;
}
.scale.is-drawing .scale__end {
  animation: scale-pop 0.4s ease-out 1.2s both;
}
@keyframes scale-draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes scale-pop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Lectura al pasar el puntero: el valor manda, la serie acompaña. */
.scale__tip {
  position: absolute;
  top: 0;
  z-index: 2;
  pointer-events: none;
  min-width: 168px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.18);
  transform: translateX(-50%);
}
.scale__tip-x {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  margin-bottom: 6px;
}
.scale__tip-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.scale__tip-row b {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.scale__tip-key {
  width: 12px;
  height: 2px;
  border-radius: 1px;
  flex: none;
  transform: translateY(-3px);
}
.scale__tip-key--human {
  background: var(--muted-2);
}
.scale__tip-key--mesh {
  background: var(--brand-ui);
}

/* Sustituye a las etiquetas del extremo cuando el SVG se queda sin sitio. */
.scale__readout {
  display: none;
  margin: 18px 0 0;
}
.scale__readout-list {
  margin: 0;
}
.scale__readout-list div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line-3);
}
.scale__readout dt {
  font-size: 14px;
  color: var(--muted);
}
.scale__readout dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.scale__readout-foot {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.scale__insight {
  margin: 22px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.scale__insight strong {
  color: var(--ink);
  font-weight: 600;
}
.scale__note {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--faint);
}

@media (max-width: 720px) {
  .scale__svg {
    font-size: 21px; /* el viewBox se encoge: el texto sube para no quedar diminuto */
  }
  /* Se van las etiquetas del extremo, que no caben; el punto final se queda,
     porque sin él la curva parece cortada por el borde. */
  .scale__endlabel,
  .scale__tick--dense,
  .scale__axis-name {
    display: none;
  }
  .scale__readout {
    display: block;
  }
  .scale__title {
    font-size: 20px;
  }
}

/* ------- Red multiagente ------- */
.mesh__dots {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 105% 95% at 50% 45%, #000 55%, transparent 92%);
  mask-image: radial-gradient(ellipse 105% 95% at 50% 45%, #000 55%, transparent 92%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
/* Dos capas: la rejilla que deriva y un "pulso" azul que la recorre como si
   fuese tráfico entre agentes. Solo se animan transform/opacity (compositor). */
.mesh__dots::before,
.mesh__dots::after {
  content: '';
  position: absolute;
  inset: -60px;
  background-size: 24px 24px;
  will-change: transform;
}
.mesh__dots::before {
  opacity: 0.6;
  background-image: radial-gradient(#3a3a3a 1px, transparent 1px);
  animation: meshDrift 60s linear infinite;
}
.mesh__dots::after {
  opacity: 0.75;
  background-image: radial-gradient(var(--brand-ui) 1.4px, transparent 1.4px);
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 50% 45%, #000 20%, transparent 85%);
  mask-image: radial-gradient(ellipse 75% 80% at 50% 45%, #000 20%, transparent 85%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: meshSignal 18s ease-in-out infinite;
}
/* El desplazamiento es múltiplo de background-size (24px) para que el bucle
   sea invisible. */
@keyframes meshDrift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-48px, -48px, 0);
  }
}
@keyframes meshSignal {
  0%,
  100% {
    transform: translate3d(-9%, 5%, 0);
    opacity: 0.45;
  }
  50% {
    transform: translate3d(10%, -6%, 0);
    opacity: 1;
  }
}
.mesh__inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
}
.mesh-demo {
  margin: 0;
  border: 1px solid #27272a;
  border-radius: var(--radius-lg);
  background: #09090b;
  overflow: hidden;
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.8);
}
.mesh-demo__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid #18181b;
  background: #121215;
}
.mesh-demo__bar-l {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dot--sm {
  width: 10px;
  height: 10px;
}
.mesh-demo__title {
  font-family: var(--mono);
  font-size: 12px;
  color: #71717a;
}
.mesh-demo__live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--green);
  font-family: var(--mono);
}
.mesh-demo__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  animation: pulse 1.6s ease infinite;
}
.mesh-demo__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #08080a;
}
/* El pie dice qué se está viendo. Va dentro del marco, separado por el mismo
   filete que la barra superior, para que se lea como parte del demo y no como
   texto suelto de la sección. */
.mesh-demo__caption {
  padding: 16px 20px;
  border-top: 1px solid #18181b;
  background: #121215;
  font-size: 14.5px;
  line-height: 1.6;
  color: #a1a1aa;
}
.mesh-demo__caption strong {
  color: #fafafa;
  font-weight: 600;
}
@media (max-width: 720px) {
  .mesh-demo__caption {
    font-size: 13.5px;
    padding: 14px 16px;
  }
}

/* ------- Casos de uso ------- */
.casos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.caso {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.caso:hover {
  border-color: #d4d4d4;
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.08);
}
.caso__title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.caso__block-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.caso__block-label--prob {
  color: var(--red);
}
.caso__block-label--sol {
  color: var(--brand-ui);
}
.caso__block-label--kpi {
  color: var(--muted-2);
}
.caso__p {
  font-size: 14.5px;
  color: var(--body);
  line-height: 1.6;
  margin: 0;
}
.caso__kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  border-top: 1px solid var(--line-3);
  padding-top: 18px;
  margin-top: auto;
}
.kpi__v {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.kpi__v--brand {
  color: var(--brand-ui);
}
.kpi__d {
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.5;
  margin-top: 4px;
}
.cta-inline {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14.5px;
  color: var(--body);
}
.cta-inline a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Chip mono reutilizable (casos + escalera) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  background: var(--bg-soft);
}
.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-ui);
}

/* ------- Qué automatizamos ------- */
/* Los chips van en lista porque son un inventario, no decoración. El centrado
   con align-self:center anula el flex-start que .chip trae de las tarjetas. */
.procesos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.procesos .chip {
  align-self: center;
  font-size: 13px;
  padding: 8px 16px;
  background: var(--bg);
}
.procesos__foot {
  margin: 28px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

/* ------- Cómo trabajamos (steps) ------- */
.grid-lines {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.steps-grid {
  grid-template-columns: repeat(4, 1fr);
}
.step {
  background: #fff;
  padding: 30px 24px;
  transition: background 0.2s;
}
.step:hover {
  background: var(--bg-soft);
}
.badge-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--line-2);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step .badge-num {
  margin-bottom: 22px;
}
.step__title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 9px;
  letter-spacing: -0.01em;
}
.step__desc {
  font-size: 14px;
  color: var(--muted-2);
  line-height: 1.55;
  margin: 0;
}

/* ------- Capacidades ------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.feature:hover {
  border-color: #d4d4d4;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.06);
}
.feature__tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 16px;
}
.feature__title {
  font-size: 16.5px;
  font-weight: 600;
  margin: 0 0 9px;
  letter-spacing: -0.01em;
}
.feature__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ------- Escalera de oferta ------- */
.ladder {
  display: flex;
  flex-direction: column;
}
.ladder-row {
  display: grid;
  grid-template-columns: 34px 240px 1fr;
  align-items: center;
  gap: 28px;
  background: #fff;
  padding: 26px 28px;
  transition: background 0.2s;
}
.ladder-row:hover {
  background: var(--bg-soft);
}
.ladder-row .badge-num {
  flex-shrink: 0;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}
/* El peldaño sobre el que está el cursor se marca en azul. */
.ladder-row:hover .badge-num {
  background: var(--brand-ui);
  border-color: var(--brand-ui);
  color: #fff;
}
.ladder__mid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.ladder__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.ladder__desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ------- FAQ ------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s;
}
.faq:hover {
  border-color: var(--ink);
}
.faq__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  user-select: none;
}
.faq__summary::-webkit-details-marker,
.faq__summary::marker {
  display: none;
  content: '';
}
.faq__icon {
  font-family: var(--mono);
  font-size: 20px;
  color: var(--muted-2);
  margin-left: 16px;
  flex-shrink: 0;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
  display: inline-block;
}
.faq[open] .faq__icon {
  transform: rotate(45deg);
  color: var(--ink);
}
.faq__body {
  padding: 0 24px 22px;
  font-size: 14.5px;
  color: var(--body);
  line-height: 1.65;
  border-top: 1px solid #f5f5f5;
  margin-top: 2px;
  padding-top: 16px;
}

/* ------- CTA final ------- */
.cta-box {
  background: #0c0c0e;
  color: #fff;
  border: 1px solid #27272a;
  border-radius: var(--radius-xl);
  padding: 80px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.cta-box__dots {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: radial-gradient(#3f3f46 1px, transparent 1px);
  background-size: 20px 20px;
}
.cta-box__inner {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
.cta-box__eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: #a1a1aa;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.cta-box__title {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 18px;
  color: #fff;
}
.cta-box__lead {
  font-size: 17.5px;
  color: #a1a1aa;
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.55;
  font-weight: 430;
}
.cta-box__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.cta-box .btn-wa {
  font-size: 15.5px;
  padding: 15px 34px;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35);
}
.cta-box__foot {
  font-size: 14.5px;
  color: #a1a1aa;
  margin: 0;
}
.cta-box__foot a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.cta-box__foot a.u {
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cta-box__foot a.cta-wa-link {
  color: #a1a1aa;
  font-weight: 450;
  transition: color 0.15s;
}
.cta-box__foot a.cta-wa-link:hover {
  color: #25d366;
}
.arrow {
  font-family: var(--mono);
}

/* ------- Footer ------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 64px 32px 40px;
  background: var(--footer-bg);
  color: #8a8a8a;
}
.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: 1.8fr repeat(2, 1fr);
  gap: 48px;
}
.footer__logo {
  height: 38px;
  width: auto;
  margin-bottom: 16px;
}
.footer__about {
  font-size: 14px;
  color: #6b6b6b;
  max-width: 320px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.footer__meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #6b6b6b;
}
.footer__meta .mono {
  font-family: var(--mono);
}
.footer-col__title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col__links a {
  font-size: 13.5px;
  color: #6b6b6b;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col__links a:hover {
  color: #fff;
}
.footer__bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  border-top: 1px solid #171717;
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__copy {
  font-size: 13px;
  color: #6b6b6b;
}
.footer__mail {
  font-family: var(--mono);
  font-size: 12px;
  color: #6b6b6b;
  text-decoration: none;
  transition: color 0.15s;
}
.footer__mail:hover {
  color: #fff;
}

/* ------- Botón flotante WhatsApp ------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  animation: glowRing 2.6s ease infinite;
  transition: transform 0.15s;
}
.wa-float:hover {
  transform: scale(1.07);
}

/* ------- Utilidad: ocultar (casos por ahora) ------- */
.is-hidden {
  display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
/* El nav se estrecha en dos pasos. Primero se aprieta la separación, y por
   debajo de 1000px los enlaces se ocultan: no caben sin partirse en dos líneas
   y solaparse con el logo y el botón. El contacto sigue disponible en el hero,
   el footer y el CTA final. */
@media (max-width: 1200px) {
  .nav__links {
    gap: 18px;
  }
  .nav__link {
    font-size: 13px;
  }
}

@media (max-width: 999px) {
  .nav__links {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 0 16px;
  }
  /* Logo + "Llámanos" + botón de WhatsApp no caben a la vez: el teléfono
     sigue accesible desde el hero, el footer y el botón flotante. */
  .nav__tel {
    display: none;
  }
  .nav__logo {
    height: 40px;
  }
  .hero {
    padding-top: 32px;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero__title {
    font-size: 36px;
    line-height: 1.12;
  }
  .split,
  .steps-grid,
  .features-grid,
  .casos-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero__stats {
    gap: 20px;
  }
  /* La barra del panel no tiene ancho para las dos etiquetas: el título se
     recorta y el indicador "En vivo" se mantiene en una línea. */
  .panel__title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .panel__live {
    flex: none;
    white-space: nowrap;
  }
  .ladder-row {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 16px;
  }
  .ladder__desc {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Páginas legales (aviso legal, privacidad)
   Documentos de lectura larga: columna estrecha, jerarquía plana y ningún
   adorno. Reutilizan los tokens de la landing para que no parezcan otra web.
   ========================================================================== */
.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
}
.legal-nav__logo {
  height: 34px;
  width: auto;
}
.legal-nav__back {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.legal-nav__back:hover {
  color: var(--ink);
}

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}
.legal__title {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--ink);
}
.legal__updated {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  margin: 0 0 8px;
}
.legal h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 48px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.legal h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--ink);
}
.legal p,
.legal li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
}
.legal p {
  margin: 0 0 16px;
}
.legal ul {
  margin: 0 0 16px;
  padding-left: 22px;
}
.legal li {
  margin-bottom: 9px;
}
.legal a {
  color: var(--brand-ui);
}
.legal strong {
  color: var(--ink-soft);
  font-weight: 600;
}
/* Ficha de datos identificativos: es el contenido que exige la LSSI, así que
   se lee como ficha y no como párrafo. */
.legal__data {
  margin: 0 0 16px;
  padding: 22px 24px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.legal__data div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 7px 0;
}
.legal__data div + div {
  border-top: 1px solid var(--line);
}
.legal__data dt {
  flex: none;
  min-width: 150px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 2px;
}
.legal__data dd {
  margin: 0;
  font-size: 15.5px;
  color: var(--ink);
}
/* Marcador de dato pendiente. Chirría a propósito: tiene que ser imposible
   publicar la página sin verlo. */
.legal__todo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--red);
  padding: 2px 8px;
  border-radius: 5px;
}

@media (max-width: 768px) {
  .legal-nav {
    padding: 0 16px;
    height: 64px;
  }
  .legal {
    padding: 48px 20px 72px;
  }
  .legal__title {
    font-size: 31px;
  }
  .legal__data {
    padding: 18px 18px;
  }
  .legal__data dt {
    min-width: 0;
    width: 100%;
  }
}

/* Pie reducido para las páginas legales: sin rejilla superior, el filete de
   .footer__bottom sobraría al ser el único bloque. */
.footer--legal {
  padding: 32px;
}
.footer--legal .footer__bottom {
  border-top: 0;
  padding-top: 0;
}
.footer--legal a {
  color: #8a8a8a;
  text-decoration: none;
  font-size: 13px;
}
.footer--legal a:hover {
  color: #fff;
}

/* Enlaces legales del pie de la landing. */
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer__legal a {
  font-size: 13px;
  color: #6b6b6b;
  text-decoration: none;
}
.footer__legal a:hover {
  color: #fff;
}
