.mvl-blog,
.mvl-post {
	--mvl-blog-width: 1290px;
	--mvl-blog-gutter: clamp( 18px, 4vw, 44px );
	--mvl-blog-ink: #4a4053;
	--mvl-blog-muted: #6b6070;
	--mvl-blog-heading: #27004b;
	--mvl-blog-accent: #99634d;
	--mvl-blog-surface: #fffdf8;
	--mvl-blog-rule: rgba( 39, 0, 75, 0.12 );
	--mvl-corner: 16px;
	--mvl-petal-xs: clamp( 26px, 3.4vw, 36px );
	--mvl-petal-sm: clamp( 40px, 7vw, 56px );
	--mvl-petal-md: clamp( 56px, 8vw, 92px );
	--mvl-pill: 999px;
	--mvl-blog-field:
		radial-gradient( 120% 100% at 82% 6%, rgba( 233, 233, 141, 0.42 ) 0%, rgba( 233, 233, 141, 0 ) 56% ),
		radial-gradient( 90% 90% at 6% 94%, rgba( 113, 150, 90, 0.2 ) 0%, rgba( 113, 150, 90, 0 ) 60% ),
		linear-gradient( 160deg, #fdfaf4 0%, #f4ece0 100% );
	--mvl-blog-fade: linear-gradient(
		90deg,
		transparent 0%,
		rgba( 0, 0, 0, 0.14 ) 7%,
		rgba( 0, 0, 0, 0.5 ) 17%,
		rgba( 0, 0, 0, 0.84 ) 27%,
		#000 36%
	);

	color: var( --mvl-blog-ink );
}

.mvl-blog {
	background: var( --mvl-blog-field );
	padding-bottom: clamp( 48px, 7vw, 88px );
}

.mvl-blog__masthead {
	max-width: var( --mvl-blog-width );
	margin: 0 auto;
	padding: clamp( 38px, 5.4vw, 68px ) var( --mvl-blog-gutter ) clamp( 30px, 4vw, 48px );
}

.mvl-blog__kicker {
	margin: 0;
	font-family: var( --mvl-font-body );
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var( --mvl-blog-accent );
}

.mvl-blog__title {
	margin: 14px 0 0;
	max-width: 15ch;
	font-family: var( --mvl-font-display );
	font-weight: 300;
	font-size: clamp( 44px, 6.6vw, 76px );
	line-height: 0.98;
	letter-spacing: -0.032em;
	color: var( --mvl-blog-heading );
	text-wrap: balance;
}

.mvl-blog__lede {
	margin: 18px 0 0;
	max-width: 52ch;
	font-size: 16.5px;
	line-height: 1.62;
}

.mvl-blog__lede p { margin: 0 0 0.7em; }
.mvl-blog__lede p:last-child { margin-bottom: 0; }

/* ---------- media ---------- */

.mvl-blog__media {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: linear-gradient( 150deg, #e6dccd 0%, #d8ccbb 100% );
}

.mvl-blog__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: grayscale( 1 ) contrast( 1.06 ) brightness( 1.05 );
}

.mvl-blog__overlay {
	position: absolute;
	inset: 0;
	background: #27004b;
	mix-blend-mode: multiply;
	opacity: 0.82;
}

.mvl-blog__media.is-feature img {
	filter: none;
}

.mvl-blog__media.is-feature .mvl-blog__overlay {
	display: none;
}

.mvl-blog__media.is-empty .mvl-blog__overlay {
	mix-blend-mode: normal;
	opacity: 0.22;
}

/* ---------- feature band ---------- */

.mvl-blog__feature {
	position: relative;
	display: grid;
	grid-template-columns: minmax( 0, 40% ) minmax( 0, 60% );
	align-items: center;
	isolation: isolate;
}

.mvl-blog__feature .mvl-blog__media {
	position: relative;
	z-index: 1;
	grid-column: 2;
	grid-row: 1;
	align-self: stretch;
	min-height: clamp( 340px, 42vw, 520px );
	border-radius: 0;
	-webkit-mask-image: var( --mvl-blog-fade );
	mask-image: var( --mvl-blog-fade );
}

.mvl-blog__decor {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.mvl-blog__mark,
.mvl-blog__bursts {
	position: absolute;
	top: 6%;
	left: -4%;
	height: 88%;
	aspect-ratio: 783 / 900;
	transform: rotate( 10deg );
	transform-origin: 50% 50%;
}

.mvl-blog__mark {
	background: rgba( 39, 0, 75, 0.05 );
	-webkit-mask-image: var( --mvl-blog-mark );
	mask-image: var( --mvl-blog-mark );
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-position: center;
	mask-position: center;
}

.mvl-blog__bursts { opacity: 0.38; }

.mvl-blog__card {
	position: relative;
	z-index: 2;
	grid-column: 1;
	grid-row: 1;
	justify-self: end;
	width: min( 520px, 100% );
	margin: clamp( 28px, 4vw, 56px ) clamp( -150px, -9.5vw, -44px ) clamp( 28px, 4vw, 56px ) var( --mvl-blog-gutter );
	padding: clamp( 26px, 3vw, 40px ) clamp( 26px, 3vw, 40px ) clamp( 34px, 3.6vw, 46px );
	border-radius: var( --mvl-corner ) var( --mvl-petal-md ) var( --mvl-corner ) var( --mvl-petal-md );
	background: var( --mvl-blog-surface );
	box-shadow: 0 1px 2px rgba( 39, 0, 75, 0.05 ), 0 22px 44px -22px rgba( 39, 0, 75, 0.38 );
}

.mvl-blog__card-title {
	margin: 14px 0 0;
	font-family: var( --mvl-font-display );
	font-weight: 400;
	font-size: clamp( 26px, 3vw, 36px );
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: var( --mvl-blog-heading );
	text-wrap: balance;
}

.mvl-blog__card-title a { color: inherit !important; text-decoration: none; }
.mvl-blog__card-title a:hover { text-decoration: underline; text-underline-offset: 0.16em; }

.mvl-blog__card-copy {
	margin: 14px 0 0;
	font-size: 15.5px;
	line-height: 1.62;
}

.mvl-blog__meta {
	margin: 18px 0 0;
	font-family: var( --mvl-font-body );
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.01em;
	color: var( --mvl-blog-muted );
}

/* ---------- toolbar ---------- */

.mvl-blog__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
	max-width: var( --mvl-blog-width );
	margin: 0 auto;
	padding: clamp( 30px, 4vw, 50px ) var( --mvl-blog-gutter ) clamp( 22px, 2.6vw, 30px );
}

.mvl-blog__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-right: auto;
}

