/* ============================================================
   Lexia — Landing (meetlexia.com)
   Hoja única, sin dependencias. Tokens derivados del design
   system de la app, inlineados aquí para que el sitio sea
   autocontenido y el material de referencia no viaje a la imagen.
   ============================================================ */

/* ---------------------------- Tokens ---------------------------- */
:root {
  /* Esmeralda */
  --lx-primary-300: #6ee7b7;
  --lx-primary-400: #34d399;
  --lx-primary-500: #10b981;
  --lx-primary-600: #059669;
  --lx-primary-700: #047857;

  /* Fondos oscuros */
  --bg:        #0b1020;
  --bg-alt:    #0d1226;
  --surface:   rgba(255, 255, 255, 0.024);
  --surface-2: rgba(255, 255, 255, 0.045);
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);

  /* Texto */
  --text:      #f2f4f7;
  --text-2:    #b3bacb;
  --text-3:    #7d879e;

  --accent:       #10b981;
  --accent-hover: #34d399;
  --accent-ink:   #04150f;
  --accent-soft:  rgba(16, 185, 129, 0.12);

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --gutter: 18px;
  --nav-h: 62px;

  --ease: cubic-bezier(0.22, 0.68, 0.2, 1);

  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 70px -25px rgba(0, 0, 0, 0.85);
}

@media (min-width: 768px) {
  :root { --gutter: 28px; --nav-h: 70px; }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video, svg { max-width: 100%; }
img, video { height: auto; }

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

button { font: inherit; color: inherit; }

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

::selection { background: rgba(16, 185, 129, 0.28); }

/* Fuera de pantalla con transform, no con left negativo: así no desborda
   el documento y no ensucia el cálculo de scroll horizontal. */
.skip-link {
  position: absolute;
  top: 10px;
  left: var(--gutter);
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transform: translateY(-250%);
  transition: transform 160ms var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* -------------------------- Tipografía -------------------------- */
.h2 {
  font-size: clamp(1.75rem, 4.6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.032em;
  font-weight: 600;
  text-wrap: balance;
}

.h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lx-primary-400);
  font-weight: 500;
  margin-bottom: 14px;
}

.lede {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 1.0625rem;
  max-width: 62ch;
}

/* --------------------------- Layout ----------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 860px; }

.section { padding-block: clamp(72px, 11vw, 132px); position: relative; }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 6vw, 60px); }
.section-head--center { margin-inline: auto; text-align: center; }

.grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .grid--3 { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* --------------------------- Botones ---------------------------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--btn-bg);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease),
              color 140ms var(--ease), transform 140ms var(--ease),
              box-shadow 140ms var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  --btn-bg: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 24px -10px rgba(16, 185, 129, 0.7);
}
.btn--primary:hover { --btn-bg: var(--accent-hover); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 12px 30px -10px rgba(16, 185, 129, 0.85); }

.btn--secondary {
  --btn-bg: var(--surface-2);
  border-color: var(--line-2);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn--secondary:hover { --btn-bg: rgba(255, 255, 255, 0.075); border-color: rgba(255, 255, 255, 0.24); }

.btn--ghost { color: var(--text-2); }
.btn--ghost:hover { color: var(--text); background: var(--surface-2); }

.btn--lg { padding: 14px 22px; font-size: 1rem; border-radius: 12px; }
.btn--block { width: 100%; }

/* ----------------------------- Nav ------------------------------ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 240ms var(--ease), border-color 240ms var(--ease);
}
.nav.is-stuck {
  background: rgba(11, 16, 32, 0.72);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: var(--line);
}

.nav__inner { display: flex; align-items: center; gap: 12px; }

.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.brand__mark { width: 30px; height: 30px; border-radius: 8px; display: block; }
.brand__text { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.03em; }
.brand__text--sm { font-size: 1.0625rem; }

.nav__links { display: none; margin-inline: auto; gap: 4px; }
.nav__links a {
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: color 140ms var(--ease), background 140ms var(--ease);
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }

.nav__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav__actions .btn { padding: 9px 14px; font-size: 0.875rem; }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__actions { margin-left: 0; }
  .nav__actions .btn { padding: 10px 17px; font-size: 0.9375rem; }
}

/* ----------------------------- Hero ----------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(48px, 9vw, 96px));
  padding-bottom: clamp(72px, 10vw, 120px);
  isolation: isolate;
  /* El glow es más ancho que el viewport a propósito: se recorta aquí para
     que no genere scroll horizontal. clip (no hidden) deja el eje vertical
     libre, así el halo sigue sangrando por arriba, detrás de la nav. */
  overflow-x: clip;
}

