/* =========================================================================
   XION-AI — Landing
   Sitio estático. Colores y tipografías según el manual de marca (CLAUDE.md).
   ========================================================================= */

:root {
  /* Base / neutros XION-AI */
  --bg:            #F8F9FA;   /* base clara por defecto (blanco técnico) */
  --anthracite:    #1E2229;   /* antracita: texto e impacto / fondos oscuros */
  --text:          #2B3036;
  --text-muted:    #6C757D;
  --text-on-dark:  #C9CDD3;
  --steel:         #9AA6B2;   /* acero */

  /* Acento XION-AI (madre) */
  --cobalt:        #2A4FE0;   /* azul cobalto */
  --cobalt-dark:   #1F3EC0;
  --cobalt-soft:   #8FA3EE;

  /* MATIAS (producto) — reservados para su territorio, no mezclar con cobalto */
  --matias-yellow:     #FFB800;
  --matias-teal:       #006C6C;
  --matias-teal-light: #40E0DA;
  --matias-teal-dark:  #00504F;   /* teal más oscuro para hover en zona MATIAS */

  /* Superficies / bordes */
  --surface:       #FFFFFF;
  --surface-alt:   #F1F3F5;
  --border:        #E4E7EB;

  /* Tipografías */
  --font-display: 'Archivo Black', system-ui, sans-serif;
  --font-tech:    'Rajdhani', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --maxw: 1240px;
  --header-h: 76px;
}

/* ---- Reset ligero ---- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cobalt); text-decoration: none; }
a:hover { color: var(--cobalt-dark); }

img { max-width: 100%; }

[id] { scroll-margin-top: 96px; }

@keyframes orbitspin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.wrap { max-width: var(--maxw); margin: 0 auto; }

/* Etiqueta técnica reutilizable ("kicker") */
.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
}
.kicker__line {
  width: 34px;
  height: 2px;
  background: var(--cobalt);
  display: block;
  flex: 0 0 auto;
}
.kicker__text {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cobalt);
}

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}

.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Logo con swap (blanco sobre hero oscuro / oscuro al hacer scroll) */
.brand {
  position: relative;
  display: block;
  width: 107px;
  height: 26px;
  flex: 0 0 auto;
}
.brand img {
  position: absolute;
  top: 0; left: 0;
  height: 26px;
  width: auto;
  display: block;
  transition: opacity .3s ease;
}
.brand__light { opacity: 1; }   /* logo blanco: visible por defecto */
.brand__dark  { opacity: 0; }   /* logo oscuro: aparece al hacer scroll */

/* Navegación principal */
.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  align-items: center;
}
.nav a {
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-on-dark, #F8F9FA);
  color: #F8F9FA;
  transition: color .3s ease;
}
.nav a:hover { color: var(--cobalt-soft); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
  margin-left: auto;
}

/* Conmutador de idioma (estructura preparada para GL/EN) */
.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .1em;
}
.lang__active { color: #F8F9FA; }
.lang__muted  { color: rgba(248,249,250,.42); }

/* CTA sólido */
.btn-cta {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  background: var(--cobalt);
  color: var(--bg);
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 2px;
}
.btn-cta:hover { background: var(--cobalt-dark); color: var(--bg); }

/* Botón hamburguesa (solo móvil) */
.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;             /* se muestra en <1040px */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: 0 0 0 10px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #F8F9FA;
  transition: background .3s ease;
}
.menu-toggle span:last-child { width: 16px; }

