/* Full-width homepage features; typography continues to come from Questy. */
.home-feature-bands {
	position: relative;
	z-index: 2;
	margin-top: 80px;
	padding-block: 40px;
	background: #111114;
}

.homepage .home-feature-bands > .home-feature-band {
	position: relative;
	isolation: isolate;
	display: block;
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: visible;
	border-block: 1px solid rgba(148, 163, 184, 0.08);
	background: #1c202d;
	text-align: left;
}

.homepage .home-feature-bands > .home-feature-band + .home-feature-band {
	margin-top: 48px;
}

.home-feature-band--free {
	--feature-background: url("../images/marketing/homepage-features/night-elf-background.webp");
}

.home-feature-band--quests {
	--feature-background: url("../images/marketing/homepage-features/blood-elf-background.webp");
}

.home-feature-band--why {
	--feature-background: url("../images/marketing/homepage-features/harvest-watcher-background.webp");
}

.homepage .home-feature-band::before {
	content: none;
}

.home-feature-backdrop {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
}

.home-feature-backdrop::before {
	content: "";
	position: absolute;
	inset: -12px;
	background-image: var(--feature-background, none);
	background-position: center;
	background-size: cover;
	filter: blur(3px) saturate(0.5);
	opacity: 0.18;
}

.home-feature-backdrop::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(24, 28, 42, 0.16), rgba(24, 28, 42, 0.72));
}

/* Blend only the first backdrop into the page, keeping its art and copy crisp. */
.homepage .home-feature-bands > .home-feature-band--free {
	border-top-color: #111114;
}

