/* ==========================================================================
   Roomie · ERP Test Landing
   Fuente de verdad: referencias/figma-erp-test/ (figma-export.css + capturas).
   Medidas tomadas del frame de 1920 px (contenido de 1184 px). Layout con
   Grid/Flexbox; no se copian las posiciones absolutas del export.
   ========================================================================== */

:root {
  /* Paleta (nombres del export de Figma) */
  --cod-gray: #0C0C0C;          /* fondo principal */
  --spring-green: #00E879;      /* verde principal */
  --racing-green: #07100B;      /* texto sobre verde */
  --alabaster: #FAFAFA;         /* texto principal */
  --pumice: #C6CCC9;
  --conch: #D7DDDA;
  --powder-ash: #B8C0BC;
  --mantle: #949E98;
  --pewter: #9CA6A1;
  --gunsmoke: #7F8A84;
  --xanadu: #717D76;
  --xanadu-2: #7C8881;
  --label: #76817B;
  --corduroy: #68736D;
  --placeholder: #5D6862;
  --edward: #AEB6B2;
  --tasman: #D5DDD7;
  --heavy-metal: #121513;       /* panel oscuro */
  --log-cabin: #101310;         /* opción / KPI */
  --input-bg: #0F1210;
  --track: #2B312D;
  --track-2: #252C28;
  --line: #2A302C;
  --line-2: #303833;
  --line-3: #313833;
  --line-4: #3A443E;
  --section-line: #1E231F;
  --rule: rgba(226, 231, 233, 0.45);   /* Line 1-6 (#E2E7E9, 0.5 px) */
  --malachite: #14EA73;
  --lime: #B7FF35;
  --danger: #FF5252;
  --warning: #F7C948;

  /* Tipografía. Neue Haas Grotesk Display Pro no está disponible: Inter temporal. */
  --font-display: "Neue Haas Grotesk Display Pro", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-arial: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-courier: "Courier New", Courier, ui-monospace, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --container: 1184px;
  --gutter: clamp(16px, 4vw, 28px);
  --nav-h: 74px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--cod-gray);
  color: var(--alabaster);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input { font: inherit; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 10px 14px; border-radius: 9px;
  background: var(--spring-green); color: var(--racing-green); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--spring-green); outline-offset: 3px; }

/* Separadores Line 1-6 del Figma (1016 px, centrados) */
.rule {
  width: min(1016px, calc(100% - 2 * var(--gutter)));
  height: 0;
  margin: 0 auto;
  border: 0;
  border-top: 1px solid var(--rule);
}
.rule-accent { border-top-color: rgba(0, 232, 121, 0.7); margin-top: 32px; }

/* ---------- Tipografía compartida ---------- */
.eyebrow {
  margin-bottom: 11px;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700; line-height: 13px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--spring-green);
}
.eyebrow-courier { font-family: var(--font-courier); }
.eyebrow-muted { color: var(--xanadu); }
.eyebrow-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

.h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--alabaster);
}
.h2-soft { font-weight: 400; color: var(--powder-ash); }
.h2-narrow { max-width: 853px; }

