/* ¿Qué te conviene? Todo valor sale de tokens.css. */

/* ---------- Estructura ---------- */
html { background: var(--fondo); }
body { min-height: 100vh; min-height: 100dvh; }
#app {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 480px; min-height: 100vh; min-height: 100dvh;
  margin: 0 auto; background: var(--fondo);
}
/* Escritorio: columna central y, a los costados, banda bosque con el patrón de V. */
@media (min-width: 600px) {
  html { background: var(--banda-bosque) url("../marca/patron-v.svg") 0 0 / 56px 56px; }
  body.vtl { background: transparent; }
  #app { box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 24px 60px rgba(0, 0, 0, .28); }
}

.tope {
  display: flex; align-items: center; gap: var(--espacio-3);
  min-height: 56px; padding: var(--espacio-2) var(--espacio-4) 0;
}
.tope__volver { gap: 6px; text-decoration: none; font-weight: 600; flex: none; }
.progreso { display: flex; gap: 6px; flex: 1; margin-left: auto; max-width: 220px; }
.progreso__barra { flex: 1; height: 4px; border-radius: 2px; background: var(--linea); overflow: hidden; }
.progreso__relleno {
  display: block; height: 100%; border-radius: 2px; transform: scaleX(0); transform-origin: left center;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.progreso__barra:nth-child(1) .progreso__relleno { background: var(--bosque); }
.progreso__barra:nth-child(2) .progreso__relleno { background: var(--ladrillo); }
.progreso__barra:nth-child(3) .progreso__relleno { background: var(--ocre); }

#escena { position: relative; flex: 1; overflow-x: hidden; overflow-x: clip; }

/* ---------- Transición entre pantallas ---------- */
.pantalla { padding: var(--espacio-4) var(--espacio-4) var(--espacio-12); }
.pantalla.entra { animation: 240ms cubic-bezier(.2, .8, .2, 1) both; }
.pantalla.entra-der { animation-name: entra-der; }
.pantalla.entra-izq { animation-name: entra-izq; }
.pantalla.sale { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; animation: 240ms cubic-bezier(.2, .8, .2, 1) both; }
.pantalla.sale-izq { animation-name: sale-izq; }
.pantalla.sale-der { animation-name: sale-der; }
@keyframes entra-der { from { opacity: 0; transform: translateX(36px); } }
@keyframes entra-izq { from { opacity: 0; transform: translateX(-36px); } }
@keyframes sale-izq { to { opacity: 0; transform: translateX(-36px); } }
@keyframes sale-der { to { opacity: 0; transform: translateX(36px); } }
@keyframes aparece { from { opacity: 0; } }
@keyframes sube { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Títulos ---------- */
.display-xl, .titulo { text-wrap: balance; }
.display-xl em, .titulo em { font-style: italic; color: var(--bosque); }

/* ---------- Inicio ---------- */
.inicio { display: flex; flex-direction: column; align-items: flex-start; padding-top: var(--espacio-8); }
.inicio__logo img { width: 180px; height: auto; }
.inicio__titulo { margin-top: var(--espacio-12); }
.inicio__bajada { margin-top: var(--espacio-4); color: var(--tinta-suave); max-width: 30ch; }
.inicio__boton { margin-top: var(--espacio-8); min-width: 200px; min-height: 56px; font-size: 17px; }
.inicio__pasos { margin-top: var(--espacio-12); display: grid; gap: var(--espacio-3); width: 100%; }
.inicio__paso { display: flex; align-items: center; gap: var(--espacio-3); font-size: 15px; line-height: 22px; color: var(--tinta-suave); }
.inicio__marca { flex: none; width: 22px; height: 6px; border-radius: 3px; }
.inicio__paso--1 .inicio__marca { background: var(--bosque); }
.inicio__paso--2 .inicio__marca { background: var(--ladrillo); }
.inicio__paso--3 .inicio__marca { background: var(--ocre); }

.ultima {
  display: grid; gap: 2px; width: 100%; margin-top: var(--espacio-8); padding: var(--espacio-4) var(--espacio-6);
  text-align: left; cursor: pointer;
  background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio-l); box-shadow: var(--sombra-tarjeta);
  transition: transform .2s ease, border-color .2s ease;
}
.ultima__etiqueta { color: var(--tinta-suave); }
.ultima__nombre { margin-top: 4px; font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.15; font-variation-settings: 'opsz' 36; }
.ultima__productos { font-size: 14px; line-height: 21px; color: var(--tinta-suave); }
.ultima__ver { margin-top: var(--espacio-2); font-size: 14px; font-weight: 700; color: var(--bosque); }
@media (hover: hover) { .ultima:hover { transform: translateY(-3px); border-color: var(--linea-control); } }

.legal { margin-top: var(--espacio-8); color: var(--tinta-suave); }

/* ---------- Preguntas ---------- */
.paso .vtl-chip { margin-bottom: var(--espacio-3); }
.paso__bajada { margin-top: var(--espacio-2); color: var(--tinta-suave); }
.lista, .grilla { display: grid; gap: var(--espacio-3); margin-top: var(--espacio-6); }
.grilla { grid-template-columns: 1fr 1fr; }
.paso__boton { width: 100%; min-height: 56px; margin-top: var(--espacio-6); font-size: 16px; }
.paso__privado { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: var(--espacio-3); color: var(--tinta-suave); }
.paso__privado svg { flex: none; }

.opcion {
  position: relative; display: flex; align-items: center; gap: var(--espacio-3); width: 100%;
  min-height: 64px; padding: var(--espacio-3) var(--espacio-4);
  border-radius: var(--radio-m); border: 1.5px solid var(--linea-control);
  background: var(--superficie); color: var(--tinta);
  font: 500 16px/22px var(--font-sans); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, border-color .15s ease;
}
@media (hover: hover) { .opcion:hover { background: var(--superficie-hundida); } }
.opcion__texto { display: grid; gap: 2px; flex: 1; min-width: 0; }
.opcion__nombre { font-weight: 600; }
.opcion__detalle { font-size: 15px; line-height: 22px; font-weight: 400; color: var(--tinta-suave); }
.opcion--situacion { padding-top: var(--espacio-4); padding-bottom: var(--espacio-4); }
.opcion--situacion .opcion__nombre { font-size: 17px; font-weight: 700; }

.opcion__tilde {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bosque); color: var(--fondo);
  opacity: 0; transform: scale(.4);
}
.opcion[aria-pressed="true"], .opcion[aria-checked="true"] { border-color: var(--bosque); background: var(--cursos-fondo); }
.opcion[aria-pressed="true"] .opcion__detalle, .opcion[aria-checked="true"] .opcion__detalle { color: var(--tinta); }
.opcion[aria-pressed="true"] .opcion__tilde, .opcion[aria-checked="true"] .opcion__tilde {
  opacity: 1; transform: scale(1);
  transition: transform .28s cubic-bezier(.34, 1.8, .64, 1), opacity .1s linear;
}
/* Casillas del filtro: el círculo vacío avisa que se puede marcar más de una. */
.opcion--casilla .opcion__tilde { opacity: 1; transform: none; background: transparent; box-shadow: inset 0 0 0 1.5px var(--linea-control); }
.opcion--casilla .opcion__tilde svg { opacity: 0; }
.opcion--casilla[aria-checked="true"] .opcion__tilde { background: var(--bosque); box-shadow: none; animation: rebote .28s cubic-bezier(.34, 1.8, .64, 1); }
.opcion--casilla[aria-checked="true"] .opcion__tilde svg { opacity: 1; }
@keyframes rebote { from { transform: scale(.6); } }