.hero__glow {
  position: absolute;
  inset: -30% -20% auto -20%;
  height: 900px;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(46% 42% at 50% 24%, rgba(16, 185, 129, 0.22), transparent 68%),
    radial-gradient(36% 34% at 78% 6%, rgba(52, 211, 153, 0.13), transparent 70%);
  filter: blur(10px);
}
.hero__glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(60% 52% at 50% 22%, #000 0%, transparent 78%);
  mask-image: radial-gradient(60% 52% at 50% 22%, #000 0%, transparent 78%);
}

.hero__inner { display: grid; gap: clamp(44px, 7vw, 64px); }

.hero__title {
  font-size: clamp(2rem, 8.4vw, 4.25rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  font-weight: 600;
  text-wrap: balance;
}
.hero__title-accent {
  background: linear-gradient(104deg, var(--lx-primary-300) 0%, var(--accent) 46%, var(--lx-primary-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero__sub {
  margin-top: 22px;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 46ch;
}

.hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero__note {
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 11px;
  margin-bottom: 24px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--lx-primary-300);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Visual del hero: ventana de navegador + teléfono delante */
.hero__visual { position: relative; padding-bottom: 15%; }

.browser {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 23, 40, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}
.browser__dot { width: 9px; height: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); flex: none; }
.browser__url {
  margin-left: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-3);
}
.browser__video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0a0e1c; }

@media (min-width: 900px) {
  .browser { width: 88%; margin-left: auto; }
}

/* ------------------------ Marco de iPhone ----------------------- */
.phone {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 590 / 1279;
  /* % sobre la propia caja: horizontal / vertical. cqw aquí resolvería contra
     el contenedor del padre y deformaba el marco en un óvalo. */
  border-radius: 16.9% / 7.8%;
  background: linear-gradient(155deg, #3a4359 0%, #1a2032 34%, #090d18 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.09),
    var(--shadow-lg);
  flex: none;
}
.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(142deg, rgba(255, 255, 255, 0.14), transparent 26%);
  mix-blend-mode: overlay;
}
.phone__screen {
  position: absolute;
  inset: 3.4cqw;
  border-radius: 13.8cqw;
  overflow: hidden;
  background: var(--bg);
}
.phone__screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone__island {
  position: absolute;
  top: 2.6cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 31cqw;
  height: 9cqw;
  border-radius: 999px;
  background: #000;
  z-index: 2;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.phone--hero { position: absolute; left: 0; bottom: 0; width: 38%; z-index: 2; }
@media (min-width: 900px) { .phone--hero { width: 32%; left: 1%; } }

/* --------------------------- Tarjetas --------------------------- */
.card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 200ms var(--ease), background 200ms var(--ease), transform 200ms var(--ease);
}
.card:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }

.card__icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--lx-primary-400);
}
.card__icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.card__title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 9px; }
.card__body { color: var(--text-2); font-size: 0.9375rem; line-height: 1.6; }

.section--problem { border-top: 1px solid var(--line); }

