/* ==========================================================================
   W. Mackie Productions — main stylesheet
   Tokens live in theme.json. This file handles layout, the hero, and motion.
   ========================================================================== */

:root {
	--wm-ink: #131311;
	--wm-cream: #F1EDE4;
	--wm-paper: #E8E1D5;
	--wm-gold: #B7A27C;
	--wm-white: #FFFFFF;
	--wm-rule: rgba(19, 19, 17, 0.18);
	--wm-rule-light: rgba(255, 255, 255, 0.28);
	--wm-gutter: clamp(1.25rem, 5vw, 4rem);
	--wm-tracking: 0.16em;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

/* Utility ---------------------------------------------------------------- */

.wm-label {
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: var(--wm-tracking);
	text-transform: uppercase;
	line-height: 1.4;
}

.wm-rule {
	border: 0;
	border-top: 1px solid var(--wm-rule);
	margin: 0;
}

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

.skip-link:focus {
	position: fixed;
	top: 1rem; left: 1rem;
	z-index: 999;
	width: auto; height: auto;
	clip: auto;
	padding: 0.75rem 1.25rem;
	background: var(--wm-ink);
	color: var(--wm-white);
	font-size: 0.875rem;
}

:where(a, button, [tabindex]):focus-visible {
	outline: 2px solid var(--wm-gold);
	outline-offset: 3px;
}

/* Link with arrow -------------------------------------------------------- */

.wm-link {
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: var(--wm-tracking);
	text-transform: uppercase;
	padding: 0.75rem 0;
	min-height: 44px;
	position: relative;
	color: inherit;
	text-decoration: none;
}

.wm-link::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0.5rem;
	width: 100%; height: 1px;
	background: currentColor;
	transform: scaleX(1);
	transform-origin: left;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.wm-link:hover::after,
.wm-link:focus-visible::after { transform: scaleX(0.35); }

/* ==========================================================================
   Header
   ========================================================================== */

.wm-header {
	position: absolute;
	top: 0; left: 0; right: 0;
	z-index: 50;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: clamp(1.25rem, 3vw, 2.25rem) var(--wm-gutter);
	color: var(--wm-white);
}

.wm-masthead {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(0.9375rem, 1.5vw, 1.25rem);
	font-weight: 400;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: inherit;
	text-decoration: none;
	line-height: 1.2;
}

/* Mobile menu toggle — hidden on desktop */
.wm-menu-toggle {
	display: none;
	background: none;
	border: 0;
	color: inherit;
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: var(--wm-tracking);
	text-transform: uppercase;
	min-width: 44px;
	min-height: 44px;
	padding: 0.5rem;
	cursor: pointer;
}

/* Mobile panel — inert on desktop */
.wm-mobile-nav { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.wm-hero {
	position: relative;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	background: var(--wm-ink);
	color: var(--wm-white);
	padding: 0 var(--wm-gutter) clamp(1.75rem, 4vh, 3rem);
}

.wm-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.wm-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
	animation: wm-settle 2.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes wm-settle {
	from { transform: scale(1.06); }
	to   { transform: scale(1); }
}

/* Scrim: only as much as the type needs. Pseudo-element, so no raw markup. */
.wm-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(to top, rgba(10, 10, 9, 0.72) 0%, rgba(10, 10, 9, 0.28) 34%, rgba(10, 10, 9, 0) 62%),
		linear-gradient(to bottom, rgba(10, 10, 9, 0.42) 0%, rgba(10, 10, 9, 0) 26%);
}

.wm-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
	align-items: end;
	gap: clamp(1.5rem, 4vw, 4rem);
	padding-bottom: clamp(2rem, 6vh, 4rem);
}

.wm-hero__region {
	margin: 0 0 clamp(1rem, 2vh, 1.75rem);
	color: rgba(255, 255, 255, 0.92);
}

.wm-hero__statement {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(3.25rem, 11vw, 8rem);
	font-weight: 300;
	line-height: 0.98;
	letter-spacing: -0.015em;
	margin: 0;
	text-wrap: balance;
}