.home-feature-band--free .home-feature-backdrop::after {
	background:
		linear-gradient(180deg, #111114 0, rgba(17, 17, 20, 0.7) 20px, rgba(17, 17, 20, 0.28) 44px, rgba(17, 17, 20, 0) 72px),
		linear-gradient(90deg, rgba(24, 28, 42, 0.16), rgba(24, 28, 42, 0.72));
}

/* Mirror the entrance fade at the bottom of the final feature backdrop. */
.homepage .home-feature-bands > .home-feature-band--why {
	border-bottom-color: #111114;
}

.home-feature-band--why .home-feature-backdrop::after {
	background:
		linear-gradient(0deg, #111114 0, rgba(17, 17, 20, 0.7) 20px, rgba(17, 17, 20, 0.28) 44px, rgba(17, 17, 20, 0) 72px),
		linear-gradient(90deg, rgba(24, 28, 42, 0.16), rgba(24, 28, 42, 0.72));
}

.home-feature-band--quests .home-feature-backdrop::after {
	transform: scaleX(-1);
}

.homepage .home-feature-band .home-feature-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	align-items: center;
	gap: clamp(32px, 4vw, 72px);
	width: min(1320px, calc(100% - 64px));
	min-height: 430px;
	margin-inline: auto;
}

.homepage .home-feature-band--quests .home-feature-inner {
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.homepage .home-feature-band .home-feature-copy {
	position: relative;
	z-index: 1;
	display: grid;
	justify-items: start;
	gap: 24px;
	width: 100%;
	max-width: none;
	margin: 0;
	padding-block: 48px;
	text-align: left;
	transform: none;
}

.homepage .home-feature-band .home-feature-copy p {
	width: auto;
	max-width: 60ch;
	margin-inline: 0;
	text-align: left;
}

.homepage .home-feature-band .free-games-heading-glow {
	font-size: clamp(2rem, 3.6vw, 3rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0;
	white-space: normal;
}

.home-feature-art {
	position: relative;
	align-self: end;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: 430px;
	min-width: 0;
	pointer-events: none;
}

.home-feature-art img {
	display: block;
	flex: 0 1 auto;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 500px;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}

.home-feature-band--free .home-feature-art img {
	width: 600px;
}

/* Match the backdrop's 72px bottom fade without changing the source artwork. */
.home-feature-band--why .home-feature-art img {
	-webkit-mask-image: linear-gradient(0deg, transparent 0, rgba(0, 0, 0, 0.3) 20px, rgba(0, 0, 0, 0.72) 44px, #000 72px);
	mask-image: linear-gradient(0deg, transparent 0, rgba(0, 0, 0, 0.3) 20px, rgba(0, 0, 0, 0.72) 44px, #000 72px);
}

.homepage .home-feature-band .why-buy-slider {
	width: 100%;
	min-width: 0;
}

/* All slides reserve their space so arrows never move when copy changes. */
.why-buy-slides {
	display: grid;
	margin-top: 8px;
}

.homepage .home-feature-band .why-buy-feature {
	grid-area: 1 / 1;
	margin-left: 7px;
	padding-left: 0;
}

.homepage .home-feature-band .why-buy-feature::before,
.homepage .home-feature-band .why-buy-feature::after {
	content: none;
}

/* Tailwind's base [hidden] rule is important; keep inactive slides measurable. */
@layer base {
	.why-buy-slides > .why-buy-feature[hidden] {
		display: block !important;
		visibility: hidden;
		pointer-events: none;
	}
}

.why-buy-feature.is-active {
	animation: why-feature-reveal 220ms ease-out;
}

.homepage .home-feature-band .why-buy-slider-controls {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 24px;
}

.why-buy-slider-controls[hidden] {
	display: none !important;
}

.why-buy-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(151, 182, 231, 0.3);
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.58);
	color: #d9e8f7;
	cursor: pointer;
	transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.why-buy-arrow:hover {
	border-color: #93c5fd;
	background: #233b61;
	box-shadow: 0 0 16px rgba(59, 130, 246, 0.24);
}

.why-buy-arrow:focus-visible {
	outline: 2px solid #93c5fd;
	outline-offset: 4px;
}

.why-buy-slide-status {
	min-width: 4ch;
	color: #b7c9e0;
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.homepage .home-feature-band .why-buy-link {
	margin-top: 0;
}

@keyframes why-feature-reveal {
	from { opacity: 0; transform: translateX(6px); }
	to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1120px) {
	.homepage .home-feature-band .free-games-heading-glow {
		font-size: 30px;
		line-height: 36px;
	}
}

@media (max-width: 1024px) {
	.homepage .home-feature-band .free-games-heading-glow {
		font-size: 24px;
		line-height: 32px;
	}
	.home-feature-bands { margin-top: 48px; padding-block: 32px; }
	.homepage .home-feature-band .home-feature-inner {
		gap: 28px;
		width: calc(100% - 48px);
		min-height: 380px;
	}
	.home-feature-art { height: 380px; }
	.home-feature-art img { max-height: 420px; }
	.homepage .home-feature-band .home-feature-copy { padding-block: 40px; }
}

@media (max-width: 640px) {
	.home-feature-bands { margin-top: 40px; padding-block: 24px; }
	.homepage .home-feature-bands > .home-feature-band + .home-feature-band { margin-top: 32px; }
	.homepage .home-feature-band .home-feature-inner,
	.homepage .home-feature-band--quests .home-feature-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		width: calc(100% - 40px);
		min-height: 0;
	}
	.homepage .home-feature-band .home-feature-copy {
		grid-row: 1;
		gap: 20px;
		padding-block: 36px 24px;
	}
	.home-feature-art {
		grid-row: 2;
		height: auto;
		padding-top: 12px;
	}
	.home-feature-art img { max-height: 310px; max-width: 90%; }
	.home-feature-band--free .home-feature-art img { max-height: 240px; }
	.home-feature-backdrop::before { background-position: 35% center; }
	.homepage .home-feature-band .why-buy-link { margin-top: 0; }
}

@media (max-width: 520px) {
	.homepage .home-feature-band .free-games-heading-glow {
		font-size: clamp(17px, 5.6vw, 24px);
		line-height: 1.2;
	}
}

@media (prefers-reduced-motion: reduce) {
	.why-buy-feature.is-active { animation: none; }
	.why-buy-arrow { transition: none; }
}