.mvl-blog__chip {
	display: inline-block;
	padding: 5px 13px;
	border: 1px solid rgba( 39, 0, 75, 0.18 );
	border-radius: var( --mvl-pill );
	background: rgba( 255, 255, 255, 0.5 );
	font-family: var( --mvl-font-body );
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var( --mvl-blog-heading );
	text-decoration: none;
	transition: background 180ms ease, border-color 180ms ease;
}

.mvl-blog__chip:hover,
.mvl-blog__chip:focus-visible {
	background: #fff;
	border-color: rgba( 39, 0, 75, 0.34 );
}

.mvl-blog__chip.is-on,
.mvl-blog__chip.is-on:hover {
	background: var( --mvl-blog-heading );
	border-color: var( --mvl-blog-heading );
	color: #fdfaf4;
}

.mvl-blog__search {
	display: flex;
	align-items: center;
	gap: 10px;
	width: min( 360px, 100% );
	padding: 4px 5px 4px 20px;
	border: 1px solid rgba( 39, 0, 75, 0.16 );
	border-radius: var( --mvl-pill );
	background: rgba( 255, 255, 255, 0.72 );
}

.mvl-blog__search input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 0;
	background: none;
	font-family: var( --mvl-font-body );
	font-size: 15px;
	color: #1a1420;
}

.mvl-blog__search input[type="search"]::placeholder { color: var( --mvl-blog-muted ); }
.mvl-blog__search input[type="search"]:focus { outline: none; }
.mvl-blog__search:focus-within { border-color: var( --mvl-blog-accent ); }

.mvl-blog__search button {
	padding: 9px 18px;
	border: 0;
	border-radius: var( --mvl-pill );
	background: var( --mvl-blog-heading );
	color: #fdfaf4;
	font-family: var( --mvl-font-body );
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
}

.mvl-blog__rule {
	max-width: var( --mvl-blog-width );
	margin: 0 auto clamp( 28px, 3.4vw, 42px );
	padding: 0 var( --mvl-blog-gutter );
}

.mvl-blog__rule::after {
	content: "";
	display: block;
	border-top: 1px solid var( --mvl-blog-rule );
}

/* ---------- grid ---------- */

.mvl-blog__grid {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: clamp( 20px, 2.6vw, 34px );
	max-width: var( --mvl-blog-width );
	margin: 0 auto;
	padding: 0 var( --mvl-blog-gutter );
}

.mvl-blog__post {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
}

.mvl-blog__post .mvl-blog__media {
	aspect-ratio: 4 / 3;
	border-radius: var( --mvl-corner ) var( --mvl-petal-sm ) var( --mvl-corner ) var( --mvl-petal-sm );
}