.wm-hero__support {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(1.125rem, 1.6vw, 1.5rem);
	font-weight: 300;
	line-height: 1.4;
	margin: 0;
	padding-top: 1.25rem;
	border-top: 1px solid var(--wm-rule-light);
	color: rgba(255, 255, 255, 0.94);
}

/* Hero footer row: nav lower-left, scroll cue lower-right */
.wm-hero__foot {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.wm-hero__nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp(1.25rem, 3vw, 2.75rem);
	margin: 0;
	padding: 0;
}

.wm-hero__nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--wm-white);
	text-decoration: none;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: var(--wm-tracking);
	text-transform: uppercase;
	position: relative;
}

.wm-hero__nav a::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0.6rem;
	width: 0; height: 1px;
	background: currentColor;
	transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.wm-hero__nav a:hover::after,
.wm-hero__nav a:focus-visible::after { width: 100%; }

.wm-hero__scroll {
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: var(--wm-tracking);
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.86);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
}

.wm-hero__scroll span { display: inline-block; animation: wm-nudge 2.6s ease-in-out infinite; }

@keyframes wm-nudge {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(4px); }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.wm-section { padding: clamp(4rem, 11vh, 9rem) var(--wm-gutter); }
.wm-section--cream { background: var(--wm-cream); color: var(--wm-ink); }
.wm-section--paper { background: var(--wm-paper); color: var(--wm-ink); }
.wm-section--ink   { background: var(--wm-ink);   color: var(--wm-cream); }

.wm-section__label {
	margin: 0 0 clamp(1.5rem, 4vh, 3rem);
	color: currentColor;
	opacity: 0.6;
}

.wm-heading {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 300;
	line-height: 1.03;
	letter-spacing: -0.01em;
	margin: 0;
	font-size: clamp(2.5rem, 6.5vw, 5.5rem);
	text-wrap: balance;
}

/* Intro statement -------------------------------------------------------- */

.wm-intro__statement {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(1.875rem, 4.6vw, 4rem);
	font-weight: 300;
	line-height: 1.18;
	margin: 0;
	max-width: 22ch;
	text-wrap: pretty;
}

.wm-intro__statement em { font-style: italic; }

/* Events ----------------------------------------------------------------- */

.wm-events__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
	align-items: end;
	gap: clamp(1.5rem, 4vw, 4rem);
	margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.wm-events__meta { display: flex; flex-direction: column; gap: 1.25rem; }

.wm-cats { list-style: none; margin: 0; padding: 0; }

.wm-cats li {
	padding: 0.875rem 0;
	border-top: 1px solid currentColor;
	font-size: 0.8125rem;
	font-weight: 400;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.82;
}

.wm-cats li:last-child { border-bottom: 1px solid currentColor; }

.wm-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, auto);
	gap: 4px;
}

.wm-grid__item { position: relative; overflow: hidden; margin: 0; }

.wm-grid__item--dominant { grid-row: span 2; }

.wm-grid__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.wm-grid__item--dominant { aspect-ratio: 4 / 5; }
.wm-grid__item--support  { aspect-ratio: 4 / 3; }

@media (hover: hover) and (pointer: fine) {
	.wm-grid__item:hover img { transform: scale(1.035); }
}

.wm-section__cta { margin-top: clamp(2rem, 5vh, 3.5rem); }

/* Headshots -------------------------------------------------------------- */

.wm-portraits {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: center;
	gap: clamp(0.75rem, 2vw, 1.5rem);
	margin-top: clamp(2.5rem, 6vh, 4rem);
}

.wm-portraits figure { margin: 0; overflow: hidden; }

.wm-portraits img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: 4 / 5;
	transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.wm-portraits__center img { aspect-ratio: 4 / 5.6; }

@media (hover: hover) and (pointer: fine) {
	.wm-portraits figure:hover img { transform: scale(1.035); }
}

.wm-headshots__support {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(1.25rem, 2.2vw, 1.75rem);
	font-weight: 300;
	line-height: 1.4;
	max-width: 34ch;
	margin: 1.5rem 0 0;
}

/* About ------------------------------------------------------------------ */