/* Panel de menú móvil */
.mobile-menu {
  display: none;
  background: var(--anthracite);
  border-top: 1px solid rgba(248,249,250,.14);
  padding: 14px 24px 26px;
  flex-direction: column;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 14px 0;
  border-bottom: 1px solid rgba(248,249,250,.1);
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #F8F9FA;
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ---- Estado "scrolled": header claro + logo oscuro + texto antracita ---- */
.site-header.scrolled {
  background: rgba(248,249,250,.92);
  border-bottom-color: var(--border);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
}
.site-header.scrolled .brand__light { opacity: 0; }
.site-header.scrolled .brand__dark  { opacity: 1; }
.site-header.scrolled .nav a { color: var(--text); }
.site-header.scrolled .nav a:hover { color: var(--cobalt); }
.site-header.scrolled .lang__active { color: var(--text); }
.site-header.scrolled .lang__muted  { color: #ADB5BD; }
.site-header.scrolled .menu-toggle span { background: var(--text); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  background: var(--anthracite);
  color: var(--bg);
  overflow: hidden;
  padding: 150px 24px 0;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(248,249,250,.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(248,249,250,.055) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.hero__orbit {
  position: absolute;
  top: 50%; right: 4%;
  transform: translateY(-50%);
  width: 600px; height: 600px;
  opacity: .5;
  pointer-events: none;
  z-index: 1;                 /* siempre por debajo del texto (.hero__inner) */
}
.hero__orbit .ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(42,79,224,.55);
  border-radius: 50%;
}
.hero__orbit .ring--inner {
  inset: 70px;
  border-color: rgba(42,79,224,.28);
}
.hero__orbit .spin {
  position: absolute;
  inset: 0;
  animation: orbitspin 64s linear infinite;
}
.hero__orbit .axis {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 0;
  border-top: 1px solid rgba(42,79,224,.45);
}
.hero__orbit .axis--a { transform: rotate(24deg); }
.hero__orbit .axis--b { transform: rotate(-24deg); }
.hero__orbit .node {
  position: absolute;
  background: var(--cobalt);
  border-radius: 50%;
}
.hero__orbit .node--core { top: 50%; left: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; }
.hero__orbit .node--a    { top: 20%; left: 14%; width: 9px; height: 9px; }
.hero__orbit .node--b    { bottom: 18%; right: 16%; width: 9px; height: 9px; }

.hero__fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(30,34,41,0), rgba(30,34,41,1));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;                /* el texto siempre por encima de la órbita */
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: 96px;
}
.hero .kicker { margin-bottom: 34px; }
.hero .kicker__text { color: var(--cobalt-soft); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 7.4vw, 104px);
  line-height: .96;
  letter-spacing: -.02em;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--cobalt); }

.hero__lead {
  margin: 32px 0 0;
  max-width: 56ch;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.62;
  color: var(--text-on-dark);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 30px;
  background: var(--cobalt);
  color: var(--bg);
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 2px;
}
.btn-primary:hover { background: var(--cobalt-dark); color: var(--bg); }

/* --- Órbita del hero: responsive. En pantallas donde el texto ocupa todo el
   ancho, se encoge, se atenúa y se manda al fondo para no invadir el titular.
   El hero mantiene overflow:hidden, así que nunca genera scroll horizontal. --- */
@media (max-width: 1040px) {
  .hero__orbit { width: 460px; height: 460px; right: 2%; opacity: .35; }
}
@media (max-width: 760px) {
  .hero__orbit {
    width: 320px; height: 320px;
    top: 22%; right: -8%;
    transform: none;
    opacity: .2;
    z-index: 0;               /* detrás del contenido para máxima legibilidad */
  }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 30px;
  border: 1px solid rgba(248,249,250,.3);
  color: var(--bg);
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: border-color .3s ease, background .3s ease;
}
.btn-ghost:hover {
  border-color: #F8F9FA;
  background: rgba(248,249,250,.06);
  color: var(--bg);
}

/* Tira de claim (diagnóstico / calibrado / supervisión) */
.claim-strip {
  margin-top: 88px;
  padding-top: 26px;
  border-top: 1px solid rgba(248,249,250,.14);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
}
.claim {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.claim__label {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2em;
  /* Cobalto SUAVE: sobre antracita el cobalto puro (#2A4FE0 ≈ 2.5:1) no pasa AA.
     --cobalt-soft (#8FA3EE ≈ 6.6:1) sí, y es el mismo cobalto del kicker del hero. */
  color: var(--cobalt-soft);
}
.claim__text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-on-dark);   /* #C9CDD3 ≈ 9:1 sobre antracita — igual que el lede */
}

/* =========================================================================
   QUÉ HACEMOS
   ========================================================================= */
.section-what {
  background: var(--bg);
  padding: 110px 24px;
}
.section-what .kicker { margin-bottom: 22px; }

.section-what h2,
.section-auto h2,
.section-method h2,
.section-sectors h2,
.section-why h2,
.section-about h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -.015em;
  margin: 0;
  max-width: 22ch;
  color: var(--anthracite);
  text-wrap: balance;
}
.section-what__lead,
.section-auto__lead,
.section-method__lead,
.section-sectors__lead,
.section-why__lead {
  margin: 22px 0 0;
  max-width: 58ch;
  font-size: 18px;
  line-height: 1.62;
  color: var(--text-muted);
  text-wrap: pretty;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
  margin-top: 52px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 34px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(30,34,41,.09);
}
.card__num {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--cobalt);
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.2;
  margin: 0;
  color: var(--anthracite);
}
.card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}
.card__link {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* =========================================================================
   AUTOMATIZACIONES (tarjetas-receta · patrón "Cuando pasa X → hacemos Y")
   Territorio XION-AI: solo cobalto, antracita y neutros.
   ========================================================================= */
.section-auto {
  background: var(--bg);
  padding: 110px 24px;
}
.section-auto .kicker { margin-bottom: 22px; }

/* Rejilla de recetas */
.recipes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  grid-auto-rows: 1fr;           /* todas las FILAS igualan altura entre sí */
  align-items: stretch;          /* y cada tarjeta llena su celda */
  gap: 22px;
  margin-top: 52px;
}