.micro {
  font-family: var(--font-mono);
  font-size: 12px; line-height: 16px;
  color: var(--gunsmoke);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700; line-height: 16px; letter-spacing: 0.2px;
  text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, opacity .15s ease;
}
.btn-arial { font-family: var(--font-arial); line-height: 15px; min-height: 45px; }
.btn-primary { background: var(--spring-green); border-color: var(--spring-green); color: var(--racing-green); }
.btn-primary:hover:not(:disabled) { background: #3DF59A; border-color: #3DF59A; transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--line-3); color: var(--alabaster); }
.btn-outline:hover:not(:disabled) { border-color: var(--spring-green); }
.btn-dark { background: #444444; color: var(--alabaster); }
.btn-dark:hover { background: #555555; }
.btn-pill { min-height: 38px; padding: 10px 12px; border-radius: 999px; }
.btn:disabled { cursor: not-allowed; opacity: 0.45; }

/* Marcador de componentes pendientes de lógica/integración */
.pending-badge {
  display: inline-flex; align-items: center; flex: none;
  padding: 3px 7px;
  border: 1px solid rgba(247, 201, 72, 0.6);
  border-radius: 999px;
  background: rgba(247, 201, 72, 0.12);
  font-family: var(--font-courier);
  font-size: 10px; font-weight: 700; letter-spacing: 1px; line-height: 12px;
  color: var(--warning);
}
/* Snapshot calculado (app.js): mismo badge en verde. */
.pending-badge.is-ready { border-color: rgba(0, 232, 121, 0.55); background: rgba(0, 232, 121, 0.1); color: var(--spring-green); }
.pending-note {
  margin-top: 12px;
  max-width: 840px;
  font-family: var(--font-mono); font-size: 12px; line-height: 18px;
  color: var(--powder-ash);
}
.pending-note strong { color: var(--alabaster); }
.placeholder { color: var(--gunsmoke); }

/* ---------- Paneles ---------- */
.panel { border-radius: 16px; }
.panel-glass { background: rgba(127, 138, 132, 0.4); border: 1px solid var(--line); padding: 24px; }
.panel-dark { background: var(--heavy-metal); }
.panel-bordered { border: 1px solid var(--line); }
.panel-smoke { background: rgba(33, 33, 33, 0.46); }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  /* Fondo sólido: con blur + transparencia el contenido que pasaba por detrás
     se veía como manchas borrosas junto al logo y el nav se agrisaba sobre el degradado. */
  background: var(--cod-gray);
  transition: background-color .2s ease;
}
/* Landing con JS: transparente arriba (la foto del hero continúa detrás, como en Figma),
   sólido en cuanto hay scroll (app.js agrega .is-scrolled). Sin JS queda sólido. */
.js body:not(.thanks-page) .nav:not(.is-scrolled) { background: transparent; }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-logo img { width: 130px; height: auto; }
.navlinks { display: flex; align-items: center; gap: 12px; }
.navlinks a:not(.btn) {
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px; line-height: 15px;
  color: var(--edward);
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.navlinks a:not(.btn):hover { color: var(--alabaster); background: rgba(255, 255, 255, 0.06); }

/* ---------- Hero ---------- */
/* Hero de una sola columna alineada a la izquierda; el ancho de lectura lo limita .hero-lead. */
.hero { padding: clamp(48px, 6vw, 96px) 0; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 13.3px; }
/* Texto principal del hero: tipografía de .h2 (igual que el título de PROBLEMA); aquí sólo el ancho. */
.hero-lead { max-width: min(78%, 920px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 14.7px; }
.hero-actions .btn-outline { background: rgba(12, 12, 12, 0.35); }

.metricline { height: 8px; border-radius: 999px; background: var(--track-2); overflow: hidden; }
.metricline i, .bar i, .progress i {
  display: block; height: 100%;
  width: calc(var(--bar-value, 0) * 1%);
  border-radius: inherit;
  background: var(--spring-green);
  transition: width .4s ease;
}

/* ---------- Secciones ---------- */
.section { padding: 71px 0 72px; }
.section-bordered { border-top: 1px solid var(--section-line); }

/* ---------- Problema / contexto ---------- */
.pressure-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
  align-items: start;
}
.panel-title { margin-bottom: 18px; font-size: 22px; font-weight: 700; line-height: 26px; }
.bullets { display: flex; flex-direction: column; gap: 12px; }
.bullets li {
  position: relative;
  padding-left: 19px;
  font-family: var(--font-mono); font-size: 14px; line-height: 20px;
  color: var(--conch);
}
.bullets li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--spring-green);
}
/* Una sola card centrada: ancho acotado para que las viñetas no queden demasiado largas. */
.problem-grid { grid-template-columns: minmax(0, 800px); justify-content: center; }

/* ---------- Quick Test ---------- */
.test-shell {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 18px;
  margin-top: 32px;
  align-items: stretch;
}
.steps {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--input-bg);
}
.step {
  display: block;
  width: 100%;
  min-height: 44px; /* 10 pasos (Figma: 51 px para 5): la lista iguala la altura del panel */
  padding: 8px 12px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-arial); font-size: 12px; line-height: 14px;
  color: #8C9791; /* Xanadu #717D76 del Figma, aclarado por legibilidad */
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.step-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.step-num { margin-right: 6px; font-family: var(--font-courier); font-weight: 700; color: var(--spring-green); }
.step:hover:not(:disabled) { color: var(--conch); }
.step:disabled { cursor: default; opacity: 0.85; }
.step.is-answered { color: var(--edward); }
.step.is-current { background: #141A16; border-left-color: var(--spring-green); color: #FFFFFF; }

.quiz-panel {
  min-height: 390px;
  padding: 24px;
  /* Gris del Figma (#7F8A84) oscurecido por contraste: título blanco 5.81:1 (AA texto normal)
     y tarjetas de opción #101310 a 3.08:1 del panel (WCAG 1.4.11). */
  background: #5A655F;
}
.progressmeta {
  display: flex; justify-content: space-between; gap: 12px;
  margin-bottom: 9px;
  font-family: var(--font-courier); font-size: 10px; font-weight: 700; line-height: 11px;
  color: #E2E7E9; /* 4.87:1 sobre el panel (antes #2B312D) */
}
.progress { height: 6px; border-radius: 999px; background: var(--track-2); overflow: hidden; }
.quiz-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.qtitle {
  float: left; width: 100%;
  max-width: 820px;
  padding: 0;
  margin: 18px 0 9px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; line-height: 1.13;
  letter-spacing: -0.01em;
  color: var(--alabaster);
}
.qtitle:focus { outline: none; }
.options { clear: both; display: flex; flex-direction: column; gap: 10px; padding-top: 9px; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.option-body {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 50px;
  padding: 15px 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--log-cabin);
  font-size: 16px; line-height: 18px;
  color: var(--alabaster);
  transition: border-color .15s ease, background-color .15s ease;
}
.option-dot {
  flex: none;
  width: 16px; height: 16px;
  border: 1px solid var(--corduroy);
  border-radius: 50%;
  transition: border .15s ease;
}
.option:hover .option-body { border-color: rgba(0, 232, 121, 0.55); }
.option input:focus-visible + .option-body { outline: 2px solid var(--spring-green); outline-offset: 2px; }
.option input:checked + .option-body { background: #132019; border-color: var(--spring-green); }
.option input:checked + .option-body .option-dot { border: 5px solid var(--spring-green); }

.quiz-error {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--log-cabin);
  font-size: 13px;
  color: #FF6B57;
}
.quiz-error[hidden] { display: none; }
.quiz-actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 15px; }
.quiz-actions .btn { min-width: 125px; }
.quiz-actions .btn-outline { border-color: var(--pumice); } /* borde ≥3:1 sobre el panel */
.quiz-actions .btn-outline:disabled { opacity: 0.5; }