.wm-about {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}

.wm-about__media { margin: 0; overflow: hidden; }

.wm-about__media img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.wm-about__body p {
	font-size: 1.0625rem;
	line-height: 1.75;
	max-width: 46ch;
	opacity: 0.88;
}

/* Contact ---------------------------------------------------------------- */

.wm-contact__invitation {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(2.75rem, 8vw, 6.5rem);
	font-weight: 300;
	line-height: 0.98;
	letter-spacing: -0.015em;
	margin: 0;
}

.wm-contact__support {
	font-size: 1.0625rem;
	line-height: 1.75;
	max-width: 44ch;
	margin: clamp(1.5rem, 4vh, 2.5rem) 0 0;
	opacity: 0.88;
}

/* Footer ----------------------------------------------------------------- */

.wm-footer {
	background: var(--wm-ink);
	color: rgba(241, 237, 228, 0.78);
	padding: clamp(2.5rem, 6vh, 4rem) var(--wm-gutter);
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
}

.wm-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	padding-top: 1.75rem;
	border-top: 1px solid rgba(241, 237, 228, 0.18);
}

.wm-footer a { color: inherit; text-decoration: none; }
.wm-footer a:hover { color: var(--wm-white); }

.wm-footer__nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
}

.wm-footer__nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	text-transform: uppercase;
	letter-spacing: var(--wm-tracking);
	font-size: 0.75rem;
}

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1024px) {
	.wm-hero__inner  { grid-template-columns: minmax(0, 1fr); }
	.wm-events__head { grid-template-columns: minmax(0, 1fr); align-items: start; }
	.wm-hero__support { max-width: 40ch; }
}

/* ==========================================================================
   Mobile — §6 and §11
   ========================================================================== */

@media (max-width: 780px) {

	/* Masthead left, Menu/Close right. Hero nav does not come along. */
	.wm-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
	.wm-hero__nav   { display: none; }

	.wm-hero {
		justify-content: flex-end;
		padding-bottom: clamp(1.5rem, 4vh, 2.5rem);
	}

	.wm-hero::after {
		background:
			linear-gradient(to top, rgba(10, 10, 9, 0.82) 0%, rgba(10, 10, 9, 0.45) 42%, rgba(10, 10, 9, 0.05) 72%),
			linear-gradient(to bottom, rgba(10, 10, 9, 0.5) 0%, rgba(10, 10, 9, 0) 22%);
	}

	/* Keep the tower and skyline in frame on a portrait screen. */
	.wm-hero__media img { object-position: 62% 50%; }

	.wm-hero__inner { padding-bottom: 1.5rem; gap: 1.25rem; }

	/* Supporting statement stacks beneath the headline (§11). */
	.wm-hero__support {
		padding-top: 1rem;
		font-size: 1.0625rem;
		max-width: 32ch;
	}

	.wm-hero__foot { justify-content: flex-start; }

	/* Grids collapse. */
	.wm-grid {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
	}

	.wm-grid__item--dominant { grid-row: auto; aspect-ratio: 4 / 3; }

	.wm-portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wm-portraits__third { display: none; }
	.wm-portraits__center img { aspect-ratio: 4 / 5; }

	.wm-about { grid-template-columns: minmax(0, 1fr); }

	.wm-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
	.wm-portraits { grid-template-columns: minmax(0, 1fr); }
	.wm-portraits__third { display: block; }
}

/* ==========================================================================
   Mobile navigation panel
   ========================================================================== */

@media (max-width: 780px) {
	.wm-mobile-nav {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 90;
		background: var(--wm-ink);
		color: var(--wm-cream);
		padding: 6rem var(--wm-gutter) 3rem;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-1rem);
		transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
	}

	.wm-mobile-nav[data-open="true"] {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.wm-mobile-nav ul { list-style: none; margin: 0; padding: 0; }

	.wm-mobile-nav li { border-bottom: 1px solid rgba(241, 237, 228, 0.16); }

	.wm-mobile-nav a {
		display: flex;
		align-items: center;
		min-height: 60px;
		font-family: "Cormorant Garamond", Georgia, serif;
		font-size: 2rem;
		font-weight: 300;
		color: inherit;
		text-decoration: none;
	}

	body[data-nav-open="true"] { overflow: hidden; }

	/* Toggle sits above the open panel. */
	.wm-header { z-index: 100; }
	body[data-nav-open="true"] .wm-header { color: var(--wm-cream); }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.wm-hero__media img { animation: none; transform: none; }
}

