/* pulido: movimiento suave, estados al pulsar, esqueleto de carga y presentación inicial */

/* ---------- cambio de pantalla ---------- */
.contenido.entra-vista { animation: pulido-entra 0.2s ease-out; }
@keyframes pulido-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- hojas: el fondo aparece a la vez que sube la hoja ---------- */
.hoja-fondo { animation: pulido-aparece 0.18s ease-out; }
@keyframes pulido-aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulido-desaparece { from { opacity: 1; } to { opacity: 0; } }

/* ---------- al pulsar ---------- */
.btn-icono, .pestana, .rapido, .servicio, .tarjeta-boton, .segmentos button, .cat-op, .idioma-op, .btn-enlace {
  transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-icono:active, .rapido:active, .cat-op:active, .idioma-op:active, .segmentos button:active { transform: scale(0.96); }
.pestana:active { transform: scale(0.94); }
.tarjeta-boton:active { transform: scale(0.99); }
.btn-enlace:active { opacity: 0.6; }
.pestana .icono { transition: transform 0.18s ease; }
.pestana.activa .icono { transform: translateY(-1px); }

/* ---------- esqueleto de carga (para quien lo necesite) ---------- */
.cargando-esqueleto {
  display: block;
  min-height: 1em;
  border-radius: 10px;
  color: transparent;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--linea) 70%, transparent) 25%,
    color-mix(in srgb, var(--linea) 30%, transparent) 50%,
    color-mix(in srgb, var(--linea) 70%, transparent) 75%);
  background-size: 300% 100%;
  animation: pulido-brillo 1.4s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}
@keyframes pulido-brillo { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- presentación inicial ---------- */
.tour-fondo {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: var(--fondo);
  animation: pulido-aparece 0.2s ease-out;
}
.tour-fondo.saliendo { animation: pulido-desaparece 0.18s ease-in forwards; }
.tour {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 8px) 16px calc(env(safe-area-inset-bottom) + 20px);
}
.tour-cab { display: flex; justify-content: flex-end; min-height: 44px; }
.tour-ventana { flex: 1; overflow: hidden; display: flex; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tour-pista { display: flex; width: 100%; transition: transform 0.25s ease; }
.tour-pista.arrastrando { transition: none; }
.tour-paso {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 0 12px;
}
.tour-emoji {
  font-size: 72px;
  line-height: 1;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 36px;
  background: var(--acento-suave);
  margin-bottom: 14px;
}
.tour-titulo { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; }
.tour-texto { margin: 0; max-width: 340px; color: var(--suave); font-size: 18px; }
.tour-puntos { display: flex; justify-content: center; gap: 2px; margin: 12px 0 16px; }
.tour-punto {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
}
.tour-punto::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--linea);
  transition: width 0.2s ease, background-color 0.2s ease;
}
.tour-punto.activo::before { width: 22px; background: var(--acento); }
.tour-acciones { display: flex; gap: 10px; }
.tour-acciones .btn { flex: 1; }
.tour-acciones .tour-siguiente { flex: 2; }

/* ---------- sin movimiento si así se pide ---------- */
@media (prefers-reduced-motion: reduce) {
  .contenido.entra-vista, .hoja-fondo, .tour-fondo, .tour-fondo.saliendo { animation: none; }
  .btn-icono, .pestana, .pestana .icono, .rapido, .servicio, .tarjeta-boton, .segmentos button, .cat-op, .idioma-op, .btn-enlace,
  .tour-pista, .tour-punto::before { transition: none; }
  .btn-icono:active, .rapido:active, .cat-op:active, .idioma-op:active, .segmentos button:active,
  .pestana:active, .tarjeta-boton:active, .servicio:active, .btn:active { transform: none; }
  .pestana.activa .icono { transform: none; }
  .cargando-esqueleto { animation: none; }
}