/* Tarjeta-receta: lienzo blanco con más cuerpo (sombra + borde reforzado
   + acento de marca a la izquierda) y el mismo gesto de hover que las .card */
.recipe {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cobalt);        /* ancla de marca, sobria */
  border-radius: 4px;
  padding: 26px 28px 24px;
  height: 100%;                  /* ocupa toda la altura de la celda del grid */
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(30, 34, 41, .06); /* cuerpo por defecto */
  transition: transform .3s ease, box-shadow .3s ease;
}
.recipe:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 38px rgba(30, 34, 41, .12); /* más pronunciada en hover */
}

/* Flujo "cuando → hacemos": dos partes con jerarquía deliberada.
   CUANDO = contexto (secundario) · HACEMOS = beneficio (protagonista) */
.recipe__flow {
  display: flex;
  align-items: center;           /* HACEMOS se ajusta a su contenido, sin estirarse */
  gap: 16px;
}
.recipe__part {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 3px;
}

/* CUANDO — bajado de intensidad: sin fondo, texto en gris medio */
.recipe__part--when {
  flex: 1 1 0;
  padding: 4px 2px;
  background: transparent;
}

/* HACEMOS — subido de peso: panel antracita muy suave, más presencia */
.recipe__part--do {
  flex: 1.25 1 0;
  padding: 16px 18px;
  background: rgba(30, 34, 41, .055);
  border: 1px solid rgba(30, 34, 41, .08);
}

.recipe__tag {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.recipe__tag--when { color: var(--cobalt); }
.recipe__tag--do   { color: var(--anthracite); }

.recipe__text {
  margin: 0;
  line-height: 1.5;
}
/* Contexto: gris medio (AA sobre blanco: #6C757D ≈ 4.6:1) */
.recipe__part--when .recipe__text {
  font-size: 16px;
  color: var(--text-muted);
}
/* Beneficio: antracita, mayor tamaño y peso — lo importante de la tarjeta */
.recipe__part--do .recipe__text {
  font-size: 17px;
  font-weight: 600;
  color: var(--anthracite);
}

/* Flecha de conexión: cobalto, con más presencia */
.recipe__arrow {
  align-self: center;
  flex: 0 0 auto;
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--cobalt);
  transition: transform .3s ease;
}

/* Línea de apoyo: contraste real + filete superior para separarla.
   margin-top:auto la fija SIEMPRE al pie → todas alineadas entre tarjetas */
