/* ROLLEM FX — animation layer (all pages) */
/* ============================================================
   ROLLEM FX — animation layer (styles)
   Every rule is gated by html.fx-on, so turning FX off (or a
   reduced-motion setting) leaves the original layout untouched.
   ============================================================ */
@property --fx-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* hidden until its reveal plays */
html.fx-on .fx-h { opacity: 0 !important; }

/* ===== SPLIT TEXT (words + slot reels) ===== */
fx-wo { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
fx-wi { display: inline-block; transform-origin: 0 100%; will-change: transform; }
fx-rw { display: inline-block; white-space: nowrap; }
fx-rc { display: inline-block; position: relative; overflow: hidden; vertical-align: top; }
fx-rg { display: block; visibility: hidden; }
fx-rs { display: block; position: absolute; left: 50%; top: 0; width: 4em; margin-left: -2em; text-align: center; will-change: transform; }
fx-rs > fx-c { display: block; height: var(--lh); line-height: var(--lh); }
.fx-split .fx-shimmer { background: none !important; -webkit-text-fill-color: currentColor !important; animation: none !important; }

/* ===== ACCENT TEXT SHIMMER ===== */
html.fx-on .fx-shimmer {
  background-image: linear-gradient(100deg, currentColor 0%, currentColor 38%, #F3E8FF 50%, currentColor 62%, currentColor 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fxShimmer 5s ease-in-out infinite;
}
@keyframes fxShimmer { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0% 0; } }

/* ===== KICKER DOT PING ===== */
html.fx-on .rl-kicker::before, html.fx-on .rn-kicker::before, html.fx-on .kicker::before,
html.fx-on .ov-kicker::before, html.fx-on .hero-badge::before, html.fx-on .ov-badge::before {
  animation: fxPing 2.2s ease-out infinite;
}
@keyframes fxPing {
  0% { box-shadow: 0 0 0 0 rgba(155,106,208,.75), 0 0 8px rgba(155,106,208,.6); }
  70% { box-shadow: 0 0 0 10px rgba(155,106,208,0), 0 0 8px rgba(155,106,208,.6); }
  100% { box-shadow: 0 0 0 0 rgba(155,106,208,0), 0 0 8px rgba(155,106,208,.6); }
}

/* ===== HERO GLOWS: drift + mouse parallax ===== */
html.fx-on .rl-hero::before, html.fx-on .rn-hero::before, html.fx-on .hero::before,
html.fx-on .ov-hero::after, html.fx-on .cta-band::before {
  animation: fxDriftA 14s ease-in-out infinite alternate;
  translate: calc(var(--fx-mx, 0) * -70px) calc(var(--fx-my, 0) * -70px);
  transition: translate .8s cubic-bezier(.2,.8,.2,1);
}
html.fx-on .rl-hero::after, html.fx-on .rn-hero::after, html.fx-on .hero::after {
  animation: fxDriftB 17s ease-in-out infinite alternate;
  translate: calc(var(--fx-mx, 0) * 90px) calc(var(--fx-my, 0) * 90px);
  transition: translate .8s cubic-bezier(.2,.8,.2,1);
}
html.fx-on .ov-hero::before { animation: fxGrid 9s linear infinite; }
@keyframes fxDriftA { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-90px,70px,0) scale(1.3); } 100% { transform: translate3d(40px,130px,0) scale(.9); } }
@keyframes fxDriftB { 0% { transform: translate3d(0,0,0) scale(1); } 100% { transform: translate3d(140px,-80px,0) scale(1.4); } }
@keyframes fxGrid { to { background-position: 22px 44px; } }

.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
html.fx-off .fx-canvas { display: none; }

/* ===== FLOATING ===== */
html.fx-on .rl-hero-side, html.fx-on .phone-mockup, html.fx-on .ov-tree { animation: fxBob 6s ease-in-out infinite; }
html.fx-on .phone-mockup { animation-duration: 5s; animation-delay: -1.5s; }
@keyframes fxBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

