/* ANIMUS MOTION V9 — progressive, GPU-friendly motion layer. */
:root { --am-ease: cubic-bezier(.22,1,.36,1); --am-tint: #a5f9e5; }

/* The five real wallpapers stay inside the existing V8 hero geometry. */
@keyframes am-hero-drift { from { transform:scale(1.01) translate3d(0,0,0) } to { transform:scale(1.075) translate3d(-.5%,.25%,0) } }
@keyframes am-hero-copy { from { opacity:0; transform:translate3d(0,23px,0) } to { opacity:1; transform:translate3d(0,0,0) } }
@keyframes am-hero-glow { 0%,100% { box-shadow:0 0 0 0 rgba(165,249,229,.03) } 50% { box-shadow:0 0 0 7px rgba(165,249,229,.13) } }
@keyframes am-logo-flicker { 0%{opacity:.65} 100%{opacity:1} }
@keyframes am-faq-in { from{opacity:.4;transform:translateY(-5px)} to{opacity:1;transform:translateY(0)} }

body.animus-motion section.hero>.hero-wallpapers>img.hero-wallpaper.is-active {
  animation: am-hero-drift 6.5s linear both;
  transform-origin:53% 48%;
}
body.animus-motion .hero-copy .eyebrow { animation:am-hero-copy .6s var(--am-ease) .08s both; }
body.animus-motion .hero-copy h1 { animation:am-hero-copy .78s var(--am-ease) .17s both; }
body.animus-motion .hero-copy .lead { animation:am-hero-copy .85s var(--am-ease) .27s both; }
body.animus-motion .hero-copy .actions,
body.animus-motion .hero-copy .hero-meta { animation:am-hero-copy .85s var(--am-ease) .37s both; }
body.animus-motion section.hero .hero-slide-dot.is-active span { animation:am-hero-glow 3s ease-in-out infinite; }

/* Observer-managed. Content always remains visible when JS is disabled. */
body.animus-motion .am-enter:not(.am-in-view) {
  opacity:0;
  transform:translate3d(0,21px,0);
}
body.animus-motion .am-enter {
  transition: opacity .62s var(--am-ease), transform .72s var(--am-ease);
  transition-delay:var(--am-stagger, 0ms);
}
body.animus-motion .am-enter.am-in-view {opacity:1;transform:translate3d(0,0,0);}
body.animus-motion .game-card.am-in-view:hover {transform:translateY(-8px);transition-delay:0ms;}

/* Light interactions: cards, links, buttons, focus, no layout-changing animation. */
body.animus-motion .site-header {
  transition:background .3s ease,box-shadow .3s ease,border-color .3s ease;
}
body.animus-motion .site-header.am-scrolled {
  background:rgba(7,10,16,.97);
  border-bottom-color:rgba(165,249,229,.19);
  box-shadow:0 13px 42px rgba(0,0,0,.30);
}
body.animus-motion .brand img { transition:filter .35s ease,transform .4s var(--am-ease); }
body.animus-motion .brand:hover img { filter:drop-shadow(0 0 13px rgba(136,245,226,.43)); transform:scale(1.055) rotate(-3deg); }
@media (hover:hover) and (pointer:fine) {
  body.animus-motion .site-header .nav a { position:relative; }
  body.animus-motion .site-header .nav a:after {
    content:"";position:absolute;height:2px;bottom:-9px;left:0;right:0;background:var(--am-tint);
    transform:scaleX(0);transform-origin:left;transition:transform .3s var(--am-ease);
  }
  body.animus-motion .site-header .nav a:hover:after,
  body.animus-motion .site-header .nav a[aria-current=page]:after { transform:scaleX(1); }
  body.animus-motion .game-cover { transition:box-shadow .45s ease,border-color .45s ease; }
  body.animus-motion .game-cover:before {
    content:"";position:absolute;inset:-35%;z-index:1;pointer-events:none;
    background:linear-gradient(110deg,transparent 37%,rgba(255,255,255,.13) 49%,transparent 59%);
    transform:translate3d(-75%,0,0) rotate(-9deg);
    transition:transform .9s var(--am-ease);
  }
  body.animus-motion .game-card:hover .game-cover:before { transform:translate3d(75%,0,0) rotate(-9deg); }
  body.animus-motion .game-card:hover .game-cover {box-shadow:0 16px 48px rgba(0,0,0,.4),0 0 0 1px rgba(165,249,229,.15);border-color:rgba(165,249,229,.26);}
  body.animus-motion .btn.primary:hover { box-shadow:0 9px 34px rgba(165,249,229,.25); }
  body.animus-motion .media-thumb:hover {box-shadow:0 0 0 1px rgba(165,249,229,.27);}
}
body.animus-motion .btn:active,body.animus-motion .play:active {transform:translateY(1px) scale(.985);}
body.animus-motion .filter-tabs button,
body.animus-motion .hero-slide-dot,
body.animus-motion .hero-slider-play { transition:background .24s ease,border-color .24s ease,color .24s ease,transform .24s ease; }
body.animus-motion .filter-tabs button:hover {transform:translateY(-2px);}
body.animus-motion .hero-slide-dot:hover,body.animus-motion .hero-slider-play:hover {transform:scale(1.13);}
body.animus-motion .search:focus-within input,
body.animus-motion input:focus-visible,
body.animus-motion select:focus-visible { border-color:rgba(165,249,229,.55);box-shadow:0 0 0 3px rgba(165,249,229,.10); }
body.animus-motion .progress {height:3px;box-shadow:0 0 14px rgba(165,249,229,.6);}

body.animus-motion details { transition:border-color .3s ease,background .3s ease; }
body.animus-motion details[open] {border-color:rgba(165,249,229,.25);}
body.animus-motion details[open] > p,
body.animus-motion details[open] > div:not(summary) {animation:am-faq-in .28s var(--am-ease) both;}
body.animus-motion dialog[open] {animation:am-hero-copy .3s var(--am-ease) both;}
body.animus-motion .media-dialog::backdrop {background:rgba(2,5,11,.85);}

/* Optional floating back-to-top action; does not intercept clicks while hidden. */
.am-back-top {
  position:fixed;right:24px;bottom:24px;z-index:38;
  width:46px;height:46px;border:1px solid rgba(165,249,229,.38);
  border-radius:50%;display:grid;place-items:center;
  background:rgba(13,21,30,.92);color:#b4ffe8;
  box-shadow:0 8px 26px rgba(0,0,0,.35);font-size:24px;line-height:1;
  opacity:0;transform:translate3d(0,18px,0) scale(.94);
  pointer-events:none;visibility:hidden;
  transition:opacity .25s ease,transform .35s var(--am-ease),background .25s ease,visibility .25s;
}
.am-back-top.am-visible { opacity:1;transform:none;visibility:visible;pointer-events:auto; }
.am-back-top:hover {background:#19352e;}
.am-back-top:focus-visible {outline:2px solid #a5f9e5;outline-offset:4px;}
@media (max-width:700px) {
  .am-back-top {right:14px;bottom:18px;width:42px;height:42px;}
  body.animus-motion .hero-copy .eyebrow,body.animus-motion .hero-copy h1,
  body.animus-motion .hero-copy .lead,body.animus-motion .hero-copy .actions,
  body.animus-motion .hero-copy .hero-meta {animation-duration:.5s;}
}
@media (prefers-reduced-motion:reduce) {
  body.animus-motion .am-enter,body.animus-motion .am-enter:not(.am-in-view) {
    opacity:1!important;transform:none!important;transition:none!important;
  }
  body.animus-motion section.hero>.hero-wallpapers>img.hero-wallpaper.is-active,
  body.animus-motion .hero-copy > *,body.animus-motion dialog[open],
  body.animus-motion .hero-slide-dot.is-active span { animation:none!important; }
  body.animus-motion .game-cover:before {display:none;}
  body.animus-motion .am-back-top {transition:none!important;}
}
