/* OnlyFun.ph motion layer (CSS-first). Load AFTER site.css. Pairs with js/motion.js.
   Entrance uses the individual `translate` property; hover/press use `transform`.
   Keeping them on separate properties means the entrance stagger delay never slows a hover. */
:root{
  --m-in:480ms;            /* entrance fade + rise */
  --m-hover:240ms;         /* card/tile lift */
  --m-press:120ms;         /* button press */
  --m-ease:cubic-bezier(.22,1,.36,1);       /* soft ease-out */
  --m-spring:cubic-bezier(.34,1.4,.64,1);   /* gentle spring, small overshoot */
  --m-rise:16px;           /* entrance travel */
  --m-step:50ms;           /* stagger per child */
  --m-lift:-4px;           /* hover lift */
  --m-glow:0 14px 26px -14px rgba(133,46,78,.45);  /* soft plum shadow under the hard pop shadow */
}

/* ---------- A. Hover: cards and tiles (pointer devices only, so taps on mobile don't stick) ---------- */
.card,.tile img,.prov,.faq details{transition:transform var(--m-hover) var(--m-spring),box-shadow var(--m-hover) var(--m-ease)}
@media (hover:hover) and (pointer:fine){
  /* linked cards: full 4px lift */
  a.card:hover,a.card.guide:hover,.card.streamer:hover{transform:translateY(var(--m-lift));box-shadow:5px 9px 0 var(--ink),var(--m-glow)}
  /* info cards (not links): quieter 2px lift so they don't read as buttons */
  .card:not(a):not(.streamer):hover{transform:translateY(-2px);box-shadow:5px 7px 0 var(--ink),var(--m-glow)}
  .grid-cards .card:not(a):hover,.mini-steps .card:hover{box-shadow:3px 5px 0 var(--ink),var(--m-glow)}
  .grid-cards a.card:hover{box-shadow:3px 7px 0 var(--ink),var(--m-glow)}
  /* game tiles: art lifts, label turns plum */
  .tile:hover img{transform:translateY(var(--m-lift));box-shadow:3px 7px 0 var(--ink),var(--m-glow)}
  a.tile{transition:color var(--m-hover) var(--m-ease)}
  a.tile:hover{color:var(--plum)}
  /* press back down */
  a.card:active,a.tile:active img{transform:translateY(-1px);transition-duration:var(--m-press)}
}
/* keyboard users get the same lift */
a.card:focus-visible{transform:translateY(var(--m-lift));box-shadow:5px 9px 0 var(--ink),var(--m-glow)}
a.tile:focus-visible img{transform:translateY(var(--m-lift))}

/* ---------- B. Buttons: keep the 3D bottom shadow, lift on hover, sink on press ---------- */
.btn{transition:transform var(--m-hover) var(--m-spring),box-shadow var(--m-hover) var(--m-ease),filter var(--m-hover) var(--m-ease)}
@media (hover:hover) and (pointer:fine){
  .btn-play:hover{transform:translateY(-2px);filter:saturate(1.08) brightness(1.03);
    box-shadow:inset 0 3px 0 rgba(255,255,255,.35),inset 0 -4px 0 rgba(62,20,38,.35),0 7px 0 var(--ink),var(--m-glow)}
  .btn-ghost:hover{transform:translateY(-2px);box-shadow:0 7px 0 var(--ink),var(--m-glow)}
}
.btn-play:active{transform:translateY(3px);transition-duration:var(--m-press);filter:none;
  box-shadow:inset 0 3px 0 rgba(255,255,255,.25),inset 0 -2px 0 rgba(62,20,38,.35),0 2px 0 var(--ink)}
.btn-ghost:active{transform:translateY(3px);transition-duration:var(--m-press);box-shadow:0 2px 0 var(--ink)}
.btn:focus-visible{outline:3px solid var(--coral);outline-offset:3px}

/* ---------- C. Entrance (motion.js marks below-the-fold items with [data-m], then adds .is-in) ---------- */
html [data-m]{
  opacity:0;translate:0 var(--m-rise);
  transition:opacity var(--m-in) var(--m-ease) calc(var(--m-i,0) * var(--m-step)),
             translate var(--m-in) var(--m-ease) calc(var(--m-i,0) * var(--m-step)),
             transform var(--m-hover) var(--m-spring),
             box-shadow var(--m-hover) var(--m-ease);
}
html [data-m].is-in{opacity:1;translate:0 0}

/* ---------- D. LIVE pulse (CSS fallback; motion.js swaps in the Lottie dot when it loads) ---------- */
@keyframes m-live{0%{box-shadow:0 0 0 0 rgba(249,149,144,.85)}70%{box-shadow:0 0 0 6px rgba(249,149,144,0)}100%{box-shadow:0 0 0 0 rgba(249,149,144,0)}}
.live::before{animation:m-live 1.5s var(--m-ease) infinite}
.live .m-live-dot{width:16px;height:16px;margin:-3px -2px -3px -5px;flex:none;display:inline-block}
.live.has-lottie::before{display:none}

/* ---------- E. How to Register: step check badge (Lottie, plays once as the step enters) ---------- */
.step-n{position:relative}
.step-n .m-check{position:absolute;right:-11px;top:-11px;width:24px;height:24px;pointer-events:none}

/* ---------- F. Reduced motion: everything visible, no travel, no loops ---------- */
@media (prefers-reduced-motion:reduce){
  html [data-m]{opacity:1;translate:none;transition:none}
  .card,.tile img,.btn,.prov,.faq details,a.tile{transition:none}
  a.card:hover,a.card.guide:hover,.card.streamer:hover,.card:not(a):hover,.tile:hover img,
  a.card:focus-visible,a.tile:focus-visible img,.btn-play:hover,.btn-ghost:hover,.btn-play:active,.btn-ghost:active,a.card:active,a.tile:active img{transform:none}
  .live::before{animation:none}
}
