/**
 * Trail World homepage — illustrated hero + island cards.
 * Scoped to .kz-trail-home / body.kz-home-paper-page.
 */

body.kz-home-paper-page {
	--kz-paper: #eef8f1;
	--kz-ink: #16324a;
	--kz-ink-muted: #3d5a6e;
	--kz-gold: #f5c400;
	--kz-green: #3cb54a;
	--kz-home-rail: min(92vw, 72rem);
	background: #eaf6ff;
	color: var(--kz-ink);
}

body.kz-home-paper-page .kz-site-header,
body.kz-home-paper-page .kz-site-header::before,
body.kz-home-paper-page .wp-site-blocks > .wp-block-template-part:has(.kz-site-header),
body.kz-home-paper-page .wp-site-blocks > header.wp-block-template-part {
	background: rgba(255, 255, 255, 0.92);
}

.kz-trail-home {
	overflow-x: clip;
	color: var(--kz-ink, #16324a);
}

.kz-trail-hero {
	position: relative;
}

.kz-trail-hero__stage {
	position: relative;
	height: calc(100svh - 6.25rem);
	min-height: 28rem;
	max-height: 44rem;
	overflow: hidden;
}

.kz-trail-hero__art {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: 62% 42% !important;
	display: block;
}

.kz-trail-hero__copy {
	position: relative;
	z-index: 2;
	width: var(--kz-home-rail, min(92vw, 72rem));
	max-width: 100%;
	margin: 0 auto;
	padding: 2.25rem 1.25rem 0;
	background: linear-gradient(90deg, rgba(234, 246, 255, 0.55) 0%, rgba(234, 246, 255, 0.12) 55%, transparent 80%);
}

.kz-trail-hero__title {
	margin: 0 0 0.4rem;
	font-family: var(--wp--preset--font-family--heading, Nunito, system-ui, sans-serif);
	font-size: clamp(2.1rem, 5.5vw, 3.4rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
	color: #16324a;
	text-shadow: 0 2px 0 rgba(255, 255, 255, 0.45);
}

.kz-trail-hero__lede {
	margin: 0 0 1rem;
	font-size: 1.15rem;
	font-weight: 650;
	color: #23445c;
	max-width: 22rem;
}

.kz-trail-hero__cast {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.kz-trail-grades {
	position: absolute;
	z-index: 2;
	left: max(1rem, calc((100% - min(92vw, 72rem)) / 2 + 1.25rem));
	bottom: 1.25rem;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.55rem;
	width: min(38rem, 58vw);
	margin: 0;
	padding: 0;
	list-style: none;
}

.kz-trail-grade {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	min-height: 6.1rem;
	padding: 0.65rem 0.4rem 0.55rem;
	border-radius: 1.35rem;
	text-decoration: none;
	color: #16324a;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 10px 24px rgba(22, 50, 74, 0.12);
	font-family: var(--wp--preset--font-family--heading, Nunito, system-ui, sans-serif);
	text-align: center;
}

.kz-trail-grade strong {
	font-size: 1rem;
}

.kz-trail-grade span:last-child {
	font-size: 0.78rem;
	color: #3d5a6e;
}

.kz-trail-grade__icon {
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 999px;
	display: grid;
	place-items: center;
	font-weight: 800;
	color: #fff;
	margin-bottom: 0.2rem;
}

.kz-trail-grade--prek .kz-trail-grade__icon {
	background: #3cb54a;
}

.kz-trail-grade--k .kz-trail-grade__icon {
	background: #f0c400;
	color: #16324a;
}

.kz-trail-grade--g1 .kz-trail-grade__icon {
	background: #f08a3a;
}

.kz-trail-grade--g2 .kz-trail-grade__icon {
	background: #3b82f6;
}

.kz-trail-islands,
.kz-trail-trust,
.kz-trail-cta {
	width: var(--kz-home-rail, min(92vw, 72rem));
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
	box-sizing: border-box;
}

.kz-trail-islands {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.75rem;
	padding-top: 1.25rem;
	padding-bottom: 1.25rem;
}

.kz-trail-island {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 0.5rem 0.5rem 0.7rem;
	border-radius: 1.25rem;
	background: #fff;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 10px 22px rgba(22, 50, 74, 0.1);
}

.kz-trail-island img {
	width: 100%;
	height: 8.5rem;
	max-height: 8.5rem;
	aspect-ratio: auto;
	object-fit: cover;
	object-position: center 42%;
	border-radius: 0.9rem;
	display: block;
}

.kz-trail-island strong {
	font-family: var(--wp--preset--font-family--heading, Nunito, system-ui, sans-serif);
	font-size: 1.05rem;
	padding: 0 0.25rem;
}

.kz-trail-island__go {
	align-self: flex-start;
	margin: 0 0.35rem;
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0.25rem 0.9rem;
	border-radius: 999px;
	background: #3cb54a;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 800;
}

.kz-trail-island__go--orange {
	background: #f08a3a;
}

.kz-trail-island__go--teal {
	background: #2aa9b8;
}

.kz-trail-island__go--purple {
	background: #8b5cf6;
}

.kz-trail-trust {
	padding-bottom: 1.75rem;
}

.kz-trail-trust__bar {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 0;
	padding: 1rem 1.1rem;
	list-style: none;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 8px 22px rgba(22, 50, 74, 0.08);
}

.kz-trail-trust__bar li {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	text-align: center;
	font-size: 0.82rem;
	color: #3d5a6e;
}

.kz-trail-trust__bar li::before {
	content: "";
	width: 1.65rem;
	height: 1.65rem;
	margin: 0 auto 0.2rem;
	border-radius: 999px;
}

.kz-trail-trust__bar li:nth-child(1)::before {
	background: #3cb54a;
}

.kz-trail-trust__bar li:nth-child(2)::before {
	background: #f472b6;
}

.kz-trail-trust__bar li:nth-child(3)::before {
	background: #f5c400;
}

.kz-trail-trust__bar li:nth-child(4)::before {
	background: #3b82f6;
}

.kz-trail-trust__bar strong {
	color: #16324a;
	font-size: 0.92rem;
}

.kz-trail-cta {
	text-align: center;
	padding-bottom: 2.75rem;
}

.kz-trail-cta__title {
	margin: 0 0 0.35rem;
	font-family: var(--wp--preset--font-family--heading, Nunito, system-ui, sans-serif);
	font-size: 1.6rem;
}

.kz-trail-cta p {
	margin: 0 0 0.85rem;
	color: #3d5a6e;
}

.kz-trail-cta__register {
	background: #f08a3a;
	color: #fff;
	border: 0;
	border-radius: 999px;
	min-height: 48px;
	font-weight: 800;
	text-decoration: none;
	padding: 0.7rem 1.4rem;
	display: inline-flex;
	align-items: center;
}

.kz-trail-more {
	display: flex;
	justify-content: center;
	gap: 1.1rem;
	flex-wrap: wrap;
	margin-top: 1.1rem !important;
}

.kz-trail-more a {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 0.2rem 0.35rem;
	font-weight: 700;
	color: #16324a;
}

@media (max-width: 900px) {
	.kz-trail-hero__stage {
		aspect-ratio: auto;
		min-height: 0;
		display: flex;
		flex-direction: column;
	}

	.kz-trail-hero__art {
		position: relative !important;
		inset: auto !important;
		height: 16rem !important;
		max-height: none !important;
		object-position: 70% 40% !important;
	}

	.kz-trail-hero__copy {
		background: none;
		padding-top: 1.1rem;
	}

	.kz-trail-grades,
	.kz-trail-islands,
	.kz-trail-trust__bar {
		grid-template-columns: 1fr 1fr;
		border-radius: 1.5rem;
	}

	.kz-trail-grades {
		position: relative;
		left: auto;
		bottom: auto;
		width: auto;
		margin: 0 1.25rem 1rem;
	}

	.kz-trail-islands {
		padding-top: 1rem;
		padding-bottom: 1rem;
		gap: 0.65rem;
	}

	.kz-trail-island img {
		height: 6rem;
		max-height: 6rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kz-trail-home *,
	.kz-trail-home *::before,
	.kz-trail-home *::after {
		animation: none !important;
		transition: none !important;
	}
}
