/* Pasos · Moxen — los estilos del efecto y de la demostración. */
:root {
  --ps-fondo: #0a0a0a;
  --ps-texto: #f4f4f4;
  --ps-tinta: #0a0a0a;                     /* lo que va sobre blanco: el ✓ y el chip elegido */
  --ps-suave: rgba(255, 255, 255, .52);
  --ps-tenue: rgba(255, 255, 255, .28);
  --ps-linea: rgba(255, 255, 255, .1);
  /* la tarjeta y los chips: degradados apenas más claros arriba, con filo de luz */
  --ps-caja-1: #171718;
  --ps-caja-2: #0e0e0f;
  --ps-chip-1: rgba(255, 255, 255, .075);
  --ps-chip-2: rgba(255, 255, 255, .03);
  --ps-filo: rgba(255, 255, 255, .09);
  --ps-sombra: rgba(0, 0, 0, .7);
  --ps-bien: #2fbf71;
  --ps-nodo: 44px;
}

/* ── el efecto ─────────────────────────────────────────────────────── */
/* La barra: un riel entre el primer y el último nodo y, encima, el
   relleno que avanza con un resorte (pasos.js le pone scaleX) y una
   chispa en su punta que brilla según la velocidad. */
.ps-barra { position: relative; display: flex; justify-content: space-between; margin: 0 0 40px; padding: 0 0 26px; list-style: none; border-bottom: 1px solid var(--ps-linea); }
.ps-riel {
  position: absolute; left: calc(var(--ps-nodo) / 2); right: calc(var(--ps-nodo) / 2); top: calc(var(--ps-nodo) / 2 - 1.5px);
  height: 3px; border-radius: 3px; background: var(--ps-linea);
}
.ps-relleno { position: absolute; inset: 0; border-radius: inherit; background: var(--ps-texto); transform-origin: 0 50%; transform: scaleX(0); will-change: transform; }
.ps-chispa {
  position: absolute; left: -14px; top: -13px; width: 28px; height: 28px; border-radius: 50%; opacity: 0; will-change: transform, opacity;
  background: radial-gradient(closest-side, var(--ps-texto), transparent);
}
.ps-nodo { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; width: var(--ps-nodo); }
/* el círculo: un anillo, el número y, debajo, un disco que se infla y un ✓ que se dibuja */
.ps-circulo {
  position: relative; display: grid; place-items: center; width: var(--ps-nodo); height: var(--ps-nodo); border-radius: 50%;
  background: linear-gradient(var(--ps-caja-1), var(--ps-caja-2)); box-shadow: inset 0 0 0 2px var(--ps-linea), 0 0 0 6px var(--ps-caja-1);
  color: var(--ps-tenue); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: color .3s, box-shadow .3s;
}
.ps-disco { position: absolute; inset: 0; border-radius: 50%; background: var(--ps-texto); transform: scale(0); transition: transform .32s cubic-bezier(.5, 0, .75, 0); }
.ps-num { position: relative; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), opacity .3s; }
.ps-circulo svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--ps-tinta); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.ps-circulo path { stroke-dasharray: 1 1.2; stroke-dashoffset: 1.1; transition: stroke-dashoffset .15s; }
.ps-nodo small { white-space: nowrap; color: var(--ps-tenue); font-size: 15px; font-weight: 500; letter-spacing: -.01em; transition: color .3s; }
/* el paso actual: anillo claro y un halo que respira */
.ps-nodo.is-actual .ps-circulo { box-shadow: inset 0 0 0 2px var(--ps-texto), 0 0 0 6px var(--ps-caja-1); color: var(--ps-texto); }
.ps-nodo.is-actual .ps-circulo::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid var(--ps-texto);
  animation: ps-halo 1.8s cubic-bezier(.22, 1, .36, 1) infinite;
}
@keyframes ps-halo { from { transform: scale(.85); opacity: .6; } to { transform: scale(1.4); opacity: 0; } }
.ps-nodo.is-actual small, .ps-nodo.is-hecho small { color: var(--ps-texto); }
/* el paso hecho: cuando la barra llega, el disco se infla con rebote, el
   número se va hacia arriba y el ✓ se dibuja encima */
.ps-nodo.is-hecho .ps-disco { transform: scale(1); transition: transform .55s cubic-bezier(.34, 1.56, .64, 1); }
.ps-nodo.is-hecho .ps-num { transform: translateY(-14px) scale(.5); opacity: 0; transition: transform .3s cubic-bezier(.5, 0, .75, 0), opacity .2s; }
.ps-nodo.is-hecho .ps-circulo path { stroke-dashoffset: 0; transition: stroke-dashoffset .38s cubic-bezier(.65, 0, .35, 1) .14s; }

/* las pantallas: pasos.js anima la que sale y la que entra; aquí solo se decide cuál se ve */
.ps-pantallas { position: relative; height: 304px; }
.ps-paso, .ps-gracias { position: absolute; inset: 0; margin: 0; padding: 0; border: 0; min-width: 0; visibility: hidden; }
.ps-paso.is-visible, .ps-gracias.is-visible { visibility: visible; }

