A number of ways to construct it but pretty much all require custom code.
I’d probably do it as;
Collection list, contains all of the cards
Per-item button, which triggers the interaction to fade-out all cards, and fade in only the current one ( by sibling target ).
JS which handles the trigger event, picks a random card, clicks that button
Another approach would be to use swiper.js, randomize your deck, and your link would trigger a slide advance. Swiper has different transitions, one of which is a fade-out / fade-in effect.