/*
 * Primitives shared by every UCMM component. Loaded by the mu-plugin on every
 * front end (block theme or Bricks). Tokens (--ucmm-*) come from the theme.
 */

.ucmm-skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 100;
	padding: 0.75rem 1rem;
	background: var(--ucmm-ink);
	color: #fff;
	font-family: var(--ucmm-font-cond);
	font-weight: 700;
	text-transform: uppercase;
}

.ucmm-skip-link:focus {
	top: 16px;
}


.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Layout primitives shared by the components. */
.ucmm-inner {
	width: min(100% - 2 * var(--ucmm-gutter), var(--ucmm-inner));
	margin-inline: auto;
}

/* Section heading: condensed caps with a short red rule. */
.ucmm-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	margin: 0 0 0.75rem;
	font-family: var(--ucmm-font-cond);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--ucmm-red);
}

.ucmm-kicker::before {
	content: "";
	width: 1.75em;
	height: 3px;
	background: currentColor;
}

.ucmm-title {
	margin: 0;
	font-family: var(--ucmm-font-display);
	font-weight: 900;
	font-size: clamp(3rem, 11vw, 5.5rem);
	line-height: 0.86;
	letter-spacing: 0.005em;
	text-transform: uppercase;
}

.ucmm-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	min-height: 48px;
	padding: 0 1.25rem;
	background: var(--ucmm-red);
	color: #fff;
	font-family: var(--ucmm-font-cond);
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.15s;
}

.ucmm-button:hover {
	background: var(--ucmm-red-deep);
	color: #fff;
}

.ucmm-button--light {
	background: #fff;
	color: var(--ucmm-red);
}

.ucmm-button--light:hover {
	background: var(--ucmm-ink);
	color: #fff;
}

/* Section after an overlapping page head (ucmm/page-head overlap) climbs onto the band (e.g. stadium photo, map). */
.ucmm-overlap-up {
	position: relative;
	margin-top: calc(-1 * clamp(64px, 12vw, 120px)) !important;
}