/* ------------------------- Cómo funciona ------------------------ */
.steps { display: grid; gap: 48px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

.step__visual {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 240px;
  margin-bottom: 26px;
}

.phone--step { width: 62%; max-width: 216px; }

.phone-stack { position: relative; width: 100%; display: flex; justify-content: flex-end; align-items: flex-end; }
.phone--ghost {
  position: absolute;
  left: 0;
  bottom: 26px;
  width: 46%;
  opacity: 0.5;
  filter: brightness(0.72) saturate(0.75);
  z-index: 1;
}
.phone-stack .phone--step { width: 66%; max-width: 216px; position: relative; z-index: 2; }

.step__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lx-primary-400);
  margin-bottom: 11px;
}
.step__title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.022em; line-height: 1.3; margin-bottom: 10px; }
.step__body { color: var(--text-2); font-size: 0.9375rem; line-height: 1.6; }

/* ------------------------- Qué obtienes ------------------------- */
.section--features { border-top: 1px solid var(--line); }

.features { display: grid; gap: 14px; }
@media (min-width: 620px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.feature {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 200ms var(--ease), background 200ms var(--ease), transform 200ms var(--ease);
}
.feature:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }

.feature__icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--lx-primary-400);
}
.feature__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.feature__title { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 8px; }
.feature__title--xl { font-size: clamp(1.375rem, 2.6vw, 1.875rem); letter-spacing: -0.03em; margin-bottom: 14px; }
.feature__body-text { color: var(--text-2); font-size: 0.9375rem; line-height: 1.6; }

/* Tarjeta destacada del asistente */
.feature--xl {
  grid-column: span 2;
  overflow: hidden;
  padding: 26px;
  border-color: rgba(16, 185, 129, 0.26);
  background:
    linear-gradient(150deg, rgba(16, 185, 129, 0.11), rgba(16, 185, 129, 0.02) 46%, transparent 72%),
    var(--surface);
}
@media (min-width: 1024px) {
  .feature--xl { grid-column: span 2; grid-row: span 2; padding: 34px; display: flex; flex-direction: column; justify-content: center; }
}
.feature--xl .feature__icon { border-color: rgba(16, 185, 129, 0.3); background: var(--accent-soft); }
.feature--xl:hover { transform: none; border-color: rgba(16, 185, 129, 0.4); background:
  linear-gradient(150deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.03) 46%, transparent 72%),
  var(--surface-2); }

.feature__glow {
  position: absolute;
  right: -30%;
  bottom: -60%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 68%);
  pointer-events: none;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  padding: 7px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(11, 16, 32, 0.5);
  font-size: 0.8125rem;
  color: var(--text-2);
  font-family: var(--font-mono);
}

/* Bloque "Mira los resultados" */
.results { margin-top: clamp(52px, 8vw, 84px); }

.results__head { margin-bottom: 30px; }
.results__head .h3 { margin-top: 2px; }

.results__grid { display: grid; gap: 26px; align-items: center; }
@media (min-width: 860px) { .results__grid { grid-template-columns: 0.62fr 1fr; gap: 40px; } }

.results__phone { display: flex; justify-content: center; }
.phone--results { width: 62%; max-width: 240px; }

.results__video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #05080f;
  box-shadow: var(--shadow-md);
}

/* --------------------------- Privacidad ------------------------- */
.section--privacy {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(16, 185, 129, 0.028) 55%, transparent);
}
.card--privacy .card__icon { border-color: rgba(16, 185, 129, 0.24); }

/* ------------------------ Acceso anticipado --------------------- */
.section--access { border-top: 1px solid var(--line); }

.access {
  position: relative;
  display: grid;
  gap: 36px;
  padding: clamp(28px, 5vw, 52px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  /* Borde degradado de 1px sin pseudo-elemento extra */
  border: 1px solid transparent;
  background-image:
    linear-gradient(160deg, #101733 0%, #0c1226 100%),
    linear-gradient(140deg, rgba(16, 185, 129, 0.55), rgba(255, 255, 255, 0.06) 42%, rgba(16, 185, 129, 0.22));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 900px) { .access { grid-template-columns: 1fr 0.92fr; gap: 56px; align-items: center; } }

.access__glow {
  position: absolute;
  top: -60%;
  left: -10%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16), transparent 66%);
  pointer-events: none;
}

.access__copy { position: relative; }

