:root {
	--ink: #fff8ee;
	--ink-dim: rgba(255, 248, 238, 0.82);
	--dusk: #14060f;
	--gold: #ffd24a;
	--gold-ink: #2a1600;
	--sunset: #ff6b35;
	--pink: #ff8ab8;
	--xp: #5dff9a;
	--gem: #c77dff;
	--play: #ffd24a;
	--dl: #7ec8ff;
	--store: #7dffb0;
	--font-pixel: "Press Start 2P", ui-monospace, monospace;
	--font-body: "Figtree", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	color: var(--ink);
	font-family: var(--font-body);
	background: var(--dusk);
	overflow-x: hidden;
}

.scene {
	position: fixed;
	inset: -4%;
	z-index: 0;
	overflow: hidden;
	transform: translate3d(0, 0, 0);
	will-change: transform;
}

.scene__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 48%;
	animation: kenburns 22s ease-in-out infinite alternate;
	filter: saturate(1.15) contrast(1.05);
}

.fx-canvas,
.sun-glow,
.scanlines,
.vignette,
.loot {
	position: fixed;
	inset: 0;
	pointer-events: none;
}

.fx-canvas {
	z-index: 1;
}

.sun-glow {
	z-index: 1;
	background: radial-gradient(ellipse 55% 42% at 50% 18%, rgba(255, 196, 80, 0.42), rgba(255, 107, 53, 0.12) 42%, transparent 70%);
	animation: sun-breathe 4.8s ease-in-out infinite;
	mix-blend-mode: screen;
}

.scanlines {
	z-index: 2;
	background: repeating-linear-gradient(
		to bottom,
		transparent 0 2px,
		rgba(0, 0, 0, 0.07) 2px 3px
	);
	mix-blend-mode: multiply;
	opacity: 0.55;
}

.vignette {
	z-index: 3;
	background:
		linear-gradient(180deg, rgba(20, 6, 15, 0.55) 0%, transparent 22%, transparent 52%, rgba(20, 6, 15, 0.82) 100%),
		radial-gradient(ellipse 80% 70% at 50% 40%, transparent 40%, rgba(20, 6, 15, 0.55) 100%);
}

.loot {
	z-index: 4;
}

.loot__coin,
.loot__xp,
.loot__gem {
	position: absolute;
	left: var(--x);
	bottom: -8%;
	animation: float-up 7.5s linear infinite;
	animation-delay: var(--d, 0s);
}

.loot__coin {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #fff3a8, var(--gold) 45%, #c48412);
	box-shadow: 0 0 10px rgba(255, 210, 74, 0.85);
	transform: scale(var(--s, 1));
}

.loot__xp {
	font-family: var(--font-pixel);
	font-size: 10px;
	padding: 4px 6px;
	border-radius: 4px;
	color: #062014;
	text-shadow: none;
}

.loot__xp--green {
	background: var(--xp);
	box-shadow: 0 0 14px rgba(93, 255, 154, 0.8);
}

.loot__xp--purple {
	background: var(--gem);
	color: #1a0824;
	box-shadow: 0 0 14px rgba(199, 125, 255, 0.85);
}

.loot__gem {
	width: 14px;
	height: 18px;
	background: var(--gem);
	clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
	box-shadow: 0 0 12px rgba(199, 125, 255, 0.9);
}

.loot__gem--pink {
	background: var(--pink);
	box-shadow: 0 0 12px rgba(255, 138, 184, 0.9);
}

.stage {
	position: relative;
	z-index: 5;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: clamp(0.8rem, 2vw, 1.6rem) 1rem 1.1rem;
}

.mast {
	text-align: center;
	margin-top: clamp(0.2rem, 1.5vh, 1rem);
}

.brand {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.55rem 0.85rem;
	font-family: var(--font-pixel);
	font-size: clamp(1.05rem, 3.6vw, 2.35rem);
	line-height: 1.35;
	letter-spacing: 0.04em;
	color: #fff;
	text-shadow:
		3px 0 0 #c43a1a,
		-3px 0 0 #2a6dff,
		0 3px 0 #3a1a0a,
		0 -3px 0 #3a1a0a,
		4px 4px 0 #1a0808,
		0 0 22px rgba(255, 107, 53, 0.55);
}

.brand__word span {
	display: inline-block;
	animation: letter-in 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both, idle-bounce 1.8s ease-in-out infinite;
	animation-delay: calc(var(--i) * 0.045s), calc(0.8s + var(--i) * 0.07s);
}

.brand.is-glitch {
	animation: rgb-glitch 0.28s steps(2, end);
}

.tagline {
	margin: 0.85rem 0 0;
	font-family: var(--font-pixel);
	font-size: clamp(0.55rem, 1.5vw, 0.78rem);
	line-height: 1.6;
	color: var(--gold);
	text-shadow: 2px 2px 0 #3a1608, 0 0 16px rgba(255, 210, 74, 0.45);
	animation: rise 0.7s ease-out 0.55s both, glow-pulse 2.4s ease-in-out infinite 1.3s;
}

.pitch {
	margin: 0.7rem 0 0;
	font-family: var(--font-body);
	font-size: clamp(1.05rem, 2.2vw, 1.35rem);
	font-weight: 800;
	letter-spacing: 0.01em;
	color: var(--ink);
	text-shadow: 0 2px 0 #1a0808, 0 0 18px rgba(255, 107, 53, 0.45);
	animation: rise 0.75s ease-out 0.7s both;
}

.cta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin: clamp(1.1rem, 4vh, 2.4rem) 0 auto;
}

