/* ============================================================
   POSENT — Sistema de diseño
   Paleta tomada del logo: índigo profundo a magenta.
   Portadas oscuras con luz, acentos en degradado y movimiento
   al entrar en pantalla.
   ============================================================ */

/* --- Tokens --- */
:root {
  /* Marca */
  --brand-1: #4f46e5;
  --brand-2: #a21caf;
  --brand-3: #ec2a8f;
  --grad: linear-gradient(115deg, var(--brand-1) 0%, var(--brand-2) 52%, var(--brand-3) 100%);
  --grad-soft: linear-gradient(115deg, rgba(79, 70, 229, 0.12), rgba(236, 42, 143, 0.12));

  /* Tinta */
  --ink: #0d1226;
  --ink-2: #4b5468;
  --ink-3: #7b849a;

  /* Superficies */
  --bg: #ffffff;
  --bg-sunken: #f7f7fb;
  --night: #0a0d1f;
  --night-2: #12173a;

  /* Líneas */
  --line: #e6e7f0;
  --line-soft: #f0f1f7;

  /* Semánticos de módulo */
  --green: #047857;
  --green-tint: #ecfdf5;
  --amber: #b45309;
  --amber-tint: #fffbeb;

  /* Medidas */
  --container: 1140px;
  --gutter: clamp(1.25rem, 5vw, 2rem);
  --section-y: clamp(4rem, 8vw, 6.5rem);
  --radius: 12px;
  --radius-lg: 18px;
  --nav-h: 76px;

  --glow: 0 18px 40px -16px rgba(79, 70, 229, 0.5);
  --glow-pink: 0 18px 44px -16px rgba(236, 42, 143, 0.45);
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

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

section[id] {
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}

/* --- Tipografía --- */
h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.3rem + 3.8vw, 3.75rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.625rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

strong {
  color: inherit;
  font-weight: 650;
}

/* Texto con el degradado de la marca */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Utilidades --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--sunken {
  background: var(--bg-sunken);
  border-block: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.s-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.s-head--center {
  margin-inline: auto;
  text-align: center;
}

.s-head--center .eyebrow {
  justify-content: center;
}

.s-head .eyebrow {
  margin-bottom: 1rem;
}

.s-head p {
  margin-top: 1rem;
  max-width: 42rem;
}

.s-head--center p {
  margin-inline: auto;
}

/* --- Entrada en pantalla ---
   El estado oculto vive bajo .js-reveal, clase que añade el propio script.
   Si el JS no carga o falla antes de esa línea, no se oculta nada: el
   contenido se ve siempre, sólo se pierde la animación. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0ms);
}

.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* --- Botones --- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding-inline: 1.5rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn--primary {
  background: var(--grad);
  background-size: 160% 100%;
  color: #fff;
  box-shadow: var(--glow);
}

.btn--primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 22px 46px -14px rgba(236, 42, 143, 0.55);
}

.btn--ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--brand-1);
  color: var(--brand-1);
  transform: translateY(-2px);
}

.btn--on-dark {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn--on-dark:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.btn--block {
  width: 100%;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--brand-1);
  font-size: 0.9375rem;
  font-weight: 650;
}

.arrow-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.arrow-link:hover svg {
  transform: translateX(4px);
}

/* --- Barra de contacto --- */
.topbar {
  position: relative;
  background: black;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8125rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 40px;
}

.topbar-contact {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.16s ease;
}

.topbar a:hover {
  color: #fff;
}

.topbar svg {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.topbar-promo {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-promo strong {
  color: #fff;
  font-weight: 700;
}

/* --- Navegación --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.nav.is-stuck {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 24px -14px rgba(13, 18, 38, 0.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--nav-h);
}

/* La marca: el símbolo recortado del logo + el nombre en degradado */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-mark {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  overflow: hidden;
}

.brand-mark img {
  position: absolute;
  width: 97px;
  height: 97px;
  max-width: none;
  left: -28px;
  top: -9px;
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark img {
  transform: scale(1.08);
}

.brand-name {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.3125rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  position: relative;
  padding: 0.5rem 0.75rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 550;
  transition: color 0.16s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a[aria-current='page']::after {
  transform: scaleX(1);
}

.nav-links a[aria-current='page'] {
  color: var(--ink);
  font-weight: 650;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-cta .btn {
  height: 42px;
  padding-inline: 1.1rem;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
}

/* --- Portada oscura --- */
.hero {
  position: relative;
  isolation: isolate;
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background: var(--night);
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
  overflow: hidden;
}

/* Luz de fondo */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -10% auto;
  height: 120%;
  z-index: -2;
  background:
    radial-gradient(42rem 26rem at 50% 0%, rgba(79, 70, 229, 0.55), transparent 62%),
    radial-gradient(34rem 22rem at 78% 18%, rgba(236, 42, 143, 0.38), transparent 62%),
    radial-gradient(30rem 20rem at 18% 26%, rgba(162, 28, 175, 0.32), transparent 62%);
  animation: heroGlow 14s ease-in-out infinite alternate;
}

/* Retícula tenue */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(60% 55% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(60% 55% at 50% 40%, #000 30%, transparent 100%);
  animation: gridPan 18s linear infinite;
}

@keyframes gridPan {
  to {
    background-position: 56px 56px, 56px 56px;
  }
}

@keyframes heroGlow {
  from {
    transform: translate3d(-2%, 0, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 2%, 0) scale(1.08);
  }
}

.hero h1 {
  max-width: 19ch;
  margin-inline: auto;
  color: #fff;
}

.hero .lead {
  max-width: 42rem;
  margin: 1.25rem auto 0;
  color: rgba(255, 255, 255, 0.72);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.9rem 0.35rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.8125rem;
  font-weight: 550;
  backdrop-filter: blur(6px);
}

.hero-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  animation: pulseGreen 2.4s ease-out infinite;
}

@keyframes pulseGreen {
  70% {
    box-shadow: 0 0 0 9px rgba(74, 222, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(236, 42, 143, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(236, 42, 143, 0);
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  margin-top: 1.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-meta svg {
  width: 15px;
  height: 15px;
  color: var(--brand-3);
}

/* En móvil todo va apilado y centrado (sin cambios). En pantallas grandes
   se reparte en dos columnas: el texto a la izquierda y el asistente a la
   derecha (ver la media query min-width más abajo). */
.hero-copy {
  min-width: 0;
}

/* Portada compacta, para las páginas interiores */
.hero--compact {
  padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.hero--compact h1 {
  max-width: 22ch;
}

/* --- Efectos de la portada --- */
/* Manchas de luz que flotan, cada una a su ritmo */
.hero-fx {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.hero-fx i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

.hero-fx i:nth-child(1) {
  top: -14%;
  left: 8%;
  width: 34rem;
  height: 28rem;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.85), transparent 68%);
  animation: drift1 11s ease-in-out infinite alternate;
}

.hero-fx i:nth-child(2) {
  top: -8%;
  right: 4%;
  width: 30rem;
  height: 26rem;
  background: radial-gradient(circle, rgba(236, 42, 143, 0.7), transparent 68%);
  animation: drift2 13s ease-in-out infinite alternate;
}

.hero-fx i:nth-child(3) {
  bottom: -20%;
  left: 38%;
  width: 28rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(162, 28, 175, 0.6), transparent 68%);
  animation: drift3 15s ease-in-out infinite alternate;
}

@keyframes drift1 {
  to {
    transform: translate3d(26%, 16%, 0) scale(1.35);
  }
}

@keyframes drift2 {
  to {
    transform: translate3d(-28%, 20%, 0) scale(1.4);
  }
}

@keyframes drift3 {
  to {
    transform: translate3d(22%, -24%, 0) scale(1.3);
  }
}

/* Puntos de luz que suben */
.hero-fx b {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
  opacity: 0;
  animation: rise-up var(--t, 12s) linear var(--d, 0s) infinite;
}

@keyframes rise-up {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  12% {
    opacity: 0.85;
  }
  85% {
    opacity: 0.45;
  }
  100% {
    transform: translateY(calc(var(--rise, 720px) * -1)) translateX(var(--drift, 20px));
    opacity: 0;
  }
}

/* Palabra que cambia dentro del titular */
.rotator {
  /* En su propia línea y con altura reservada para 2 líneas: aunque la
     frase que rota ocupe 1 o 2 líneas, el titular no cambia de alto y nada
     de lo de abajo (lead, botones) da el salto feo al cambiar de palabra. */
  display: block;
  min-height: 2.3em; /* ~2 líneas con line-height 1.14 */
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Corto a propósito: mientras dura el fundido el titular se queda a medias */
  transition: opacity 0.19s ease, transform 0.19s ease;
}

.rotator.is-out {
  opacity: 0;
  transform: translateY(0.3em);
}

/* --- Escenario de la portada: el tablero y, encima, el asistente --- */
.hero-stage {
  position: relative;
  max-width: 540px;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
}

/* Halo detrás del asistente, para que despegue del fondo oscuro */
.hero-stage::before {
  content: '';
  position: absolute;
  inset: -12% -14%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(162, 28, 175, 0.55), transparent 72%);
  filter: blur(32px);
}

.hero-chat {
  position: relative;
  width: 100%;
  border-radius: 16px;
  /* Mismo fondo del asistente real: blanco arriba, lavanda muy claro abajo */
  background: linear-gradient(183deg, #fff 60%, rgb(234, 237, 248) 90%);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 34px 80px -24px rgba(5, 8, 25, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: chatIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

@keyframes chatIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

/* Header como el del asistente real: fondo transparente (deja ver el
   degradado del panel), título oscuro y una línea divisoria abajo. */
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: transparent;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.chat-logo {
  width: 28px;
  height: 28px;
  flex: none;
}

.chat-head strong {
  font-size: 0.9375rem;
  font-weight: 550;
  color: var(--ink);
}

.chat-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--ink-3);
}

.chat-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  animation: pulse 2s ease-out infinite;
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem;
  min-height: 200px;
}

.msg {
  max-width: 88%;
  padding: 0.65rem 0.85rem;
  border-radius: 13px;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: msgIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* Burbuja del usuario: lavanda muy claro con texto oscuro, como el real. */
.msg--user {
  align-self: flex-end;
  border-radius: 12px;
  background: rgb(234, 237, 248);
  color: #2d2b2b;
  font-weight: 500;
}

/* Respuesta del asistente: sin globo (fondo transparente, sin borde),
   igual que en POSENT: el texto va suelto sobre el panel. */
.msg--bot {
  align-self: flex-start;
  max-width: 92%;
  padding: 0.35rem 0.1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.msg--file {
  max-width: 100%;
}

.msg--bot strong {
  color: var(--brand-1);
  font-weight: 700;
}

.msg-sub {
  margin-top: 0.3rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

/* Archivo que entrega el asistente dentro de la respuesta */
.file-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  animation: chipPop 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes chipPop {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.97);
  }
}

.file-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  /* El verde de las hojas de cálculo: se reconoce al instante */
  background: #107c41;
  color: #fff;
}

.file-ico svg {
  width: 18px;
  height: 18px;
}

.file-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.file-meta strong {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta small {
  color: var(--ink-3);
  font-size: 0.75rem;
}

.file-dl {
  display: grid;
  place-items: center;
  flex: none;
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--grad-soft);
  color: var(--brand-1);
}

.file-dl svg {
  width: 15px;
  height: 15px;
}

/* Indicador de "pensando": el mismo del asistente real de POSENT —
   un loader de dos puntos orbitando (gris + morado) y, al lado, la frase
   del ESTADO (entendiendo / consultando / generando), con el color normal
   del texto del chat (no morado). */
.thinking {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.15rem 0;
}

.chat-loader {
  --size: 0.32px;
  flex: none;
  box-sizing: border-box;
  position: relative;
  width: calc(48 * var(--size));
  height: calc(48 * var(--size));
  animation: chatLoaderRot 1s linear infinite;
}

.chat-loader::before,
.chat-loader::after {
  content: '';
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(24 * var(--size));
  height: calc(24 * var(--size));
  border-radius: 50%;
  background: #9ca3af;
  transform: scale(0.5) translate(0, 0);
  animation: chatLoaderDot 1s infinite ease-in-out;
}

.chat-loader::before {
  background: #a78bfa;
  transform: scale(0.5) translate(calc(-48 * var(--size)), calc(-48 * var(--size)));
}

@keyframes chatLoaderRot {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes chatLoaderDot {
  50% {
    transform: scale(1) translate(-50%, -50%);
  }
}

.thinking-label {
  color: var(--ink);
  font-size: 0.875rem;
  animation: thinkFade 0.3s ease both;
}

@keyframes thinkFade {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
}

/* Zona de escribir: como en POSENT, un campo blanco con sombra suave y,
   al lado, un botón de enviar circular en el color de marca. */
.chat-input {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
}

.chat-field {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  color: var(--ink-3);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-send {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-1);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chat-send svg {
  width: 16px;
  height: 16px;
}

/* --- Clientes en marquesina --- */
.clients {
  padding-block: clamp(2.25rem, 4vw, 3.25rem);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.clients-title {
  margin-bottom: 1.75rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.marquee {
  display: flex;
  width: 100%;
  overflow: hidden;
  /* Los extremos se desvanecen, para que no aparezcan de golpe */
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee-track {
  display: flex;
  flex: none;
  gap: 1rem;
  padding-right: 1rem;
  animation: slide 42s linear infinite;
  will-change: transform;
}

.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}

@keyframes slide {
  to {
    transform: translateX(-100%);
  }
}

.client-chip {
  display: grid;
  place-items: center;
  flex: none;
  width: 190px;
  height: 110px;
  padding: 0.75rem 1.1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.client-chip:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: 0 18px 36px -22px rgba(79, 70, 229, 0.65);
}

.client-chip img {
  width: auto;
  height: auto;
  max-width: 100%;
  /* Límite en píxeles, no en %: contra la fila de la rejilla el porcentaje
     no resuelve y los logos cuadrados se salían de la tarjeta. */
  max-height: 78px;
  object-fit: contain;
}

/* --- Tira de valores --- */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.value {
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.value:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 20px 45px -25px rgba(79, 70, 229, 0.55);
}

.icon-box {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1.125rem;
  border-radius: 13px;
  background: var(--grad);
  color: #fff;
  box-shadow: var(--glow);
}

.icon-box svg {
  width: 22px;
  height: 22px;
}

.value h3 {
  margin-bottom: 0.5rem;
}

.value p {
  font-size: 0.9375rem;
}

/* --- Módulos (DIAN, nómina, contabilidad) --- */
.modules {
  display: flex;
  flex-direction: column;
  gap: clamp(3.5rem, 7vw, 5.5rem);
}

.module {
  --tag: var(--brand-1);
  --tag-bg: rgba(79, 70, 229, 0.1);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.module--flip {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.module--flip .module-copy {
  order: 2;
}

.module--flip .shot {
  order: 1;
}

.module--green {
  --tag: var(--green);
  --tag-bg: var(--green-tint);
}

.module--amber {
  --tag: var(--amber);
  --tag-bg: var(--amber-tint);
}

.module-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.125rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  background: var(--tag-bg);
  color: var(--tag);
  font-size: 0.8125rem;
  font-weight: 700;
}

.module-tag svg {
  width: 15px;
  height: 15px;
}

.module-copy h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
}

.module-copy > p {
  margin-top: 1rem;
}

.checks {
  margin: 1.75rem 0;
  display: grid;
  gap: 0.75rem;
}

.checks li {
  position: relative;
  padding-left: 1.85rem;
  font-size: 0.9375rem;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background-color: var(--tag-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d1226' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E");
  background-size: 0.65rem;
  background-position: center;
  background-repeat: no-repeat;
}

.module .arrow-link {
  color: var(--tag);
}

/* --- Marco de captura --- */
.shot {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 24px 50px -28px rgba(13, 18, 38, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shot:hover {
  transform: translateY(-5px);
  box-shadow: 0 34px 64px -26px rgba(79, 70, 229, 0.5);
}

.shot img {
  width: 100%;
  transition: transform 0.5s ease;
}

.shot figcaption {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.95rem;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 550;
}

.shot figcaption svg {
  width: 13px;
  height: 13px;
}

/* --- Funcionalidades --- */
.grid-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature {
  padding: clamp(1.5rem, 3vw, 1.875rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 22px 45px -26px rgba(79, 70, 229, 0.6);
}

.feature .icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.feature .icon-box svg {
  width: 20px;
  height: 20px;
}

.feature h3 {
  margin-bottom: 0.45rem;
}

.feature p {
  font-size: 0.9375rem;
}

/* --- Galería de capturas --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.gallery .shot img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top left;
}

.gallery .shot:hover img {
  transform: scale(1.05);
}

/* --- Sectores --- */
.grid-sectors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.sector {
  padding: clamp(1.5rem, 3vw, 1.875rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.sector:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 45px -26px rgba(236, 42, 143, 0.5);
}

.sector h3 {
  margin-bottom: 0.45rem;
}

.sector p {
  font-size: 0.9375rem;
}

/* --- Razones numeradas --- */
.grid-reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 2.75rem) clamp(2rem, 5vw, 3.5rem);
}

.reason {
  padding-top: 1.25rem;
  border-top: 2px solid transparent;
  border-image: var(--grad) 1;
  border-image-slice: 1;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}

.reason-num {
  display: block;
  margin-bottom: 0.5rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.375rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.reason h3 {
  margin-bottom: 0.4rem;
}

.reason p {
  font-size: 0.9375rem;
}

/* --- Testimonios --- */
.grid-quotes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.grid-quotes--three {
  grid-template-columns: repeat(3, 1fr);
}

.quote {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.quote::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.quote:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px -26px rgba(79, 70, 229, 0.5);
}

.quote:hover::before {
  opacity: 1;
}

.quote blockquote {
  flex: 1;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.quote footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.875rem;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.quote cite {
  display: block;
  color: var(--ink);
  font-style: normal;
  font-weight: 650;
}

.quote footer span {
  color: var(--ink-3);
}

/* Logo del cliente dentro de la reseña, en vez de las iniciales */
.quote-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 86px;
  height: 56px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.quote-logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 42px;
  object-fit: contain;
}

/* --- Rejilla de clientes (logo + nombre) --- */
.grid-clients {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.2vw, 1.5rem);
}

.client-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 1.875rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.client-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 22px 48px -26px rgba(79, 70, 229, 0.55);
}

.client-card-logo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 92px;
  padding: 0.5rem;
  overflow: hidden;
}

.client-card-logo img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 84px;
  object-fit: contain;
}

.client-card h3 {
  margin: 0;
  font-size: 1rem;
}

/* --- Preguntas frecuentes --- */
.faq {
  max-width: 50rem;
  margin-inline: auto;
}

.faq-item {
  margin-bottom: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[data-open='true'] {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 16px 36px -24px rgba(79, 70, 229, 0.6);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  padding: 1.125rem 1.25rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-align: left;
}

.faq-q svg {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 6px;
  background: var(--grad-soft);
  color: var(--brand-1);
  transition: transform 0.25s ease;
}

.faq-item[data-open='true'] .faq-q svg {
  transform: rotate(135deg);
}

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.faq-item[data-open='true'] .faq-a {
  grid-template-rows: 1fr;
}

.faq-a > div {
  overflow: hidden;
}

.faq-a p {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9375rem;
}

.faq-a a {
  color: var(--brand-1);
  font-weight: 550;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Planes --- */
.grid-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  align-items: start;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.plan:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px -30px rgba(79, 70, 229, 0.55);
}

/* El plan recomendado va en oscuro y un poco más alto */
.plan--featured {
  background: var(--night);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.76);
  box-shadow: 0 30px 70px -30px rgba(79, 70, 229, 0.8);
}

.plan--featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--grad);
}

.plan--featured h3,
.plan--featured .plan-price {
  color: #fff;
}

.plan-badge {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: var(--glow-pink);
}

.plan h3 {
  font-size: 1.375rem;
}

.plan-price {
  margin: 0.35rem 0 1.5rem;
  color: var(--ink);
  font-size: 0.9375rem;
}

.plan-list {
  flex: 1;
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.75rem;
  font-size: 0.9375rem;
}

.plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.plan-list svg {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 0.22em;
  color: var(--brand-1);
}

.plan--featured .plan-list svg {
  color: var(--brand-3);
}

.plan-list .is-off {
  color: var(--ink-3);
  opacity: 0.75;
}

.plan-list .is-off svg {
  color: var(--ink-3);
}

.plan--featured .plan-list .is-off {
  color: rgba(255, 255, 255, 0.45);
}

.plan--featured .plan-list .is-off svg {
  color: rgba(255, 255, 255, 0.45);
}

/* --- Formulario --- */
.form-card {
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: 0 30px 70px -40px rgba(13, 18, 38, 0.5);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.125rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}

.form-note {
  margin-top: 1rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
  text-align: center;
}

.form-ok {
  display: none;
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(4, 120, 87, 0.3);
  border-radius: 10px;
  background: var(--green-tint);
  color: var(--green);
  font-size: 0.9375rem;
  font-weight: 550;
}

.form-ok[data-show='true'] {
  display: block;
}

/* --- Cifras --- */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.stat {
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px -26px rgba(79, 70, 229, 0.5);
}

.stat .icon-box {
  margin-inline: auto;
}

.stat-num {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 0.35rem;
  font-size: 0.9375rem;
}

/* --- Comparativa --- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.cmp {
  min-width: 620px;
  font-size: 0.9375rem;
}

.cmp th,
.cmp td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

.cmp thead th {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cmp thead th:nth-child(2) {
  background: var(--grad-soft);
  color: var(--brand-1);
}

.cmp tbody td:first-child {
  color: var(--ink);
  font-weight: 550;
}

.cmp tbody td:nth-child(2) {
  background: rgba(79, 70, 229, 0.045);
}

.cmp tbody tr:last-child td {
  border-bottom: 0;
}

.cmp-yes,
.cmp-no {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.cmp-yes svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.cmp-no {
  color: var(--ink-3);
}

.cmp-no svg {
  width: 16px;
  height: 16px;
  color: var(--ink-3);
}

/* --- Cierre --- */
.closing {
  position: relative;
  isolation: isolate;
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  background: var(--night);
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  overflow: hidden;
}

.closing::before {
  content: '';
  position: absolute;
  inset: -50% -10% auto;
  height: 160%;
  z-index: -1;
  background:
    radial-gradient(34rem 20rem at 30% 10%, rgba(79, 70, 229, 0.5), transparent 62%),
    radial-gradient(30rem 18rem at 72% 40%, rgba(236, 42, 143, 0.38), transparent 62%);
}

.closing h2 {
  max-width: 22ch;
  margin-inline: auto;
  color: #fff;
}

.closing p {
  max-width: 36rem;
  margin: 1rem auto 0;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* --- Pie --- */
.footer {
  padding-block: clamp(3rem, 5vw, 4rem) 2rem;
  background: var(--night-2);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 24rem;
}

.footer h4 {
  margin-bottom: 1rem;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer li + li {
  margin-top: 0.625rem;
}

.footer-grid a {
  transition: color 0.16s ease;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.875rem;
}

/* --- WhatsApp --- */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease;
}

.wa-float::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.55);
  animation: ring 2.6s ease-out infinite;
}

@keyframes ring {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  70%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.wa-float:hover {
  transform: scale(1.08);
}

.wa-float svg {
  width: 28px;
  height: 28px;
}

/* --- Vista ampliada --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(8, 11, 28, 0.88);
  backdrop-filter: blur(6px);
}

.lightbox[data-open='true'] {
  display: grid;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.lightbox-inner {
  position: relative;
  max-width: 1200px;
  width: 100%;
}

.lightbox img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
}

.lightbox-caption {
  margin-top: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -2.75rem;
  right: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.26);
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   Portada en dos columnas (solo pantallas anchas)
   En móvil/tablet se mantiene apilado y centrado como estaba.
   ============================================================ */
@media (min-width: 960px) {
  .hero {
    text-align: left;
  }

  .hero-grid {
    display: grid;
    /* Columna del asistente con ancho FIJO en px: así el panel no cambia
       de tamaño según la pregunta/respuesta. El texto ocupa el resto. */
    grid-template-columns: minmax(0, 1fr) 480px;
    align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);
  }

  .hero-copy .hero-pill {
    margin-inline: 0;
  }

  .hero h1,
  .hero .lead {
    margin-inline: 0;
  }

  .hero h1 {
    max-width: 15ch;
  }

  .hero .lead {
    max-width: 34rem;
  }

  .hero-actions,
  .hero-meta {
    justify-content: flex-start;
  }

  /* El asistente llena su columna fija (derecha), sin el margen superior
     que lo separaba cuando iba debajo del texto. */
  .hero-stage {
    margin: 0;
    max-width: none;
    width: 100%;
  }

  /* Altura cómoda y estable para que no se vea diminuto ni salte de alto
     entre una respuesta y otra. */
  .hero-chat .chat-body {
    min-height: 260px;
  }
}

/* ============================================================
   Pantallas menores
   ============================================================ */
@media (max-width: 1040px) {
  .grid-clients,
  .grid-sectors,
  .grid-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-features,
  .grid-reasons,
  .grid-plans,
  .grid-quotes--three {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .plan--featured {
    transform: none;
  }
}

@media (max-width: 880px) {
  .nav-links,
  .nav-cta .btn {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav[data-open='true'] .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px -24px rgba(13, 18, 38, 0.45);
  }

  .nav[data-open='true'] .nav-links a {
    padding: 0.8rem 0;
    font-size: 1rem;
  }

  .nav[data-open='true'] .nav-links a::after {
    display: none;
  }

  .module,
  .module--flip {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .module--flip .module-copy,
  .module--flip .shot {
    order: 0;
  }

  .values,
  .gallery,
  .grid-quotes {
    grid-template-columns: 1fr;
  }

  .gallery .shot img {
    aspect-ratio: 16 / 10;
  }

  .topbar-promo {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .grid-clients,
  .grid-features,
  .grid-reasons,
  .grid-sectors,
  .grid-plans,
  .grid-quotes--three,
  .grid-stats {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn,
  .closing-actions .btn {
    flex: 1 1 auto;
  }

  .topbar-contact {
    gap: 1rem;
    font-size: 0.78125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .marquee-track,
  .hero-fx i,
  .hero-fx b,
  .hero::after {
    animation: none;
  }

  .hero-fx b {
    opacity: 0.5;
  }

  .marquee {
    overflow-x: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
