/* =================================================================
   KamioSystems — styles.css
   Landing de una sola página. Objetivo único: solicitar diagnóstico.
   Estructura modelada al estilo "sistemas" (hero + enfoque + proceso
   + sistemas + resultados + diagnóstico). Mobile-first.
   ================================================================= */

/* -----------------------------------------------------------------
   1. VARIABLES (paleta fija — no cambiar valores)
   ----------------------------------------------------------------- */
:root {
  --bg-primary:     #FFFFFF;
  --bg-secondary:   #F0F2F5;
  --border:         #D0D8E8;
  --accent:         #1A4FCC;
  --text-secondary: #3A3A4A;
  --text-primary:   #0A0A14;

  /* Derivados permitidos: solo opacidad/mezcla de la paleta base */
  --accent-soft:    rgba(26, 79, 204, 0.12);
  --accent-ring:    rgba(26, 79, 204, 0.45);
  --accent-deep:    color-mix(in srgb, var(--accent) 85%, var(--text-primary));
  --shadow-cta:     0 12px 28px rgba(26, 79, 204, 0.28);
  --shadow-card:    0 8px 30px rgba(10, 10, 20, 0.06);
  --shadow-glow:    0 12px 32px rgba(26, 79, 204, 0.10);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1120px;
  --pad-x: 1.25rem;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* -----------------------------------------------------------------
   2. RESET / BASE
   ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* scroll-behavior NO se declara "smooth" aquí a propósito: Lenis
   (main.js) ya gestiona el scroll suave en JS, y mezclarlo con el
   smooth-scroll nativo del navegador hace que compitan frame a
   frame — el scroll se vuelve lentísimo y con tirones. Si Lenis no
   carga (o prefers-reduced-motion), queda el salto nativo instantáneo. */
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-secondary);
  background: var(--bg-primary);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { color: var(--text-primary); line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
em { font-style: normal; color: var(--accent); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-x); }

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

/* -----------------------------------------------------------------
   2b. FONDO GLOBAL (canvas de red de nodos + gradiente estático)
   El canvas vive detrás de todo el contenido; las secciones con
   fondo usan una versión ligeramente translúcida para dejarlo
   respirar. Con prefers-reduced-motion el canvas se oculta y queda
   solo el gradiente estático del contenedor.
   ----------------------------------------------------------------- */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%,  rgba(26, 79, 204, 0.07) 0%, transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(26, 79, 204, 0.05) 0%, transparent 46%);
}
.bg-canvas canvas { width: 100%; height: 100%; display: block; }

/* El contenido se pinta por encima del canvas */
main, .site-footer { position: relative; z-index: 1; }

/* -----------------------------------------------------------------
   3. SECCIONES, EYEBROW Y TÍTULOS
   ----------------------------------------------------------------- */
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section--alt {
  background: var(--bg-secondary);
  background: color-mix(in srgb, var(--bg-secondary) 84%, transparent);
}

/* Anclas: que el header fijo no tape el inicio de la sección */
main section[id] { scroll-margin-top: 84px; }

/* Eyebrow numerado tipo "01 / El enfoque" */
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}
.section__eyebrow span {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
}