.opcion--area { flex-direction: column; align-items: flex-start; gap: var(--espacio-3); min-height: 124px; padding: var(--espacio-4); }
.opcion--area .opcion__nombre { font-size: 16px; line-height: 21px; }
.opcion--area .opcion__tilde { position: absolute; top: 12px; right: 12px; }
.opcion__icono {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--cursos-fondo); color: var(--cursos-texto);
  transition: background-color .15s ease;
}
.opcion[aria-pressed="true"] .opcion__icono { background: var(--superficie); }

/* Área con foto: la foto de fondo bajo un degradé de banda bosque (README del kit), texto claro encima. */
.opcion--foto { overflow: hidden; border-color: transparent; background: var(--banda-bosque); color: var(--sobre-bosque); min-height: 148px; justify-content: space-between; isolation: isolate; }
.opcion__foto { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.opcion--foto::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(31, 77, 58, .30) 0%, rgba(31, 77, 58, .62) 45%, rgba(31, 77, 58, .92) 100%);
}
.opcion--foto .opcion__icono { background: rgba(242, 243, 238, .92); color: #1F4D3A; }
.opcion--foto .opcion__nombre { font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.opcion--foto .opcion__tilde { background: var(--sobre-bosque); color: #1F4D3A; }
.opcion--foto[aria-pressed="true"] { background: var(--banda-bosque); border-color: var(--ocre); }
.opcion--foto[aria-pressed="true"] .opcion__icono { background: #F2F3EE; }
@media (hover: hover) {
  .opcion--foto:hover { background: var(--banda-bosque); }
  .opcion--foto:hover .opcion__foto { transform: scale(1.04); }
}

/* ---------- Armando ---------- */
.armando { display: flex; flex-direction: column; align-items: center; padding-top: var(--espacio-20); text-align: center; }
.simbolo--armando { width: 84px; height: 84px; margin-bottom: var(--espacio-8); }
.franja-1 { fill: var(--bosque); }
.franja-2 { fill: #B8402F; }
.franja-3 { fill: #E0A81E; }
.simbolo--armando .franja { animation: franja .42s cubic-bezier(.2, .8, .2, 1) both; }
.simbolo--armando .franja-2 { animation-delay: .22s; }
.simbolo--armando .franja-3 { animation-delay: .44s; }
@keyframes franja { from { opacity: 0; transform: translateY(-12px); } }
.armando__lista { display: grid; gap: var(--espacio-3); margin-top: var(--espacio-8); text-align: left; }
.armando__linea { display: flex; align-items: center; gap: var(--espacio-3); font-weight: 500; color: var(--tinta-suave); animation: linea .01s linear both; }
.armando__tilde {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--linea-control); color: var(--fondo);
  animation: tilde .3s cubic-bezier(.34, 1.8, .64, 1) both;
}
.armando__linea--1, .armando__linea--1 .armando__tilde { animation-delay: .35s; }
.armando__linea--2, .armando__linea--2 .armando__tilde { animation-delay: .8s; }
.armando__linea--3, .armando__linea--3 .armando__tilde { animation-delay: 1.25s; }
@keyframes linea { to { color: var(--tinta); } }
@keyframes tilde { from { transform: scale(.6); } to { background: var(--bosque); box-shadow: none; transform: scale(1); } }

/* ---------- Resultado ---------- */
.resultado { padding-top: var(--espacio-2); }
.res-banda { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: var(--espacio-4); padding: var(--espacio-6); }
.res-banda__chip { background: rgba(242, 243, 238, .14); color: var(--sobre-bosque); }
.res-banda__titulo { margin-top: var(--espacio-3); font-size: 32px; line-height: 1.06; }
.res-banda__situacion { margin-top: var(--espacio-2); font-size: 16px; line-height: 23px; color: var(--sobre-bosque-suave); }
.res-dato { display: grid; justify-items: end; text-align: right; }
.res-dato__numero {
  font-family: var(--font-display); font-weight: 500; font-size: 76px; line-height: .9; letter-spacing: -0.03em;
  font-variation-settings: 'opsz' 40; font-variant-numeric: tabular-nums lining-nums; color: var(--sobre-bosque);
}
.res-dato__unidad { margin-top: 6px; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--sobre-bosque-suave); white-space: nowrap; }

.bloques { display: grid; gap: var(--espacio-8); margin-top: var(--espacio-8); }
.bloque { animation: sube .5s cubic-bezier(.2, .8, .2, 1) both; }
.bloque:nth-child(1) { animation-delay: .12s; }
.bloque:nth-child(2) { animation-delay: .24s; }
.bloque:nth-child(3) { animation-delay: .36s; }
.bloque__cabeza { display: flex; align-items: center; gap: var(--espacio-2); margin-bottom: var(--espacio-3); }
.bloque__numero {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--cursos-fondo); color: var(--cursos-texto); font-size: 13px; font-weight: 700; line-height: 1;
}
.bloque__etiqueta { font-size: 14px; line-height: 18px; font-weight: 700; color: var(--bosque); }
.habito { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.28; letter-spacing: -0.005em; font-variation-settings: 'opsz' 36; text-wrap: pretty; }

.producto {
  display: grid; gap: var(--espacio-3); padding: var(--espacio-6);
  background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio-l); box-shadow: var(--sombra-tarjeta);
}
.producto__cabeza { display: flex; align-items: center; gap: var(--espacio-4); }
.producto__imagen {
  flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px; overflow: hidden;
  background: var(--productos-fondo); color: var(--productos-texto);
}
.producto__imagen img { width: 100%; height: 100%; object-fit: cover; }
/* Con foto: el producto recortado, grande y sin recuadro. La sombra suave lo despega de la tarjeta
   (varios productos son blancos). */
.producto__imagen--foto { width: 128px; height: 128px; border-radius: 0; overflow: visible; background: none; }
.producto__imagen--foto img { object-fit: contain; filter: drop-shadow(0 6px 10px rgba(23, 20, 15, .18)); }
.producto--compacta .producto__imagen.producto__imagen--foto { width: 96px; height: 96px; border-radius: 0; }
@media (prefers-color-scheme: dark) { .producto__imagen--foto img { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .5)); } }
.producto__titulo { display: grid; justify-items: start; gap: var(--espacio-2); min-width: 0; }
.producto__nombre { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.12; letter-spacing: -0.01em; font-variation-settings: 'opsz' 36; text-wrap: balance; }
.producto__que { color: var(--tinta-suave); font-size: 15px; line-height: 23px; }
.pildora {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start;
  padding: 6px 12px; border-radius: var(--radio-pill);
  background: var(--cursos-fondo); color: var(--cursos-texto); font-size: 13px; line-height: 16px; font-weight: 700;
}
.pildora svg { flex: none; }
.producto__dato { padding-top: var(--espacio-3); border-top: 1px solid var(--linea); }
.producto__dato .etiqueta { color: var(--tinta-suave); margin-bottom: 4px; }
.producto__dato p { font-size: 15px; line-height: 23px; }
.producto__contacto { justify-self: start; margin-top: var(--espacio-1); }
.producto--compacta { padding: var(--espacio-4); box-shadow: none; }
.producto--compacta .producto__imagen { width: 56px; height: 56px; border-radius: 14px; }
.producto--compacta .producto__nombre { font-size: 20px; }
.tene { margin-top: var(--espacio-3); padding: 0 var(--espacio-1); color: var(--tinta-suave); }
.tene strong { font-weight: 600; color: var(--tinta); }

