/* ============================================================
   Kai Strategy Lab — hoja de estilos corporativa
   Sistema visual "Kai claro": fondo slate-50 con gradientes
   radiales teal/azul, tarjetas blancas, acento teal-700.
   CSS propio (sin frameworks) para carga rápida y CWV altos.
   ============================================================ */

:root {
  /* Fondos */
  --bg-page: #f8fafc;
  --bg-section: #f1f5f9;
  --bg-card: #ffffff;
  --bg-accent-soft: #f0fdfa;

  /* Texto */
  --text-heading: #020617;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  /* Bordes */
  --border-soft: #e2e8f0;
  --border-subtle: #f1f5f9;

  /* Primario teal */
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #14b8a6;
  --primary-soft: #ccfbf1;
  --primary-bg: #f0fdfa;

  /* Acentos */
  --accent-blue: #2563eb;
  --accent-blue-soft: #dbeafe;
  --accent-green: #059669;
  --accent-green-soft: #d1fae5;
  --accent-amber: #d97706;
  --accent-amber-soft: #fef3c7;
  --accent-violet: #7c3aed;
  --accent-violet-soft: #ede9fe;

  /* Footer oscuro */
  --dark: #0f172a;
  --dark-2: #1e293b;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.14);
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.10), transparent 28%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 26%),
    var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

::selection { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: 10px 18px;
  border-end-end-radius: 12px; font-weight: 600; font-size: 0.9rem;
}
.skip-link:focus { inset-inline-start: 0; color: #fff; }

:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Tipografía ---------- */
h1, h2, h3, .display { font-family: var(--font-display); color: var(--text-heading); }

h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text-main);
  text-wrap: balance;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
}

p { color: var(--text-secondary); text-wrap: pretty; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-secondary);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  margin-bottom: 14px;
}

.accent { color: var(--primary); }

/* ---------- Layout ---------- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section-tight { padding: 56px 0; }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { margin-top: 14px; font-size: 1.06rem; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

/* La cabecera respira más ancho que el cuerpo: los ocho ítems del nav más el
   botón de socios y el selector de idioma no caben en los 1180px del cuerpo. */
.site-header .container { max-width: 1400px; }

.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 20px;
}

.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.06rem; letter-spacing: -0.02em;
  color: var(--text-main);
  white-space: nowrap;
}
.brand:hover { color: var(--text-main); }
.brand svg { width: 32px; height: 32px; flex-shrink: 0; }

.nav-links { display: flex; align-items: center; gap: 15px; list-style: none; }
.nav-links a {
  font-size: 0.88rem; font-weight: 500; color: var(--text-secondary);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--primary); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff !important;
  padding: 9px 15px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }

.nav-partners {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 12px;
  border: 1px solid var(--primary); color: var(--primary);
  font-size: 0.88rem; font-weight: 600; white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nav-partners:hover { background: var(--primary); color: #fff; text-decoration: none; transform: translateY(-1px); }
.nav-partners svg { flex: 0 0 auto; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 8px; cursor: pointer; color: var(--text-main);
}

/* ---------- Selector de idioma (bandera actual + desplegable) ---------- */
.lang-switch { position: relative; display: flex; align-items: center; }
.lang-current {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 10px; border-radius: 10px;
  border: 1px solid var(--border-soft); background: #fff;
  font-family: var(--font-body); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.05em;
  color: var(--text-secondary); cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.lang-current:hover { color: var(--primary-dark); border-color: var(--primary-light); }
.lang-current svg:not(.chev), .lang-menu svg {
  width: 20px; height: 13.5px; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.10);
  flex-shrink: 0;
}
.lang-current .chev { width: 13px; height: 13px; color: var(--text-soft); transition: transform 0.2s ease; }
.lang-current[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 60;
  margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--border-soft); border-radius: 12px;
  box-shadow: var(--shadow-md); min-width: 200px;
  display: grid; gap: 2px;
}
.lang-menu[hidden] { display: none; }
.lang-menu li { border: none; }
.lang-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 0.88rem; font-weight: 500; color: var(--text-main); white-space: nowrap;
}
.lang-menu a:hover { background: var(--primary-bg); color: var(--primary-dark); }

/* Cabecera reducida de las páginas legales: solo el selector de idioma, sin
   menú ni hamburguesa. Necesita su propia clase porque el bloque móvil de
   abajo convierte .nav-links en un panel `position:absolute` con fondo blanco;
   forzarlo con `style="display:flex"` (como estaba) solo pisaba el `display` y
   dejaba el panel flotando a sangre bajo la cabecera en TODO viewport ≤1360px,
   en las 52 páginas legales. (Auditoría 2026-07-24, hallazgo 1.8.) */