.mvl-blog__post .mvl-blog__media img {
	filter: none;
	transition: transform 620ms cubic-bezier( 0.22, 0.61, 0.36, 1 );
}

.mvl-blog__post:hover .mvl-blog__media img {
	transform: scale( 1.05 );
}

.mvl-blog__post .mvl-blog__media .mvl-blog__overlay {
	opacity: 0;
	transition: opacity 200ms ease;
}

.mvl-blog__post:hover .mvl-blog__media .mvl-blog__overlay {
	opacity: 0.055;
}

.mvl-blog__post .mvl-blog__kicker { margin-top: 14px; }

.mvl-blog__post-title {
	margin: 6px 0 0;
	font-family: var( --mvl-font-display );
	font-weight: 400;
	font-size: 21px;
	line-height: 1.18;
	letter-spacing: -0.015em;
	color: var( --mvl-blog-heading );
	text-wrap: balance;
}

.mvl-blog__post-title a { color: inherit !important; text-decoration: none; }
.mvl-blog__post-title a::after { content: ""; position: absolute; inset: 0; }
.mvl-blog__post:hover .mvl-blog__post-title a { text-decoration: underline; text-underline-offset: 0.16em; }

.mvl-blog__post-copy {
	margin: 10px 0 0;
	font-size: 14.5px;
	line-height: 1.58;
}

.mvl-blog__post .mvl-blog__meta { margin-top: 12px; }

/* ---------- empty state ---------- */

.mvl-blog__empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	max-width: var( --mvl-blog-width );
	margin: 0 auto;
	padding: 0 var( --mvl-blog-gutter ) clamp( 20px, 3vw, 36px );
}

.mvl-blog__empty-copy {
	margin: 0;
	max-width: 52ch;
	font-size: 16.5px;
	line-height: 1.6;
}

/* ---------- pagination ---------- */

.mvl-blog__pagination {
	max-width: var( --mvl-blog-width );
	margin: clamp( 34px, 4.4vw, 56px ) auto 0;
	padding: 0 var( --mvl-blog-gutter );
}

.mvl-blog__pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.mvl-blog__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	padding: 9px 15px;
	border: 1px solid rgba( 39, 0, 75, 0.18 );
	border-radius: var( --mvl-pill );
	background: rgba( 255, 255, 255, 0.5 );
	font-family: var( --mvl-font-body );
	font-size: 13.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var( --mvl-blog-heading );
	text-decoration: none;
	transition: background 180ms ease, border-color 180ms ease;
}

.mvl-blog__pagination .page-numbers:hover {
	background: #fff;
	border-color: rgba( 39, 0, 75, 0.34 );
}

.mvl-blog__pagination .page-numbers.current {
	background: var( --mvl-blog-heading );
	border-color: var( --mvl-blog-heading );
	color: #fdfaf4;
}

.mvl-blog__pagination .page-numbers.dots {
	border-color: transparent;
	background: none;
	min-width: 0;
	padding: 9px 4px;
}

.mvl-blog a:focus-visible,
.mvl-blog button:focus-visible,
.mvl-blog input:focus-visible {
	outline: 2px solid var( --mvl-blog-accent );
	outline-offset: 3px;
}

/* ---------- responsive ---------- */

@media ( max-width: 61.25em ) {
	.mvl-blog__feature {
		grid-template-columns: minmax( 0, 1fr );
		grid-template-rows: auto auto;
	}

	/* The modifier class is carried here on purpose: a bare
	   .mvl-blog__feature .mvl-blog__media would lose the mask-image fight
	   against the desktop rule, since a media query adds no specificity.
	   See references/responsive-modifier-resets.md. */
	.mvl-blog__feature .mvl-blog__media.is-feature,
	.mvl-blog__feature .mvl-blog__media.is-empty {
		grid-column: 1;
		grid-row: 1;
		min-height: clamp( 220px, 46vw, 330px );
		-webkit-mask-image: none;
		mask-image: none;
	}

	.mvl-blog__decor { display: none; }

	.mvl-blog__card {
		grid-column: 1;
		grid-row: 2;
		justify-self: stretch;
		width: auto;
		margin: -52px var( --mvl-blog-gutter ) 0;
	}

	.mvl-blog__grid { grid-template-columns: repeat( 2, minmax( 0, 1fr ) ); }
}

@media ( max-width: 40em ) {
	.mvl-blog__grid { grid-template-columns: minmax( 0, 1fr ); }
	.mvl-blog__search { width: 100%; }
}

@media ( prefers-reduced-motion: reduce ) {
	.mvl-blog * { transition: none !important; }
}
