/* ============================================================
   CLARITY STATE AI — premium.css
   ADITIVO. Se carga DESPUÉS de styles.css y multipagina.css en todas
   las páginas. Capa de refinamiento editorial (nivel Aaru / Arkham):
   - Monospace para datos y eyebrows (move de Arkham).
   - Tracking negativo + text-wrap balance en display.
   - Ritmo, profundidad y micro-interacciones.
   - Scroll-reveal sutil (respeta prefers-reduced-motion; no-JS = visible).
   No modifica styles.css ni multipagina.css.
   2026-06-16 — fase de corrección.
   ============================================================ */

:root {
  /* Fuente de etiquetas/eyebrows: Hanken Grotesk (neutra, cálida). Reemplazó a IBM Plex Mono
     para quitar el aire "de plantilla de IA". Se mantiene el nombre --f-mono por compatibilidad. */
  --f-mono: 'Hanken Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Tipografía editorial ---------- */
/* Display: tracking negativo + balance de línea (evita viudas) */
.hero-title,
.page-hero-title,
.section-headline,
.cred-founder-name,
.recurso-card h3 {
  text-wrap: balance;
  letter-spacing: -0.02em;
}
.hero-title { letter-spacing: -0.025em; }

/* Cuerpo: text-wrap pretty (remate de líneas más parejo) */
.hero-subtitle,
.page-hero-lede,
.section-lead,
.cta-lead,
.narrative-body p,
.pilar-desc,
.faq-answer,
.trust-card p,
.cred-founder-line { text-wrap: pretty; }

/* ---------- Monospace para DATOS y EYEBROWS (Arkham) ---------- */
.eyebrow,
.prueba-tag,
.trust-tag,
.fase-num,
.cred-trust-label,
.showcase-bar small,
.recurso-tag {
  font-family: var(--f-mono);
  font-weight: 500;
  letter-spacing: 0.16em;
}
.eyebrow { font-size: 0.72rem; }

/* Cifras grandes en mono tabular: se leen como dato medido, no marketing */
.stat-num,
.showcase-stat-num {
  font-family: var(--f-mono);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Risk-reversal microcopy bajo los CTA ---------- */
.cta-reassure {
  display: block;
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.cta-reassure b { color: var(--text-primary); font-weight: 600; }
.hero-buttons + .cta-reassure { margin-top: 18px; }

/* ---------- Profundidad / detalle caro ---------- */
/* Hairline superior en secciones oscuras consecutivas, para ritmo */
.section + .section { position: relative; }

/* Micro-interacción consistente en tarjetas-enlace */
.trust-card,
.recurso-card,
a.pilar-card { transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition); }

/* Tarjetas de los 3 frentes: realce de jerarquía con número de orden */
.pilares-grid--3 .pilar-card { position: relative; }

/* Acento de subrayado editorial en enlaces de texto del cuerpo */
.narrative-body a { text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* ---------- Scroll-reveal (sutil) ----------
   El estado oculto SOLO aplica cuando <html> tiene .cs-reveal (la pone el JS).
   Sin JS, todo queda visible (sin FOUC, SEO-safe). */
.cs-reveal .cs-rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.cs-reveal .cs-rv.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .cs-reveal .cs-rv { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Pulido fino de jerarquía ---------- */
/* Más aire bajo el eyebrow para el ritmo "una idea por pantalla" */
.section-headline { margin-bottom: 32px; }

/* Cita editorial: que respire como en Aaru/Arkham */
.pull-quote--testimonio { letter-spacing: -0.01em; }

/* Botón primario: foco accesible visible (teclado) */
.btn-primary:focus-visible,
.btn-text:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

/* ============================================================
   FIX DE CONTRASTE — componentes nuevos dentro de section-light
   (2026-06-16). Los overrides de section-light en styles.css no
   cubrían .stat, .includes-list ni .cred-*; quedaban ilegibles.
   premium.css carga al final, así que estas reglas ganan por orden.
   ============================================================ */

/* La prueba (#prueba): cifra y textos sobre fondo claro */
.section-light .stat-label { color: var(--text-on-light); }
.section-light .stat-source { color: var(--text-on-light-muted); }
.section-light .stat-num { color: var(--accent-on-light); }

/* Lista de entregables / "cómo trabajamos" sobre fondo claro */
.section-light .includes-list li { color: var(--text-on-light); }
.section-light .includes-list li::before {
  background: rgba(29, 78, 216, 0.10);
  border-color: var(--accent-on-light);
}
.section-light .includes-list li::after { color: var(--accent-on-light); }

/* Quién responde (#quien-responde): card del fundador como superficie clara */
.section-light .cred-founder {
  background: var(--card-on-light);
  border-color: var(--border-on-light);
}
.section-light .cred-founder { border-left-color: var(--accent-on-light); }
.section-light .cred-founder-role { color: var(--accent-on-light); }
.section-light .cred-photo { border-color: var(--border-on-light-strong); }
.section-light .cred-trust-block {
  background: var(--card-on-light);
  border-color: var(--border-on-light);
}
.section-light .cred-trust-label { color: var(--text-on-light-muted); }

/* Formulario dentro de section-light: etiquetas e inputs legibles */
.section-light .form-label { color: var(--text-on-light); }
.section-light .form-input,
.section-light .form-textarea {
  background: #fff;
  border-color: var(--border-on-light);
  color: var(--text-on-light);
}
.section-light .form-input::placeholder,
.section-light .form-textarea::placeholder { color: var(--text-on-light-muted); }
.section-light .form-hint { color: var(--text-on-light-muted); }

/* ============================================================
   COMPONENTES FASE 8AM (2026-06-16)
   Carrusel de ejecuciones · Alianza 27RL · Ecuación de valor.
   ============================================================ */

/* ---- Carrusel de ejecuciones (#ejecuciones, fondo oscuro) ---- */
.exec-carousel {
  margin-top: 40px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
@media (min-width: 920px) {
  .exec-carousel { grid-template-columns: repeat(3, 1fr); grid-auto-flow: row; overflow: visible; }
}
.exec-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border-radius: 16px;
  background: rgba(18, 26, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.exec-area {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.exec-sit {
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
}
.exec-act {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}
.exec-out {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent-light);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
}

/* ---- Alianza 27 Risk Lab (#alianza, fondo oscuro) ---- */
.alianza-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 820px) { .alianza-grid { grid-template-columns: 1fr; } }
.alianza-body .includes-list { margin-top: 20px; }
.alianza-mark {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 220px;
  padding: 36px;
  border-radius: 16px;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.10), rgba(18,26,36,0.55));
  border: 1px solid var(--border-accent);
}
/* Grid de fondo sutil (eco del particle field), detrás del logo */
.alianza-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
}
.alianza-logo {
  position: relative;
  z-index: 1;
  width: min(200px, 62%);
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}
.alianza-mark-tag {
  position: relative;
  z-index: 1;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Ecuación de valor (#metodologia, fondo claro) ---- */
.value-eq {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border-on-light);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 720px) { .value-eq { grid-template-columns: 1fr; } }
.value-eq-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
  border-right: 1px solid var(--border-on-light);
}
.value-eq-item:last-child { border-right: none; }
@media (max-width: 720px) {
  .value-eq-item { border-right: none; border-bottom: 1px solid var(--border-on-light); }
  .value-eq-item:last-child { border-bottom: none; }
}
.value-eq-k {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-on-light);
}
.value-eq-v {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-on-light);
}
