/* Single Article — hero, featured image, body content */

.ortega-article {
	--ortega-ar-blue: #0058a4;
	--ortega-ar-blue-dark: #093272;
	--ortega-ar-yellow: #ffe400;
	--ortega-ar-cloud: var(--wp--preset--color--blue-200, #e9f2f9);
	--ortega-ar-white: #ffffff;
	--ortega-ar-inline: clamp(1rem, 4vw, 3rem);
	--ortega-ar-maxw: 1440px;
	--ortega-ar-content: 760px;
	--ortega-ar-sidebar: 58px;
	--ortega-ar-featured-w: min(calc(100% - 2 * var(--ortega-ar-inline)), 1134px);
	--ortega-ar-featured-h: calc(var(--ortega-ar-featured-w) * 659 / 1134);
	--ortega-ar-featured-pull: clamp(1rem, 3vw, 2.5rem);
	--ortega-ar-nav-overlap: 0px;
	box-sizing: border-box;
	color: var(--ortega-ar-blue-dark);
	display: block;
	max-width: 100%;
	width: 100%;
}

.ortega-article *,
.ortega-article *::before,
.ortega-article *::after {
	box-sizing: border-box;
}

body.ortega-hero-nav-scroll .ortega-article {
	--ortega-ar-nav-overlap: 112px;
}

@media (max-width: 781px) {
	body.ortega-hero-nav-scroll .ortega-article {
		--ortega-ar-nav-overlap: 73px;
	}
}

/* ---------------------------------------------------------------- Hero stage (blue panel + overlapping image) */

.ortega-article__hero-stage {
	background-color: var(--ortega-ar-white);
	position: relative;
	width: 100%;
}

.ortega-article__hero-stage:has(.ortega-article__featured) {
	/* Room for the bottom 25% of the featured image below the rough edge. */
	padding-bottom: calc(0.25 * var(--ortega-ar-featured-h));
}

/* Blue fill behind the text column and the top ~75% of the featured image. */
.ortega-article__hero-stage:has(.ortega-article__featured)::before {
	background-color: var(--ortega-ar-blue);
	content: "";
	inset: 0 0 calc(0.25 * var(--ortega-ar-featured-h)) 0;
	position: absolute;
	z-index: 0;
}

.ortega-article__hero {
	background-color: var(--ortega-ar-blue);
	overflow: visible;
	position: relative;
	width: 100%;
}

.ortega-article__hero-stage:has(.ortega-article__featured) .ortega-article__hero {
	background-color: transparent;
}

/* Pin the rough edge to the blue/white split (75% of the featured image height). */
.ortega-article__hero-stage:has(.ortega-article__featured) > .edge.bottom {
	bottom: auto;
	margin-top: -2px;
	top: calc(100% - 0.25 * var(--ortega-ar-featured-h));
	transform: translateX(-50%) scaleY(-1);
}

.ortega-article__hero-stage:not(:has(.ortega-article__featured)) > .edge.bottom {
	bottom: auto;
	margin-top: -2px;
	top: 100%;
}

.ortega-article__hero-stage > .edge.blue,
.ortega-article__hero .edge.blue {
	background-color: var(--ortega-ar-blue);
}

.ortega-article__hero-inner {
	align-items: center;
	display: flex;
	flex-direction: column;
	margin-inline: auto;
	max-width: var(--ortega-ar-maxw);
	padding:
		clamp(5.5rem, 14vw, 6.5rem)
		var(--ortega-ar-inline)
		clamp(3rem, 7vw, 5rem);
	position: relative;
	text-align: center;
	width: 100%;
}

.ortega-article__breadcrumb,
.ortega-article__title,
.ortega-article__hero-meta {
	position: relative;
	z-index: 5;
}

/* Breadcrumbs */

.ortega-article__breadcrumb {
	margin-bottom: clamp(1rem, 3vw, 1.5rem);
	width: 100%;
}

.ortega-article__breadcrumb-list {
	align-items: center;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 7px;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ortega-article__breadcrumb-item {
	align-items: center;
	display: inline-flex;
	gap: 7px;
	margin: 0;
}

.ortega-article__breadcrumb-link,
.ortega-article__breadcrumb-current {
	color: var(--ortega-ar-white);
	font-family: var(--ortega-font-copy);
	font-size: var(--ortega-type-breadcrumb, 14px);
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.28;
	text-decoration: none;
}

.ortega-article__breadcrumb-link {
	transition: opacity 0.2s ease;
}

.ortega-article__breadcrumb-link:hover,
.ortega-article__breadcrumb-link:focus-visible {
	opacity: 0.7;
}

.ortega-article__breadcrumb-sep {
	color: var(--ortega-ar-white);
	display: inline-flex;
	opacity: 0.85;
}

/* Title */

.ortega-article__hero.is-text-entrance-pending .ortega-article__breadcrumb,
.ortega-article__hero.is-text-entrance-pending .ortega-article__title,
.ortega-article__hero.is-text-entrance-pending .ortega-article__author {
	visibility: hidden;
}

.ortega-article__title {
	color: var(--ortega-ar-white);
	font-family: var(--ortega-font-display);
	font-size: clamp(2.25rem, 9vw, 6.25rem);
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.06;
	margin: 0;
	max-width: 21ch;
	text-transform: uppercase;
}

.ortega-article__title :is(sup, .ortega-mark) {
	top: -1em;
}

/* Author + mobile actions row */

.ortega-article__hero-meta {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-top: clamp(1.5rem, 4vw, 2.5rem);
	width: 100%;
}

.ortega-article__author {
	align-items: center;
	display: flex;
	flex: 1 1 auto;
	gap: 1rem;
	min-width: 0;
}

.ortega-article__author-avatar-wrap {
	flex: 0 0 auto;
	position: relative;
}

.ortega-article__author-avatar-wrap::before {
	background-color: var(--ortega-ar-white);
	border-radius: 50%;
	content: "";
	inset: -4px;
	position: absolute;
	z-index: 0;
}

.ortega-article__author-avatar {
	border-radius: 50%;
	display: block;
	height: 48px;
	object-fit: cover;
	position: relative;
	width: 48px;
	z-index: 1;
}

.ortega-article__author-text {
	display: flex;
	flex-direction: column;
	gap: 0;
	text-align: left;
}

.ortega-article__author-label {
	color: var(--ortega-ar-yellow);
	font-family: var(--ortega-font-copy);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.16;
	margin: 0;
	text-transform: uppercase;
}

.ortega-article__author-name {
	color: var(--ortega-ar-white);
	font-family: var(--ortega-font-copy);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.44;
	margin: 0;
}

/* Print / share */

.ortega-article__actions {
	align-items: center;
	display: inline-flex;
}

.ortega-article__actions--desktop {
	display: none;
}

.ortega-article__actions--mobile {
	background-color: rgba(9, 50, 114, 0.43);
	border-radius: 999px;
	flex: 0 0 auto;
	gap: 1.25rem;
	padding: 1rem 1.5rem;
}

.ortega-article__action {
	align-items: center;
	background: none;
	border: 0;
	color: var(--ortega-ar-white);
	cursor: pointer;
	display: inline-flex;
	padding: 0;
	transition: opacity 0.2s ease;
}

.ortega-article__action:hover,
.ortega-article__action:focus-visible {
	opacity: 0.75;
}

.ortega-article__action:focus-visible {
	outline: 2px solid var(--ortega-ar-yellow);
	outline-offset: 3px;
}

.ortega-article__action-icon {
	display: block;
	filter: brightness(0) invert(1);
	height: 24px;
	width: 24px;
}

.ortega-article__action-divider {
	background-color: rgba(255, 255, 255, 0.35);
	flex: 0 0 auto;
	height: 25px;
	width: 1px;
}

/* ---------------------------------------------------------------- Featured image */

.ortega-article__featured {
	/* Pull up into the blue panel; bleed the bottom 25% into the white band. */
	margin-bottom: calc(-0.25 * var(--ortega-ar-featured-h));
	margin-inline: auto;
	margin-top: calc(-1 * var(--ortega-ar-featured-pull));
	max-width: var(--ortega-ar-featured-w);
	position: relative;
	width: 100%;
	z-index: 3;
}

.ortega-article__featured-inner {
	width: 100%;
}

.ortega-article__featured-media {
	aspect-ratio: 1134 / 659;
	padding: clamp(12px, 2vw, 30px);
	position: relative;
	width: 100%;
}

.ortega-article__featured-media::before {
	background-color: var(--ortega-ar-white);
	content: "";
	inset: 0;
	position: absolute;
	z-index: 0;
	-webkit-mask-image: url("../images/recipe/hero-image-mask.svg");
	mask-image: url("../images/recipe/hero-image-mask.svg");
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
}

.ortega-article__featured-image-mask {
	border-radius: clamp(12px, 2vw, 16px);
	height: 100%;
	overflow: hidden;
	position: relative;
	width: 100%;
	z-index: 1;
}

.ortega-article__featured-fill {
	background-color: var(--ortega-ar-yellow);
	inset: 0;
	position: absolute;
	z-index: 0;
}

.ortega-article__featured.is-image-entrance-pending .ortega-article__featured-fill,
.ortega-article__featured.is-image-entrance-pending .ortega-article__featured-image {
	visibility: hidden;
}

.ortega-article__featured-image {
	display: block;
	height: 100%;
	object-fit: cover;
	position: relative;
	width: 100%;
	z-index: 1;
}

/* ---------------------------------------------------------------- Body */

.ortega-article__body {
	background-color: var(--ortega-ar-white);
	padding: clamp(2rem, 5vw, 3rem) 0 clamp(3rem, 8vw, 5.5rem);
	position: relative;
	width: 100%;
}

.ortega-article__body-inner {
	align-items: start;
	display: grid;
	gap: clamp(1.5rem, 4vw, 2.5rem);
	grid-template-columns: 1fr;
	justify-items: center;
	margin-inline: auto;
	max-width: var(--ortega-ar-maxw);
	padding-inline: var(--ortega-ar-inline);
	width: 100%;
}

.ortega-article__sidebar {
	display: none;
}

.ortega-article__content {
	font-family: var(--ortega-font-copy);
	font-size: var(--ortega-type-body-md, 16px);
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.5;
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.ortega-article__content > :first-child {
	margin-top: 0;
}

.ortega-article__content > :last-child {
	margin-bottom: 0;
}

.ortega-article__content p {
	margin: 0 0 1.5rem;
}

.ortega-article__content :is(h2, h3, h4).wp-block-heading,
.ortega-article__content > h2,
.ortega-article__content > h3 {
	color: var(--ortega-ar-blue-dark);
	font-family: var(--ortega-font-display);
	font-size: clamp(1.5rem, 5vw, 2.5rem);
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 1.05;
	margin: clamp(2rem, 6vw, 3.5rem) 0 clamp(1rem, 3vw, 1.5rem);
	text-transform: uppercase;
}

.ortega-article__content .wp-block-image {
	margin: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.ortega-article__content .wp-block-image img {
	border-radius: clamp(8px, 2vw, 24px);
	display: block;
	height: auto;
	width: 100%;
}

.ortega-article__content .wp-block-separator,
.ortega-article__content hr {
	background: transparent;
	border: 0;
	height: 13px;
	margin: clamp(2rem, 5vw, 3rem) 0;
	overflow: visible;
	position: relative;
	width: 100%;
}

.ortega-article__content .wp-block-separator:not(.is-style-pattern)::before,
.ortega-article__content hr:not(.is-style-pattern)::before {
	background-image: url("../images/wave-x.svg");
	background-position: left center;
	background-repeat: repeat-x;
	background-size: 134px 10px;
	content: "";
	height: 10px;
	left: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 100%;
}

.ortega-article__content .wp-block-separator.is-style-pattern::before {
	background-image: url("../images/separator-pattern.svg");
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	content: "";
	height: 13px;
	left: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 100%;
}

.ortega-article__content .wp-block-buttons {
	margin: clamp(1.25rem, 4vw, 2rem) 0;
}

.ortega-article__content .wp-block-button__link,
.ortega-article__content a.ortega-btn {
	align-items: center;
	background-color: var(--ortega-ar-yellow);
	border: 0;
	border-radius: 999px;
	color: var(--ortega-ar-blue-dark);
	display: inline-flex;
	font-family: var(--ortega-font-body);
	font-size: var(--ortega-type-btn-md, 16px);
	font-weight: 700;
	justify-content: center;
	letter-spacing: 0;
	line-height: 1.875;
	min-height: clamp(44px, 5vw, 54px);
	padding: 0.5rem clamp(1.35rem, 3vw, 1.75rem);
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.ortega-article__content .wp-block-button__link:hover,
.ortega-article__content .wp-block-button__link:focus-visible,
.ortega-article__content a.ortega-btn:hover,
.ortega-article__content a.ortega-btn:focus-visible {
	background-color: #ffd000;
}

.ortega-article__content a:not(.wp-block-button__link):not(.ortega-btn) {
	color: var(--ortega-ar-blue);
	font-weight: 600;
	text-underline-offset: 3px;
}

.ortega-article__content a:not(.wp-block-button__link):not(.ortega-btn):hover,
.ortega-article__content a:not(.wp-block-button__link):not(.ortega-btn):focus-visible {
	color: var(--ortega-ar-blue-dark);
}

.ortega-article__content :is(ul, ol) {
	margin: 0 0 1.5rem;
	padding-left: 1.25rem;
}

.ortega-article__content li {
	margin-bottom: 0.5rem;
}

.ortega-article__content li:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------- Desktop */

@media (min-width: 782px) {
	.ortega-article {
		--ortega-ar-featured-pull: clamp(2.5rem, 5vw, 4.5rem);
	}

	.ortega-article__hero-inner {
		padding-bottom: clamp(3.5rem, 6vw, 5.5rem);
		padding-top: 0;
	}

	.ortega-article__breadcrumb {
		margin-top: calc(var(--ortega-ar-nav-overlap) + 64px);
	}

	.ortega-article__hero-meta {
		justify-content: center;
		margin-bottom: 48px;
	}

	.ortega-article__author {
		flex: 0 1 auto;
	}

	.ortega-article__author-avatar {
		height: 55px;
		width: 55px;
	}

	.ortega-article__author-name {
		font-size: 1.125rem;
	}

	.ortega-article__actions--mobile {
		display: none;
	}

	.ortega-article__body-inner {
		gap: clamp(2.5rem, 4vw, 3.5rem);
		grid-template-columns: var(--ortega-ar-sidebar) var(--ortega-ar-content);
		justify-content: center;
		justify-items: stretch;
	}

	.ortega-article__sidebar {
		align-self: start;
		display: block;
		height: fit-content;
		position: sticky;
		top: clamp(6.5rem, 10vw, 8.5rem);
		width: var(--ortega-ar-sidebar);
		z-index: 5;
	}

	.ortega-article__actions--desktop {
		align-items: center;
		background-color: var(--ortega-ar-cloud);
		border-radius: 999px;
		display: inline-flex;
		flex-direction: column;
		gap: 1.5rem;
		padding: 2.25rem 1.125rem;
		width: var(--ortega-ar-sidebar);
	}

	.ortega-article__actions--desktop .ortega-article__action {
		color: var(--ortega-ar-blue);
	}

	.ortega-article__actions--desktop .ortega-article__action-icon {
		filter: none;
	}

	.ortega-article__actions--desktop .ortega-article__action:hover,
	.ortega-article__actions--desktop .ortega-article__action:focus-visible {
		color: var(--ortega-ar-blue-dark);
		opacity: 1;
	}

	.ortega-article__actions--desktop .ortega-article__action:hover .ortega-article__action-icon,
	.ortega-article__actions--desktop .ortega-article__action:focus-visible .ortega-article__action-icon {
		filter: brightness(0.6);
	}

	.ortega-article__actions--desktop .ortega-article__action-divider {
		background-color: rgba(9, 50, 114, 0.2);
		height: 1px;
		width: 25px;
	}

	.ortega-article__content {
		font-size: 1.25rem;
		line-height: 1.5;
		max-width: var(--ortega-ar-content);
		width: var(--ortega-ar-content);
	}
}

/* ---------------------------------------------------------------- Motion / print */

@media (prefers-reduced-motion: reduce) {
	.ortega-article__hero.is-text-entrance-pending .ortega-article__breadcrumb,
	.ortega-article__hero.is-text-entrance-pending .ortega-article__title,
	.ortega-article__hero.is-text-entrance-pending .ortega-article__author {
		visibility: visible;
	}

	.ortega-article__featured.is-image-entrance-pending .ortega-article__featured-fill,
	.ortega-article__featured.is-image-entrance-pending .ortega-article__featured-image {
		visibility: visible;
	}

	.ortega-article__action,
	.ortega-article__content .wp-block-button__link,
	.ortega-article__content a.ortega-btn {
		transition: none;
	}
}

@media print {
	.ortega-article__actions,
	.ortega-article__sidebar,
	.ortega-article .edge {
		display: none !important;
	}

	.ortega-article__hero {
		background-color: #ffffff;
	}

	.ortega-article__title,
	.ortega-article__breadcrumb-link,
	.ortega-article__breadcrumb-current,
	.ortega-article__author-name {
		color: #000000;
	}

	.ortega-article__author-label {
		color: #333333;
	}
}
