/* Galenia Partners · Funnel de captación vendedor · CSS
   Tokens base: css/tokens.css (generado desde web/src/styles/tokens.css)
   Solo se definen aquí las variables específicas del funnel. */

:root {
  /* Variables específicas del funnel — no están en el canon base */
  --ajuste-pos: var(--menta-senal);
  --ajuste-neg: #C2673A;
  /* Mismos alias que usa landing/css/home.css (T-136: antes esta hoja no los
     tenía y el fondo de escritorio salía plano). --verde-tinte ya vive en
     tokens.css con el mismo nombre, así que no se redeclara aquí. */
  --lima-tinte:  var(--premium-soft);
  --filete-lima: color-mix(in srgb, var(--lima) 45%, transparent);
}

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

body {
  margin: 0;
  background: var(--blanco-roto);
  color: var(--tinta);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* Titulares en la sans de marca (Outfit), igual que la landing:
   antes esta hoja no fijaba font-family en los titulares y heredaban la sans
   del body — quedaba desalineado con index.html. Las cifras (.valo .fig) se
   quedan fuera a propósito: las cifras nunca van en la fuente de titulares (regla de
   marca, ver home.css). */
h1, h2, .q { font-family: var(--font-display); }

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px max(18px, env(safe-area-inset-right, 0px)) 12px max(18px, env(safe-area-inset-left, 0px));
  background: var(--verde-hondo);
  color: #fff;
}
.topbar .volver {
  color: var(--lima);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 4px;
}
.topbar .volver:hover { text-decoration: underline; }
.topbar a:focus-visible { outline: 3px solid var(--lima); outline-offset: 3px; border-radius: 6px; }
/* Logo v2 sobre fondo oscuro (--verde-hondo): versión «inv» (letras blancas,
   g y destello lima). Ancho mínimo legible 110px. */
.topbar .brand {
  display: flex;
  align-items: center;
}
.topbar .brand-logo-img {
  display: block;
  width: 116px;
  height: auto;
}

/* ── STAGE / PHONE FRAME ─────────────────────────────────────────────────
   T-136: en escritorio la tarjeta angosta centrada dejaba ~900px de fondo
   muerto a los lados — válido en móvil (es la pantalla entera), roto en
   escritorio. .stage-grid añade una columna de contexto (.pitch) a la
   izquierda desde 1001px; por debajo de eso colapsa a una sola columna y
   .pitch desaparece (no hay sitio ni falta: la tarjeta ya es la pantalla). */
.stage {
  padding: 22px 14px 60px;
  background: radial-gradient(700px 320px at 100% 0%, var(--lima-tinte), transparent 62%), var(--blanco-roto);
}
.stage-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.phone {
  width: 100%;
  max-width: 420px;
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: var(--r-l);
  box-shadow: var(--sombra-m);
  overflow: hidden;
}
.phone .view {
  padding: 24px 22px 28px;
  overflow-y: auto;
}

/* ── ARGUMENTARIO DE ESCRITORIO (.pitch) ──────────────────────────────────
   Mismo lenguaje visual que landing/css/home.css: eyebrow lima/verde, titular en
   serif, lista con "tic" circular. Contenido copiado literalmente de la
   sección «El método, no una cifra a ojo» de index.html — nada nuevo que
   inventar, mismas frases ya validadas. Oculto por defecto; aparece solo en
   el layout de escritorio (media query más abajo). */
.pitch { display: none; }
.pitch-eyebrow {
  font-family: var(--font);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--verde-botica);
  margin: 0 0 16px;
}
.pitch-h1 {
  font-size: clamp(30px, 2.6vw, 40px);
  line-height: 1.12;
  letter-spacing: 0;
  margin: 0 0 16px;
  max-width: 15ch;
}
.pitch-lead {
  font-size: 17px;
  color: var(--bruma);
  line-height: 1.55;
  max-width: 46ch;
  margin: 0 0 30px;
}
.pitch-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 44ch;
}
.pitch-list li {
  display: flex;
  gap: 13px;
  font-size: 15.5px;
  color: var(--tinta);
  line-height: 1.45;
}
.pitch-tic {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--verde-galenia);
  color: #fff;
  display: grid;
  place-items: center;
}
.pitch-tic svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ── SCREENS ─────────────────────────────────────────────── */
.screen { display: none; }
.screen.active {
  display: block;
  animation: fade .22s ease;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .screen.active { animation: none; }
}

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--verde-botica);
}
.lbl {
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--verde-botica);
  display: block;
}
h1 {
  font-weight: 600;
  font-size: 33px;
  line-height: 1.05;
  letter-spacing: -.005em;
  margin: 0 0 11px;
}
h2 {
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0;
  margin: 0 0 8px;
}
.lead {
  font-size: 16px;
  color: var(--bruma);
  margin: 0 0 18px;
  line-height: 1.45;
}
.q {
  font-weight: 600;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 2px 0 14px;
}
.muted {
  color: var(--bruma);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 10px;
}
.helper {
  font-size: 12.5px;
  color: var(--bruma);
  margin: 7px 0 0;
  line-height: 1.4;
}
.disc {
  font-size: 11px;
  color: var(--bruma);
  margin: 15px 0 0;
  line-height: 1.45;
}
.narr {
  font-size: 13.5px;
  color: var(--tinta);
  line-height: 1.5;
  margin: 13px 0 0;
}
.nudge {
  font-size: 13px;
  color: var(--bruma);
  margin: 13px 0 0;
}