.btn {
	position: relative;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.05rem;
	padding: 0.85rem 1.25rem;
	border-radius: 0.35rem;
	border: 3px solid #3a1608;
	font-family: var(--font-pixel);
	font-size: clamp(0.52rem, 1.35vw, 0.68rem);
	line-height: 1.3;
	text-decoration: none;
	box-shadow: 0 4px 0 #1a0808, 0 8px 18px rgba(0, 0, 0, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
	transform: translateX(-120%);
	animation: shine 2.8s ease-in-out infinite;
}

.btn:hover {
	transform: translateY(-3px) scale(1.04);
	filter: brightness(1.08);
	box-shadow: 0 7px 0 #1a0808, 0 14px 28px rgba(0, 0, 0, 0.4);
}

.btn--play:hover {
	animation-play-state: paused;
}

.btn:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 #1a0808;
}

.btn--play {
	background: linear-gradient(#ffe27a, var(--gold) 45%, #e0a020);
	color: var(--gold-ink);
	animation: bounce-cta 1.9s ease-in-out infinite;
}

.btn--dl {
	background: linear-gradient(#c6e8ff, var(--dl) 50%, #3a8fd4);
	color: #082033;
}

.btn--store {
	background: linear-gradient(#c8ffd8, var(--store) 50%, #2aa85a);
	color: #062014;
}

.steps {
	width: min(1080px, 100%);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.7rem;
}

.card {
	position: relative;
	padding: 0.85rem 0.75rem 0.9rem;
	border: 3px solid #3a1608;
	border-radius: 0.4rem;
	background: linear-gradient(180deg, rgba(42, 18, 12, 0.88), rgba(18, 8, 12, 0.92));
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), 0 10px 22px rgba(0, 0, 0, 0.35);
	animation: card-in 0.55s ease-out both, card-pulse 3.6s ease-in-out infinite;
	animation-delay: calc(0.15s + var(--n) * 0.12s), calc(1.4s + var(--n) * 0.9s);
	cursor: pointer;
}

.card:hover {
	transform: translateY(-6px);
	box-shadow: 0 0 22px color-mix(in srgb, var(--c) 70%, transparent), 0 14px 28px rgba(0, 0, 0, 0.4);
}

.card.is-pop {
	animation: card-pop 0.38s cubic-bezier(0.2, 1.5, 0.4, 1);
}

.card__icon {
	width: 2.6rem;
	height: 2.6rem;
	display: grid;
	place-items: center;
	image-rendering: pixelated;
	animation: bob 1.6s ease-in-out infinite;
	animation-delay: calc(var(--n) * 0.2s);
}

.card:hover .card__icon {
	animation: pop-spin 0.45s ease;
}

.card__n {
	position: absolute;
	top: 0.45rem;
	right: 0.55rem;
	margin: 0;
	font-family: var(--font-pixel);
	font-size: 0.7rem;
	color: var(--c);
}

.card h2 {
	margin: 0.45rem 0 0.3rem;
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1.2;
}

.card p:last-child {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.35;
	color: var(--ink-dim);
}

.privacy {
	margin: 0.75rem 0 0;
	font-size: 0.8rem;
}

.privacy a {
	color: var(--ink-dim);
	text-underline-offset: 0.18em;
}

.privacy a:hover {
	color: var(--gold);
}

@keyframes kenburns {
	from { transform: scale(1) translate(0, 0); }
	to { transform: scale(1.08) translate(-1.4%, -1.1%); }
}

@keyframes float-up {
	0% { transform: translateY(0) rotate(0deg); opacity: 0; }
	12% { opacity: 1; }
	100% { transform: translateY(-110vh) rotate(220deg); opacity: 0; }
}

@keyframes letter-in {
	from { opacity: 0; transform: translateY(18px) scale(0.6); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes idle-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

@keyframes rgb-glitch {
	0% { transform: translate(0); }
	25% { transform: translate(-3px, 1px); text-shadow: 4px 0 0 #ff2d6a, -4px 0 0 #2ad4ff; }
	50% { transform: translate(3px, -1px); }
	100% { transform: translate(0); }
}

@keyframes rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-pulse {
	0%, 100% { filter: brightness(1); }
	50% { filter: brightness(1.25); }
}

@keyframes shine {
	0%, 55% { transform: translateX(-120%); }
	80%, 100% { transform: translateX(120%); }
}

@keyframes bounce-cta {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

@keyframes card-in {
	from { opacity: 0; transform: translateY(22px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes card-pulse {
	0%, 88%, 100% { border-color: #3a1608; }
	94% { border-color: var(--c); }
}

@keyframes bob {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-3px); }
}

@keyframes pop-spin {
	0% { transform: scale(1) rotate(0); }
	40% { transform: scale(1.25) rotate(-12deg); }
	100% { transform: scale(1) rotate(0); }
}

@keyframes sun-breathe {
	0%, 100% { opacity: 0.75; }
	50% { opacity: 1; }
}

@keyframes card-pop {
	0% { transform: scale(1); }
	40% { transform: scale(1.07) translateY(-8px); }
	100% { transform: scale(1); }
}

@media (max-width: 900px) {
	.steps {
		grid-template-columns: 1fr 1fr;
	}

	.cta {
		flex-direction: column;
		align-items: stretch;
		width: min(22rem, 100%);
		margin-top: 1.2rem;
	}

	.btn {
		width: 100%;
	}

	.btn--play {
		animation: none;
	}
}

@media (max-width: 520px) {
	.steps {
		grid-template-columns: 1fr;
	}

	.brand {
		font-size: 1.05rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.scene__img,
	.brand__word span,
	.tagline,
	.pitch,
	.btn,
	.btn::after,
	.btn--play,
	.card,
	.card__icon,
	.loot__coin,
	.loot__xp,
	.loot__gem,
	.sun-glow {
		animation: none !important;
	}

	.btn:hover,
	.card:hover {
		transform: none;
	}

	.loot,
	.scanlines,
	.sun-glow {
		display: none;
	}
}