.access__lead {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 1.0625rem;
  line-height: 1.62;
  max-width: 48ch;
}
.access__lead strong { color: var(--lx-primary-300); font-weight: 600; }

.access__list { margin-top: 24px; display: grid; gap: 11px; }
.access__list li {
  position: relative;
  padding-left: 25px;
  color: var(--text-2);
  font-size: 0.9375rem;
}
.access__list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

/* --------------------------- Formulario ------------------------- */
.access__form-wrap { position: relative; }

.form {
  display: grid;
  gap: 15px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(8, 12, 26, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@media (min-width: 620px) { .form { padding: 28px; } }

.field { display: grid; gap: 7px; }

.field__label { font-size: 0.8125rem; font-weight: 500; color: var(--text-2); letter-spacing: -0.005em; }
.field__opt { color: var(--text-3); font-weight: 400; }
.req { color: var(--lx-primary-400); }

.input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease), background 140ms var(--ease);
}
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: rgba(255, 255, 255, 0.22); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.input:user-invalid { border-color: #f43f5e; }

.select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237d879e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
.select option { background: #12182b; color: var(--text); }

.form__status { font-size: 0.875rem; line-height: 1.5; min-height: 0; }
.form__status:empty { display: none; }
.form__status.is-ok { color: var(--lx-primary-300); }
.form__status.is-error { color: #fda4af; }

.form__legal { font-size: 0.75rem; color: var(--text-3); line-height: 1.5; }

.form.is-sent { display: none; }

.form-done {
  padding: 34px 28px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  background: rgba(16, 185, 129, 0.07);
  text-align: center;
}
.form-done__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--lx-primary-400);
}
.form-done__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.form-done__title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.form-done__text { color: var(--text-2); font-size: 0.9375rem; }

/* ------------- Bloque de chat (sustituye al formulario) ---------- */
.access-chat {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(8, 12, 26, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@media (min-width: 620px) { .access-chat { padding: 28px; } }

.access-chat__icon {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--lx-primary-400);
}
.access-chat__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.access-chat__title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; }
.access-chat__text { color: var(--text-2); font-size: 0.9375rem; line-height: 1.6; }
.access-chat__text strong { color: var(--lx-primary-300); font-weight: 600; }
.access-chat .btn { margin-top: 6px; }

/* Enlace que despliega el formulario de respaldo */
.access-form-details { margin-top: 20px; }

.access-form-details__summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 0.8125rem;
  cursor: pointer;
  list-style: none;
  transition: color 140ms var(--ease);
}
.access-form-details__summary::-webkit-details-marker { display: none; }
.access-form-details__summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 220ms var(--ease);
}
.access-form-details__summary:hover { color: var(--lx-primary-300); }
.access-form-details[open] .access-form-details__summary::after {
  transform: rotate(-135deg) translate(-3px, -3px);
}

.access-form-details .form { margin-top: 16px; }

/* ------------------------------ FAQ ----------------------------- */
.section--faq { border-top: 1px solid var(--line); }

.faq { border-top: 1px solid var(--line); }

.faq__item { border-bottom: 1px solid var(--line); }

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.018em;
  cursor: pointer;
  list-style: none;
  transition: color 140ms var(--ease);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  border-right: 1.8px solid var(--text-3);
  border-bottom: 1.8px solid var(--text-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 220ms var(--ease), border-color 140ms var(--ease);
}
.faq__item summary:hover { color: var(--lx-primary-300); }
.faq__item summary:hover::after { border-color: var(--lx-primary-400); }
.faq__item[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); border-color: var(--lx-primary-400); }

.faq__answer { padding: 0 4px 22px; }
.faq__answer p { color: var(--text-2); font-size: 0.9375rem; line-height: 1.65; max-width: 70ch; }