.aviso {
  margin-top: var(--espacio-6); padding: var(--espacio-3) var(--espacio-4);
  border-left: 3px solid var(--ladrillo); border-radius: 0 var(--radio-s) var(--radio-s) 0; background: var(--superficie);
  font-size: 15px; line-height: 23px;
  animation: aparece .5s ease .45s both;
}
.aviso + .aviso { margin-top: var(--espacio-3); }
.aviso__titulo { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; color: var(--tinta-suave); }

/* Captura de mail: la salida de menor esfuerzo para quien no abre WhatsApp. */
.mail {
  display: grid; gap: var(--espacio-2); margin-top: var(--espacio-8); padding: var(--espacio-6);
  border: 1px solid var(--linea); border-radius: var(--radio-l); background: var(--superficie);
  animation: aparece .5s ease .48s both;
}
.mail__titulo { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.15; font-variation-settings: 'opsz' 36; }
.mail__bajada { color: var(--tinta-suave); font-size: 15px; line-height: 23px; }
.mail__form { display: flex; flex-wrap: wrap; gap: var(--espacio-2); margin-top: var(--espacio-2); }
.mail__entrada {
  flex: 1 1 11rem; min-width: 0; min-height: 48px; padding: 0 var(--espacio-4);
  font: 400 16px/1.2 var(--font-sans); color: var(--tinta);
  background: var(--fondo); border: 1.5px solid var(--linea-control); border-radius: var(--radio-pill);
}
.mail__entrada::placeholder { color: var(--tinta-suave); }
.mail__entrada:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; border-color: var(--bosque); }
.mail__boton { flex: none; min-height: 48px; }
.mail__boton:disabled { opacity: .5; cursor: progress; }
.mail__aviso:not(:empty) { margin-top: var(--espacio-1); color: var(--ladrillo); font-size: 14px; line-height: 20px; font-weight: 600; }
.mail__gracias { display: flex; align-items: center; gap: var(--espacio-2); font-weight: 600; color: var(--bosque); }
.mail__gracias svg { flex: none; }

