/* delight: small moments, all in the route-board world */

/* the route lights up to the stop you point at */
.stops li:hover::before, .stops li:has(~ li:hover)::before,
.stops li:focus-within::before, .stops li:has(~ li:focus-within)::before { background: var(--red); border-color: var(--red); }
.stops li:has(~ li:hover)::after, .stops li:has(~ li:focus-within)::after { background: var(--red); }
.stops li::before, .stops li::after { transition: background-color .18s, border-color .18s; }
.route li { cursor: default; }
.route li:hover .pin, .route li:has(~ li:hover) .pin { border-color: var(--red); }
.route li:hover .lbl { color: var(--red-deep); }
.route .pin { transition: border-color .2s, transform .2s cubic-bezier(.16, 1, .3, 1); }
.route li:hover .pin { transform: scale(1.18); }

/* lyrics: a line and its translation light up together */
.lyrow:not(.lyhead) { margin: 0 -10px; padding: 1px 10px; border-radius: 2px; transition: background-color .15s; }
.lyrow:not(.lyhead):hover, .lyrow.on { background: #F7DCDC; }
.lyrow:not(.lyhead):hover .e, .lyrow.on .e { color: var(--ink); }

/* language switch: the board changes like a destination blind */
@keyframes blind { from { clip-path: inset(0 0 100% 0); transform: translateY(-.25em); } to { clip-path: inset(0 0 0 0); transform: none; } }
.reblind h1, .reblind h2, .reblind .lbl, .reblind .nav a, .reblind .foot-tag, .reblind .what h3 { animation: blind .42s cubic-bezier(.16, 1, .3, 1) both; }
.reblind .nav a:nth-child(2), .reblind .route li:nth-child(2) .lbl { animation-delay: .04s; }
.reblind .nav a:nth-child(3), .reblind .route li:nth-child(3) .lbl { animation-delay: .08s; }
.reblind .nav a:nth-child(4), .reblind .route li:nth-child(4) .lbl { animation-delay: .12s; }
.reblind .nav a:nth-child(5), .reblind .route li:nth-child(5) .lbl { animation-delay: .16s; }

/* filter: the list rolls in, first rows only */
@keyframes rowin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rolling > li:nth-child(-n+8) { animation: rowin .38s cubic-bezier(.16, 1, .3, 1) both; }
.rolling > li:nth-child(2) { animation-delay: .03s; } .rolling > li:nth-child(3) { animation-delay: .06s; }
.rolling > li:nth-child(4) { animation-delay: .09s; } .rolling > li:nth-child(5) { animation-delay: .12s; }
.rolling > li:nth-child(6) { animation-delay: .15s; } .rolling > li:nth-child(7) { animation-delay: .18s; }
.rolling > li:nth-child(8) { animation-delay: .21s; }

/* the ticket box prints from the top */
@keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
dialog[open] { animation: print .36s cubic-bezier(.16, 1, .3, 1); }

/* the plate's two dots */
.mark:hover .plate { background: var(--red-deep); box-shadow: inset 0 0 0 2px var(--red-deep), inset 0 0 0 3.5px #fff; }
.plate { transition: background-color .2s, box-shadow .2s; }

@media (prefers-reduced-motion: reduce) {
  .reblind *, .rolling > li, dialog[open] { animation: none !important; }
  .route li:hover .pin { transform: none; }
}
