/* Build 50 interaction: every control answers a press and a hover, and the home screen is never still.
   interact50.js adds the squeeze, the ripple, the overlay arrival and the snow; this sheet styles them and adds
   the hover and focus states. Everything is off under Reduce motion (the in-game setting and the system one). */

/* The ripple lives in its own fixed layer, clipped to the control it belongs to, so no control's layout changes. */
.press-ripple{position:fixed;z-index:2147483000;overflow:hidden;pointer-events:none;contain:strict}
.press-ripple>i{position:absolute;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.55),rgba(255,255,255,.28) 55%,rgba(255,255,255,0) 72%);will-change:transform,opacity}

/* Snow across the home screen, between the painting and the rider. */
.home-snow{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;opacity:0;transition:opacity .6s}

/* Hover: a control under the pointer lights up before it is pressed. `:where` keeps this from outranking any
   component that already has its own hover. */
@media (hover:hover){
  :where(button,[role="button"],summary,select,a[href]):where(:not(:disabled)):hover{filter:brightness(1.09)}
  :where(button,[role="button"],summary,a[href]):where(:not(:disabled)){transition:filter .16s ease,translate .16s cubic-bezier(.2,.75,.25,1),box-shadow .16s ease}
  /* Cards and big calls to action lift a little as well. */
  :where(.finder-card,.mode-card,.run-card,.store-card,.gear-store-card,.equipped-slot,.pass-cell,.mission-card,.crate-card,.deal-card,.home-today-row,.home-friends,.atlas-pin,.journey-chapter,.pack-card button):where(:not(:disabled)):hover{translate:0 -2px}
  /* An arrow on a control leans the way it points. */
  :where(button,a[href]):hover>:where(i,span,em).arrow,:where(.home-ride,.home-friends,.home-change-line,.play-button):hover>:where(i:last-child){translate:2px -2px}
}
:where(button,[role="button"],summary,a[href])>:where(i:last-child){transition:translate .18s cubic-bezier(.2,.75,.25,1)}

/* Keyboard riders see where they are on every screen. */
:where(button,[role="button"],summary,select,a[href],input,[tabindex]):focus-visible{outline:2px solid var(--brand-focus);outline-offset:2px;box-shadow:0 0 0 2px var(--brand-navy)}

/* The selected tab's highlight eases in instead of jumping. */
.lobby-tab,.panel-tab,[role="tab"]{transition:background-color .2s ease,color .2s ease,box-shadow .2s ease}

/* The big RIDE button catches the light every few seconds, and breathes while it waits. */
.home-ride:not(:disabled){position:relative;overflow:hidden}
.home-ride:not(:disabled)::after{content:'';position:absolute;top:0;bottom:0;left:-60%;width:38%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.42),transparent);transform:skewX(-20deg);animation:ride-sheen 4.2s 1.4s infinite;pointer-events:none}
@keyframes ride-sheen{0%,72%{left:-60%}100%{left:135%}}
.home-ride:not(:disabled)>i{animation:ride-nudge 4.2s 1.4s infinite}
@keyframes ride-nudge{0%,78%,100%{transform:none}86%{transform:translate(4px,-4px)}}

/* Numbers that change (stars, credits, tier) tick over rather than swap. */
.wallet b,.wallet strong,[data-count]{font-variant-numeric:tabular-nums}

body.reduced-motion .press-ripple,body.reduced-motion .home-snow{display:none}
body.reduced-motion .home-ride::after,body.reduced-motion .home-ride>i{animation:none}
body.reduced-motion :where(button,[role="button"],summary,a[href]){transition:none}
body.reduced-motion :where(.finder-card,.mode-card,.run-card,.store-card,.gear-store-card,.equipped-slot,.pass-cell,.mission-card,.crate-card,.deal-card,.home-today-row,.home-friends,.atlas-pin,.journey-chapter):hover{translate:none}
@media (prefers-reduced-motion:reduce){
  .press-ripple,.home-snow{display:none}
  .home-ride::after,.home-ride>i{animation:none}
  :where(button,[role="button"],summary,a[href]){transition:none}
  :where(.finder-card,.mode-card,.run-card,.store-card,.gear-store-card,.equipped-slot,.pass-cell,.mission-card,.crate-card,.deal-card,.home-today-row,.home-friends,.atlas-pin,.journey-chapter):hover{translate:none}
}
