/**
 * Home collection editorial surfaces.
 *
 * The media stage stays in the document at every pointer size. The fine
 * pointer controller only adds a restrained response; the information and
 * route never depend on hover.
 */

.ew-home-services {
	background: var(--ew-bg, #f4efe5);
}

.ew-home-services h2,
.ew-home-category-list {
	max-width: 72rem;
}

.ew-home-service-pathways {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(2rem, 4vw, 4rem);
	row-gap: 0;
	margin-top: clamp(2rem, 5vw, 4rem);
	padding-block: 1px;
}

.ew-home-service-pathways::before,
.ew-home-service-pathways::after {
	position: absolute;
	left: 0;
	width: 100%;
	height: 1px;
	content: '';
	background: linear-gradient(90deg, transparent, var(--ew-border, rgba(25, 38, 31, 0.22)) 10%, var(--ew-border, rgba(25, 38, 31, 0.22)) 90%, transparent);
	pointer-events: none;
}

.ew-home-service-pathways::before {
	top: 0;
}

.ew-home-service-pathways::after {
	bottom: 0;
}

.ew-home-service-pathway {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 42%);
	gap: clamp(1.25rem, 2vw, 2rem);
	align-items: center;
	min-width: 0;
	padding: clamp(1.5rem, 3vw, 2.5rem) 0;
	background: var(--ew-bg, #f4efe5);
}

.ew-home-service-pathway__text {
	min-width: 0;
}

.ew-home-service-pathway__label {
	margin: 0 0 0.75rem;
	color: var(--ew-link, #1f5b49);
	font: 600 0.7rem/1.2 var(--ew-font-sans, sans-serif);
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.ew-home-service-pathway h3 {
	margin: 0;
	font-size: clamp(1.45rem, 2.5vw, 2rem);
	line-height: 1.14;
	text-wrap: balance;
}

.ew-home-service-pathway__text > p:not(.ew-home-service-pathway__label) {
	max-width: 34rem;
	margin: 1rem 0 1.25rem;
}

.ew-home-service-pathway__media {
	width: 100%;
	min-width: 0;
	align-self: center;
	min-height: 0;
	/* This editorial slot overrides the registry's inline landscape ratio. */
	aspect-ratio: 4 / 5 !important;
}

.ew-home-service-pathway__cta,
.ew-home-category-row__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	color: var(--ew-link, #1f5b49);
	font-weight: 600;
	text-decoration: none;
}

.ew-home-service-pathway__cta .ew-draw,
.ew-home-category-row__cta .ew-draw {
	width: 1.125rem;
	height: 0.875rem;
	flex: 0 0 auto;
}

.ew-home-service-pathway__cta:focus-visible,
.ew-home-category-row__cta:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 0.25rem;
}

.ew-home-category-list {
	margin-top: clamp(2rem, 5vw, 4rem);
}

.ew-home-category-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
	grid-template-rows: auto auto auto;
	column-gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
	min-height: clamp(22rem, 28vw, 27rem);
	padding: clamp(2rem, 4vw, 4rem) 0;
}

.ew-home-category-row::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 1px;
	content: '';
	background: linear-gradient(90deg, transparent, var(--ew-border, rgba(25, 38, 31, 0.22)) 10%, var(--ew-border, rgba(25, 38, 31, 0.22)) 90%, transparent);
	pointer-events: none;
}

.ew-home-category-row > h3 {
	grid-column: 1;
	grid-row: 1;
	margin: 0;
	font-size: clamp(1.75rem, 3vw, 2.7rem);
	line-height: 1;
}

.ew-home-category-row__copy {
	grid-column: 1;
	grid-row: 2;
	max-width: 36rem;
}

.ew-home-category-row__copy p {
	margin: 1rem 0;
}

.ew-home-category-row__media {
	grid-column: 2;
	grid-row: 1 / span 3;
	width: 100%;
	min-width: 0;
	min-height: 20rem;
	height: 100%;
	align-self: stretch;
	aspect-ratio: auto !important;
}

.ew-home-category-row__cta {
	grid-column: 1;
	grid-row: 3;
}

.ew-home-category-row--reverse > h3,
.ew-home-category-row--reverse > .ew-home-category-row__copy,
.ew-home-category-row--reverse > .ew-home-category-row__cta {
	grid-column: 2;
}

.ew-home-category-row--reverse {
	grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
}

.ew-home-category-row--reverse > .ew-home-category-row__media {
	grid-column: 1;
}

@media (min-width: 64rem) {
	.ew-home-service-pathway:nth-child(odd) {
		padding-inline: 0;
	}

	.ew-home-service-pathway:nth-child(even) {
		padding-inline: 0;
	}
}

@media (max-width: 63.99rem) {
	.ew-home-service-pathways {
		grid-template-columns: 1fr;
	}

	.ew-home-service-pathway {
		grid-template-columns: minmax(0, 1fr) minmax(8rem, 34%);
	}

	.ew-home-category-row {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		gap: 0;
		min-height: 0;
	}

	.ew-home-category-row > h3,
	.ew-home-category-row__copy,
	.ew-home-category-row__media,
	.ew-home-category-row__cta,
	.ew-home-category-row--reverse > h3,
	.ew-home-category-row--reverse > .ew-home-category-row__copy,
	.ew-home-category-row--reverse > .ew-home-category-row__media,
	.ew-home-category-row--reverse > .ew-home-category-row__cta {
		grid-column: 1;
		grid-row: auto;
	}

	.ew-home-category-row > h3 {
		order: 1;
	}

	.ew-home-category-row__copy {
		order: 2;
	}

	.ew-home-category-row__media {
		order: 3;
		min-height: 15rem;
		height: auto;
		aspect-ratio: 16 / 10 !important;
		margin: 0.75rem 0 1.25rem;
	}

	.ew-home-category-row__cta {
		order: 4;
		margin-bottom: 0.5rem;
	}
}

@media (max-width: 34rem) {
	.ew-home-service-pathway {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.ew-home-service-pathway__media {
		min-height: 13rem;
		aspect-ratio: 16 / 10 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ew-home-service-pathway__media,
	.ew-home-category-row__media {
		transition: none;
	}
}