.recipe__support {
  margin: 0;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* =========================================================================
   FLUJO EN VIVO — panel antracita animado EN BUCLE (reproducción fiel de
   flujo-en-vivo.html). Zona XION-AI: solo cobalto/antracita/neutros.
   Los selectores genéricos (.node/.row/.conn/.drop/.doc/.piece/.check/.tag)
   van ESCOPADOS bajo .flow para no colisionar con el resto del sitio (p.ej.
   .node del hero). @keyframes, animation-delay y los --gd inline se reproducen
   EXACTAMENTE (son los que dan la sincronía). Variables mapeadas al :root del
   proyecto: --cobalt, --anthracite, --cobalt-soft, --bg, --text-on-dark, fuentes.
   ========================================================================= */
.flow {
  --line: rgba(143, 163, 238, .22);   /* cobalt-soft a baja opacidad (sin equivalente en :root) */
  position: relative;
  background: var(--anthracite);
  border-radius: 10px;
  padding: 40px 36px 46px;
  overflow: hidden;
  max-width: 1180px;
  margin: 64px auto 0;         /* separa el panel de la rejilla de recetas (arriba) */
}
.flow__grid {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(248,249,250,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248,249,250,.045) 1px, transparent 1px);
  background-size: 46px 46px;
}
.flow__head { position: relative; margin-bottom: 30px; }
.flow__eyebrow {
  font-family: var(--font-tech); font-weight: 700; letter-spacing: .24em;
  text-transform: uppercase; font-size: 12px; color: var(--cobalt-soft);
}
.flow__title {
  font-family: var(--font-display); font-weight: 400; color: #fff;
  font-size: clamp(26px, 3.4vw, 40px); line-height: 1.02; margin: 12px 0 10px;
}
.flow__sub { color: var(--text-on-dark); max-width: 60ch; font-size: 16px; line-height: 1.6; }
.flow__replay {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-tech); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; font-size: 12px; color: var(--cobalt-soft);
  background: transparent; border: 1px solid var(--line); border-radius: 4px;
  padding: 8px 14px; cursor: pointer;
}
.flow__replay:hover { border-color: var(--cobalt); color: #fff; }

.flow .track { position: relative; }
.flow .row { position: relative; display: flex; align-items: stretch; gap: 0; }
.flow .row + .row { margin-top: 20px; }

.flow .node {
  position: relative; flex: 1 1 0; min-width: 0;
  background: rgba(143,163,238,.04); border: 1px solid var(--line); border-radius: 8px;
  padding: 18px 18px 20px;
  opacity: 0; transform: translateY(14px) scale(.985);
  transition: opacity .5s ease, transform .5s ease;
}
.flow .track.in .node { opacity: 1; transform: none; animation: nodeGlow 10s ease-in-out infinite; animation-delay: var(--gd, 0s); }
.flow .node__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.flow .node__icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(42,79,224,.12); color: var(--cobalt-soft); }
.flow .node__icon svg { width: 22px; height: 22px; display: block; }
.flow .node__num { font-family: var(--font-tech); font-weight: 700; font-size: 13px; letter-spacing: .18em; color: var(--cobalt-soft); opacity: .7; }
.flow .node h4 { font-family: var(--font-body); font-weight: 700; font-size: 16px; color: #fff; margin: 0 0 5px; line-height: 1.25; }
.flow .node p { font-size: 13.5px; line-height: 1.5; color: var(--text-on-dark); margin: 0; }
@keyframes nodeGlow {
 0%,100% { box-shadow: 0 0 0 rgba(42,79,224,0); border-color: var(--line); }
 3% { box-shadow: 0 14px 36px rgba(42,79,224,.30); border-color: var(--cobalt); }
 10% { box-shadow: 0 0 0 rgba(42,79,224,0); border-color: var(--line); }
}

.flow .conn { flex: 0 0 46px; position: relative; align-self: center; height: 2px; background: var(--line); margin: 0 -1px; }
.flow .conn .comet { position: absolute; top: 50%; left: -6px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--cobalt); box-shadow: 0 0 12px 2px rgba(42,79,224,.8); opacity: 0; }
.flow .conn .comet::before { content: ""; position: absolute; right: 6px; top: 50%; width: 22px; height: 2px; margin-top: -1px; background: linear-gradient(90deg, transparent, rgba(42,79,224,.75)); border-radius: 2px; }
.flow .track.in .conn .comet { animation: cometX 10s linear infinite; }
@keyframes cometX { 0%{left:-6px;opacity:0} 2%{opacity:1} 10%{left:calc(100% + 6px);opacity:1} 12%,100%{left:calc(100% + 6px);opacity:0} }

.flow .drop { position: relative; height: 34px; display: flex; justify-content: center; margin: 6px 0; }
.flow .drop .line { width: 2px; height: 100%; background: var(--line); position: relative; }
.flow .drop .comet { position: absolute; left: 50%; top: -6px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--cobalt); box-shadow: 0 0 12px 2px rgba(42,79,224,.8); opacity: 0; }
.flow .track.in .drop .comet { animation: cometY 10s linear infinite; animation-delay: 2.8s; }
@keyframes cometY { 0%{top:-6px;opacity:0} 2%{opacity:1} 10%{top:calc(100% + 2px);opacity:1} 12%,100%{opacity:0} }

.flow .node--human { border-color: rgba(42,79,224,.5); }
.flow .node--human .tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-tech); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 10.5px; color: var(--cobalt-soft); border: 1px solid var(--line); border-radius: 20px; padding: 3px 9px; margin-bottom: 8px; }
.flow .node--human::after { content: ""; position: absolute; inset: -4px; border-radius: 11px; border: 1px solid var(--cobalt); opacity: 0; pointer-events: none; }
.flow .track.in .node--human::after { animation: humanRing 10s ease-in-out infinite; animation-delay: 4.0s; }
@keyframes humanRing { 0%{opacity:0;transform:scale(.985)} 4%{opacity:.95;transform:scale(1)} 12%{opacity:0;transform:scale(1.05)} 17%{opacity:0;transform:scale(.99)} 21%{opacity:.7;transform:scale(1)} 29%{opacity:0;transform:scale(1.05)} 100%{opacity:0} }

