/* Styles theme.json cannot express. Keep selectors flat (classes only). */

/* Accessibility: visible focus everywhere, never removed. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--focus);
	outline-offset: 2px;
}

/* 44px minimum tap targets for buttons and menu links. */
.wp-element-button,
.wp-block-navigation-item__content,
.wp-block-search__button {
	min-height: var(--wp--custom--tap-target);
	display: inline-flex;
	align-items: center;
}

/* Paragraph style: Eyebrow (small tracked caps above headings). */
.is-style-eyebrow {
	font-size: var(--wp--preset--font-size--eyebrow);
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin-bottom: 0;
}

/* Paragraph style: Arrow link ("Learn more →"). Underline appears on hover/focus. */
.is-style-arrow-link a,
.wp-block-read-more {
	text-decoration: none;
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--small);
}

.is-style-arrow-link a::after,
.wp-block-read-more::after {
	content: " \2192";
}

.is-style-arrow-link a:hover,
.is-style-arrow-link a:focus,
.wp-block-read-more:hover,
.wp-block-read-more:focus {
	text-decoration: underline;
}

/* Header */
.mm-header {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.mm-header__wordmark {
	font-size: 26px;
	font-weight: 500;
	letter-spacing: 0.1em;
	line-height: 1.1;
	text-transform: uppercase;
	margin: 0;
}

.mm-header__wordmark a {
	color: var(--wp--preset--color--heading);
	text-decoration: none;
}

/* Search: icon only, like the design, still a 44px target with a label for screen readers. */
.mm-header .wp-block-search__button {
	background: transparent;
	border: 0;
	color: var(--wp--preset--color--primary);
	min-width: var(--wp--custom--tap-target);
	justify-content: center;
}

.mm-header__tagline {
	font-size: var(--wp--preset--font-size--eyebrow);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin: 0;
}

.mm-header .current-menu-item > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 8px;
}

.mm-header .wp-block-navigation-item__content {
	text-decoration: none;
}

/* Photo placeholders: clearly marked until approved images arrive. */
.mm-placeholder {
	background: var(--wp--preset--color--placeholder);
	font-style: italic;
}

/* Quick links: four columns divided by thin rules; 2x2 on tablet. */
.mm-quick-links {
	text-align: center;
}

.mm-quick-links__item + .mm-quick-links__item {
	border-left: 1px solid var(--wp--preset--color--border);
}

.mm-quick-links__icon img {
	width: 32px;
	height: 32px;
}

@media (max-width: 1023px) and (min-width: 782px) {
	.mm-quick-links {
		flex-wrap: wrap !important;
	}

	.mm-quick-links__item {
		flex-basis: 45% !important;
	}

	.mm-quick-links__item:nth-child(odd) {
		border-left: 0;
	}
}

@media (max-width: 781px) {
	.mm-quick-links__item + .mm-quick-links__item {
		border-left: 0;
		border-top: 1px solid var(--wp--preset--color--border);
		padding-top: var(--wp--preset--spacing--50);
	}
}

/* Section dividers */
.mm-section--ruled {
	border-top: 1px solid var(--wp--preset--color--border);
}

/* News cards: image keeps a calm 16:9 frame even without a photo. */
.mm-news-card__image img,
.mm-news-card__image .wp-block-post-featured-image__placeholder {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--placeholder);
}

/* Posts without a featured image keep the same frame, so the cards line up. */
.mm-news-card:not(:has(.wp-block-post-featured-image))::before {
	content: "";
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--placeholder);
}

.mm-news-card__title {
	font-size: 22px;
}

/* Donate band: message left, button right; stacks on phones. */
.wp-block-group.mm-donate-band {
	flex-wrap: nowrap;
}

.mm-donate-band__message {
	flex: 1 1 auto;
	max-width: 720px;
}

@media (max-width: 781px) {
	.wp-block-group.mm-donate-band {
		flex-wrap: wrap;
	}
}

/* Sidebar cards on inner pages */
.mm-side-card {
	border-radius: var(--wp--custom--radius);
}

.wp-block-group.mm-side-card + .wp-block-group.mm-side-card {
	margin-top: var(--wp--preset--spacing--40);
}

.mm-side-card__title {
	font-size: 22px;
}

/* Page intro: one sentence, kept to a readable line length. */
.mm-page-intro__text {
	max-width: 760px;
}

/* Breadcrumbs */
.mm-breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
}

.mm-breadcrumbs__item + .mm-breadcrumbs__item::before {
	content: "/";
	margin-right: 0.5em;
	color: var(--wp--preset--color--text);
}

.mm-breadcrumbs__link {
	text-decoration: none;
}

.mm-breadcrumbs__link:hover,
.mm-breadcrumbs__link:focus {
	text-decoration: underline;
}

/* Footer */
.mm-footer__brand {
	font-size: var(--wp--preset--font-size--eyebrow);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin: 0;
}

.mm-footer__links a {
	text-decoration: none;
}

.mm-footer__links a:hover,
.mm-footer__links a:focus {
	text-decoration: underline;
}

/* Respect people who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
		animation: none !important;
	}
}