.juanma {
  display: grid; gap: var(--espacio-4); margin-top: var(--espacio-8); padding: var(--espacio-6);
  border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea);
  margin-left: calc(var(--espacio-4) * -1); margin-right: calc(var(--espacio-4) * -1);
  padding-left: var(--espacio-4); padding-right: var(--espacio-4);
  background: var(--superficie);
  animation: aparece .5s ease .5s both;
}
.juanma__quien { display: flex; align-items: center; gap: var(--espacio-4); }
.juanma__foto { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.juanma__foto--iniciales {
  display: grid; place-items: center; background: var(--cursos-fondo); color: var(--cursos-texto);
  font-family: var(--font-display); font-weight: 500; font-size: 24px; font-variation-settings: 'opsz' 36;
}
.juanma__titulo { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1.15; font-variation-settings: 'opsz' 36; }
.juanma__linea { margin-top: 4px; font-size: 15px; line-height: 22px; color: var(--tinta-suave); }
.juanma__boton { min-height: 56px; font-size: 17px; }

.acciones { display: grid; justify-items: center; gap: var(--espacio-3); margin-top: var(--espacio-6); }
.acciones .vtl-btn--secundario { width: 100%; }
.acciones__catalogo { margin-top: var(--espacio-1); }
.inicio__catalogo { margin-top: var(--espacio-6); }
.instalar {
  display: grid; gap: var(--espacio-3); margin-top: var(--espacio-6); padding: var(--espacio-4);
  border: 1px solid var(--linea); border-radius: var(--radio-m); background: var(--superficie);
}
.instalar__texto { display: flex; align-items: center; gap: var(--espacio-3); font-weight: 500; }
.instalar__texto svg { flex: none; color: var(--bosque); }
.instalar__botones { display: flex; align-items: center; gap: var(--espacio-4); }

/* ---------- Barra fija (solo celular) y notas ---------- */
.barra-fija {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: var(--espacio-3) var(--espacio-4) calc(var(--espacio-3) + env(safe-area-inset-bottom, 0px));
  background: var(--superficie); border-top: 1px solid var(--linea);
  transform: translateY(110%); visibility: hidden;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .28s;
}
.barra-fija.visible { transform: none; visibility: visible; transition-delay: 0s; }
.barra-fija .vtl-btn { width: 100%; min-height: 52px; font-size: 16px; }
@media (min-width: 600px) { .barra-fija { display: none; } }
@media (max-width: 599px) { body[data-paso="resultado"] .resultado { padding-bottom: 104px; } }

.avisos { position: fixed; left: 0; right: 0; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: grid; justify-items: center; padding: 0 var(--espacio-4); pointer-events: none; }
.nota {
  display: flex; align-items: center; gap: var(--espacio-4); max-width: 448px; padding: var(--espacio-3) var(--espacio-4);
  border-radius: var(--radio-m); background: var(--tinta); color: var(--fondo);
  font-size: 14px; line-height: 20px; font-weight: 500; pointer-events: auto;
  animation: sube .25s ease both; overflow-wrap: anywhere;
}
.nota__accion { flex: none; min-height: 44px; padding: 0 var(--espacio-2); border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.sin-js { padding: var(--espacio-8) var(--espacio-4); }

/* ---------- Reducir movimiento: solo opacidad ---------- */
@media (prefers-reduced-motion: reduce) {
  .pantalla.entra, .bloque, .nota, .aviso, .juanma, .mail { animation: aparece .12s linear both; animation-delay: 0s; }
  .pantalla.sale { animation: none; opacity: 0; }
  .opcion, .opcion__tilde, .opcion__icono, .opcion__foto, .progreso__relleno, .ultima, .barra-fija { transition: none !important; }
  .opcion--foto:hover .opcion__foto { transform: none; }
  .opcion--casilla[aria-checked="true"] .opcion__tilde { animation: none; }
  .ultima:hover { transform: none; }
}