.section__title {
  font-size: clamp(1.6rem, 4.4vw, 2.6rem);
  max-width: 18ch;
  margin-bottom: 2.5rem;
}
/* Titulares grandes en mayúsculas, estilo "sistemas" */
.section__title--xl {
  font-size: clamp(1.9rem, 5.2vw, 3.2rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-bottom: 1.25rem;
}

/* -----------------------------------------------------------------
   4. BOTONES
   ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}
.btn--sm { padding: 0.55rem 1.05rem; font-size: 0.92rem; }
.btn--lg { padding: 1rem 1.8rem; font-size: 1.06rem; }

.btn--primary { background: var(--accent); color: var(--bg-primary); }
.btn--primary:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-cta);
  background: var(--accent);
  background: var(--accent-deep);
}

.btn--ghost { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn--ghost:hover { transform: scale(1.03); border-color: var(--accent); color: var(--accent); }

/* -----------------------------------------------------------------
   5. PRELOADER
   ----------------------------------------------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--bg-primary);
}
.preloader__inner { text-align: center; width: min(80vw, 360px); }
.preloader__brand {
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}
.preloader__word { display: inline-flex; overflow: hidden; }
.preloader__char { display: inline-block; transform: translateY(110%); }
.preloader__bar {
  height: 3px;
  width: 100%;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.preloader__bar-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 999px; }
.preloader__count {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.preloader.is-hidden { opacity: 0; transform: translateY(-30px); pointer-events: none; }

/* -----------------------------------------------------------------
   6. CURSOR PERSONALIZADO (solo desktop)
   ----------------------------------------------------------------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transform: translate(-50%, -50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid var(--accent);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
body.cursor-enabled .cursor-dot,
body.cursor-enabled .cursor-ring { opacity: 1; }
body.cursor-enabled { cursor: none; }
body.cursor-enabled a,
body.cursor-enabled button { cursor: none; }
.cursor-ring.cursor-hover {
  width: 60px; height: 60px;
  background: var(--accent-soft);
  border-color: var(--accent);
}
.cursor-dot.cursor-hover { opacity: 0; }

/* -----------------------------------------------------------------
   7. HEADER + NAV
   ----------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding-block: 0.85rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(10, 10, 20, 0.04);
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--text-primary); }
.brand__name { font-size: 1.05rem; letter-spacing: -0.02em; }
.brand__mark {
  width: 22px; height: 22px;
  flex: none;
  object-fit: contain;
  display: block;
  border-radius: 5px;
}

/* Nav: oculta en móvil, visible en desktop */
.site-nav { display: none; gap: 1.75rem; }
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s var(--ease);
}
.site-nav a:hover { color: var(--text-primary); }
.site-nav a:hover::after { width: 100%; }
/* Estado activo según la sección visible (scroll-spy en main.js) */
.site-nav a.is-active { color: var(--text-primary); }
.site-nav a.is-active::after { width: 100%; }

/* -----------------------------------------------------------------
   8. HERO
   ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  padding-bottom: 4rem;
  overflow: hidden;
}
.hero__inner { position: relative; z-index: 2; max-width: 820px; }

.hero__glow {
  position: absolute;
  top: -15%;
  left: -10%;
  width: min(65vw, 720px);
  height: min(65vw, 720px);
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 62%);
  filter: blur(30px);
  z-index: 0;
  pointer-events: none;
  animation: glowDrift 16s var(--ease) infinite alternate;
}
@keyframes glowDrift {
  from { transform: translate(0, 0) scale(1); opacity: 0.9; }
  to   { transform: translate(22%, 16%) scale(1.25); opacity: 1; }
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.hero__title {
  font-size: clamp(2.2rem, 7.4vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero__title .line { display: block; }
.hero__subtitle {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 2.25rem;
}
.hero__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.85rem; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__trust { font-size: 0.88rem; color: var(--text-secondary); opacity: 0.85; }

/* Chips de tipos de negocio */
.hero__cats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.hero__cats li {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

/* Decoración de flujos con parallax */
.hero__decor {
  position: absolute;
  top: 50%;
  right: -8%;
  transform: translateY(-50%);
  width: min(50vw, 560px);
  z-index: 1;
  opacity: 0.4;
  pointer-events: none;
}
.flow-node {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: nodePulse 3.2s var(--ease) infinite;
}
.flow-node:nth-child(2) { animation-delay: 0.4s; }
.flow-node:nth-child(3) { animation-delay: 0.8s; }
.flow-node:nth-child(4) { animation-delay: 1.2s; }
.flow-node:nth-child(5) { animation-delay: 1.6s; }
.flow-node:nth-child(6) { animation-delay: 2s; }
.flow-node:nth-child(7) { animation-delay: 2.4s; }
@keyframes nodePulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.12); }
}
.flow-line {
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 5 6;
  fill: none;
  opacity: 0.5;
  animation: flowDash 1s linear infinite;
}
@keyframes flowDash { to { stroke-dashoffset: -11; } }

/* Iconos dentro de los nodos (hoja de cálculo, correo, chat, panel) */
.flow-icon {
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0.85;
}

/* Pulso que recorre el camino entre nodos. Oculto si el navegador
   no soporta offset-path (queda solo el dash animado). */
.flow-pulse { fill: var(--accent); opacity: 0; }
@supports (offset-path: path("M0 0 L1 1")) {
  .flow-pulse {
    opacity: 1;
    offset-path: path("M120 100 L340 80 L410 270 L170 290 Z");
    animation: flowTravel 8s linear infinite;
  }
}
@keyframes flowTravel {
  from { offset-distance: 0%; }
  to   { offset-distance: 100%; }
}

