/* =============================================================================
   DropDigitals — Capa de experiencia (experience.js)
   Tres piezas de retención: barra de progreso del recorrido, riel de hitos
   (solo escritorio), y el asistente "¿Qué necesitas?" con su recomendación.
   Todo usa los tokens de styles.css: funciona igual en claro y oscuro.
   ============================================================================= */

/* ------------------------------------------ Barra de progreso del recorrido */
.xp-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: calc(var(--z-sticky) + 2);
  pointer-events: none;
}

.xp-progress i {
  display: block;
  height: 100%;
  background: var(--brand-strong);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

[data-theme="dark"] .xp-progress i {
  background: var(--brand);
  box-shadow: 0 0 10px oklch(0.72 0.17 51 / 0.55);
}

/* ------------------------------------------------ Riel de hitos (escritorio) */
.xp-rail {
  position: fixed;
  right: clamp(0.7rem, 1.2vw, 1.4rem);
  top: 50%;
  translate: 0 -50%;
  z-index: var(--z-sticky);
  display: none;
  flex-direction: column;
  gap: 0.2rem;
}

@media (min-width: 1200px) and (hover: hover) {
  .xp-rail {
    display: flex;
  }
}

.xp-rail button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.32rem 0.15rem;
  border: 0;
  background: none;
  cursor: pointer;
}

.xp-rail .lbl {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  opacity: 0;
  translate: 8px 0;
  transition: opacity var(--t) var(--ease-out), translate var(--t) var(--ease-out);
}

.xp-rail .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background-color var(--t), box-shadow var(--t), scale var(--t) var(--ease-out);
}

.xp-rail button:hover .lbl,
.xp-rail button.is-cur .lbl {
  opacity: 1;
  translate: 0 0;
}

.xp-rail button:hover .dot {
  background: var(--ink-faint);
}

.xp-rail button.is-cur .dot {
  background: var(--brand);
  scale: 1.4;
  box-shadow: 0 0 0 4px oklch(0.69 0.16 51 / 0.18);
}

.xp-rail button:focus-visible {
  outline: none;
  border-radius: var(--r-sm);
  box-shadow: var(--ring);
}

/* ------------------------------------------------------- Lienzo de confeti */
.xp-confetti {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-toast) + 10);
  pointer-events: none;
}

/* --------------------------------------------------- Movimiento reducido --- */
@media (prefers-reduced-motion: reduce) {

  .xp-rail .lbl,
  .xp-rail .dot {
    transition: none;
  }
}