/* Nota: esta hoja tenía un bloque .mark/.wordmark para un logo duplicado
   dentro de la tarjeta (S0) además del de la topbar — T-136 lo quitó del
   HTML porque salía el logotipo dos veces en la misma pantalla; con eso el
   CSS quedaba muerto, así que se retira también. El logo vive una sola vez,
   en .topbar, visible en todas las pantallas. */

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  border: 0;
  border-radius: var(--r-pill);
  padding: 14px 20px;
  min-height: 50px;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  line-height: 1.2;
  transition: opacity .15s;
  text-decoration: none;
}
.btn:hover { opacity: .88; }
.btn:focus-visible {
  outline: 3px solid var(--menta-senal);
  outline-offset: 3px;
}
.btn-primary { background: var(--verde-botica); color: #fff; }
.btn-menta   { background: var(--lima); color: var(--verde-hondo); }
.btn-ghost   { background: transparent; color: var(--verde-botica); box-shadow: inset 0 0 0 1.5px var(--linea); }
.btn-block   { display: block; width: 100%; }
.row { display: flex; gap: 10px; margin-top: 6px; }
.row .btn-ghost { flex: 0 0 auto; }
.row .btn-primary { flex: 1; }

/* ── BADGES ──────────────────────────────────────────────── */
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  background: var(--verde-tinte);
  color: var(--verde-hondo);
}
.bdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--menta-senal);
  flex-shrink: 0;
}

/* ── STEP HEADER + PROGRESS ──────────────────────────────── */
.stephead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.progress {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--linea);
  overflow: hidden;
  margin-bottom: 16px;
}
.progress > i {
  display: block;
  height: 100%;
  background: var(--verde-botica);
  border-radius: var(--r-pill);
  transition: width .3s ease;
}

/* ── FIELDS + INPUTS ─────────────────────────────────────── */
.field {
  display: block;
  margin-top: 12px;
}
.field span, .field-lbl {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  padding: 13px 14px;
  border: 1.5px solid var(--linea);
  border-radius: var(--r-m);
  background: var(--papel);
  color: var(--tinta);
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%234F5D55' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.field input:focus,
.field select:focus {
  outline: 3px solid var(--menta-senal);
  outline-offset: 0;
  border-color: var(--verde-botica);
}
.field input.err,
.field select.err {
  border-color: var(--alerta);
}
.err-msg {
  font-size: 12.5px;
  color: var(--alerta);
  margin: 5px 0 0;
  display: none;
}
.err-msg.show { display: block; }
.warn-msg {
  font-size: 12.5px;
  color: var(--ambar);
  margin: 5px 0 0;
  display: none;
}
.warn-msg.show { display: block; }

/* ── OPTIONS (tap cards) ─────────────────────────────────── */
.opts { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.opt {
  padding: 15px 16px;
  min-height: 54px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-m);
  font-weight: 600;
  cursor: pointer;
  transition: border-color .12s, background .12s;
  user-select: none;
}
.opt:hover { border-color: var(--verde-botica); }
.opt:focus-visible { outline: 3px solid var(--menta-senal); outline-offset: 2px; }
.opt.sel {
  border-color: var(--verde-botica);
  background: var(--verde-tinte);
  color: var(--verde-hondo);
  box-shadow: inset 0 0 0 1px var(--verde-galenia);
}

/* ── ACCURACY METER ──────────────────────────────────────── */
.acc { margin-top: 16px; }
.acc .top {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--bruma);
  margin-bottom: 6px;
}
.acc .top b {
  color: var(--tinta);
  font-variant-numeric: tabular-nums;
}
.acc .track {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--linea);
  overflow: hidden;
}
.acc .track > i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--verde-salvia);
  transition: width .4s ease;
}
@media (prefers-reduced-motion: reduce) {
  .acc .track > i { transition: none; }
}
.acc .track.lock > i {
  background: repeating-linear-gradient(
    45deg,
    #D3DDD8,
    #D3DDD8 6px,
    #C6D3CD 6px,
    #C6D3CD 12px
  );
}