.flow .node--sent .check { position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border-radius: 50%; background: var(--cobalt); display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.6); }
.flow .node--sent .check svg { width: 15px; height: 15px; color: #fff; }
.flow .track.in .node--sent .check { animation: checkPop 10s ease-in-out infinite; animation-delay: 6.4s; }
@keyframes checkPop { 0%{opacity:0;transform:scale(.6)} 5%{opacity:1;transform:scale(1.18)} 11%{transform:scale(1)} 24%{opacity:1;transform:scale(1)} 31%{opacity:0} 100%{opacity:0} }

.flow .doc { margin-top: 14px; background: rgba(14,17,22,.5); border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.flow .doc__h { font-family: var(--font-tech); font-weight: 700; letter-spacing: .16em; font-size: 9px; color: var(--cobalt-soft); margin-bottom: 9px; }
.flow .doc__l { height: 5px; border-radius: 3px; background: rgba(143,163,238,.22); margin: 5px 0; }
.flow .doc__l.w1 { width: 86%; } .flow .doc__l.w2 { width: 70%; } .flow .doc__l.w3 { width: 78%; }
.flow .doc__t { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.flow .doc__t span { font-family: var(--font-tech); font-weight: 700; font-size: 10px; letter-spacing: .14em; color: #fff; }
.flow .doc__t b { width: 54px; height: 8px; border-radius: 3px; background: var(--cobalt); }

.flow .piece { margin-top: 12px; display: flex; justify-content: center; }
.flow .piece svg { width: 96px; height: auto; stroke: var(--cobalt-soft); }

@media (max-width: 900px) {
 .flow .row { flex-direction: column; gap: 0; }
 .flow .conn { flex: none; width: 2px; height: 26px; align-self: center; background: var(--line); margin: 6px 0; }
 .flow .conn .comet { left: 50%; margin-left: -4px; top: -6px; }
 .flow .conn .comet::before { display: none; }
 .flow .track.in .conn .comet { animation: cometYs 10s linear infinite; }
}
@keyframes cometYs { 0%{top:-6px;opacity:0} 2%{opacity:1} 10%{top:calc(100% + 4px);opacity:1} 12%,100%{opacity:0} }

@media (prefers-reduced-motion: reduce) {
 .flow .track .node, .flow .track.in .node { opacity: 1; transform: none; animation: none; }
 .flow .track.in .conn .comet, .flow .track.in .drop .comet { animation: none; opacity: 1; left: 50%; }
 .flow .track.in .node--sent .check { animation: none; opacity: 1; transform: none; }
 .flow .node--human::after { display: none; }
}

/* Cierre de la sección */
.recipe-close {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}
.recipe-close__text {
  margin: 0;
  flex: 1 1 320px;
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* En móvil las dos partes se apilan y la flecha apunta hacia abajo */
@media (max-width: 599px) {
  .recipe__flow { flex-direction: column; }
  .recipe__arrow { transform: rotate(90deg); }
}

/* =========================================================================
   MATIAS — ÚNICA sección con territorio propio: amarillo + teal sobre base
   clara y texto antracita. REGLA CRÍTICA: aquí NO hay cobalto; se sobrescriben
   enlaces/chips/botones globales para que usen TEAL (nunca azul + amarillo).
   ========================================================================= */
.section-matias {
  background: var(--bg);
  padding: 110px 24px;
}
.section-matias .kicker { margin-bottom: 22px; }

/* Sobrescritura de marca: dentro de #matias, cobalto → teal (ni un pixel azul) */
#matias .kicker__line { background: var(--matias-teal); }
#matias .kicker__text { color: var(--matias-teal); }
#matias a:not(.btn-matias) { color: var(--matias-teal); }
#matias a:not(.btn-matias):hover { color: var(--matias-teal-dark); }

.section-matias h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -.015em;
  margin: 0;
  max-width: 20ch;
  color: var(--anthracite);
  text-wrap: balance;
}

/* Cabecera-producto: texto + lockup, con guiño de chaflán amarillo (motivo MATIAS) */
.matias-head {
  position: relative;
  overflow: hidden;
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1.45fr .85fr;
  gap: 40px;
  align-items: center;
  padding: 40px 40px 42px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background:
    linear-gradient(225deg, var(--matias-yellow) 0 26px, transparent 26px) top right / 54px 54px no-repeat,
    var(--surface);
}
.matias-lead {
  margin: 18px 0 0;
  max-width: 54ch;
  font-size: 18px;
  line-height: 1.62;
  color: var(--text-muted);
  text-wrap: pretty;
}
.matias-head__logo { display: flex; justify-content: center; }
.matias-head__logo img { width: 100%; max-width: 250px; height: auto; display: block; }

/* Módulos de la plataforma — tarjetas (no son una secuencia: sin conector) */
.matias-modules {
  margin: 44px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.matias-module {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.matias-module:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(30, 34, 41, .09);
}
.matias-module__num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
  color: var(--matias-teal);
}
.matias-module__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
  color: var(--anthracite);
}
.matias-module__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Módulo "Y lo que viene" — atenuado, tipo próximamente */
.matias-module--soon {
  background: transparent;
  border-style: dashed;
}
.matias-module--soon:hover { transform: none; box-shadow: none; }
.matias-module--soon .matias-module__num,
.matias-module--soon .matias-module__title { opacity: .7; }
.matias-module__tag {
  align-self: flex-start;
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--matias-teal);
  border: 1px solid var(--matias-teal);
  border-radius: 999px;
  padding: 2px 10px;
}

/* Cómo funciona resumido (1 línea) + credibilidad — texto que respira */
.matias-note {
  margin: 30px 0 0;
  max-width: 72ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}
.matias-cred {
  margin: 14px 0 0;
  max-width: 64ch;
  padding-left: 16px;
  border-left: 3px solid var(--matias-yellow);   /* guiño amarillo MATIAS */
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* CTA — misma forma que .btn-primary pero en TEAL (nunca cobalto) */
.matias-cta { margin-top: 34px; }
.btn-matias {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 30px;
  background: var(--matias-teal);
  color: var(--bg);
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background .25s ease;
}
.btn-matias:hover { background: var(--matias-teal-dark); color: var(--bg); }

/* Responsive: cabecera y módulos se apilan */
@media (max-width: 860px) {
  .matias-head { grid-template-columns: 1fr; gap: 28px; }
  .matias-head__logo { order: -1; justify-content: flex-start; }
  .matias-modules { grid-template-columns: 1fr; }
}

/* =========================================================================
   MÉTODO (Cómo trabajamos) — zona XION-AI: cobalto/antracita/neutros.
   Sección de confianza (sin CTA). Reutiliza el ritmo del resto.
   ========================================================================= */
.section-method {
  background: var(--bg);
  padding: 110px 24px;
}
.section-method .kicker { margin-bottom: 22px; }

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 52px;
}
.method-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 30px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.method-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(30, 34, 41, .09);
}
.method-card__num {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: .04em;
  line-height: 1;
  color: var(--cobalt);
}
.method-card__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
  color: var(--anthracite);
}
.method-card__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Responsive: 4 → 2 columnas → 1 columna */
@media (max-width: 980px) {
  .method-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .method-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   SECTORES (multisectorial) — zona XION-AI: cobalto/antracita/neutros.
   MATIAS no aparece aquí (solo una nota sutil, en cobalto, en Metal).
   ========================================================================= */
.section-sectors {
  background: var(--bg);
  padding: 110px 24px;
}
.section-sectors .kicker { margin-bottom: 22px; }

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 52px;
}
.sector-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 30px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.sector-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(30, 34, 41, .09);
}
.sector-card__icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(42, 79, 224, .08);
  color: var(--cobalt);
}
.sector-card__icon svg { width: 24px; height: 24px; display: block; }
.sector-card__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
  color: var(--anthracite);
}
.sector-card__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}
/* Nota sutil "Aquí nació MATIAS" — sigue en cobalto (nada de teal) */
.sector-card__note {
  margin: auto 0 0;
  padding-top: 6px;
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.sectors-close {
  margin: 34px 0 0;
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* Responsive: 4 → 2 columnas → 1 columna */
@media (max-width: 980px) {
  .sectors-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .sectors-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   POR QUÉ XION-AI — zona XION-AI: cobalto/antracita/neutros.
   Diferenciadores + comparativa honesta + CTA. Sin amarillo ni teal.
   ========================================================================= */
.section-why {
  background: var(--bg);
  padding: 110px 24px;
}
.section-why .kicker { margin-bottom: 22px; }

/* Utilidad accesible: texto solo para lectores de pantalla */
.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;
}

/* Tres diferenciadores */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 52px;
}
.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 30px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(30, 34, 41, .09);
}
.why-card__icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(42, 79, 224, .08);
  color: var(--cobalt);
}
.why-card__icon svg { width: 24px; height: 24px; display: block; }
.why-card__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
  color: var(--anthracite);
}
.why-card__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Cierre / CTA */
.why-cta {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}
.why-cta__text {
  margin: 0;
  flex: 1 1 320px;
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* Responsive */
@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   SOBRE NOSOTROS — zona XION-AI: base clara, cobalto/antracita/neutros.
   Texto que respira + motivo de marca (órbita en cobalto muy tenue).
   Sin personas, sin fotos, sin métricas. Sin amarillo/teal.
   ========================================================================= */
.section-about {
  background: var(--bg);
  padding: 110px 24px;
}
.section-about .kicker { margin-bottom: 22px; }

.about-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-text { min-width: 0; }
.about-p {
  margin: 18px 0 0;
  max-width: 60ch;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
  text-wrap: pretty;
}
.about-p:first-of-type { margin-top: 26px; }

/* Motivo visual: la órbita / rejilla de la "O" del logo, en cobalto muy tenue */
.about-visual { display: flex; justify-content: center; }
.about-orbit { width: 100%; max-width: 320px; height: auto; }
.about-orbit__ring { fill: none; stroke: var(--cobalt); stroke-width: 1; opacity: .22; }
.about-orbit__ring--dim { opacity: .14; }
.about-orbit__axis { stroke: var(--cobalt); stroke-width: 1; opacity: .15; }
.about-orbit__dot { fill: var(--cobalt); opacity: .7; }
.about-orbit__dot--sm { opacity: .5; }
.about-orbit__core { fill: var(--cobalt); opacity: .85; }
.about-orbit__spin {
  transform-origin: 160px 160px;
  animation: orbitspin 90s linear infinite;
}

/* Franja discreta de 3 principios (rótulos en cobalto) */
.about-principles {
  list-style: none;
  margin: 56px 0 0;
  padding: 30px 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.about-principles li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.about-principles li::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 2px;
  background: var(--cobalt);
}
.about-principles__label {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cobalt);
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { order: -1; justify-content: flex-start; }
  .about-orbit { max-width: 220px; }
}
@media (max-width: 620px) {
  .about-principles { grid-template-columns: 1fr; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .about-orbit__spin { animation: none; }
}

/* =========================================================================
   CONTACTO — cierre de impacto en antracita con acento cobalto (zona XION-AI).
   Canal principal: WhatsApp. Sin amarillo/teal. Sin formulario.
   ========================================================================= */
.section-contact {
  position: relative;
  background: var(--anthracite);
  color: var(--bg);
  overflow: hidden;
  padding: 116px 24px;
}
.section-contact__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 420px at 86% 18%, rgba(42,79,224,.22), transparent 70%),
    linear-gradient(to right, rgba(248,249,250,.04) 1px, transparent 1px) 0 0 / 54px 54px,
    linear-gradient(to bottom, rgba(248,249,250,.04) 1px, transparent 1px) 0 0 / 54px 54px;
}
.section-contact__inner { position: relative; z-index: 1; }
.section-contact .kicker { margin-bottom: 22px; }
.section-contact .kicker__text { color: var(--cobalt-soft); }

