/*
 * The homepage's tour (Simon, 17 Nov 2026), on top of css/buy-demo.css: the recording takes the larger front
 * place and the Stacked Wallet's balance still takes the back place, and each of the four captions lights only
 * while its part of the recording plays. Cut from one take (preview-tools/record/wallet-plans/home-tour/, joined by tour-join.sh):
 * loop 66.3 s; the buy starts at 3.8 s, the switch to the wallet at 27.3 s, Autostack at 44.4 s, and the
 * dashboard comes back at 64.8 s, so caption 1 lights again into the loop.
 * Hand-written. When the tour joins hero-demos.json, let hero-css.py write it.
 */

@media (min-width: 861px) {
  .bd--tour .bd-phone--recording { --gp-n: 310; left: auto; right: 0; top: 0; z-index: 1; }
  .bd--tour .bd-phone--still { --gp-n: 262; right: auto; left: 0; top: 70px; z-index: 0; }
}

.bd--tour { --bd-loop: 66.3s; }

/* Off, then on for its own part only. */
@keyframes bdTourStep1 { 0%, 4.9% { background: var(--bs-teal); color: var(--bs-slate); border-color: var(--bs-teal); } 5.7%, 96.9% { background: transparent; color: var(--bs-white); border-color: var(--bs-outline); } 97.7%, 100% { background: var(--bs-teal); color: var(--bs-slate); border-color: var(--bs-teal); } }
@keyframes bdTourStep2 { 0%, 4.9% { background: transparent; color: var(--bs-white); border-color: var(--bs-outline); } 5.7%, 40.4% { background: var(--bs-teal); color: var(--bs-slate); border-color: var(--bs-teal); } 41.2%, 100% { background: transparent; color: var(--bs-white); border-color: var(--bs-outline); } }
@keyframes bdTourStep3 { 0%, 40.4% { background: transparent; color: var(--bs-white); border-color: var(--bs-outline); } 41.2%, 66.3% { background: var(--bs-teal); color: var(--bs-slate); border-color: var(--bs-teal); } 67.1%, 100% { background: transparent; color: var(--bs-white); border-color: var(--bs-outline); } }
@keyframes bdTourStep4 { 0%, 66.3% { background: transparent; color: var(--bs-white); border-color: var(--bs-outline); } 67.1%, 96.9% { background: var(--bs-teal); color: var(--bs-slate); border-color: var(--bs-teal); } 97.7%, 100% { background: transparent; color: var(--bs-white); border-color: var(--bs-outline); } }

@media (prefers-reduced-motion: no-preference) {
  .bd--tour .bd-st1 .bd-badge { animation: bdTourStep1 var(--bd-loop) linear infinite; }
  .bd--tour .bd-st2 .bd-badge { animation: bdTourStep2 var(--bd-loop) linear infinite; }
  .bd--tour .bd-st3 .bd-badge { animation: bdTourStep3 var(--bd-loop) linear infinite; }
  .bd--tour .bd-st4 .bd-badge { animation: bdTourStep4 var(--bd-loop) linear infinite; }
}