/* ---------- Readiness Snapshot ---------- */
.score-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  margin-top: 32px;
  align-items: start;
}
.scorebox {
  display: flex; flex-direction: column; align-items: center;
  min-height: 312px;
  padding: 27px 28px 28px;
  border-radius: 18px;
  background: var(--alabaster);
  color: #111111;
  text-align: center;
}
.scorebox-eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; line-height: 13px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: #555555;
}
/* ERP Dependency Score: arco de exposición 0-100 (no es progreso positivo).
   Capas (de arriba a abajo): separadores en 25/50/75 · velo sobre el tramo no alcanzado ·
   bandas oficiales (0-24 verde, 25-49 amarillo, 50-74 naranja, 75-100 rojo; 45° cada una).
   --gauge-deg = score × 1.8deg; lo fija app.js (renderScore). */
@property --gauge-deg { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.gauge {
  --gauge-deg: 0deg;
  position: relative;
  width: 205px; height: 105px;
  margin-top: 30px;
  border-radius: 205px 205px 0 0;
  background:
    conic-gradient(from -90deg at 50% 100%,
      transparent 0deg 44.25deg, var(--alabaster) 44.25deg 45.75deg,
      transparent 45.75deg 89.25deg, var(--alabaster) 89.25deg 90.75deg,
      transparent 90.75deg 134.25deg, var(--alabaster) 134.25deg 135.75deg,
      transparent 135.75deg),
    conic-gradient(from -90deg at 50% 100%,
      transparent 0deg var(--gauge-deg), rgba(250, 250, 250, 0.74) var(--gauge-deg) 180deg, transparent 180deg),
    conic-gradient(from -90deg at 50% 100%,
      #00E879 0deg 45deg, #F7C948 45deg 90deg, #FF9F1A 90deg 135deg, #FF5252 135deg 180deg, transparent 180deg);
}
.gauge::after {
  content: ""; position: absolute; left: 25px; right: 25px; bottom: 0; height: 75px;
  border-radius: 160px 160px 0 0;
  background: var(--alabaster);
}
/* Sin las 10 respuestas: escala completa desaturada (estado propio del score, no el del Snapshot). */
.scorebox[data-score-state="pending"] .gauge { --gauge-deg: 180deg; filter: grayscale(1); opacity: 0.35; }
/* Animación sutil del relleno sólo entre resultados (prefers-reduced-motion la desactiva). */
.scorebox[data-score-state="ready"] .gauge { transition: --gauge-deg .6s ease; }
.gauge-text { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-top: -54px; position: relative; }
.gauge-text b { font-family: var(--font-mono); font-size: 38px; font-weight: 700; line-height: 50px; color: #111111; white-space: nowrap; }
.gauge-text b small { margin-left: 1px; font-size: 18px; font-weight: 700; line-height: 1; color: #555555; } /* sin alterar la altura de la línea */
/* Nivel: tonos oscuros de cada banda (≥ 4.5:1 sobre la tarjeta). El nombre siempre va en texto. */
.gauge-text span { font-family: var(--font-mono); font-size: 11px; font-weight: 700; line-height: 15px; letter-spacing: 1px; color: #8A5A00; text-transform: uppercase; }
.scorebox[data-level="controlado"] .gauge-text span { color: #0B7A43; }
.scorebox[data-level="friccion"] .gauge-text span { color: #8A5A00; }
.scorebox[data-level="exposicion"] .gauge-text span { color: #A84300; }
.scorebox[data-level="critica"] .gauge-text span { color: #B3261E; }
/* Anuncio para lectores de pantalla (sin espacio visual). */
.score-sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.scorebox-copy { max-width: 220px; margin-top: 14px; font-size: 13px; line-height: 19px; color: #555555; }

.drivers-panel { padding: 23px 24px 30px; }
.drivers li + li { border-top: 1px solid #1E231F; }
.driver {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 16px 0;
}
.driver-num { font-family: var(--font-courier); font-size: 11px; font-weight: 700; line-height: 12px; color: var(--spring-green); padding-top: 3px; }
.driver strong { display: block; font-size: 16px; font-weight: 700; line-height: 19px; color: var(--alabaster); }
.driver p { margin-top: 4px; font-family: var(--font-mono); font-size: 13px; line-height: 18px; color: var(--mantle); }
.driver.is-placeholder strong { color: var(--mantle); }
/* Fila sin foco relevante: discreta y sin badge, para no parecer un driver real. */
.driver.is-empty strong { color: var(--mantle); }
.driver.is-empty .badge { visibility: hidden; }
/* Fila 03 reservada (no calculada): un punto más discreta que los drivers calculados. */
.driver.is-reserved strong { color: var(--edward); }
.driver.is-reserved .badge { border-style: dashed; }
/* Alertas prioritarias: texto explícito, 8.03:1 sobre la tarjeta. */
.drivers-alert {
  margin-top: 2px; padding-top: 14px;
  border-top: 1px solid #1E231F;
  font-family: var(--font-mono); font-size: 12px; line-height: 18px;
  color: #FF8A7A;
}
.drivers-alert strong { font-weight: 700; }
.drivers-alert[hidden] { display: none; }
.badge {
  padding: 5px 10px;
  border: 1px solid var(--line-4);
  border-radius: 999px;
  font-family: var(--font-courier); font-size: 10px; line-height: 11px;
  color: var(--pewter);
}

.indicators { margin-top: 18px; padding: 30px 24px 24px; }
.indicators .eyebrow { margin-bottom: 22px; }
.indicators-note { margin-top: 20px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: #9AA39E; }
.bars { display: flex; flex-direction: column; gap: 20px; }
.barhead { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.bars .barhead span { font-size: 13px; font-weight: 600; line-height: 16px; }
.bars .barhead b { font-family: var(--font-arial); font-size: 13px; font-weight: 700; line-height: 15px; }
.bar { height: 9px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar i { background: linear-gradient(90deg, #00E879 0%, #B7FF35 100%); }

.cta-box {
  display: grid; grid-template-columns: minmax(0, 1fr) 276px; gap: 32px; align-items: center;
  margin-top: 18px;
  padding: 44px 38px 44px 34px;
  border-radius: 20px;
  background: #B9C1C4;
}
.cta-box h3 {
  max-width: 520px;
  font-size: clamp(22px, 2.4vw, 30px); font-weight: 400; line-height: 1.17;
  color: #2D2D2D;
}
.cta-box h3 strong { font-weight: 700; }
.cta-box-actions { display: flex; flex-direction: column; gap: 20px; }
/* Botón ~12% más grande que el .btn base (padding, alto y columna de 246 → 276 px). */
.cta-box-actions .btn { min-height: 50px; padding: 16px 24px; font-size: 14px; }

/* ---------- ROI / TCO Calculator (slider + 2 resultados; ver js/calculator.js) ---------- */
.tco-grid {
  display: grid; grid-template-columns: minmax(0, 641fr) minmax(0, 525fr);
  gap: 18px;
  margin-top: 21px;
  align-items: stretch;
}
/* Contenido centrado en vertical: la tarjeta iguala la altura de las dos tarjetas apiladas. */
.tco-panel { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 23px 24px 24px; }
.tco-panel .eyebrow { margin-bottom: 0; }
.big-number {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.4vw, 58px); font-weight: 700; line-height: 70px;
  letter-spacing: -3px;
}
.calc-amount { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Slider nativo: clases propias (no se reutiliza .bar, compartida con el Snapshot).
   Track con el mismo degradado de las barras; --calc-fill lo actualiza calculator.js. */
.calc-slider {
  --calc-fill: 0%;
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  touch-action: pan-y; /* arrastre horizontal sin bloquear el scroll vertical */
}
.calc-slider::-webkit-slider-runnable-track {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00E879 0%, #B7FF35 var(--calc-fill), var(--track) var(--calc-fill));
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px; height: 24px;
  margin-top: -7.5px;
  border: 3px solid var(--spring-green);
  border-radius: 50%;
  background: var(--alabaster);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.calc-slider::-moz-range-track { height: 9px; border-radius: 999px; background: var(--track); }
.calc-slider::-moz-range-progress { height: 9px; border-radius: 999px; background: linear-gradient(90deg, #00E879 0%, #B7FF35 100%); }
.calc-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border: 3px solid var(--spring-green);
  border-radius: 50%;
  background: var(--alabaster);
}
.calc-slider:focus { outline: none; }
.calc-slider:focus-visible { outline: 2px solid var(--spring-green); outline-offset: 4px; border-radius: 6px; }
.calc-range {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; line-height: 16px;
  color: #9AA39E;
  font-variant-numeric: tabular-nums;
}

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
/* Dos resultados: apilados a la derecha en escritorio, misma altura entre sí. */
.calc-kpis { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; }
.kpi-note { font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: #9AA39E; }
/* Lectores de pantalla: anuncio del ahorro sin ocupar espacio visual. */
.calc-sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.kpi {
  display: flex; flex-direction: column; gap: 9px;
  min-height: 124px;
  padding: 18px;
  border: 1px solid var(--track);
  border-radius: 13px;
  background: var(--log-cabin);
}
.kpi small {
  font-family: var(--font-courier); font-size: 10px; font-weight: 700; line-height: 13px;
  text-transform: uppercase;
  color: var(--xanadu-2);
}
.kpi small.kpi-label-mono { font-family: var(--font-mono); }
/* Montos en una sola línea y con cifras de ancho fijo (no "bailan" al arrastrar el slider). */
.kpi b { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; line-height: 34px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 9px; margin-top: 12px; }

/* ---------- Lead Gate ---------- */
.lead-grid { grid-template-columns: minmax(0, 607fr) minmax(0, 559fr); margin-top: 21px; }
.form-panel { padding: 24px; background: #CDCFD0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 12px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 10px; font-weight: 700; line-height: 12px; color: var(--label); }
.field input {
  width: 100%;
  min-height: 46px;
  padding: 13px 14px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--input-bg);
  font-family: var(--font-arial); font-size: 16px; line-height: 18px;
  color: var(--alabaster);
}
.field input::placeholder { color: var(--placeholder); }
.field input:focus { outline: none; border-color: var(--spring-green); box-shadow: 0 0 0 3px rgba(0, 232, 121, 0.22); }
.field input[aria-invalid="true"] { border-color: #C62828; }
.field-error:empty { display: none; }
.field-error { font-size: 11px; font-weight: 700; line-height: 14px; color: #B3261E; }

/* Título, descripción y CTA agrupados y centrados en vertical dentro de la altura de la card. */
.recommendation-panel { display: flex; flex-direction: column; justify-content: center; padding: 24px 25px 28px; min-height: 100%; }
.recommendation {
  max-width: 442px;
  font-size: clamp(22px, 2.3vw, 28px); font-weight: 700; line-height: 1.21;
  color: var(--alabaster);
}
.recommendation-lead {
  max-width: 430px;
  padding: 6px 0 18px;
  font-size: 16px; line-height: 21px; letter-spacing: 0.03em;
  color: var(--powder-ash);
}
/* Figma: el CTA sigue a la descripción (≈23 px) alineado a la derecha, con aire libre debajo. */
.form-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 5px; }
/* Sin descripción visible (estado pendiente): misma separación de ≈23 px entre el título y el CTA. */
.recommendation-lead[hidden] ~ .form-actions { margin-top: 23px; }
.form-actions .btn { min-width: 219px; }
.form-actions .btn:disabled { opacity: 0.5; }
.form-status { min-height: 18px; max-width: 420px; font-size: 13px; line-height: 18px; color: var(--powder-ash); text-align: center; }
.form-status.is-valid { color: var(--spring-green); }
.form-status.is-error { color: #FF8A7A; }
.form-actions .btn[aria-busy="true"] { cursor: progress; opacity: 0.7; }

/* Campo trampa anti-bots: fuera de pantalla (no display:none, que algunos bots omiten) */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Consentimiento (aviso de privacidad) sobre el panel claro del formulario */
.field-check { margin-top: 4px; }
.field .check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; font-weight: 400; line-height: 17px;
  color: #2B312D;
  cursor: pointer;
}
.field .check input {
  flex: none;
  width: 18px; height: 18px; min-height: 0;
  margin: 0; padding: 0;
  accent-color: var(--racing-green);
  cursor: pointer;
}
.field .check input:focus-visible { outline: 2px solid var(--racing-green); outline-offset: 2px; box-shadow: none; }
.check a { color: var(--racing-green); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--section-line); background: var(--cod-gray); }
.footer-inner {
  display: grid; grid-template-columns: minmax(0, 405px) minmax(0, 721px);
  justify-content: space-between; gap: 32px;
  padding-top: 48px; padding-bottom: 56px;
}
.footer-brand { display: flex; flex-direction: column; gap: 18px; }
.footer-logo img { width: 142px; height: auto; }
.footer-brand p { max-width: 230px; font-size: 14.1px; line-height: 23px; color: #9BA69E; }
.footer-contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 28px; align-content: start; }
.contact {
  display: flex; align-items: flex-start; gap: 12px;
  min-width: 0;
  text-decoration: none;
  transition: transform .2s ease;
}
.contact:hover { transform: translateY(-1px); }
.contact:hover span:last-child { color: #FFFFFF; }
.contact-icon {
  display: flex; align-items: center; justify-content: center; flex: 0 0 34px;
  width: 34px; height: 34px;
  border: 1px solid rgba(20, 234, 115, 0.24);
  border-radius: 10px;
  background: rgba(20, 234, 115, 0.055);
  font-family: "Inter", Arial, sans-serif; font-size: 10.9px; font-weight: 800; line-height: 17px; letter-spacing: 0.435px;
  color: var(--malachite);
}
.contact span:last-child {
  min-width: 0; padding-top: 6px;
  font-size: 14.1px; line-height: 22px;
  color: var(--tasman);
  overflow-wrap: anywhere;
}

/* ---------- Fondos de la landing (export de Figma) ----------
   Capas, de arriba hacia abajo (orden de Figma):
   1. erp-test-background: degradado "Neon Code Corridor" con grano y transparencia
      arriba/abajo; en Figma va de y=-240 al inicio del footer. Se usa la variante de
      960 px sin pérdida en todos los anchos (la versión con pérdida generaba bandas).
   2. erp-test-hero-background: foto detrás de nav, Hero y Contexto (y=-240, ancho total).
   3. erp-test-lead-background: foto anclada al inicio del footer (detrás del Lead Gate).
   <main> se extiende bajo el nav (margen negativo) para que la foto del hero quede detrás.
   La escala -240/1920 = -12.5vw reproduce el desfase superior del frame de Figma. */
body:not(.thanks-page) > main {
  /* Geometría de las fotos (proporciones de los exports: hero 1921×1587, lead 1921×1233).
     Las capas de fundido usan estas medidas para suavizar los bordes de cada foto. */
  --bg-top-offset: -12.5vw;
  --hero-w: 100vw;
  --hero-h: calc(var(--hero-w) * 0.8261);
  --hero-x: 0%;
  --lead-w: 100vw;
  --lead-h: calc(var(--lead-w) * 0.6419);
  --lead-x: 50%;
  --hero-fade-h: calc(var(--hero-h) * 0.3);
  --lead-fade-h: calc(var(--lead-h) * 0.3);
  margin-top: calc(-1 * var(--nav-h));
  padding-top: var(--nav-h);
  background-color: var(--cod-gray);
  /* Orden de Figma (arriba -> abajo): degradado, foto hero, foto lead.
     Las dos capas lineales funden el borde inferior del hero y el superior del lead con
     el color base, para que no aparezca un corte horizontal cuando la proporción de la
     página difiere de la del frame de 1920 px. */
  background-image:
    url("../assets/erp-test-background-960.webp"), /* WebP sin pérdida: el grano no tolera compresión con pérdida */
    linear-gradient(to bottom, rgba(12, 12, 12, 0), var(--cod-gray)),
    url("../assets/erp-test-hero-background.webp"),
    linear-gradient(to bottom, var(--cod-gray), rgba(12, 12, 12, 0)),
    url("../assets/erp-test-lead-background.webp");
  background-repeat: no-repeat;
  background-size:
    100% calc(100% - var(--bg-top-offset)),
    var(--hero-w) var(--hero-fade-h),
    var(--hero-w) auto,
    var(--lead-w) var(--lead-fade-h),
    var(--lead-w) auto;
  background-position:
    0 var(--bg-top-offset),
    var(--hero-x) calc(var(--bg-top-offset) + var(--hero-h) - var(--hero-fade-h)),
    var(--hero-x) var(--bg-top-offset),
    left var(--lead-x) bottom calc(var(--lead-h) - var(--lead-fade-h)),
    var(--lead-x) 100%;
}
/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .navlinks a:not(.btn) { padding-inline: 8px; }
}

/* Tablet */
@media (max-width: 1024px) {
  /* Fotos: sin deformar ni estirar; la textura del hero se ancla a la izquierda y la del
     lead a la derecha, con un ancho mínimo para que la textura no se vea diminuta. */
  body:not(.thanks-page) > main {
    --bg-top-offset: 0px;
    --hero-w: max(100vw, 1400px);
    --lead-w: max(100vw, 1300px);
    --lead-x: 100%;
  }
  .hero-lead { max-width: none; }
  .test-shell { grid-template-columns: 1fr; }
  .steps { padding: 10px; }
  .steps ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .score-grid { grid-template-columns: 1fr; }
  .scorebox { width: 100%; max-width: 420px; margin-inline: auto; min-height: 0; }
  .cta-box { grid-template-columns: 1fr; padding: 32px 28px; }
  .cta-box-actions { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .tco-grid { grid-template-columns: 1fr; }
  .calc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* resultados lado a lado bajo el slider */
  .lead-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .navlinks a:not(.btn) { display: none; }
  .pressure-grid { grid-template-columns: 1fr; }
  /* Pasos del quiz: sólo indicadores numerados (una fila de 10; la pregunta completa sigue en el panel) */
  .steps ol { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .step { min-height: 0; padding: 9px 2px; border-left: 0; border-bottom: 2px solid var(--line); text-align: center; }
  .step.is-current { border-bottom-color: var(--spring-green); }
  .step-num { margin: 0; }
  .step-label { display: none; }
}

/* Móvil */
@media (max-width: 640px) {
  /* Variantes de 960 px (WebP) y altura fija de cada foto para mantener legible la textura. */
  body:not(.thanks-page) > main {
    --hero-w: calc(980px / 0.8261);
    --hero-h: 980px;
    --lead-w: calc(760px / 0.6419);
    --lead-h: 760px;
    background-image:
      url("../assets/erp-test-background-960.webp"),
      linear-gradient(to bottom, rgba(12, 12, 12, 0), var(--cod-gray)),
      url("../assets/erp-test-hero-background-960.webp"),
      linear-gradient(to bottom, var(--cod-gray), rgba(12, 12, 12, 0)),
      url("../assets/erp-test-lead-background-960.webp");
  }
  :root { --nav-h: 62px; }
  .nav-logo img { width: 104px; }
  .btn-pill { font-size: 11px; padding: 8px 12px; min-height: 34px; }
  .hero { padding-bottom: 48px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .section { padding: 52px 0 56px; }
  .pressure-grid, .test-shell, .score-grid, .tco-grid { margin-top: 24px; }
  /* Pasos del quiz: dos filas de cinco indicadores numerados */
  .steps ol { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  /* Altura estable entre preguntas (título a 22 px): los botones quedan abajo y no saltan.
     624 px = altura natural máxima medida a 375 px con las 10 preguntas v2 (621 px). */
  .quiz-panel { display: flex; flex-direction: column; min-height: 624px; padding: 18px 16px; }
  .quiz-panel form { display: flex; flex: 1; flex-direction: column; }
  .quiz-actions { margin-top: auto; }
  .quiz-actions .btn { min-width: 0; flex: 1; padding-inline: 10px; white-space: nowrap; }
  .driver { grid-template-columns: 28px minmax(0, 1fr); }
  .driver .badge { display: none; }
  .cta-box-actions { flex-direction: column; }
  .calc-kpis { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; } /* una columna: montos completos en una línea */
  .kpi { min-height: 0; padding: 14px; }
  .form-panel { padding: 18px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .recommendation-panel { padding: 22px 18px; }
  .form-actions { align-items: stretch; }
  .form-actions .btn { width: 100%; min-width: 0; }
  .form-status { max-width: none; text-align: left; }
  .footer-contacts { grid-template-columns: 1fr; }
}