/* Homepage Relocation Remixed states: one static photo card per state. */
body.home .cre-hstates {
	display: block;
	margin-bottom: 60px;
}
/* 1140px of content plus 20px gutters keeps the row in line with the
   boxed heading and divider containers above it. */
body.home .cre-hstates__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
	box-sizing: border-box;
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px;
}
/* A lone card on the last row sits in the middle column instead of the left. */
body.home .cre-hstates__card:last-child:nth-child(3n + 1) {
	grid-column: 2;
}
body.home .cre-hstates__card {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 6px;
	aspect-ratio: 4 / 3;
	text-decoration: none;
	box-shadow: 0 10px 28px rgba(16, 24, 40, 0.12);
}
body.home .cre-hstates__card img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
}
body.home .cre-hstates__card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.48);
	transition: background-color 0.4s ease;
}
body.home .cre-hstates__body {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 24px;
	text-align: center;
}
body.home .cre-hstates__name {
	color: #fff;
	font-family: "Source Sans Pro", sans-serif;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.15;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
body.home .cre-hstates__cta {
	display: inline-block;
	padding: 10px 22px;
	border: 1px solid rgba(255, 255, 255, 0.85);
	color: #fff;
	font-family: "Source Sans Pro", sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}
body.home .cre-hstates__card:hover img,
body.home .cre-hstates__card:focus-visible img {
	transform: scale(1.06);
}
body.home .cre-hstates__card:hover::after,
body.home .cre-hstates__card:focus-visible::after {
	background: rgba(0, 0, 0, 0.3);
}
body.home .cre-hstates__card:hover .cre-hstates__cta,
body.home .cre-hstates__card:focus-visible .cre-hstates__cta {
	background: #1db2ff;
	border-color: #1db2ff;
}
body.home .cre-hstates__card:focus-visible {
	outline: 3px solid #1db2ff;
	outline-offset: 3px;
}

@media (max-width: 1024px) {
	body.home .cre-hstates__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
	/* Seven cards over two columns also leaves one over; centre it rather
	   than stranding it beside an empty cell. */
	body.home .cre-hstates__card:last-child:nth-child(3n + 1),
	body.home .cre-hstates__card:last-child:nth-child(2n + 1) {
		grid-column: 1 / -1;
		width: calc(50% - 10px);
		margin-inline: auto;
	}
	body.home .cre-hstates__name {
		font-size: 30px;
	}
}

@media (max-width: 767px) {
	body.home .cre-hstates__grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	body.home .cre-hstates__card:last-child:nth-child(3n + 1),
	body.home .cre-hstates__card:last-child:nth-child(2n + 1) {
		grid-column: auto;
		width: auto;
		margin-inline: 0;
	}
	body.home .cre-hstates__card {
		aspect-ratio: 16 / 10;
	}
	body.home .cre-hstates__name {
		font-size: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.home .cre-hstates__card img,
	body.home .cre-hstates__card::after,
	body.home .cre-hstates__cta {
		transition: none;
	}
	body.home .cre-hstates__card:hover img,
	body.home .cre-hstates__card:focus-visible img {
		transform: none;
	}
}
