.em-blog-gallery {
	--em-blog-bg: #fff;
	--em-blog-text: #151514;
	--em-blog-muted: #575757;
	--em-blog-accent: #ff4d00;
	--em-blog-gutter: clamp(16px, 3vw, 48px);
	--em-blog-top: 110px;
	margin-top: clamp(64px, 9vw, 125px);
	background: var(--em-blog-bg);
	color: var(--em-blog-text);
	font-family: Outfit, sans-serif;
}

.em-blog-gallery__viewport {
	padding-inline: var(--em-blog-gutter);
}

.em-blog-gallery__intro {
	padding: clamp(24px, 5vw, 64px) var(--em-blog-gutter) 0;
	text-align: center;
}

.em-blog-gallery .em-blog-gallery__intro h2 {
	max-width: 850px;
	margin: 0 auto;
	color: inherit;
	font: 400 clamp(34px, 5vw, 72px) / 1.05 EmperialSerif, Georgia, serif;
	letter-spacing: -.035em;
	scroll-margin-top: calc(var(--em-blog-top) + 12px);
	text-wrap: balance;
}

.em-blog-gallery__intro p {
	margin: 14px 0 0;
	color: var(--em-blog-muted);
	font: 400 clamp(16px, 1.5vw, 20px) / 1.35 Outfit, sans-serif;
}

.em-blog-gallery .em-blog-gallery__track {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr));
	gap: clamp(18px, 2.5vw, 35px);
	max-width: 1200px;
	margin: clamp(28px, 5vw, 56px) auto 0;
	padding: 0;
	list-style: none;
}

.em-blog-gallery__item {
	min-width: 0;
}

.em-blog-gallery a.em-blog-gallery__card {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 100%;
	aspect-ratio: 3 / 4;
	padding: 56px 16px 18px;
	overflow: hidden;
	border-radius: clamp(20px, 2vw, 28px);
	background: #302a26;
	color: #fff;
	text-decoration: none;
}

.em-blog-gallery__card::after {
	position: absolute;
	z-index: -1;
	inset: 0;
	background: linear-gradient(180deg, transparent 30%, rgb(0 0 0 / 17%) 48%, rgb(0 0 0 / 92%) 100%);
	content: "";
}

.em-blog-gallery .em-blog-gallery__image {
	position: absolute;
	z-index: -2;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.em-blog-gallery__copy time {
	display: block;
	margin-bottom: 7px;
	color: #f2efe9;
	font-size: 13px;
}

.em-blog-gallery .em-blog-gallery__copy h3 {
	margin: 0;
	color: inherit;
	font: 450 clamp(17px, 1.65vw, 23px) / 1.16 Outfit, sans-serif;
	letter-spacing: -.017em;
	overflow-wrap: anywhere;
}

.em-blog-gallery__arrow {
	position: absolute;
	top: 13px;
	right: 13px;
	display: grid;
	place-items: center;
	width: 35px;
	height: 35px;
	border: 1px solid rgb(255 255 255 / 65%);
	border-radius: 50%;
	background: rgb(0 0 0 / 55%);
	color: #fff;
}

.em-blog-gallery__card:hover .em-blog-gallery__arrow,
.em-blog-gallery__card:focus-visible .em-blog-gallery__arrow {
	border-color: var(--em-blog-accent);
	background: var(--em-blog-accent);
}

.em-blog-gallery a:focus-visible {
	outline: 2px solid var(--em-blog-accent);
	outline-offset: 4px;
}

.em-blog-gallery a.em-blog-gallery__card:focus-visible {
	outline-offset: -5px;
}

.em-blog-gallery__skip {
	display: none;
}

.em-blog-gallery.is-animated .em-blog-gallery__stage::after {
	display: block;
	height: var(--em-blog-travel, 0px);
	content: "";
}

.em-blog-gallery.is-animated .em-blog-gallery__viewport {
	--em-blog-rail-top: clamp(42px, 4.5vw, 64px);
	--em-blog-rail-bottom: clamp(36px, 3.25vw, 48px);
	--em-blog-card-height: calc(100svh - var(--em-blog-top) - var(--em-blog-rail-top) - var(--em-blog-rail-bottom));
	position: sticky;
	top: var(--em-blog-top);
	padding: var(--em-blog-rail-top) 0 var(--em-blog-rail-bottom);
	overflow: clip;
}

.em-blog-gallery.is-animated .em-blog-gallery__skip {
	position: absolute;
	z-index: 2;
	top: 12px;
	left: var(--em-blog-gutter);
	display: block;
	padding: 9px 16px;
	border-radius: 50px;
	background: var(--em-blog-text);
	color: var(--em-blog-bg);
	translate: 0 -160%;
}

.em-blog-gallery.is-animated .em-blog-gallery__skip:focus {
	translate: 0;
}

.em-blog-gallery.is-animated .em-blog-gallery__track {
	--em-blog-card-width: min(clamp(230px, 26vw, 390px), calc(var(--em-blog-card-height) * .68));
	position: relative;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(42px, 5vw, 80px);
	width: max-content;
	min-width: 100%;
	max-width: none;
	margin: 0;
	padding-inline: var(--em-blog-gutter);
}

.em-blog-gallery.is-animated .em-blog-gallery__item {
	flex: 0 0 var(--em-blog-card-width);
	width: var(--em-blog-card-width);
}

.em-blog-gallery__footer {
	padding: 24px var(--em-blog-gutter) 42px;
	scroll-margin-top: calc(var(--em-blog-top) + 12px);
	text-align: center;
}

.em-blog-gallery.is-animated .em-blog-gallery__footer {
	padding-top: 8px;
}

.em-blog-gallery__footer a,
.em-blog-gallery__footer a:visited {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 7px 15px;
	border: 1px solid rgb(0 0 0 / 20%);
	border-radius: 50px;
	color: var(--em-blog-text);
	text-decoration: none;
}

.em-blog-gallery__footer a:hover {
	border-color: var(--em-blog-accent);
}

@media (max-width: 680px) {
	.em-blog-gallery.is-animated .em-blog-gallery__track {
		--em-blog-card-width: min(72vw, calc(var(--em-blog-card-height) * .68));
	}

	.em-blog-gallery .em-blog-gallery__copy h3 {
		font-size: clamp(17px, 4.8vw, 21px);
	}
}