.section-contact h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 56px);
  line-height: 1.04;
  letter-spacing: -.015em;
  margin: 0;
  max-width: 20ch;
  color: var(--bg);
  text-wrap: balance;
}
.section-contact__lead {
  margin: 22px 0 0;
  max-width: 58ch;
  font-size: 18px;
  line-height: 1.62;
  color: var(--text-on-dark);
  text-wrap: pretty;
}

/* Bloque CTA — WhatsApp protagonista */
.contact-cta {
  margin-top: 42px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 34px;
  background: var(--cobalt);
  color: var(--bg);
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.btn-whatsapp:hover {
  background: var(--cobalt-dark);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(42, 79, 224, .35);
}
.btn-whatsapp__icon { flex: 0 0 auto; display: block; }
.contact-cta__reassure {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-on-dark);
}

/* Alternativa discreta: email */
.contact-alt {
  margin: 30px 0 0;
  font-size: 15px;
  color: var(--steel);
}
.contact-alt a { color: var(--cobalt-soft); }
.contact-alt a:hover { color: var(--bg); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  background: var(--anthracite);
  color: var(--text-on-dark);
  padding: 56px 24px;
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.site-footer img { height: 24px; width: auto; display: block; }
.site-footer__legal {
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* =========================================================================
   REVELADO AL HACER SCROLL
   ========================================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.22,.7,.3,1),
              transform .6s cubic-bezier(.22,.7,.3,1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Respeta la preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero__orbit .spin { animation: none; }
}

/* =========================================================================
   RESPONSIVE — punto de corte a 1040px (coincide con el diseño original)
   ========================================================================= */
@media (max-width: 1039px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
}

/* En pantallas muy estrechas el conmutador de idioma cede sitio al CTA */
@media (max-width: 479px) {
  .lang { display: none; }
}

/* =========================================================================
   BANNER DE COOKIES (RGPD) + enlace "Configurar cookies" del footer.
   Zona XION-AI: cobalto/antracita/neutros. Aceptar = cobalto; ambos botones
   con el mismo peso visual (Rechazar NUNCA escondido ni gris apagado).
   ========================================================================= */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;                 /* por encima del header (60) */
  background: var(--anthracite);
  color: var(--bg);
  border-top: 1px solid rgba(248, 249, 250, .16);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .28);
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
}
.cookie-banner__text {
  margin: 0;
  flex: 1 1 420px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-on-dark);
}
.cookie-banner__link { color: var(--cobalt-soft); text-decoration: underline; }
.cookie-banner__link:hover { color: var(--bg); }