.nav-links--bare {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-inline-start: auto;
}

@media (max-width: 1360px) {
  .nav-toggle { display: inline-flex; }
  .nav-links:not(.nav-links--bare) {
    display: none;
    position: absolute; top: 68px; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border-soft);
    padding: 10px 24px 18px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links:not(.nav-links--bare) li { border-bottom: 1px solid var(--border-subtle); }
  .nav-links:not(.nav-links--bare) li:last-child { border-bottom: none; padding-top: 12px; }
  .nav-links:not(.nav-links--bare) a { display: block; padding: 13px 2px; font-size: 1rem; }
  .nav-cta { justify-content: center; }
  /* Dentro del menú móvil el desplegable de idioma se expande en línea */
  .nav-links .lang-switch { border-bottom: none; padding: 14px 0 4px; display: block; }
  .nav-links .lang-current { padding: 8px 12px; font-size: 0.8rem; }
  .nav-links .lang-menu {
    position: static; box-shadow: none; margin-top: 8px;
    border-color: var(--border-subtle); min-width: 0;
  }
  .nav-links .lang-menu a { display: flex; padding: 11px 12px; font-size: 0.95rem; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 13px;
  font-family: var(--font-body); font-size: 0.97rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn svg { width: 17px; height: 17px; transition: transform 0.2s ease; }
.btn:hover svg { transform: translateX(3px); }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px -8px rgba(15, 118, 110, 0.55); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }

.btn-ghost { background: #fff; color: var(--text-main); border-color: var(--border-soft); }
.btn-ghost:hover { border-color: var(--primary-light); color: var(--primary-dark); transform: translateY(-1px); }

.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: var(--primary-bg); color: var(--primary-dark); transform: translateY(-1px); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 12px;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em;
}
.badge-teal { background: var(--primary-bg); color: var(--primary); border: 1px solid #99f6e4; }
.badge-green { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-slate { background: #f1f5f9; color: #475569; border: 1px solid var(--border-soft); }
.badge-amber { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

.dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.card-lg { border-radius: var(--radius-lg); padding: 36px; border-color: var(--border-soft); }

.card-hover { transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease; }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #cbd5e1; }

/* En /herramientas/ los títulos de tarjeta son <h2> por la misma razón que los
   del pie: son las secciones de esa página. Se les da el tamaño de un h3 para
   que la retícula de tarjetas siga viéndose igual en todo el sitio. */
.card h3, .card h2 { margin-bottom: 10px; }
.card h2 {
  font-size: 1.2rem; line-height: 1.3; font-weight: 700;
  color: #1e293b; letter-spacing: -0.01em; text-wrap: initial;
}
.card p { font-size: 0.95rem; }

.icon-tile {
  width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; flex-shrink: 0;
}
.icon-tile svg { width: 21px; height: 21px; }
.tile-teal { background: var(--primary-bg); color: var(--primary); }
.tile-blue { background: #eff6ff; color: var(--accent-blue); }
.tile-green { background: #ecfdf5; color: var(--accent-green); }
.tile-amber { background: #fffbeb; color: var(--accent-amber); }
.tile-slate { background: #f1f5f9; color: var(--text-secondary); }
/* Kai BuildArt: teal, blue, green y amber ya estaban ocupados y tile-slate es gris
   apagado; un producto que se promociona no puede entrar con el tono "atenuado".
   Hoy la vitrina son ocho productos y cada uno tiene su tile: al añadir el noveno,
   el color nuevo va aquí y NUNCA se reutiliza tile-slate. */
.tile-violet { background: #f5f3ff; color: var(--accent-violet); }
/* Kai Insight (cyan #0891b2) y Kai TasteMap (rose): mismo par fondo-50 / icono-600 que
   el resto de la familia de tiles — el color identitario va en el icono, no en el fondo. */
.tile-cyan { background: #ecfeff; color: #0891b2; }
.tile-rose { background: #fff1f2; color: #e11d48; }

.num {
  font-family: var(--font-display);
  font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em;
  color: var(--primary);
}

/* ---------- Hero ---------- */
.hero { padding: 84px 0 72px; position: relative; overflow: hidden; }
.hero-inner { max-width: 830px; position: relative; }
.hero h1 { margin: 18px 0 22px; }
.hero .lead { max-width: 640px; }

.hero-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin: 26px 0 30px;
  font-size: 0.9rem; font-weight: 600; color: var(--text-muted);
}
.hero-tags span { display: inline-flex; align-items: center; gap: 8px; }
.hero-tags .dot { background: var(--primary-light); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.hero-note { font-size: 0.9rem; color: var(--text-muted); max-width: 560px; }

.hero-orbit {
  position: absolute; inset-inline-end: -140px; top: -60px;
  width: 520px; height: 520px; opacity: 0.55; pointer-events: none;
}
@media (max-width: 1080px) { .hero-orbit { display: none; } }

/* ---------- Panel / bloques ---------- */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 40px;
}
@media (max-width: 640px) { .panel { padding: 26px; } .card { padding: 22px; } .card-lg { padding: 26px; } }

.check-row { display: flex; gap: 14px; align-items: flex-start; }
.check-row svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; margin-top: 3px; }
.check-row h3 { font-size: 1.02rem; margin-bottom: 4px; }
.check-row p { font-size: 0.92rem; }

/* ---------- Chips de portafolio ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #f8fafc; border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  border-radius: 999px; padding: 6px 13px;
  font-size: 0.83rem; font-weight: 500;
}
.chip strong { color: var(--text-main); font-weight: 600; }

/* ---------- Banda CTA ---------- */
.cta-band {
  background: linear-gradient(120deg, #0f766e 0%, #0d9488 55%, #115e59 100%);
  border-radius: var(--radius-lg);
  padding: 52px 48px;
  color: #fff;
  position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset-inline-end: -80px; top: -80px;
  width: 340px; height: 340px; border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 65%);
}
.cta-band h2 { color: #fff; max-width: 720px; position: relative; }
.cta-band p { color: #ccfbf1; margin-top: 14px; max-width: 640px; position: relative; }
.cta-band .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; position: relative; }
.cta-band .note { font-size: 0.88rem; color: #99f6e4; }
.cta-band a.mail { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .cta-band { padding: 34px 26px; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: #cbd5e1;
  margin-top: 88px;
  padding: 56px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
@media (max-width: 920px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .brand { color: #f8fafc; margin-bottom: 14px; }
.footer-brand p { color: #94a3b8; font-size: 0.9rem; max-width: 300px; }

/* Los títulos de columna del pie son <h2> por jerarquía (auditoría SEO/GEO
   2026-09-06: eran <h4> y las páginas de herramientas saltaban de <h1> a <h4>),
   pero visualmente siguen siendo la etiqueta pequeña de siempre. El nivel
   semántico y el tamaño son cosas distintas y aquí divergen a propósito. */
.site-footer h2 {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: #5eead4; margin-bottom: 16px;
  font-family: var(--font-body); line-height: 1.3; text-wrap: initial;
}
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer ul a { color: #cbd5e1; font-size: 0.92rem; }
.site-footer ul a:hover { color: #5eead4; }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px; padding-top: 26px;
  font-size: 0.85rem; color: #94a3b8;
}
.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #5eead4; }
.footer-motto { font-weight: 600; color: #e2e8f0; letter-spacing: 0.01em; }

/* ---------- Página legal ---------- */
.legal-main { max-width: 780px; margin: 0 auto; padding: 56px 24px 40px; }
.legal-main h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 10px 0 8px; }
.legal-updated { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 34px; }
.legal-courtesy {
  font-size: 0.9rem; color: var(--text-muted); font-style: italic;
  background: var(--bg-section); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 10px 16px; margin: -20px 0 30px;
}
/* Enlace a la versión española de esta misma página. En redonda y subrayado para
   que se lea como acción y no se pierda dentro de la cursiva apagada del aviso:
   es el único camino del lector hacia el documento que sí es vinculante. */
.legal-courtesy a { font-style: normal; text-decoration: underline; white-space: nowrap; }
.legal-main h2 { font-size: 1.25rem; margin: 34px 0 10px; }
.legal-main p, .legal-main li { font-size: 0.98rem; color: var(--text-secondary); margin-bottom: 12px; }
.legal-main ul { padding-inline-start: 22px; }
.legal-nav {
  margin: 48px auto 0; max-width: 780px; padding: 22px 24px 0;
  border-top: 1px solid var(--border-soft);
  font-size: 0.9rem; color: var(--text-muted);
}
.legal-nav p { margin-bottom: 10px; }

/* ---------- Preguntas (bloque citable, auditoría SEO/GEO 2026-09-06) ----------
   `<details>` y no un acordeón con JavaScript: el texto de las respuestas está
   SIEMPRE en el HTML, plegado o no. Un bloque que solo existe cuando alguien lo
   pulsa no lo puede leer un rastreador ni citarlo un asistente, y este bloque
   existe justamente para que lo citen. Además funciona sin JavaScript, que es
   lo que sostiene la CSP del sitio. */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: flex-start; gap: 12px;
}
/* El triángulo por defecto se sustituye por uno propio que gira: el nativo no
   se puede colorear ni alinear igual en todos los navegadores. */
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 9px; height: 9px;
  margin-inline-start: auto; margin-top: 7px;
  flex-shrink: 0;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary h3 { font-size: 1.04rem; font-weight: 600; margin: 0; }
.faq summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 6px; }
.faq details p { margin-top: 12px; color: var(--text-secondary); font-size: 0.97rem; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
@media (max-width: 640px) { .faq details { padding: 16px 18px; } }

/* ---------- Animaciones ---------- */
.fade-in { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .btn, .card-hover, .nav-cta { transition: none; }
}

/* ---------- Utilidades ----------
   Con !important: las dos páginas de herramientas enlazan tailwind-canvas.css
   DESPUÉS de esta hoja, y Tailwind define clases homónimas (.mt-2, .mb-3…) con
   otros valores. Ese CSS se genera en el build desde 2026-07-24 (antes venía del
   CDN, que compilaba en el navegador), pero sigue cargándose después: el orden es
   lo que obliga al !important, no de dónde venga el archivo. */
.mt-1 { margin-top: 8px !important; } .mt-2 { margin-top: 16px !important; } .mt-3 { margin-top: 24px !important; } .mt-4 { margin-top: 36px !important; }
.mb-2 { margin-bottom: 16px !important; } .mb-3 { margin-bottom: 24px !important; }
.small { font-size: 0.88rem; color: var(--text-muted); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border-soft), transparent); margin: 8px 0; }
.arrow-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 0.95rem; color: var(--primary);
}
.arrow-link svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.arrow-link:hover svg { transform: translateX(3px); }

/* ============================================================
   RTL — el árabe (idioma 14, desde el 2026-08-16)

   Este bloque es CORTO a propósito. Casi todo el volteo lo hace ya
   `dir="rtl"` sobre las propiedades lógicas del resto de la hoja
   (inset-inline-*, margin-inline-*, padding-inline-*), que se
   escribieron así justamente para no necesitar un espejo aparte.
   Aquí vive solo lo que el CSS lógico NO puede expresar y lo que la
   escritura árabe exige por sí misma.
   Detalle y cicatrices: kai-transversal/LECCIONES-RTL-KAI.md §4 y §5.
   ============================================================ */

/* 1 · La fuente. Inter y Outfit no traen glifos árabes.
   El orden del stack no es cosmético: el navegador resuelve la fuente
   GLIFO A GLIFO, así que dejando Inter/Outfit delante también en árabe,
   el latín incrustado (Kai Strategy Lab, PESTEL, CSV, TLS, NIT) se pinta
   con la MISMA fuente que en los otros 13 idiomas y solo los glifos
   árabes caen a Noto. Un stack, dos escrituras coherentes. */
html[lang="ar"] {
  --font-body: 'Inter', 'Noto Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
}

/* 2 · letter-spacing: 0. No es preferencia estética, es composición.
   El árabe es una escritura CONECTADA: las letras se enlazan dentro de
   la palabra. Cualquier tracking rompe esas ligaduras y el texto se lee
   descosido — y aquí hay de los dos signos: el negativo de los títulos
   (hasta -0.045em en h1) y el positivo de los eyebrows (+0.16em), que es
   el que más daño hace porque literalmente separa letra de letra.
   `html[lang="ar"] .clase` (0,2,1) le gana a `.clase` (0,1,0) sin
   necesidad de !important. */
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .display,
html[lang="ar"] .brand,
html[lang="ar"] .eyebrow,
html[lang="ar"] .badge,
html[lang="ar"] .num,
html[lang="ar"] .lang-current,
html[lang="ar"] .site-footer h2,
html[lang="ar"] .footer-motto { letter-spacing: 0; }

/* 3 · Interlineado. El árabe tiene ascendentes y descendentes más largas
   que el latín. El `line-height: 1.02` del h1 —que en Inter es un titular
   apretado y elegante— en árabe llega a solapar trazos entre líneas. */
html[lang="ar"] h1 { line-height: 1.25; }
html[lang="ar"] h2 { line-height: 1.35; }

/* 4 · `translateX` es FÍSICO y no existe versión lógica suya.
   Las flechas de botones y enlaces avanzan al pasar el ratón; en una
   página que va de derecha a izquierda, «avanzar» es hacia la izquierda.
   Sin esta regla la flecha se ALEJA del texto en vez de señalarlo. */
html[dir="rtl"] .btn:hover svg,
html[dir="rtl"] .arrow-link:hover svg { transform: translateX(-3px); }

/* ⚠️ Las banderas del selector NO se espejan: una bandera es invariante.
   Hoy no hay nada que hacer —ningún transform las toca y `dir` no voltea
   dibujos, solo texto y cajas—, y esta nota existe para que nadie añada
   más adelante un `scaleX(-1)` «para completar el espejo». */