.skip {
  display: inline-block;
  margin-top: 12px;
  color: var(--bruma);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  padding: 0;
}
.skip:focus-visible { outline: 3px solid var(--menta-senal); outline-offset: 2px; }

/* ── VALORACION CARD ─────────────────────────────────────── */
.valo {
  background: var(--verde-hondo);
  color: #fff;
  border-radius: var(--r-l);
  padding: 24px 22px;
  box-shadow: var(--sombra-m);
  position: relative;
  overflow: hidden;
}
.valo::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 140px;
  height: 140px;
  opacity: .09;
  background:
    linear-gradient(var(--lima),var(--lima)) center / 22px 100% no-repeat,
    linear-gradient(var(--lima),var(--lima)) center / 100% 22px no-repeat;
}
.valo .k {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--lima);
  margin: 0 0 7px;
}
.valo .fig {
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.valo .vsub {
  color: rgba(255,255,255,.72);
  font-size: 13px;
  margin-top: 7px;
}

/* Skeleton loading */
.valo-skeleton {
  background: var(--verde-hondo);
  border-radius: var(--r-l);
  padding: 24px 22px;
  box-shadow: var(--sombra-m);
}
.skel-line {
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.12);
  animation: pulse 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .skel-line { animation: none; }
}
@keyframes pulse {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}

/* Range bar */
.range { margin-top: 18px; }
.range .bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.16);
  position: relative;
}
.range .fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: var(--r-pill);
  background: var(--lima);
}
.range .pin {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px var(--verde-hondo);
}
.range .ends {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.82);
  font-variant-numeric: tabular-nums;
}

/* ── COLLAPSIBLE BRIDGE ──────────────────────────────────── */
details.collap {
  margin-top: 15px;
  border: 1px solid var(--linea);
  border-radius: var(--r-m);
  overflow: hidden;
}
details.collap > summary {
  list-style: none;
  padding: 13px 15px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: var(--blanco-roto);
  display: flex;
  justify-content: space-between;
  user-select: none;
}
details.collap > summary::-webkit-details-marker { display: none; }
details.collap > summary::after { content: "▾"; color: var(--bruma); }
details.collap[open] > summary::after { content: "▴"; }
.collap .bd { padding: 8px 6px 12px; border-top: 1px solid var(--linea); }

/* Bridge chart */
.bscroll { overflow-x: auto; }
.bscroll svg { display: block; min-width: 640px; width: 100%; height: auto; }
.leg {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--bruma);
  padding: 4px 8px;
}
.leg span { display: inline-flex; align-items: center; gap: 5px; }
.lk { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.bnote { font-size: 10.5px; color: var(--bruma); padding: 0 8px 4px; opacity: .85; }
.v-figd { font-weight: 800; font-size: 13px; fill: var(--tinta); font-variant-numeric: tabular-nums; }
.v-pos  { font-weight: 700; font-size: 12px; fill: var(--verde-botica); }
.v-neg  { font-weight: 700; font-size: 12px; fill: var(--ajuste-neg); }
.cat     { font-weight: 600; font-size: 10.5px; fill: var(--tinta); }
.cat-sub { font-size: 9px; fill: var(--bruma); }

/* ── CARD ────────────────────────────────────────────────── */
.card {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: var(--r-l);
  padding: 18px;
  box-shadow: var(--sombra-s);
}
.card h3 { margin: 0 0 4px; font-weight: 700; font-size: 16px; letter-spacing: -.015em; }

/* Pickcard (s9) */
.pickcard {
  border: 1.5px solid var(--linea);
  border-radius: var(--r-l);
  padding: 18px;
  margin-top: 12px;
}
.pickcard.hi {
  border-color: var(--verde-botica);
  box-shadow: 0 0 0 3px rgba(12,107,78,.08);
}

/* ── NOTE / LOCK / TRUST ─────────────────────────────────── */
.note {
  font-size: 12px;
  color: var(--bruma);
  background: var(--hueso);
  border-radius: var(--r-m);
  padding: 11px 13px;
  margin-top: 14px;
}
.lock {
  font-size: 12px;
  color: var(--bruma);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}
.trust {
  font-size: 12px;
  color: var(--bruma);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}
.assist {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--verde-botica);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  width: 100%;
}
.assist:focus-visible { outline: 3px solid var(--menta-senal); }