/* ===== HOT BADGES ===== */
html.fx-on .rlx-hotgame-img span, html.fx-on .rlx-inf-badge, html.fx-on .rn-featured-badge {
  animation: fxBadge 1.6s ease-in-out infinite;
}
@keyframes fxBadge {
  0%, 100% { scale: 1; box-shadow: 0 2px 10px rgba(239,68,68,.4); }
  50% { scale: 1.1; box-shadow: 0 0 20px rgba(239,68,68,.85); }
}

/* ===== BUTTON SHINE ===== */
html.fx-on .rl-btn3d:not(.rl-btn3d-out), html.fx-on .rl-btn-3d, html.fx-on .rn-btn3d,
html.fx-on .btn:not(.btn-out), html.fx-on .ov-btn:not(.ov-btn-ghost):not(.ov-btn-out), html.fx-on .rlx-modal-btn.primary {
  position: relative; overflow: hidden; isolation: isolate;
}
html.fx-on .rl-btn3d:not(.rl-btn3d-out)::after, html.fx-on .rl-btn-3d::after, html.fx-on .rn-btn3d::after,
html.fx-on .btn:not(.btn-out)::after, html.fx-on .ov-btn:not(.ov-btn-ghost):not(.ov-btn-out)::after, html.fx-on .rlx-modal-btn.primary::after {
  content: ''; position: absolute; top: -30%; bottom: -30%; left: -70%; width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.6), transparent);
  transform: skewX(-20deg); pointer-events: none; z-index: 1;
  animation: fxShine 3.6s ease-in-out infinite;
}
@keyframes fxShine { 0%, 55% { left: -70%; } 90%, 100% { left: 135%; } }