.cookie-banner__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}
.cookie-btn {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 11px 24px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
/* Aceptar — cobalto sólido */
.cookie-btn--accept {
  background: var(--cobalt);
  color: var(--bg);
  border-color: var(--cobalt);
}
.cookie-btn--accept:hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); }
/* Rechazar — mismo tamaño y bien visible (contorno claro, texto claro) */
.cookie-btn--reject {
  background: transparent;
  color: var(--bg);
  border-color: rgba(248, 249, 250, .45);
}
.cookie-btn--reject:hover { border-color: var(--bg); background: rgba(248, 249, 250, .08); }
/* Foco visible por teclado en ambos */
.cookie-btn:focus-visible {
  outline: 2px solid var(--cobalt-soft);
  outline-offset: 2px;
}

/* Enlace pequeño del footer para reabrir la configuración */
.site-footer__cookies {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--steel);
  transition: color .2s ease;
}
.site-footer__cookies:hover { color: var(--cobalt-soft); }
.site-footer__cookies:focus-visible {
  outline: 2px solid var(--cobalt-soft);
  outline-offset: 3px;
}

/* Móvil: los botones ocupan el ancho y el banner respira */
@media (max-width: 560px) {
  .cookie-banner__actions { width: 100%; }
  .cookie-btn { flex: 1 1 0; text-align: center; }
}

