/*
 * Gamer's Joyland Pro - motion layer.
 * Everything here is progressive: without JavaScript, or with prefers-reduced-motion, content is shown immediately.
 * Reveals use the individual `translate` / `scale` properties so that `transform` stays free for hover effects.
 */

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes gj-spin { to { transform: rotate(360deg); } }
@keyframes gj-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes gj-ticker { to { transform: translateX(-50%); } }
@keyframes gj-rv { from { opacity: 0; translate: var(--rv-tx, 0) var(--rv-ty, 0); scale: var(--rv-s, 1); filter: var(--rv-f, none); } to { opacity: 1; translate: 0 0; scale: 1; filter: none; } }
@keyframes gj-rv-failsafe { to { opacity: 1; translate: 0 0; scale: 1; filter: none; } }
@keyframes gj-bg-settle { from { transform: scale(1.045); } to { transform: scale(1); } }
@keyframes gj-kenburns { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.2%, -1%, 0); } }
@keyframes gj-layer-rise { from { opacity: 0; translate: 0 34px; } to { opacity: 1; translate: 0 0; } }
@keyframes gj-layer-slide { from { opacity: 0; translate: -56px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes gj-layer-zoom { from { opacity: 0; scale: .9; } to { opacity: 1; scale: 1; } }
@keyframes gj-layer-blur { from { opacity: 0; filter: blur(14px); } to { opacity: 1; filter: blur(0); } }
@keyframes gj-layer-mask { from { opacity: 1; clip-path: inset(0 0 100% 0); translate: 0 18px; } to { opacity: 1; clip-path: inset(0 0 -20% 0); translate: 0 0; } }
@keyframes gj-orb-a { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(8%, 12%, 0) scale(1.15); } }
@keyframes gj-orb-b { 0% { transform: translate3d(0, 0, 0) scale(1.1); } 100% { transform: translate3d(-10%, -8%, 0) scale(.95); } }
@keyframes gj-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-18px) rotate(8deg); } }
@keyframes gj-pre-pulse { 0%, 100% { transform: scale(1); opacity: .95; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes gj-pre-halo { 0% { transform: scale(.7); opacity: .6; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes gj-pre-bar { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes gj-pre-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes gj-page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gj-shine { to { transform: translateX(120%); } }

/* ==========================================================================
   Scroll reveal (class gj-rv-on is added in the document head when allowed)
   ========================================================================== */
[data-gj-reveal="fade-up"] { --rv-ty: var(--gj-rv-dist); }
[data-gj-reveal="fade-down"] { --rv-ty: calc(var(--gj-rv-dist) * -1); }
[data-gj-reveal="fade-left"] { --rv-tx: calc(var(--gj-rv-dist) * -1.5); }
[data-gj-reveal="fade-right"] { --rv-tx: calc(var(--gj-rv-dist) * 1.5); }
[data-gj-reveal="scale-in"] { --rv-s: .94; }
[data-gj-reveal="blur"] { --rv-ty: calc(var(--gj-rv-dist) * .5); --rv-f: blur(12px); }

.gj-rv-on [data-gj-reveal]:not([data-gj-stagger]):not(.is-revealed),
.gj-rv-on [data-gj-stagger] > [data-gj-item]:not(.is-revealed) {
	opacity: 0;
	translate: var(--rv-tx, 0) var(--rv-ty, 0);
	scale: var(--rv-s, 1);
	filter: var(--rv-f, none);
	/* CSS-only failsafe: if the script never runs, content appears after 4 seconds. */
	animation: gj-rv-failsafe 0s linear 4s forwards;
}
.gj-rv-on [data-gj-reveal].is-revealed:not([data-gj-stagger]),
.gj-rv-on [data-gj-stagger] > [data-gj-item].is-revealed {
	animation: gj-rv var(--gj-rv-dur) var(--gj-ease) var(--rv-delay, var(--gj-rv-delay)) backwards;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.gj-hero.is-ready .swiper-slide-active .gj-slide__img { animation: gj-bg-settle 1.8s var(--gj-ease) both; }
.gj-hero.has-kenburns.is-ready .swiper-slide-active .gj-slide__img { animation: gj-kenburns calc(var(--gj-hero-delay) + 3s) ease-out both; }
.gj-hero.is-paused .swiper-slide-active .gj-slide__img { animation-play-state: paused; }

/* Layered text. Enabled by JavaScript (class gj-hero-anim) so that no-JS visitors see everything. */
.gj-hero-anim .gj-slide [data-gj-layer] { opacity: 0; }
.gj-hero-anim .swiper-slide-active [data-gj-layer] { opacity: 1; animation-duration: 1s; animation-timing-function: var(--gj-ease); animation-fill-mode: backwards; animation-delay: calc(.2s + var(--l, 1) * .13s); }
.gj-hero-anim [data-gj-layer="1"] { --l: 1; }
.gj-hero-anim [data-gj-layer="2"] { --l: 2; }
.gj-hero-anim [data-gj-layer="3"] { --l: 3; }
.gj-hero-anim [data-gj-layer="4"] { --l: 4; }
.gj-hero-anim .swiper-slide-active[data-anim="rise"] [data-gj-layer] { animation-name: gj-layer-rise; }
.gj-hero-anim .swiper-slide-active[data-anim="slide"] [data-gj-layer] { animation-name: gj-layer-slide; }
.gj-hero-anim .swiper-slide-active[data-anim="zoom"] [data-gj-layer] { animation-name: gj-layer-zoom; }
.gj-hero-anim .swiper-slide-active[data-anim="blur"] [data-gj-layer] { animation-name: gj-layer-blur; }
.gj-hero-anim .swiper-slide-active[data-anim="mask"] [data-gj-layer] { animation-name: gj-layer-mask; }
.gj-hero-anim .swiper-slide-active:not([data-anim]) [data-gj-layer] { animation-name: gj-layer-rise; }
/* Staggered buttons inside the action layer */
.gj-hero-anim .swiper-slide-active .gj-slide__actions > * { animation: gj-layer-rise .9s var(--gj-ease) backwards; }
.gj-hero-anim .swiper-slide-active .gj-slide__actions > :nth-child(1) { animation-delay: .85s; }
.gj-hero-anim .swiper-slide-active .gj-slide__actions > :nth-child(2) { animation-delay: .98s; }
.gj-hero-anim .swiper-slide-active .gj-slide__actions > :nth-child(3) { animation-delay: 1.11s; }
.gj-hero-anim .swiper-slide-active .gj-slide__actions > :nth-child(4) { animation-delay: 1.24s; }
/* When GSAP drives the entrance, the CSS animation steps aside. */
.gj-hero-gsap [data-gj-layer], .gj-hero-gsap .gj-slide__actions > * { animation: none !important; }
.gj-hero-gsap .gj-slide__title .gj-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.gj-hero-gsap .gj-slide__title .gj-word > span { display: inline-block; will-change: transform; }

/* ==========================================================================
   Ambient background effects
   ========================================================================== */
.gj-orbs { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.gj-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .42; will-change: transform; }
.gj-orb--1 { width: min(52vw, 560px); height: min(52vw, 560px); left: -12%; top: -34%; background: var(--gj-accent); }
.gj-orb--2 { width: min(46vw, 500px); height: min(46vw, 500px); right: -10%; bottom: -40%; background: var(--gj-accent-2); }
.gj-fx-orbs .gj-orb--1 { animation: gj-orb-a 18s ease-in-out infinite alternate; }
.gj-fx-orbs .gj-orb--2 { animation: gj-orb-b 22s ease-in-out infinite alternate; }
[data-theme="light"] .gj-orb { opacity: .22; }
.gj-shapes { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.gj-shapes i { position: absolute; display: block; width: 64px; height: 64px; border: 1px solid rgba(255, 255, 255, .22); animation: gj-float 9s ease-in-out infinite; }
.gj-shapes i:nth-child(1) { left: 8%; top: 22%; }
.gj-shapes i:nth-child(2) { right: 12%; top: 30%; width: 44px; height: 44px; animation-delay: -3s; animation-duration: 11s; }
.gj-shapes i:nth-child(3) { right: 28%; bottom: 20%; width: 80px; height: 80px; animation-delay: -5s; animation-duration: 13s; }

/* ==========================================================================
   Button effects (body.gj-btn-*) - only when button effects are enabled
   ========================================================================== */
.gj-fx-btn.gj-btn-gradient-shift .gj-btn:not(.gj-btn--outline):not(.gj-btn--light):not(.gj-btn--outline-light):hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(var(--gj-accent-rgb), .5); }
.gj-fx-btn.gj-btn-glow .gj-btn:hover { box-shadow: 0 0 0 4px rgba(var(--gj-accent-rgb), .25), 0 14px 38px rgba(var(--gj-accent-rgb), .6); }
.gj-fx-btn.gj-btn-arrow .gj-btn:hover .gj-btn__icon { transform: translateX(6px); }
.gj-fx-btn.gj-btn-scale .gj-btn:hover { transform: scale(1.05); }
.gj-fx-btn.gj-btn-scale .gj-btn:active { transform: scale(.98); }
.gj-fx-btn.gj-btn-border .gj-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid transparent; transition: border-color .3s, inset .3s var(--gj-ease); pointer-events: none; }
.gj-fx-btn.gj-btn-border .gj-btn:hover::after { border-color: rgba(255, 255, 255, .85); inset: 3px; }
.gj-fx-btn.gj-btn-icon-slide .gj-btn__icon { width: 0; opacity: 0; margin-inline-start: -.6em; overflow: hidden; transition: width .35s var(--gj-ease), opacity .3s, margin .35s var(--gj-ease), transform .3s; }
.gj-fx-btn.gj-btn-icon-slide .gj-btn:hover .gj-btn__icon, .gj-fx-btn.gj-btn-icon-slide .gj-btn:focus-visible .gj-btn__icon { width: 1em; opacity: 1; margin-inline-start: 0; }
.gj-btn:active { transform: translateY(0) scale(.99); }

/* ==========================================================================
   Card effects (body.gj-card-*) - hover-capable devices only; touch devices keep everything visible.
   Cards are clipped to their chamfered shape, so effects use the frame line (--line), the fill (--fill),
   the HUD brackets and the artwork rather than outer shadows.
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
	.gj-fx-cards .gj-gcard:hover .gj-gcard__img, .gj-fx-cards .gj-ucard:hover .gj-ucard__img, .gj-fx-cards .gj-pcard:hover .gj-pcard__img { transform: scale(1.06); }
	.gj-fx-cards .gj-gcard:hover .gj-gcard__more .gj-icon { transform: translateX(5px); }
	.gj-fx-cards .gj-gcard:hover .gj-gcard__shine { animation: gj-shine .9s var(--gj-ease); }

	.gj-fx-cards.gj-card-lift .gj-gcard:hover, .gj-fx-cards.gj-card-lift .gj-ucard:hover { transform: translateY(-8px); }

	.gj-fx-cards.gj-card-glow .gj-gcard:hover, .gj-fx-cards.gj-card-glow .gj-ucard:hover { --line: var(--gj-highlight); --fill: radial-gradient(120% 70% at 50% 100%, rgba(var(--gj-accent-rgb), .3), transparent 70%), var(--gj-card); }

	.gj-fx-cards.gj-card-zoom .gj-gcard:hover .gj-gcard__img, .gj-fx-cards.gj-card-zoom .gj-ucard:hover .gj-ucard__img { transform: scale(1.14); }

	.gj-fx-cards.gj-card-reveal .gj-gcard__foot .gj-stores { opacity: 0; translate: 0 12px; transition: opacity .35s var(--gj-ease), translate .4s var(--gj-ease); }
	.gj-fx-cards.gj-card-reveal .gj-gcard:hover .gj-gcard__foot .gj-stores, .gj-fx-cards.gj-card-reveal .gj-gcard:focus-within .gj-gcard__foot .gj-stores { opacity: 1; translate: 0 0; }

	.gj-fx-cards.gj-card-gradient .gj-gcard:hover { --fill: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--gj-accent-rgb), .3), transparent 60%), var(--gj-card); }
}
/* Touch-friendly pressed states */
@media (hover: none) {
	.gj-gcard:active, .gj-ucard:active { transform: scale(.985); --line: var(--gj-grad); }
}

/* Hero title: word-by-word masked reveal (pure CSS, started by the active slide). */
@keyframes gj-word-up { from { transform: translateY(105%); } to { transform: none; } }
.gj-slide__title .gj-word { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em .02em .06em; margin: -.08em -.02em -.06em; }
.gj-slide__title .gj-word > span { display: inline-block; }
.gj-hero-anim .swiper-slide-active .gj-slide__title.is-split { animation: none; }
.gj-hero-anim .swiper-slide-active .gj-slide__title.is-split .gj-word > span { animation: gj-word-up 1s var(--gj-ease) backwards; animation-delay: calc(.3s + var(--wi, 0) * .09s); }
.gj-hero-anim .swiper-slide-active[data-anim="blur"] .gj-slide__title.is-split .gj-word > span { animation-name: gj-layer-blur; }
.gj-hero-anim .swiper-slide-active[data-anim="zoom"] .gj-slide__title.is-split .gj-word > span { animation-name: gj-layer-zoom; }

/* ==========================================================================
   Preloader
   ========================================================================== */
.gj-preloader { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; background: var(--gj-bg); transition: opacity .45s var(--gj-ease), visibility 0s linear .45s; }
.js .gj-preloader { animation: gj-pre-failsafe .45s ease var(--gj-pre-timeout, 3s) forwards; }
.gj-preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.gj-preloader__stage { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.gj-preloader__ring { position: absolute; inset: 12%; border: 2px solid rgba(var(--gj-accent-rgb), .16); border-top-color: var(--gj-accent); border-right-color: var(--gj-accent-2); animation: gj-spin calc(1.15s / var(--gj-pre-speed, 1)) linear infinite; }
.gj-preloader__glow { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle, rgba(var(--gj-accent-rgb), .45), transparent 70%); filter: blur(10px); animation: gj-pre-pulse calc(2s / var(--gj-pre-speed, 1)) ease-in-out infinite; }
.gj-preloader__logo { position: relative; width: 58px; height: 58px; display: grid; place-items: center; animation: gj-pre-pulse calc(2s / var(--gj-pre-speed, 1)) ease-in-out infinite; }
.gj-preloader__mark, .gj-preloader__img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(var(--gj-accent-rgb), .6)); }
.gj-preloader__bars { display: none; position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); gap: 5px; align-items: flex-end; height: 22px; }
.gj-preloader__bars i { width: 5px; height: 100%; border-radius: 3px; background: var(--gj-grad); transform-origin: bottom; animation: gj-pre-bar calc(.9s / var(--gj-pre-speed, 1)) ease-in-out infinite; }
.gj-preloader__bars i:nth-child(2) { animation-delay: .1s; }
.gj-preloader__bars i:nth-child(3) { animation-delay: .2s; }
.gj-preloader__bars i:nth-child(4) { animation-delay: .3s; }
.gj-preloader__bars i:nth-child(5) { animation-delay: .4s; }
.gj-preloader--pulse .gj-preloader__ring { border: 0; background: radial-gradient(circle, rgba(var(--gj-accent-rgb), .5), transparent 70%); animation: gj-pre-halo calc(1.6s / var(--gj-pre-speed, 1)) ease-out infinite; }
.gj-preloader--pulse .gj-preloader__glow { display: none; }
.gj-preloader--bars .gj-preloader__ring { display: none; }
.gj-preloader--bars .gj-preloader__bars { display: flex; }

/* ==========================================================================
   Page transitions (never delays navigation: the next page loads immediately)
   ========================================================================== */
.gj-pt-on body { animation: gj-page-in .4s var(--gj-ease) both; }
.gj-pt-on body::after { content: ""; position: fixed; inset: 0; z-index: 99990; background: var(--gj-bg); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.gj-pt-on.gj-leaving body::after { opacity: .96; }

/* ==========================================================================
   Phones & touch: minimal motion (html.gj-mini) or none (html.gj-m-off)
   ========================================================================== */
.gj-mini .gj-orb, .gj-mini .gj-shapes, .gj-mini .gj-particles { display: none; }
.gj-mini .gj-hero.has-kenburns.is-ready .swiper-slide-active .gj-slide__img { animation: gj-bg-settle 1.2s var(--gj-ease) both; }
.gj-mini { --gj-rv-dist: 12px; --gj-rv-dur: .45s; --gj-rv-stagger: .04s; }
.gj-mini.gj-pt-on body { animation: none; }
.gj-mini.gj-pt-on body::after { display: none; }

/* ==========================================================================
   Reduced motion - always honoured
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
	.gj-rv-on [data-gj-reveal], .gj-rv-on [data-gj-item] { opacity: 1 !important; translate: none !important; scale: none !important; filter: none !important; }
	.gj-ticker__track { animation: none !important; width: auto; flex-wrap: wrap; }
	.gj-orb, .gj-shapes, .gj-particles { display: none; }
	.gj-hero-anim .gj-slide [data-gj-layer] { opacity: 1; }
	.gj-preloader { display: none; }
	.gj-gcard__shine { display: none; }
}
.gj-rm *, .gj-rm *::before, .gj-rm *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
.gj-rm .gj-ticker__track { animation: none !important; width: auto; flex-wrap: wrap; }
.gj-rm .gj-orb, .gj-rm .gj-shapes, .gj-rm .gj-particles { display: none; }
.gj-rm .gj-preloader { display: none; }
.gj-m-off .gj-orb, .gj-m-off .gj-shapes, .gj-m-off .gj-particles { display: none; }
.gj-m-off *, .gj-m-off *::before, .gj-m-off *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
/* Split titles: the shadow is drawn on the whole title, so word masks never show box edges. */
.gj-slide__title.is-split { text-shadow: none; filter: drop-shadow(0 8px 30px rgba(0, 0, 0, .5)); }
.gj-slide__title.is-split .gj-hl { filter: none; }