/* ==========================================================================
   Zoom safety — content must survive 200% text zoom
   ========================================================================== */

@media (max-width: 780px) {
	.wm-hero { min-height: 100svh; height: auto; }
	.wm-hero__inner { min-height: 0; }
}

/* ==========================================================================
   Core block overrides
   The patterns use native Gutenberg blocks so everything stays editable.
   These rules reconcile core's markup with the layout above.
   ========================================================================== */

/* Core wraps images in <figure>. Strip its spacing and let it fill. */
.wm-hero__media,
.wm-hero__media figure,
.wm-grid__item,
.wm-portraits figure,
.wm-about__media {
	margin: 0;
}

.wm-hero__media { position: absolute; inset: 0; z-index: 0; }
.wm-hero__media figure { width: 100%; height: 100%; }

.wm-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
	animation: wm-settle 2.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Core group wrappers inside the hero must not create their own stacking. */
.wm-hero__inner,
.wm-hero__foot { position: relative; z-index: 2; }

.wm-hero__lede { margin: 0; }

/* Core adds default block margins; the hero controls its own rhythm. */
.wm-hero :where(p, h1) { margin-block: 0; }
.wm-hero__region { margin-bottom: clamp(1rem, 2vh, 1.75rem) !important; }

/* Site title as masthead ------------------------------------------------- */

.wm-masthead,
.wm-masthead a {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(0.9375rem, 1.5vw, 1.25rem);
	font-weight: 400;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: inherit;
	text-decoration: none;
	line-height: 1.2;
	margin: 0;
}

/* Navigation blocks ------------------------------------------------------ */

.wm-hero__nav.wp-block-navigation {
	--navigation-layout-justification-setting: flex-start;
	gap: clamp(1.25rem, 3vw, 2.75rem);
}

.wm-hero__nav .wp-block-navigation__container { gap: clamp(1.25rem, 3vw, 2.75rem); }

.wm-hero__nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--wm-white);
	text-decoration: none;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: var(--wm-tracking);
	text-transform: uppercase;
	position: relative;
}

.wm-hero__nav .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0.6rem;
	width: 0; height: 1px;
	background: currentColor;
	transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.wm-hero__nav .wp-block-navigation-item__content:hover::after,
.wm-hero__nav .wp-block-navigation-item__content:focus-visible::after { width: 100%; }

/* Header nav is the mobile overlay only — hidden on desktop (§6). */
.wm-header__nav { display: none; }

.wm-header__nav .wp-block-navigation__responsive-container-open,
.wm-header__nav .wp-block-navigation__responsive-container-close {
	font-family: var(--wp--preset--font-family--utility, inherit);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: var(--wm-tracking);
	text-transform: uppercase;
	color: inherit;
	min-width: 44px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wm-header__nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 6rem var(--wm-gutter) 3rem;
}

.wm-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 2rem;
	font-weight: 300;
	min-height: 60px;
	display: flex;
	align-items: center;
	width: 100%;
	border-bottom: 1px solid rgba(241, 237, 228, 0.16);
}

/* Grid items are core images ---------------------------------------------- */

.wm-grid__item,
.wm-portraits figure,
.wm-about__media { overflow: hidden; }

.wm-grid__item img,
.wm-portraits img,
.wm-about__media img { width: 100%; height: 100%; object-fit: cover; }

.wm-portraits__side img,
.wm-portraits__third img { aspect-ratio: 4 / 5; }

.wm-about__media figcaption {
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.5;
	padding-top: 0.75rem;
	text-align: left;
}

/* Events head is a two-column grid of core blocks. */
.wm-events__head > .wm-heading { margin: 0; }
.wm-events__head > .wm-cats    { margin: 0; }