/* =========================================================================
   ENLACES LEGALES EN EL FOOTER (index) — sobre fondo antracita
   ========================================================================= */
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}
.site-footer__links a {
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  transition: color .2s ease;
}
.site-footer__links a:hover { color: var(--cobalt-soft); }

/* =========================================================================
   PÁGINAS LEGALES (aviso-legal · privacidad · cookies) — zona XION-AI.
   Base clara, texto antracita, enlaces cobalto. Sin amarillo/teal.
   ========================================================================= */
.legal-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.legal-header__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.legal-header__brand { display: block; flex: 0 0 auto; }
.legal-header__brand img { height: 24px; width: auto; display: block; }
.legal-back {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cobalt);
  white-space: nowrap;
}
.legal-back:hover { color: var(--cobalt-dark); }

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}
.legal__updated {
  display: inline-block;
  margin-bottom: 30px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-tech);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.legal h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 0 10px;
  color: var(--anthracite);
  text-wrap: balance;
}
.legal h2 {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .01em;
  margin: 42px 0 12px;
  color: var(--anthracite);
}
.legal h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  margin: 24px 0 8px;
  color: var(--anthracite);
}
.legal p,
.legal li { font-size: 16px; line-height: 1.7; color: var(--text); }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--cobalt); }
.legal a:hover { color: var(--cobalt-dark); }
.legal strong { color: var(--anthracite); }
.legal__lead { font-size: 17px; color: var(--text-muted); }

/* Bloque de datos de la empresa */
.legal__data {
  margin: 0 0 18px;
  padding: 18px 22px;
  list-style: none;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.legal__data li { margin: 5px 0; color: var(--text); }

/* Tabla de cookies */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 15px;
}
.legal-table th,
.legal-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.legal-table th {
  background: var(--surface-alt);
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--anthracite);
}
.legal-table td { color: var(--text-muted); }

/* Pie mínimo de las páginas legales */
.legal-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Tabla con scroll en móvil */
@media (max-width: 560px) {
  .legal-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* =========================================================================
   PÁGINA 404 (Cloudflare Pages sirve /404.html en rutas inexistentes)
   ========================================================================= */
.notfound {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px 24px 110px;
  text-align: center;
}
.notfound__code {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(72px, 15vw, 150px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--cobalt);
}
.notfound h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.1;
  margin: 14px 0 0;
  color: var(--anthracite);
}
.notfound p {
  margin: 16px auto 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
}
.notfound__cta { margin-top: 32px; }