/* ----------------------------- Footer --------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 40px; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
.footer__links a { font-size: 0.875rem; color: var(--text-2); transition: color 140ms var(--ease); }
.footer__links a:hover { color: var(--lx-primary-300); }
.footer__legal { font-size: 0.8125rem; color: var(--text-3); font-family: var(--font-mono); }

@media (max-width: 559px) {
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer__links { margin-left: 0; }
}

/* ----------------------------- Modal ---------------------------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 18px; }
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 16, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade 200ms var(--ease);
}

.modal__dialog {
  position: relative;
  width: min(1000px, 100%);
  animation: rise 260ms var(--ease);
}

.modal__video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 40px 90px -25px rgba(0, 0, 0, 0.95);
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(8, 12, 24, 0.82);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 140ms var(--ease), border-color 140ms var(--ease);
}
.modal__close:hover { background: rgba(16, 185, 129, 0.22); border-color: rgba(16, 185, 129, 0.5); }
.modal__close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

body.modal-open { overflow: hidden; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.985); } }

/* --------------------- Animaciones de entrada ------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------------------------- Utilidades ------------------------ */
.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;
}

/* ------------------------- Reduced motion ----------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:active { transform: none; }
  .card:hover, .feature:hover { transform: none; }
}

/* ------------------------- Página legal ------------------------- */
.legal { padding-top: calc(var(--nav-h) + clamp(44px, 8vw, 72px)); padding-bottom: clamp(64px, 9vw, 100px); }
.legal__draft {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 26px;
  padding: 8px 15px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
  font-size: 0.8125rem;
  font-weight: 500;
}
.legal__title { font-size: clamp(1.75rem, 4.6vw, 2.5rem); line-height: 1.1; letter-spacing: -0.032em; font-weight: 600; }
.legal__updated { margin-top: 12px; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-3); }
.legal__body { margin-top: 44px; display: grid; gap: 34px; max-width: 68ch; }
.legal__body h2 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.022em; margin-bottom: 10px; }
.legal__body p { color: var(--text-2); font-size: 0.9375rem; line-height: 1.7; }
.legal__body p + p { margin-top: 12px; }
.legal__body ul { margin-top: 12px; display: grid; gap: 9px; }
.legal__body li { position: relative; padding-left: 22px; color: var(--text-2); font-size: 0.9375rem; line-height: 1.65; }
.legal__body li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
}
.legal__body a { color: var(--lx-primary-300); text-decoration: underline; text-underline-offset: 3px; }
.legal__back { margin-top: 48px; }

/* ================= Widget del chat (@n8n/chat) ==================
   El widget publica sus tokens en :root desde su propio style.css, que
   esta página carga ANTES que esta hoja: por eso basta con redefinirlos
   aquí, sin !important ni selectores más específicos.

   Los nombres son los literales del paquete v0 (ojo con la incoherencia
   del propio paquete: --chat--color--primary lleva doble guion, pero
   --chat--color-secondary y --chat--color--primary-shade-50 no).

   Sin redefinir --chat--font-family el widget queda con una font-family
   inválida (su default trae paréntesis envolventes, artefacto de Sass).
   ================================================================ */