.ucmm-button--outline {
	background: transparent;
	box-shadow: inset 0 0 0 2px currentColor;
	color: var(--ucmm-ink, #141414);
}

.ucmm-button--outline:hover {
	background: var(--ucmm-ink, #141414);
	box-shadow: none;
	color: #fff;
}

.ucmm-kicker--light {
	color: #fff;
}

.ucmm-logo-fallback {
	display: inline-grid;
	place-items: center;
	border-radius: 50%;
	background: var(--ucmm-ghost, #e6e9ed);
	font-family: var(--ucmm-font-cond);
	font-weight: 700;
	color: var(--ucmm-mute, #5b6068);
}

/* Kinetic texture layer inside red bands (absolutely positioned by each component). */
.ucmm-texture {
	background: var(--ucmm-texture) center / cover no-repeat;
	pointer-events: none;
}

/* Pills: nature of a news item (site article / social post). */
.ucmm-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 9px 4px;
	border-radius: 999px;
	background: #fff;
	color: var(--ucmm-ink, #141414);
	font-family: var(--ucmm-font-cond);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgb(0 0 0 / 0.18);
}

.ucmm-pill svg {
	flex: none;
}

.ucmm-pill--site {
	background: var(--ucmm-ink, #141414);
	color: #fff;
}

.ucmm-pill--facebook,
.ucmm-pill--instagram {
	background: #fff;
	color: var(--ucmm-red, #d2122e);
}

/* News cards (4:5), shared by opening, grids, archive and related posts. */
.ucmm-news-card {
	margin: 0;
}

.ucmm-news-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.ucmm-news-card__media {
	position: relative;
	margin: 0;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--ucmm-red-deep, #a10d22);
	box-shadow: 0 10px 30px -12px rgb(0 0 0 / 0.45);
}

.ucmm-news-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.ucmm-news-card__media .ucmm-pill {
	position: absolute;
	top: 10px;
	left: 10px;
}

.ucmm-news-card__link:hover .ucmm-news-card__media > img {
	transform: scale(1.03);
}

.ucmm-news-card__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 0.5em;
	margin: 10px 0 4px;
	font-family: var(--ucmm-font-cond);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--ucmm-red, #d2122e);
}

.ucmm-news-card__meta span::before {
	content: "|";
	margin-right: 0.5em;
	opacity: 0.6;
}

.ucmm-news-card__title {
	margin: 0;
	font-family: var(--ucmm-font-cond);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.12;
	text-align: center;
	text-transform: uppercase;
	text-wrap: balance;
}

.ucmm-news-card__link:hover .ucmm-news-card__title {
	color: var(--ucmm-red, #d2122e);
}

/* Featured: text over a dark gradient at the bottom of the picture. */
.ucmm-news-card--featured .ucmm-news-card__link {
	position: relative;
	color: #fff;
}

.ucmm-news-card--featured .ucmm-news-card__body {
	position: absolute;
	inset: auto 0 0;
	padding: 56px 18px 18px;
	background: linear-gradient(to bottom, rgb(20 20 20 / 0), rgb(20 20 20 / 0.82) 45%, rgb(20 20 20 / 0.94));
}

.ucmm-news-card--featured .ucmm-news-card__meta {
	justify-content: flex-start;
	margin-top: 0;
	color: #fff;
}

.ucmm-news-card--featured .ucmm-news-card__title {
	font-size: clamp(1.5rem, 6.2vw, 2.5rem);
	line-height: 1;
	text-align: left;
}

.ucmm-news-card--featured .ucmm-news-card__link:hover .ucmm-news-card__title {
	color: #fff;
}

.ucmm-news-card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin-top: 10px;
	font-family: var(--ucmm-font-cond);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #ff5c70;
}

.ucmm-news-card__more::after {
	content: "→";
	transition: transform 0.2s;
}

.ucmm-news-card__link:hover .ucmm-news-card__more::after {
	transform: translateX(4px);
}

/* Small cards: interview titles are long, keep three lines. */
.ucmm-news-card:not(.ucmm-news-card--featured) .ucmm-news-card__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

/* Long-form typography: interviews are a lede + questions (h3) + answers. */
.ucmm-prose {
	font-size: 1.125rem;
	line-height: 1.7;
	color: #1f2226;
}

.ucmm-prose > * {
	margin: 0;
}

.ucmm-prose > * + * {
	margin-top: 1.1em;
}

.ucmm-prose > :first-child:is(h2, p) {
	font-family: var(--ucmm-font-body);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.55;
	text-transform: none;
	color: var(--ucmm-ink, #141414);
}

.ucmm-prose h2,
.ucmm-prose h3,
.ucmm-prose h4 {
	margin-top: 1.8em;
	font-family: var(--ucmm-font-cond);
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
}

.ucmm-prose h2 {
	font-size: 1.625rem;
}

.ucmm-prose h3 {
	font-size: 1.375rem;
	color: var(--ucmm-red, #d2122e);
}

.ucmm-prose h3 + p,
.ucmm-prose h2 + p {
	margin-top: 0.5em;
}

.ucmm-prose a {
	color: var(--ucmm-red, #d2122e);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.ucmm-prose blockquote {
	margin-inline: 0;
	padding-left: 1em;
	border-left: 4px solid var(--ucmm-red, #d2122e);
	font-family: var(--ucmm-font-cond);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
}

.ucmm-prose :is(ul, ol) {
	padding-left: 1.25em;
}

.ucmm-prose img {
	max-width: 100%;
	height: auto;
}

/* Pagination (paginate_links type=list) */
.ucmm-pagination {
	margin-top: clamp(32px, 6vw, 56px);
}

.ucmm-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ucmm-pagination :is(a, span) {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	box-sizing: border-box;
	border: 1px solid var(--ucmm-line, #dadee4);
	font-family: var(--ucmm-font-cond);
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ucmm-ink, #141414);
}

.ucmm-pagination .current {
	background: var(--ucmm-red, #d2122e);
	border-color: var(--ucmm-red, #d2122e);
	color: #fff;
}

.ucmm-pagination a:hover {
	border-color: var(--ucmm-ink, #141414);
}

/*
 * Motion. Entrance of the first fold and reveal on scroll, CSS only.
 * The LCP element (featured card) only moves, never starts invisible: an element at
 * opacity 0 would push the LCP time to the end of the animation.
 */
@keyframes ucmm-rise {
	from {
		transform: translateY(28px);
	}
}

@keyframes ucmm-rise-fade {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
}

@keyframes ucmm-fade {
	from {
		opacity: 0;
	}
}

/* Reveal while scrolling (scroll-driven animations; without support content is simply visible). */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		:is(.ucmm-next, .ucmm-result, .ucmm-standings, .ucmm-story__media, .ucmm-story__body, .ucmm-news-grid .ucmm-news-card, .ucmm-news-item:not(.ucmm-news-item--lead), .ucmm-sponsor-card, .ucmm-contact__grid > *, .ucmm-map) {
			animation: ucmm-rise-fade linear both;
			animation-timeline: view();
			animation-range: entry 5% entry 45%;
		}
	}
}

/* YouTube facade (inc/embeds.php): nothing is loaded from YouTube before play. */
.ucmm-video {
	margin: 1.5em 0;
}

.ucmm-video__play,
.ucmm-video iframe {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	background: var(--ucmm-ink, #141414);
}

.ucmm-video__play {
	overflow: hidden;
	padding: 0;
	cursor: pointer;
	isolation: isolate;
}

.ucmm-video--no-thumb .ucmm-video__play {
	background: var(--ucmm-texture) center / cover no-repeat, var(--ucmm-red, #d2122e);
}

.ucmm-video__play img {
	position: absolute;
	z-index: -1;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease, filter 0.3s ease;
}

.ucmm-video__play:hover img {
	transform: scale(1.03);
	filter: brightness(0.85);
}

.ucmm-video__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background: var(--ucmm-red, #d2122e);
	box-shadow: 0 10px 30px rgb(0 0 0 / 0.35);
	transform: translate(-50%, -50%);
}

.ucmm-video__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	border-style: solid;
	border-width: 13px 0 13px 21px;
	border-color: transparent transparent transparent #fff;
	transform: translate(-50%, -50%);
}

.ucmm-video__label {
	position: absolute;
	bottom: 14px;
	left: 16px;
	padding: 6px 10px;
	background: rgb(20 20 20 / 0.75);
	color: #fff;
	font-family: var(--ucmm-font-cond);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ucmm-video figcaption {
	margin-top: 6px;
	font-size: 0.8125rem;
	color: var(--ucmm-mute, #5b6068);
}

/* Cookie consent (inc/analytics.php): only when Google Analytics is configured. */
.ucmm-consent {
	position: fixed;
	z-index: 1000;
	right: var(--ucmm-gutter, 16px);
	bottom: var(--ucmm-gutter, 16px);
	left: var(--ucmm-gutter, 16px);
	display: grid;
	gap: 14px;
	box-sizing: border-box;
	max-width: 520px;
	margin-left: auto;
	padding: 18px 44px 18px 18px;
	background: var(--ucmm-ink, #141414);
	color: #fff;
	box-shadow: 0 10px 30px rgb(0 0 0 / 0.3);
	font-size: 0.9375rem;
	line-height: 1.45;
}

.ucmm-consent[hidden] {
	display: none;
}

.ucmm-consent__text {
	margin: 0;
}

.ucmm-consent__text a {
	color: inherit;
	text-decoration: underline;
}

.ucmm-consent__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

/* Same weight for both choices. */
.ucmm-consent__btn {
	padding: 11px 14px;
	border: 2px solid #fff;
	background: transparent;
	color: #fff;
	font-family: var(--ucmm-font-cond);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}

.ucmm-consent__btn:hover,
.ucmm-consent__btn:focus-visible {
	background: #fff;
	color: var(--ucmm-ink, #141414);
}

.ucmm-consent__close {
	position: absolute;
	top: 6px;
	right: 8px;
	padding: 4px 8px;
	border: 0;
	background: none;
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