/* Footer blocks ----------------------------------------------------------- */

.wm-footer__title,
.wm-footer__title a {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.0625rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: inherit;
	text-decoration: none;
	margin: 0 0 0.4rem;
}

.wm-footer__region,
.wm-footer__copyright { margin: 0; opacity: 0.7; }

.wm-footer__nav .wp-block-navigation__container { gap: 1.5rem; }

.wm-footer__nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	text-transform: uppercase;
	letter-spacing: var(--wm-tracking);
	font-size: 0.75rem;
	color: inherit;
	text-decoration: none;
}

/* Mobile: hero nav out, header overlay in (§6) ---------------------------- */

@media (max-width: 780px) {
	.wm-hero__nav   { display: none; }
	.wm-header__nav { display: block; }
	.wm-hero__media img { object-position: 62% 50%; }
}

/* ==========================================================================
   Brief §5 — square edges, and §12 — smooth scrolling
   ========================================================================== */

/* Square edges rather than rounded cards. Core blocks default to a radius
   in some contexts; the brief rules that out site-wide. */
.wp-block-image img,
.wp-block-image figure,
.wm-grid__item,
.wm-portraits figure,
.wm-about__media,
.wp-block-button__link,
.wp-block-group { border-radius: 0; }

/* Smooth scrolling for the hero cue and any in-page anchor.
   The reduced-motion block above already resets this to auto. */
html { scroll-behavior: smooth; }

/* ==========================================================================
   Core specificity overrides
   Core block styles print inline in <head> and can load after this file, so
   these rules use compound selectors to win on specificity rather than order.
   ========================================================================== */

/* --- Images must fill their containers ---------------------------------
   Core sets .wp-block-image img { height: auto }, which stops every
   full-bleed and grid image from filling its box. */

.wm-hero .wm-hero__media figure.wp-block-image,
.wm-grid figure.wp-block-image,
.wm-portraits figure.wp-block-image,
.wm-about figure.wp-block-image {
	margin: 0;
	display: block;
	overflow: hidden;
}

.wm-hero .wm-hero__media figure.wp-block-image { width: 100%; height: 100%; }

.wm-hero .wm-hero__media figure.wp-block-image img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 50%;
}

.wm-grid figure.wp-block-image img,
.wm-portraits figure.wp-block-image img,
.wm-about figure.wp-block-image img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	display: block;
}

/* --- Hero height must account for the admin bar ------------------------ */

.wm-hero.wp-block-group {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	position: relative;
	min-height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
	overflow: hidden;
}

.wm-hero .wm-hero__media.wp-block-group {
	position: absolute;
	inset: 0;
	z-index: 0;
	margin: 0;
	padding: 0;
}

/* Core group layout adds flow spacing the hero doesn't want. */
.wm-hero .wm-hero__inner.wp-block-group,
.wm-hero .wm-hero__foot.wp-block-group { margin-block: 0; }

.wm-hero .wm-hero__inner.wp-block-group {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
	align-items: end;
	gap: clamp(1.5rem, 4vw, 4rem);
	padding-bottom: clamp(1.5rem, 4vh, 3rem);
}

@media (max-width: 1024px) {
	.wm-hero .wm-hero__inner.wp-block-group { grid-template-columns: minmax(0, 1fr); }
}

/* --- Header overlay nav: mobile only ----------------------------------
   Core's overlayMenu "always" adds .always-shown, which forces the open
   button visible at every width. The header nav is the mobile control
   only; the hero carries desktop navigation (brief §6). */

.wm-header .wm-header__nav { display: none; }

@media (max-width: 780px) {
	.wm-header .wm-header__nav { display: block; }
	.wm-hero .wm-hero__nav { display: none; }
}

/* --- Header must clear the admin bar ---------------------------------- */

.wm-header.wp-block-group {
	position: absolute;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 50;
	margin: 0;
}

/* --- Events grid: tight, deliberate composition ------------------------ */

.wm-grid.wp-block-group {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, 1fr);
	gap: 4px;
	margin-block: 0;
}