/* ── EXIT SCREENS (sdiy/sasedone) ────────────────────────── */
.hero-done {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--premium-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--verde-botica);
  margin: 6px auto 14px;
}
.exit-note {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bruma);
  background: var(--hueso);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  margin-bottom: 8px;
}

/* ── PRIVACY CHECKBOX ────────────────────────────────────── */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--bruma);
  line-height: 1.45;
}
.check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--verde-botica);
  margin-top: 1px;
  cursor: pointer;
}
.check-row a { color: var(--verde-botica); }

/* ── FRANJA SELECTOR (sase) ──────────────────────────────── */
.franja-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-top: 8px;
}

/* ── ERROR BANNER ────────────────────────────────────────── */
.error-banner {
  display: none;
  background: rgba(197,69,59,.08);
  border: 1px solid rgba(197,69,59,.25);
  border-radius: var(--r-m);
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--alerta);
}
.error-banner.show { display: flex; gap: 10px; align-items: flex-start; }
.error-banner button {
  background: none;
  border: none;
  color: var(--alerta);
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: 2px;
  white-space: nowrap;
}

/* ── BLOQUE MERCADO BLOQUEADO ─────────────────────────────── */
.market-blocked {
  background: var(--hueso);
  border: 1px dashed var(--linea);
  border-radius: var(--r-m);
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--bruma);
  text-align: center;
}
.market-blocked .lock-icon { margin-bottom: 4px; display: flex; justify-content: center; color: var(--verde-galenia); }
.market-blocked .lock-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── BANNER "VER ESTIMACION ANTERIOR" ───────────────────── */
.prev-banner {
  background: rgba(12,107,78,.06);
  border: 1px solid rgba(12,107,78,.15);
  border-radius: var(--r-m);
  padding: 12px 14px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--tinta);
}
.prev-banner button {
  background: var(--verde-botica);
  color: #fff;
  border: none;
  border-radius: var(--r-pill);
  padding: 7px 13px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.prev-banner button:focus-visible { outline: 3px solid var(--menta-senal); }

/* ── NOTA PROVINCIA FALLBACK ─────────────────────────────── */
.prov-fallback {
  display: none;
  font-size: 12.5px;
  color: var(--ambar);
  margin: 6px 0 0;
}
.prov-fallback.show { display: block; }

/* ── RESPONSIVE ──────────────────────────────────────────── */

/* Escritorio: dos columnas (argumentario + tarjeta) y fondo trabajado en vez
   del crema plano — mismo recurso que .hero de home.css (radiales suaves de
   verde y lima), para que las dos páginas se reconozcan como la misma
   marca. La tarjeta se queda con su ancho de siempre (420px): no se estira,
   solo deja de estar sola. */
@media (min-width: 1001px) {
  .stage {
    padding: 72px 32px 96px;
    background:
      radial-gradient(1100px 480px at 10% -12%, var(--verde-tinte), transparent 60%),
      radial-gradient(900px 420px at 94% 4%, var(--lima-tinte), transparent 58%);
  }
  .stage-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 72px;
    align-items: start;
  }
  .pitch {
    display: block;
    padding-top: 30px;
    /* Filete lima a la izquierda: separa el argumentario del fondo sin
       meter otra caja, mismo recurso que section+section en home.css. */
    border-left: 1px solid var(--filete-lima);
    padding-left: 40px;
  }
  .phone { margin: 0; max-width: 480px; }
  .pitch-h1 { font-size: clamp(38px, 3.6vw, 52px); max-width: 16ch; }
}

/* Barra alineada con la columna central en escritorio */
@media (min-width: 1001px) {
  .topbar {
    padding-left: max(32px, calc((100vw - 1180px) / 2));
    padding-right: max(32px, calc((100vw - 1180px) / 2));
  }
}

@media (max-width: 460px) {
  .phone { border-radius: var(--r-m); }
  .phone .view { padding: 18px 16px 22px; }
  h1 { font-size: 26px; }
  .valo .fig { font-size: 38px; }
  .stage { padding: 14px 10px 50px; }
}
