/* Single article template. */

.ohso-single-post {
	--single-post-content-width: 48rem;
	--single-post-section-width: 60rem;
	--single-post-hero-frame-width: 85.5625rem;
	--single-post-hero-frame-offset: max(
		var(--section-gutter),
		calc((100% - var(--single-post-hero-frame-width)) / 2)
	);
	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--base);
}

.ohso-single-post__hero {
	position: relative;
	display: flex;
	box-sizing: border-box;
	min-height: 36.125rem;
	align-items: flex-start;
	padding: 8.4375rem 0 9.375rem;
	overflow: visible;
	background: linear-gradient(180deg, var(--base) 0%, var(--secondary-ultra-light) 100%);
}

.ohso-single-post__hero-background {
	position: absolute;
	inset: 0;
	overflow: hidden;
	opacity: 0.2;
	pointer-events: none;
	user-select: none;
}

.ohso-single-post__hero-curve {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	user-select: none;
}

.ohso-single-post__hero-pattern,
.ohso-single-post__hero-ellipse {
	position: absolute;
	max-width: none;
	pointer-events: none;
	user-select: none;
}

.ohso-single-post__hero-pattern {
	top: -14rem;
	left: -21.5rem;
	width: 55.8125rem;
	height: 54.25rem;
}

.ohso-single-post__hero-ellipse {
	left: -37rem;
	bottom: -36.0625rem;
	width: 199.125rem;
	height: 41.6875rem;
}

.ohso-single-post__hero-inner {
	position: relative;
	z-index: 1;
	width: min(100%, 66rem);
	margin-inline-start: var(--single-post-hero-frame-offset);
}

.ohso-single-post__eyebrow,
.ohso-single-post__title,
.ohso-single-post__related-heading h2,
.ohso-single-post__related-title {
	margin: 0;
}

.ohso-single-post__eyebrow {
	margin-bottom: var(--space-xxs);
	color: var(--primary);
	font-family: var(--font-body);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: normal;
	text-transform: uppercase;
}

.ohso-single-post__title {
	color: var(--primary-dark);
	font-family: var(--font-heading);
	font-size: var(--text-2xl);
	font-weight: 400;
	line-height: 1.3;
}

.ohso-single-post__featured-image {
	position: absolute;
	z-index: 2;
	top: 19.9375rem;
	left: 50%;
	box-sizing: border-box;
	width: 57.5rem;
	height: 35.9375rem;
	margin: 0;
	overflow: hidden;
	border-radius: var(--radius-m);
	transform: translateX(-50%);
}

.ohso-single-post__featured-image-media,
.ohso-single-post__related-image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.ohso-single-post__body {
	box-sizing: border-box;
	padding: 23.4375rem var(--section-gutter) var(--section-padding);
}

.ohso-single-post--without-featured-image .ohso-single-post__body {
	padding-top: var(--section-padding);
}

.ohso-single-post__entry-content {
	width: min(100%, var(--single-post-content-width));
	margin-inline: auto;
	color: var(--content);
	font-family: var(--font-body);
	font-size: var(--text-m);
	line-height: 1.5;
}

.ohso-single-post__entry-content > * {
	margin-block: 0 var(--space-s);
}

.ohso-single-post__entry-content > :last-child {
	margin-bottom: 0;
}

.ohso-single-post__entry-content > .alignwide {
	width: min(
		calc(100vw - (var(--section-gutter) * 2)),
		var(--single-post-section-width)
	);
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

.ohso-single-post__entry-content :is(h2, h3, h4, h5, h6) {
	color: var(--content);
	font-family: var(--font-heading);
	font-weight: 400;
}

.ohso-single-post__entry-content h2 {
	font-size: var(--text-xl);
	line-height: 1.2;
}

.ohso-single-post__entry-content h3 {
	font-size: var(--text-h4);
	line-height: 1.3;
}

.ohso-single-post__entry-content :is(ul, ol) {
	padding-left: 1.5em;
}

.ohso-single-post__entry-content :is(ul, ol) :is(ul, ol) {
	margin-bottom: 0;
}

.ohso-single-post__related {
	box-sizing: border-box;
	width: min(calc(100% - (var(--section-gutter) * 2)), var(--single-post-section-width));
	margin-inline: auto;
	padding-bottom: var(--section-padding);
}

.ohso-single-post__related-heading {
	padding-top: var(--space-s);
	border-top: 0.0625rem solid var(--primary);
}

.ohso-single-post__related-heading h2 {
	color: var(--primary-dark);
	font-family: var(--font-heading);
	font-size: var(--text-l);
	font-weight: 400;
	line-height: 1.5;
}

.ohso-single-post__related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--grid-gap);
	margin-top: var(--grid-gap);
}

.ohso-single-post__related-card {
	min-width: 0;
}

.ohso-single-post__related-image-link {
	display: block;
	height: 10.9375rem;
	overflow: hidden;
	border-radius: var(--radius-s);
}

.ohso-single-post__related-title {
	padding-block: var(--space-s);
	font-family: var(--font-heading);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.2;
}

.ohso-single-post__related-title a {
	color: var(--primary);
	text-decoration: none;
}

@media (hover: hover) {
	.ohso-single-post__related-title a:hover {
		color: var(--primary-dark);
	}
}

.ohso-single-post :is(a, button):focus-visible {
	outline: 0.1875rem solid var(--primary-dark);
	outline-offset: 0.1875rem;
}

@media (max-width: 62rem) {
	.ohso-single-post__hero {
		min-height: 28rem;
		flex-direction: column;
		align-items: center;
		gap: var(--space-s);
		padding: clamp(4rem, 10vw, 6rem) var(--section-gutter) clamp(4rem, 9vw, 6rem);
		overflow: hidden;
	}

	.ohso-single-post__hero-inner {
		box-sizing: border-box;
		width: calc(100% - (var(--section-gutter) * 2));
		max-width: 44.375rem;
		margin-inline: var(--section-gutter);
	}

	.ohso-single-post__hero-ellipse {
		bottom: -40rem;
	}

	.ohso-single-post__featured-image {
		position: relative;
		top: auto;
		left: auto;
		width: min(100%, 57.5rem);
		height: auto;
		aspect-ratio: 920 / 575;
		transform: none;
	}

	.ohso-single-post__body {
		padding-top: var(--space-l);
	}
}

@media (max-width: 42rem) {
	.ohso-single-post__hero {
		min-height: 24rem;
	}

	.ohso-single-post__title {
		font-size: clamp(2rem, 8vw, var(--text-2xl));
	}

	.ohso-single-post__body,
	.ohso-single-post__related {
		padding-bottom: var(--space-l);
	}

	.ohso-single-post__related-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ohso-single-post__related-image-link {
		height: auto;
		aspect-ratio: 3 / 2;
	}
}