.hero__scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 6px;
  z-index: 2;
}
.hero__scroll-line { width: 3px; height: 8px; background: var(--accent); border-radius: 999px; animation: scrollPulse 1.8s var(--ease) infinite; }
@keyframes scrollPulse { 0%,100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(6px); } }

/* -----------------------------------------------------------------
   9. BLOQUE 01 — PUNTO DE VISTA / PROBLEMA
   ----------------------------------------------------------------- */
.pov__body {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 58ch;
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem);
  line-height: 1.7;
}
.pains {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem);
}
.pain {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
@media (hover: hover) {
  .pain:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-glow); }
}
.pain__num {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}
.pain__title { font-size: 1.15rem; margin-bottom: 0.4rem; }
.pain__text { font-size: 0.98rem; color: var(--text-secondary); }

/* Camino de la automatización (etiquetas conectadas) */
.path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.path span {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-primary);
}
.path span:not(:last-child)::after {
  content: "→";
  margin-left: 0.85rem;
  color: var(--accent);
}

/* -----------------------------------------------------------------
   10. BLOQUE 02 — PROCESO
   ----------------------------------------------------------------- */
.proceso__lead {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 2.5rem;
}
.steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.step {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-card), var(--shadow-glow); border-color: var(--accent); }
.step__num {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.step__title { font-size: 1.3rem; margin-bottom: 0.5rem; }
.step__text { font-size: 1rem; color: var(--text-secondary); }

/* -----------------------------------------------------------------
   10b. BLOQUE 03 — CASOS DE USO (antes / después)
   ----------------------------------------------------------------- */
.cases__note {
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-width: 58ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.cases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.case {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
@media (hover: hover) {
  .case:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-glow); }
}
.case__title { font-size: 1.12rem; margin-bottom: 1.15rem; }
.case__state {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.75rem;
  align-items: start;
}
.case__state svg { width: 20px; height: 20px; grid-row: span 2; margin-top: 0.2rem; }
.case__tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.case__state p { grid-column: 2; font-size: 0.97rem; }
.case__state--before { color: var(--text-secondary); }
.case__state--before .case__tag { opacity: 0.7; }
.case__state--after p { color: var(--text-primary); font-weight: 600; }
.case__state--after svg,
.case__state--after .case__tag { color: var(--accent); }
.case__arrow { margin: 0.6rem 0; color: var(--accent); padding-left: 2px; }
.case__arrow svg { width: 20px; height: 36px; }
.case__arrow path { stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* -----------------------------------------------------------------
   11. BLOQUE 04 — DIAGNÓSTICO (test de dos paneles, paleta clara)
   Sección sobre fondo gris claro con el panel en blanco flotando.
   ----------------------------------------------------------------- */
.quiz {
  background: var(--bg-secondary);
  background: color-mix(in srgb, var(--bg-secondary) 84%, transparent);
  color: var(--text-secondary);
  --q-faint: rgba(58, 58, 74, 0.55); /* --text-secondary atenuado */
}
.quiz__wrap { display: grid; grid-template-columns: 1fr; gap: 2.25rem; }

/* --- Aside (título, progreso, stepper) --- */
.quiz__eyebrow,
.quiz__q-eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--q-faint);
  margin-bottom: 1rem;
}
.quiz__q-eyebrow { color: var(--accent); margin-bottom: 1.25rem; }

.quiz__heading {
  color: var(--text-primary);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.quiz__heading em { color: var(--accent); }
.quiz__sub { color: var(--text-secondary); max-width: 42ch; margin-bottom: 1.85rem; }

.quiz__progress {
  height: 5px;
  max-width: 240px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 2rem;
}
/* La barra se anima con transform (scaleX) — GSAP cuando está
   disponible; la transición CSS es el fallback sin GSAP. */
.quiz__progress-bar {
  height: 100%;
  width: 100%;
  background: var(--accent);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease);
}

/* Stepper vertical (aside) */
.stepper { display: grid; gap: 0.1rem; }