.wm-grid figure.wm-grid__item--dominant {
	grid-row: 1 / span 2;
	grid-column: 1;
	aspect-ratio: auto;
	height: 100%;
}

.wm-grid figure.wm-grid__item--support {
	grid-column: 2;
	aspect-ratio: auto;
	height: 100%;
}

/* Give the grid a definite height so the row track resolves cleanly. */
.wm-grid.wp-block-group { height: clamp(30rem, 62vh, 46rem); }

@media (max-width: 780px) {
	.wm-grid.wp-block-group {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		height: auto;
	}

	.wm-grid figure.wm-grid__item--dominant,
	.wm-grid figure.wm-grid__item--support {
		grid-row: auto;
		grid-column: 1;
		aspect-ratio: 4 / 3;
		height: auto;
	}
}

/* --- Headshots: equal columns, centre slightly taller ------------------ */

.wm-portraits.wp-block-group {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: center;
	gap: clamp(0.75rem, 2vw, 1.5rem);
	margin-block: clamp(2.5rem, 6vh, 4rem) 0;
}

.wm-portraits figure.wm-portraits__side,
.wm-portraits figure.wm-portraits__third { aspect-ratio: 4 / 5; }
.wm-portraits figure.wm-portraits__center { aspect-ratio: 4 / 5.6; }

@media (max-width: 780px) {
	.wm-portraits.wp-block-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wm-portraits figure.wm-portraits__third { display: none; }
	.wm-portraits figure.wm-portraits__center { aspect-ratio: 4 / 5; }
}

@media (max-width: 480px) {
	.wm-portraits.wp-block-group { grid-template-columns: minmax(0, 1fr); }
	.wm-portraits figure.wm-portraits__third { display: block; }
}

/* --- About split ------------------------------------------------------- */

.wm-about.wp-block-group {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
	margin-block: 0;
}

.wm-about figure.wm-about__media { aspect-ratio: 4 / 5; }

@media (max-width: 780px) {
	.wm-about.wp-block-group { grid-template-columns: minmax(0, 1fr); }
}

/* --- Events head ------------------------------------------------------- */

.wm-events__head.wp-block-group {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
	align-items: end;
	gap: clamp(1.5rem, 4vw, 4rem);
	margin-block: 0 clamp(2.5rem, 6vh, 4.5rem);
}

@media (max-width: 1024px) {
	.wm-events__head.wp-block-group {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
	}
}

/* ==========================================================================
   Events grid — force row-driven sizing
   The earlier aspect-ratio rules were still winning on the support items,
   so the right column came up short of the dominant image's bottom edge.
   ========================================================================== */

.wm-section .wm-grid.wp-block-group {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: 1fr 1fr;
	gap: 4px;
	height: clamp(30rem, 62vh, 46rem);
	align-items: stretch;
	justify-items: stretch;
}

.wm-section .wm-grid figure.wp-block-image {
	aspect-ratio: auto !important;
	height: 100%;
	min-height: 0;
	width: 100%;
	margin: 0;
	align-self: stretch;
	overflow: hidden;
	position: relative;
}

.wm-section .wm-grid figure.wp-block-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	display: block;
}

.wm-section .wm-grid figure.wm-grid__item--dominant { grid-area: 1 / 1 / 3 / 2; }
.wm-section .wm-grid figure.wm-grid__item--support:nth-of-type(2) { grid-area: 1 / 2 / 2 / 3; }
.wm-section .wm-grid figure.wm-grid__item--support:nth-of-type(3) { grid-area: 2 / 2 / 3 / 3; }

/* Focal points: keep faces in frame at this crop. */
.wm-section .wm-grid figure.wm-grid__item--dominant img { object-position: 50% 38%; }
.wm-section .wm-grid figure.wm-grid__item--support:nth-of-type(3) img { object-position: 50% 42%; }

@media (max-width: 780px) {
	.wm-section .wm-grid.wp-block-group {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		height: auto;
	}

	.wm-section .wm-grid figure.wp-block-image {
		aspect-ratio: 4 / 3 !important;
		height: auto;
		grid-area: auto !important;
	}
}