/* ===== HEADER / LOGO / FOOTER ===== */
html.fx-on .rl-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, #814DB0 20%, #D946EF 40%, transparent 50%, #9B6AD0 70%, #D946EF 85%, transparent 100%);
  background-size: 200% 100%; animation: fxLine 3.5s linear infinite; opacity: .85;
}
@keyframes fxLine { from { background-position: 0 0; } to { background-position: -200% 0; } }
html.fx-on .rl-logo { animation: fxGlitch 6s infinite; }
html.fx-on .rl-logo:hover, html.fx-on .rl-footer-logo:hover { animation: fxGlitch .5s steps(2) 2; }
@keyframes fxGlitch {
  0%, 90%, 100% { text-shadow: none; translate: 0 0; }
  91% { text-shadow: -3px 0 #D946EF, 3px 0 #22D3EE; translate: 2px 0; }
  92% { text-shadow: 3px -1px #D946EF, -3px 1px #22D3EE; translate: -2px 0; }
  93% { text-shadow: none; translate: 0 0; }
  95% { text-shadow: -2px 1px #D946EF, 2px -1px #22D3EE; translate: 1px 0; }
  96% { text-shadow: none; translate: 0 0; }
}
html.fx-on .rl-footer::before { animation: fxPulseW 3.2s ease-in-out infinite; }
@keyframes fxPulseW { 0%, 100% { width: 120px; opacity: .7; } 50% { width: 340px; opacity: 1; } }
html.fx-on .rl-social a:hover svg { animation: fxSpin .6s cubic-bezier(.3,1.5,.5,1); }
@keyframes fxSpin { from { transform: rotate(0deg) scale(.5); } to { transform: rotate(360deg) scale(1); } }
html.fx-on .rl-wave svg { transform-origin: 50% 100%; animation: fxWave 6s ease-in-out infinite alternate; }
@keyframes fxWave { from { transform: scaleY(1); } to { transform: scaleY(1.35); } }

/* header + dock entrance after the intro */
html.fx-on.fx-ready .rl-header-inner > * { animation: fxDrop .9s cubic-bezier(.16,1,.3,1) backwards; }
html.fx-on.fx-ready .rl-header-inner > .rl-nav-left { animation-delay: .05s; }
html.fx-on.fx-ready .rl-header-inner > .rl-logo { animation: fxDrop .9s .15s cubic-bezier(.16,1,.3,1) backwards, fxGlitch 6s 1.2s infinite; }
html.fx-on.fx-ready .rl-header-inner > .rl-nav-right { animation-delay: .25s; }
@keyframes fxDrop { from { opacity: 0; transform: translate3d(0,-26px,0); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
html.fx-on:not(.fx-ready) .pv-dock { transform: translate(-50%, 160%); }
html.fx-on.fx-ready .pv-dock { animation: fxDock 1s .35s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes fxDock { from { transform: translate(-50%, 160%); } to { transform: translate(-50%, 0); } }

/* ===== IMAGE SHINE ON HOVER ===== */
html.fx-on .rlx-hotgame-img::after, html.fx-on .rn-card-img::after, html.fx-on .post-thumb::after,
html.fx-on .rlx-inf-img::after, html.fx-on .rl-img-ph::after, html.fx-on .index-thumb::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.42) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .85s cubic-bezier(.2,.8,.2,1);
}
html.fx-on .rlx-hotgame:hover .rlx-hotgame-img::after, html.fx-on .rn-card:hover .rn-card-img::after,
html.fx-on .post-card:hover .post-thumb::after, html.fx-on .rlx-inf-card:hover .rlx-inf-img::after,
html.fx-on .rl-img-ph:hover::after, html.fx-on .index-row:hover .index-thumb::after { transform: translateX(120%); }

/* ===== 3D TILT + GLARE + NEON RING ===== */
html.fx-on .fx-tilting {
  transform: perspective(1000px) rotateX(var(--fx-rx, 0deg)) rotateY(var(--fx-ry, 0deg)) translate3d(0,-6px,0) !important;
  transition: transform .12s ease-out !important;
  z-index: 4;
}
.fx-glare, .fx-ring { display: block; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.fx-glare {
  z-index: 6;
  background:
    radial-gradient(circle at var(--fx-gx, 50%) var(--fx-gy, 50%), rgba(255,255,255,.38), rgba(255,255,255,0) 45%),
    radial-gradient(circle at calc(100% - var(--fx-gx, 50%)) calc(100% - var(--fx-gy, 50%)), rgba(155,106,208,.16), rgba(155,106,208,0) 60%);
}
.fx-ring {
  z-index: 7; padding: 2px !important; margin: 0 !important;
  background: conic-gradient(from var(--fx-a), #814DB0, #D946EF, #F3E8FF, #9B6AD0, #6A3D96, #814DB0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: fxSpinA 2.2s linear infinite;
}
html.fx-on .fx-tilting > .fx-glare, html.fx-on .fx-tilting > .fx-ring { opacity: 1; }
@keyframes fxSpinA { to { --fx-a: 360deg; } }

/* ===== REVEAL HELPERS ===== */
.fx-scan {
  position: absolute; left: 0; right: 0; height: 2px; margin: -1px 0 0 !important; padding: 0 !important; z-index: 9; pointer-events: none;
  background: linear-gradient(90deg, transparent, #D946EF 20%, #fff 50%, #D946EF 80%, transparent);
  box-shadow: 0 0 22px 5px rgba(217,70,239,.55);
}

/* ===== PROGRESS BAR ===== */
.fx-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2147483646; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #6A3D96, #9B6AD0 35%, #D946EF 70%, #F3E8FF);
  box-shadow: 0 0 14px rgba(217,70,239,.75), 0 0 4px rgba(155,106,208,.9);
}
html.fx-off .fx-progress { display: none; }

/* ===== CURSOR ===== */
.fx-cursor, .fx-cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 2147483647; pointer-events: none; border-radius: 50%; opacity: 0;
  transition: opacity .3s ease, width .25s ease, height .25s ease, margin .25s ease, background .25s ease, border-color .25s ease;
}
.fx-cursor {
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 2px solid rgba(155,106,208,.8);
  box-shadow: 0 0 18px rgba(155,106,208,.45), inset 0 0 10px rgba(155,106,208,.25);
}
.fx-cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #9B6AD0; box-shadow: 0 0 10px #D946EF; }
.fx-cursor.is-on, .fx-cursor-dot.is-on { opacity: 1; }
.fx-cursor.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(155,106,208,.12); border-color: rgba(217,70,239,.85); }
.fx-cursor.is-down { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
html.fx-off .fx-cursor, html.fx-off .fx-cursor-dot { display: none; }

/* ===== CLICK BURST ===== */
.fx-burst {
  position: fixed; top: 0; left: 0; z-index: 2147483646; pointer-events: none;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 2px;
}
.fx-burst.g { width: auto; height: auto; margin: -9px 0 0 -6px; background: none !important; font: 900 15px/1 'Inter', 'Segoe UI', sans-serif; text-shadow: 0 0 8px currentColor; }
.fx-shock {
  position: fixed; top: 0; left: 0; z-index: 2147483646; pointer-events: none;
  width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%;
  border: 2px solid rgba(217,70,239,.8); box-shadow: 0 0 22px rgba(217,70,239,.6);
}

/* ===== INTRO ===== */
.fx-intro { position: fixed; inset: 0; z-index: 2147483647; display: flex; align-items: center; justify-content: center; cursor: pointer; font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.fx-intro-a, .fx-intro-b {
  position: absolute; left: 0; right: 0; height: 50.5%;
  background:
    radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.3px) 0 0 / 22px 22px,
    linear-gradient(160deg, #141A3D 0%, #1C2451 50%, #3A2A66 100%);
  transition: transform .95s cubic-bezier(.76,0,.24,1);
}
.fx-intro-a { top: 0; box-shadow: 0 1px 0 rgba(217,70,239,.0); }
.fx-intro-b { bottom: 0; background-position: 0 11px, 0 0; }
.fx-intro-core { position: relative; z-index: 2; text-align: center; color: #fff; transition: opacity .45s ease, transform .6s cubic-bezier(.7,0,.3,1), filter .45s ease; }
.fx-intro-logo { font-size: clamp(3.2rem, 13vw, 8rem); font-weight: 900; letter-spacing: -.045em; line-height: 1; text-shadow: 0 0 40px rgba(155,106,208,.45); }
.fx-intro-logo > span { color: #B994E3; }
.fx-intro-sub { margin-top: 18px; font-size: .66rem; font-weight: 800; letter-spacing: .55em; text-transform: uppercase; color: rgba(255,255,255,.55); padding-left: .55em; }
.fx-intro-bar { width: min(260px, 60vw); height: 3px; margin: 22px auto 0; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.1); }
.fx-intro-bar i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #814DB0, #D946EF, #F3E8FF); box-shadow: 0 0 12px #D946EF; animation: fxIntroBar 1.4s cubic-bezier(.6,0,.2,1) forwards; }
@keyframes fxIntroBar { to { transform: scaleX(1); } }
.fx-intro-flash {
  position: absolute; top: 50%; left: 0; right: 0; height: 2px; margin-top: -1px; z-index: 3;
  transform: scaleX(0); opacity: 0;
  background: linear-gradient(90deg, transparent, #D946EF 25%, #fff 50%, #D946EF 75%, transparent);
  box-shadow: 0 0 26px 6px rgba(217,70,239,.6);
  transition: transform .35s cubic-bezier(.7,0,.3,1), opacity .5s ease .35s;
}
.fx-intro.out { pointer-events: none; }
.fx-intro.out .fx-intro-core { opacity: 0; transform: scale(1.35); filter: blur(14px); }
.fx-intro.out .fx-intro-flash { transform: scaleX(1); opacity: 0; }
.fx-intro.out .fx-intro-a { transform: translateY(-100%); transition-delay: .18s; }
.fx-intro.out .fx-intro-b { transform: translateY(100%); transition-delay: .18s; }
html.fx-preload body { opacity: 0; animation: fxBoot 0s 2.5s forwards; }
@keyframes fxBoot { to { opacity: 1; } }

/* ===== PAGE SHUTTER ===== */
.fx-shutter { position: fixed; inset: 0; z-index: 2147483645; display: flex; pointer-events: none; }
.fx-shutter.is-on { pointer-events: auto; }
.fx-shutter > i {
  flex: 1; height: 100%; margin-right: -1px; transform: scaleY(0);
  background: linear-gradient(180deg, #141A3D 0%, #1C2451 55%, #2A3470 100%);
  box-shadow: inset -1px 0 0 rgba(155,106,208,.22);
}
.fx-shutter > i:nth-child(even) { background: linear-gradient(180deg, #1C2451 0%, #2A3470 55%, #3A2A66 100%); }
.fx-shutter > i:last-of-type { background: linear-gradient(180deg, #3A2A66, #6A3D96); }
.fx-shutter-label {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0;
  text-align: center; color: #fff; white-space: nowrap; font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.fx-shutter-label b { display: block; font-size: .9rem; font-weight: 900; letter-spacing: -.3px; color: rgba(255,255,255,.7); margin-bottom: 4px; }
.fx-shutter-label b span { color: #B994E3; }
.fx-shutter-label strong {
  display: block; font-size: clamp(2.4rem, 8vw, 5rem); font-weight: 900; letter-spacing: -.04em; line-height: 1;
  text-transform: uppercase; animation: fxGlitchBig 1.1s steps(2) infinite;
}
@keyframes fxGlitchBig {
  0%, 70%, 100% { text-shadow: 0 0 30px rgba(217,70,239,.45); }
  75% { text-shadow: -4px 0 #D946EF, 4px 0 #22D3EE, 0 0 30px rgba(217,70,239,.45); }
  85% { text-shadow: 3px -2px #D946EF, -3px 2px #22D3EE, 0 0 30px rgba(217,70,239,.45); }
}

/* ===== MODAL ===== */
html.fx-on .rlx-popup { animation: fxModal .65s cubic-bezier(.16,1,.3,1); }
@keyframes fxModal {
  0% { opacity: 0; transform: perspective(1200px) rotateX(-20deg) translate3d(0,70px,0) scale(.88); filter: blur(12px); }
  100% { opacity: 1; transform: none; filter: none; }
}
html.fx-on .rlx-modal.show .rlx-modal-header-ico { animation: fxPopSpin .7s .12s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes fxPopSpin { from { transform: scale(0) rotate(-180deg); } to { transform: none; } }
html.fx-on .rlx-modal.show .rlx-modal-content > * { animation: fxRiseIn .6s cubic-bezier(.16,1,.3,1) both; }
html.fx-on .rlx-modal.show .rlx-modal-content > :nth-child(2) { animation-delay: .06s; }
html.fx-on .rlx-modal.show .rlx-modal-content > :nth-child(3) { animation-delay: .12s; }
html.fx-on .rlx-modal.show .rlx-modal-content > :nth-child(4) { animation-delay: .18s; }
html.fx-on .rlx-modal.show .rlx-modal-content > :nth-child(5) { animation-delay: .24s; }
html.fx-on .rlx-modal.show .rlx-modal-content > :nth-child(6) { animation-delay: .30s; }
html.fx-on .rlx-modal.show .rlx-modal-content > :nth-child(7) { animation-delay: .36s; }
html.fx-on .rlx-modal.show .rlx-modal-content > :nth-child(8) { animation-delay: .42s; }
html.fx-on .rlx-modal.show .rlx-modal-content > :nth-child(n+9) { animation-delay: .48s; }
@keyframes fxRiseIn { from { opacity: 0; transform: translate3d(0,20px,0); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* intro logo: each letter sits in its own slot-machine window */
.fx-intro-logo fx-rc {
  margin: 0 .04em; border-radius: .12em;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02) 50%, rgba(255,255,255,.07));
  box-shadow: inset 0 0 0 1px rgba(155,106,208,.35), inset 0 10px 18px rgba(0,0,0,.35), inset 0 -10px 18px rgba(0,0,0,.35), 0 0 24px rgba(155,106,208,.25);
}
.fx-intro-logo fx-rg { padding: 0 .06em; }
.fx-intro-logo.fx-split { text-shadow: none; }