/* ── la demostración ───────────────────────────────────────────────── */
.ps-escena { height: 100%; display: grid; place-items: center; padding: 2rem 1rem; }
.ps-tarjeta {
  position: relative; isolation: isolate; width: min(820px, 100%); padding: 44px 48px 40px; border-radius: 32px;
  background: linear-gradient(var(--ps-caja-1), var(--ps-caja-2));
  box-shadow: inset 0 1px 0 var(--ps-filo), inset 0 0 0 1px var(--ps-linea), 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -16px var(--ps-sombra), 0 60px 120px -40px var(--ps-sombra);
}
/* un grano fino sobre la tarjeta */
.ps-tarjeta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ps-paso legend { float: left; width: 100%; margin: 0 0 30px; padding: 0; font-size: 40px; font-weight: 600; letter-spacing: -.045em; line-height: 1.05; }
.ps-chips { clear: both; display: flex; flex-wrap: wrap; gap: 12px; }
.ps-chips label { display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ps-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
/* el chip: al elegirlo, un disco blanco se infla desde donde tocaste */
.ps-chips span {
  position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; height: 62px; padding: 0 26px; border-radius: 99px;
  background: linear-gradient(var(--ps-chip-1), var(--ps-chip-2));
  box-shadow: inset 0 1px 0 var(--ps-filo), inset 0 0 0 1px var(--ps-linea), 0 1px 2px rgba(0, 0, 0, .25);
  font-size: 19px; font-weight: 500; letter-spacing: -.01em;
  transition: color .2s .06s, box-shadow .25s, transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.ps-chips span::before {
  content: ""; position: absolute; z-index: -1; left: var(--x, 50%); top: var(--y, 50%); width: 560px; height: 560px; margin: -280px 0 0 -280px;
  border-radius: 50%; background: var(--ps-texto); transform: scale(0); transition: transform .3s cubic-bezier(.4, 0, 1, 1);
}
.ps-chips label:hover span { box-shadow: inset 0 1px 0 var(--ps-filo), inset 0 0 0 1px var(--ps-suave), 0 6px 16px -8px var(--ps-sombra); transform: translateY(-1px); }
.ps-chips label:active span { transform: scale(.96); }
.ps-chips input:checked + span { color: var(--ps-tinta); box-shadow: inset 0 0 0 1px var(--ps-texto), 0 10px 24px -10px var(--ps-sombra); }
.ps-chips input:checked + span::before { transform: scale(1); transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.ps-chips input:focus-visible + span { outline: 2px solid var(--ps-suave); outline-offset: 4px; }

.ps-resumen { clear: both; margin: 0 0 28px; font-size: 19px; }
.ps-resumen div { display: grid; grid-template-columns: 180px 1fr; padding: 11px 0; border-top: 1px solid var(--ps-linea); }
.ps-resumen div:last-child { border-bottom: 1px solid var(--ps-linea); }
.ps-resumen dt { color: var(--ps-suave); }
.ps-resumen dd { margin: 0; font-weight: 500; }
.ps-enviar {
  display: flex; align-items: center; gap: 12px; width: fit-content; height: 60px; margin-left: auto; padding: 0 30px; border: 0; border-radius: 99px;
  background: var(--ps-texto); color: var(--ps-tinta); font: inherit; font-size: 19px; font-weight: 600; cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 12px 28px -12px var(--ps-sombra);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.ps-enviar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.ps-enviar:hover svg { transform: translateX(4px); }
.ps-enviar:active { transform: scale(.96); }
.ps-enviar:focus-visible { outline: 2px solid var(--ps-suave); outline-offset: 4px; }

.ps-gracias { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; }
.ps-sello { position: relative; width: 104px; height: 104px; }
.ps-sello svg { position: absolute; inset: 0; overflow: visible; fill: none; stroke: var(--ps-bien); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ps-sello circle, .ps-sello path { stroke-dasharray: 1 1.2; stroke-dashoffset: 1.1; }
.ps-gracias.is-visible circle { stroke-dashoffset: 0; transition: stroke-dashoffset .6s cubic-bezier(.65, 0, .35, 1) .35s; }
.ps-gracias.is-visible path { stroke-dashoffset: 0; transition: stroke-dashoffset .4s cubic-bezier(.65, 0, .35, 1) .8s; }
/* las partículas del final: las lanza pasos.js */
.ps-sello i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--ps-texto); opacity: 0; }
.ps-gracias p { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -.035em; }

.ps-atras {
  position: absolute; left: 48px; bottom: 34px; padding: 8px 2px; border: 0; background: none; border-radius: 8px;
  color: var(--ps-suave); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: opacity .3s, color .2s;
}
.ps-atras:hover { color: var(--ps-texto); }
.ps-atras:focus-visible { outline: 2px solid var(--ps-suave); outline-offset: 2px; }
.ps-atras[hidden] { display: block; opacity: 0; pointer-events: none; }

@media (max-width: 640px) {
  :root { --ps-nodo: 34px; }
  .ps-tarjeta { padding: 28px 20px 26px; border-radius: 24px; }
  .ps-nodo small { font-size: 12px; }
  .ps-pantallas { height: 330px; }
  .ps-paso legend { font-size: 28px; margin-bottom: 22px; }
  .ps-chips { gap: 8px; }
  .ps-chips span { height: 50px; padding: 0 18px; font-size: 16px; }
  .ps-resumen { font-size: 16px; }
  .ps-resumen div { grid-template-columns: 110px 1fr; }
  .ps-atras { left: 20px; bottom: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-nodo.is-actual .ps-circulo::after { animation: none; }
  .ps-disco, .ps-num, .ps-chips span, .ps-chips span::before { transition-duration: .01s !important; }
}