:root {
  --chat--font-family: var(--font-sans);
  --chat--border-radius: 12px;
  --chat--transition-duration: 160ms;

  /* Esmeralda y acentos */
  --chat--color--primary: #10b981;
  --chat--color--primary-shade-50: #34d399;
  --chat--color--primary--shade-100: #059669;
  --chat--color-secondary: #10b981;
  --chat--color-secondary-shade-50: #059669;

  /* Escala clara del widget, recolocada al tema oscuro */
  --chat--color-light: var(--text);
  --chat--color-light-shade-50: var(--line-2);
  --chat--color-light-shade-100: var(--line);
  --chat--color-medium: var(--line-2);
  --chat--color-disabled: var(--text-3);
  --chat--color-typing: var(--text-3);

  /* Ventana */
  --chat--window--width: 400px;
  --chat--window--height: min(620px, calc(100vh - 140px));
  --chat--window--bottom: 20px;
  --chat--window--right: 20px;
  --chat--window--border: 1px solid var(--line-2);
  --chat--window--border-radius: 16px;
  --chat--window--margin-bottom: 16px;

  /* Cabecera */
  --chat--header--background: #111827;
  --chat--header--color: var(--text);
  --chat--header--padding: 16px 18px;
  --chat--header--border-bottom: 1px solid var(--line);
  --chat--heading--font-size: 1.0625rem;
  --chat--subtitle--font-size: 0.8125rem;
  --chat--subtitle--line-height: 1.5;

  /* Cuerpo, mensajes y pie */
  --chat--body--background: #0f172a;
  --chat--footer--background: #111827;
  --chat--footer--color: var(--text);
  --chat--messages-list--padding: 18px;
  --chat--message--font-size: 0.9375rem;
  --chat--message--padding: 11px 14px;
  --chat--message--border-radius: 14px;
  --chat--message--margin-bottom: 10px;
  --chat--message--pre--background: rgba(255, 255, 255, 0.06);
  --chat--message--bot--background: #111827;
  --chat--message--bot--color: var(--text);
  --chat--message--bot--border: 1px solid var(--line);
  --chat--message--user--background: #10b981;
  --chat--message--user--color: #04150f;
  --chat--message--user--border: 1px solid transparent;

  /* Campo de escritura */
  --chat--textarea--height: 46px;
  --chat--input--font-size: 0.9375rem;
  --chat--input--background: rgba(255, 255, 255, 0.05);
  --chat--input--text-color: var(--text);
  --chat--input--border: 1px solid var(--line-2);
  --chat--input--border-active: 1px solid var(--accent);
  --chat--input--border-radius: 12px;
  --chat--input--padding: 12px 14px;
  --chat--input--send--button--background: transparent;
  --chat--input--send--button--color: var(--accent);
  --chat--input--send--button--background-hover: transparent;
  --chat--input--send--button--color-hover: var(--accent-hover);

  /* Botón flotante */
  --chat--toggle--size: 56px;
  --chat--toggle--background: var(--accent);
  --chat--toggle--hover--background: var(--accent-hover);
  --chat--toggle--active--background: var(--accent);
  --chat--toggle--color: var(--accent-ink);
  --chat--close--button--color-hover: var(--accent-hover);
}

/* El widget no le pone sombra ni a la ventana ni al botón. */
.chat-window-wrapper .chat-window-toggle { box-shadow: 0 14px 32px -12px rgba(0, 0, 0, 0.75); }
.chat-window-wrapper .chat-window-toggle svg { width: 26px; height: 26px; }
.chat-window-wrapper .chat-window { box-shadow: var(--shadow-lg); }

/* El placeholder no tiene variable propia en el paquete. */
.chat-window-wrapper .chat-inputs textarea::placeholder { color: var(--text-3); }

/* El paquete no trae ninguna media query: en móvil la ventana ocupa la
   pantalla entera. El contenedor es fixed y a pantalla completa, así que
   deja pasar los clics mientras la ventana está en display:none: si no,
   taparía la landing entera.

   El widget no publica ninguna clase ni atributo de "abierto" (usa v-show),
   así que el único estado legible desde CSS es el display inline de la
   ventana. Con eso: cerrado, el botón flotante se queda abajo a la derecha,
   en su sitio; abierto, como no cabe en el flujo sobre una ventana que ya
   ocupa todo, se va arriba a la derecha sobre la cabecera —que le reserva
   el hueco— porque es lo único que cierra el chat. */
@media (max-width: 640px) {
  .chat-window-wrapper {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    max-height: none;
    justify-content: flex-end;
    pointer-events: none;
  }
  .chat-window-wrapper .chat-window {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    pointer-events: auto;
  }

  .chat-window-wrapper .chat-window-toggle {
    margin: 0 12px 12px auto;
    pointer-events: auto;
  }
  .chat-window-wrapper:has(.chat-window:not([style*="display: none"])) .chat-window-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
    z-index: 2;
  }
  .chat-window-wrapper:has(.chat-window:not([style*="display: none"])) .chat-header {
    padding-right: 76px;
  }
}