/* Stepper de círculos dentro del panel — solo visible en móvil desde paso 1 */
.stepper--panel {
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 0 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.stepper--panel.is-hidden { visibility: hidden; pointer-events: none; }
/* Cada step-item: círculo + línea conectora a la derecha */
.stepper--panel .step-item {
  display: flex;
  align-items: center;
  padding: 0;
  gap: 0;
}
.stepper--panel .step-item__label { display: none; }
.stepper--panel .step-item__num {
  width: 2rem;
  height: 2rem;
  font-size: 0.72rem;
}
/* Línea conectora entre círculos */
.stepper--panel .step-item:not(:last-child)::after {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  flex: none;
}
.stepper--panel .step-item.is-done:not(:last-child)::after { background: var(--accent); }
.step-item { display: flex; align-items: center; gap: 0.9rem; padding: 0.42rem 0; cursor: pointer; }
.step-item__num {
  flex: none;
  display: grid; place-items: center;
  width: 2.35rem; height: 2.35rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  font-size: 0.78rem; font-weight: 700; line-height: 1;
  color: var(--q-faint);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.step-item__label {
  font-size: 0.82rem; font-weight: 700; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--q-faint);
  transition: color 0.2s ease;
}
.step-item.is-done .step-item__num { color: var(--accent); border-color: var(--accent); }
.step-item.is-done .step-item__label { color: var(--text-secondary); }
.step-item.is-active .step-item__num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.step-item.is-active .step-item__label { color: var(--text-primary); }

/* --- Panel (paso actual) --- */
.quiz__panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(1.25rem, 5vw, 3.25rem);
  min-height: 420px;
  box-shadow: var(--shadow-card);
}
.quiz__stage { flex: 1; display: flex; flex-direction: column; justify-content: center; opacity: 1; transition: opacity 0.2s var(--ease); }
.quiz__stage.is-fading { opacity: 0; }

.quiz__question {
  color: var(--text-primary);
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1.1rem;
}
.quiz__desc { color: var(--text-secondary); font-size: 1.05rem; max-width: 54ch; margin-bottom: 1.75rem; }

/* Lista numerada del intro */
.quiz__points { display: grid; gap: 0.85rem; counter-reset: qp; }
.quiz__points li {
  position: relative;
  padding-left: 2.4rem;
  color: var(--text-primary);
  font-size: 1rem;
  counter-increment: qp;
}
.quiz__points li::before {
  content: counter(qp, decimal-leading-zero);
  position: absolute; left: 0; top: 0.1rem;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.8rem; font-weight: 700;
  color: var(--accent);
}

/* Opciones tipo tarjeta: icono + texto + check de selección */
.quiz__options { display: grid; gap: 0.7rem; }
.quiz__option {
  display: flex; align-items: center; gap: 0.9rem;
  width: 100%; text-align: left;
  font-family: inherit; font-size: 1rem; font-weight: 500; color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1.05rem;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.2s ease,
              border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.quiz__option-icon {
  flex: none;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.quiz__option-icon svg { width: 20px; height: 20px; }
.quiz__option-text { flex: 1; }
.quiz__option-check {
  flex: none;
  width: 20px; height: 20px;
  color: var(--bg-primary);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.25s var(--ease);
}
.quiz__option-check svg { width: 100%; height: 100%; }
@media (hover: hover) {
  .quiz__option:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--bg-primary); box-shadow: var(--shadow-glow); }
}
.quiz__option.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg-primary);
}
.quiz__option.is-selected .quiz__option-icon {
  background: rgba(255, 255, 255, 0.18); /* --bg-primary atenuado sobre accent */
  color: var(--bg-primary);
}
.quiz__option.is-selected .quiz__option-check { opacity: 1; transform: scale(1); }

/* Resultado */
.quiz__result-label {
  display: inline-block;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.quiz__result-tag {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  margin: -0.4rem 0 0.9rem;
}

/* Estimación de horas recuperables (orientativa) */
.quiz__estimate {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.5rem;
}
.quiz__estimate-num {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.quiz__estimate-label { font-size: 0.85rem; color: var(--text-secondary); }

/* Mini-formulario de captura al final del diagnóstico */
.quiz__form,
.quiz__form-success { border-top: 1px solid var(--border); padding-top: 1.4rem; }
.quiz__form-title { font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; }
.quiz__form-grid { display: grid; gap: 0.85rem; margin-bottom: 1rem; }
.quiz__field { display: grid; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.quiz__field input {
  font: inherit;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.quiz__field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.quiz__field input.is-invalid {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.quiz__form-error {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.quiz__form-note { font-size: 0.8rem; color: var(--text-secondary); opacity: 0.75; margin-top: 0.9rem; }
.quiz__form-success { display: grid; gap: 1rem; justify-items: start; }
.quiz__form-success-title { font-weight: 700; color: var(--accent); }

/* Footer del panel */
.quiz__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.quiz__back {
  font-family: inherit; font-size: 0.92rem; font-weight: 600;
  color: var(--text-secondary); background: none; border: 0; cursor: pointer;
  padding: 0.5rem 0; transition: color 0.2s ease;
}
.quiz__back:hover { color: var(--accent); }
.quiz__next[disabled] { opacity: 0.4; pointer-events: none; }

@media (max-width: 899px) {
  /* Ocultar stepper del aside — aparece dentro del panel */
  .stepper:not(.stepper--panel) { display: none; }
  /* Mostrar stepper horizontal dentro del panel */
  .stepper--panel { display: flex; }
  /* Quitar descripción larga del aside para reducir scroll */
  .quiz__sub { display: none; }
  /* Barra de progreso ocupa todo el ancho */
  .quiz__progress { max-width: 100%; margin-bottom: 0; }
  /* Cabecera del aside más compacta */
  .quiz__heading { font-size: clamp(1.6rem, 6vw, 2rem); margin-bottom: 0.5rem; }
  /* El panel no necesita tanto espacio vertical en móvil */
  .quiz__panel { min-height: auto; border-radius: 16px; }
  /* Footer de botones: el botón "Siguiente" ocupa todo el ancho */
  .quiz__footer { flex-direction: column-reverse; gap: 0.75rem; }
  .quiz__footer .quiz__next { width: 100%; justify-content: center; }
  .quiz__footer .quiz__back { width: 100%; text-align: center; padding: 0.6rem 0; }
  /* Opciones: area táctil más grande */
  .quiz__option { padding: 1.1rem 1rem; font-size: 0.98rem; }
  /* Pregunta más legible en pantallas pequeñas */
  .quiz__question { font-size: clamp(1.25rem, 5.5vw, 1.7rem); }
  /* Descripción de pregunta */
  .quiz__desc { font-size: 0.97rem; margin-bottom: 1.25rem; }
}

@media (min-width: 900px) {
  .quiz__wrap { grid-template-columns: minmax(220px, 0.72fr) 1.45fr; gap: 3.5rem; align-items: center; }
  /* Restaurar min-height completo en pantallas grandes */
  .quiz__panel { min-height: 560px; }
  .quiz__options { grid-template-columns: 1fr 1fr; }
  .quiz__form-grid { grid-template-columns: 1fr 1fr; }
  .quiz__form-grid .quiz__field:first-child { grid-column: 1 / -1; }
}

/* -----------------------------------------------------------------
   12. BLOQUE 04 — RESULTADOS / CONFIANZA
   ----------------------------------------------------------------- */
.proof__metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.metric {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
@media (hover: hover) {
  .metric:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-glow); }
}
/* Línea decorativa que se dibuja al entrar la métrica en viewport */
.metric::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: 0.9rem auto 0;
  background: var(--accent);
  border-radius: 999px;
  transform: scaleX(0);
  transition: transform 0.8s var(--ease) 0.35s;
}
.metric.is-visible::after { transform: scaleX(1); }
.metric__value {
  display: block;
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.6rem;
}
.metric__label { font-size: 0.98rem; color: var(--text-secondary); }

.rgpd {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.5rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow-cta);
}
.rgpd__icon { flex: none; width: 46px; height: 46px; color: #fff; }
.rgpd__icon svg { width: 100%; height: 100%; }
.rgpd__tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}
.rgpd__title { color: #fff; font-size: clamp(1.25rem, 3.2vw, 1.7rem); margin-bottom: 0.6rem; }
.rgpd__text { color: rgba(255, 255, 255, 0.92); font-size: 1.02rem; max-width: 62ch; }

.proof__note { font-size: 0.9rem; color: var(--text-secondary); opacity: 0.8; max-width: 60ch; }

/* -----------------------------------------------------------------
   12b. BLOQUE 06 — FAQ (acordeón accesible, animado con grid-rows)
   ----------------------------------------------------------------- */
.faq__list { display: grid; gap: 0.75rem; max-width: 780px; }
.faq__item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
@media (hover: hover) {
  .faq__item:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }
}
.faq__q {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.faq__chevron {
  flex: none;
  width: 20px; height: 20px;
  color: var(--text-secondary);
  transition: transform 0.3s var(--ease), color 0.2s ease;
}
.faq__item.is-open .faq__chevron { transform: rotate(180deg); color: var(--accent); }
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
}
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a-inner { overflow: hidden; }
.faq__a-inner p {
  padding: 0 1.3rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: 68ch;
}

/* -----------------------------------------------------------------
   12c. CTA STICKY (pastilla flotante tras el hero)
   ----------------------------------------------------------------- */
.sticky-cta {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  box-shadow: var(--shadow-cta);
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.2s ease;
}
.sticky-cta.is-visible { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: hover) {
  .sticky-cta.is-visible:hover { transform: scale(1.05); background: var(--accent-deep); }
}
@media (max-width: 767px) {
  /* En móvil: barra inferior a todo el ancho */
  .sticky-cta {
    right: 0.75rem;
    left: 0.75rem;
    bottom: 0.75rem;
    justify-content: center;
    padding: 0.95rem 1rem;
    border-radius: 14px;
  }
}

/* -----------------------------------------------------------------
   13. BLOQUE 07 — DIAGNÓSTICO / CTA FINAL + FILTRO
   ----------------------------------------------------------------- */
.cta-final__subtitle {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 52ch;
  margin-bottom: 2.5rem;
}
.filter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem);
}
.filter__col {
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  border: 1px solid var(--border);
  background: var(--bg-primary);
}
.filter__col--yes { border-top: 3px solid var(--accent); }
.filter__col--no { background: var(--bg-secondary); }
.filter__head { font-size: 1.2rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem; }
.filter__col--yes .filter__head span { color: var(--accent); }
.filter__col--no .filter__head span { color: var(--text-secondary); }
.filter__list { display: grid; gap: 0.7rem; }
.filter__list li { font-size: 1.02rem; color: var(--text-secondary); padding-left: 1.4rem; position: relative; }
.filter__col--yes .filter__list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.filter__col--no .filter__list li::before { content: "✗"; position: absolute; left: 0; color: var(--text-secondary); opacity: 0.6; }

.cta-final__action { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; text-align: center; margin-bottom: 2.5rem; }

.calendar-embed { width: 100%; border-radius: var(--radius); overflow: hidden; min-height: 0; }
.calendar-embed.is-open { min-height: 640px; border: 1px solid var(--border); }
.calendar-embed iframe { width: 100%; min-height: 640px; border: 0; display: block; }
.calendar-embed__fallback {
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--bg-primary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
}

/* -----------------------------------------------------------------
   14. FOOTER
   ----------------------------------------------------------------- */
.site-footer { background: var(--text-primary); color: #fff; padding-block: 2.5rem; }
.site-footer .brand__name, .site-footer__tag { color: #fff; }
.site-footer__row { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.12); }
.site-footer__tag { font-size: 0.95rem; opacity: 0.7; }
.site-footer__bottom { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 1.25rem; }
.site-footer__legal { font-size: 0.78rem; opacity: 0.5; text-transform: uppercase; letter-spacing: 0.08em; }
.site-footer .btn--ghost { color: #fff; border-color: rgba(255,255,255,0.25); }
.site-footer .btn--ghost:hover { color: var(--accent); background: #fff; border-color: #fff; }

/* -----------------------------------------------------------------
   15. ANIMACIÓN REVEAL (estado base; GSAP lo anima)
   ----------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(40px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* -----------------------------------------------------------------
   16. RESPONSIVE
   ----------------------------------------------------------------- */
@media (max-width: 767px) {
  /* El diagrama decorativo del hero se oculta en móvil: el canvas
     global ya aporta el fondo y evitamos ruido tras el texto. */
  .hero__decor { display: none; }
}

@media (min-width: 768px) {
  body { font-size: 18px; }
  .site-nav { display: inline-flex; }
  .pains { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .cases__grid { grid-template-columns: repeat(3, 1fr); }
  .proof__metrics { grid-template-columns: repeat(3, 1fr); }
  .rgpd { flex-direction: row; align-items: flex-start; gap: 1.75rem; }
  .filter { grid-template-columns: 1fr 1fr; }
  .site-footer__row { flex-direction: row; align-items: center; justify-content: space-between; }
  .site-footer__bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 1100px) {
  .pains { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
  .hero__decor { right: 0; opacity: 0.6; }
}

/* -----------------------------------------------------------------
   17. PREFERS-REDUCED-MOTION (fallback estático)
   ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .preloader__char { transform: none; }
  .hero__scroll-line { animation: none; }
  /* El canvas de red no arranca (main.js); ocultarlo deja visible
     el gradiente estático del contenedor .bg-canvas */
  .bg-canvas canvas { display: none; }
  /* Estados finales visibles de los elementos animados */
  .quiz__progress-bar { transition: none; }
  .metric::after { transform: scaleX(1); transition: none; }
  .flow-pulse { opacity: 0 !important; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
