/**
 * Mindset with Matt: global layout glue.
 *
 * Colours, type and spacing live in theme.json. This file only covers what
 * theme.json cannot express: the sticky header, section rhythm, the
 * block-style variations registered in inc/block-styles.php, and the single
 * page-load moment in the hero.
 */

/* ---------------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------------ */

:root {
	--mwm-header-offset: calc(var(--wp-admin--admin-bar--height, 0px) + 0px);
}

html {
	scroll-padding-top: calc(var(--wp--custom--header-height, 5.25rem) + 1rem);
}

body {
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	font-feature-settings: "cv11", "ss01";
}

::selection {
	background: color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent);
	color: var(--wp--preset--color--contrast);
}

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

/* The header, main and footer sit flush: sections own their own spacing. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Full-width page sections stack without gaps. */
.site-content > .alignfull,
.site-content > .alignfull + * {
	margin-block-start: 0;
}

.site-content > .alignfull:last-child {
	margin-block-end: 0;
}

/* ---------------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------------ */

.site-header-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--custom--color--line) 70%, transparent);
}

/* The frosted ground sits on a layer of its own. A backdrop-filter on the
   header itself would make it the containing block for anything fixed
   inside it, which trapped the phone menu's full-screen overlay inside the
   header's own 140px. */
.site-header-part::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--wp--preset--color--base) 90%, transparent);
	-webkit-backdrop-filter: saturate(140%) blur(14px);
	backdrop-filter: saturate(140%) blur(14px);
}

@media (max-width: 600px) {
	.site-header-part {
		top: 0;
	}
}

.site-header__inner {
	min-height: calc(var(--wp--custom--header-height, 5.25rem) - 2 * var(--wp--preset--spacing--40));
}

/* The uploaded logo takes the wordmark's place; until there is one, the
   wordmark carries the header exactly as before. */
.site-header__brand .wp-block-site-logo img {
	height: clamp(2rem, 1.6rem + 1vw, 2.75rem);
	width: auto;
}

.site-header__brand:has(.wp-block-site-logo img) .wp-block-site-title {
	display: none;
}

.wp-block-site-title.site-brand {
	font-size: clamp(1.5rem, 1.25rem + 0.7vw, 1.875rem);
}

.wp-block-site-title.site-brand a {
	color: var(--wp--preset--color--contrast);
}

.wp-block-button.is-size-small .wp-block-button__link {
	padding: 0.7rem 1.25rem;
	font-size: 0.875rem;
}

/* Navigation */
.site-nav .wp-block-navigation-item__content {
	padding-block: 0.35rem;
	color: var(--wp--preset--color--contrast);
}


.site-nav .wp-block-navigation__submenu-container {
	min-width: 17rem !important;
	padding: 0.5rem !important;
	background: var(--wp--preset--color--white) !important;
	border: 1px solid var(--wp--custom--color--line) !important;
	border-radius: var(--wp--custom--radius--medium);
	box-shadow: var(--wp--preset--shadow--lifted);
}

.site-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.65rem 0.85rem !important;
	border-radius: var(--wp--custom--radius--small);
}


/* Mobile overlay menu: big, calm serif links. */
.site-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: calc(var(--wp--custom--header-height, 5.25rem) + 1rem) var(--wp--preset--spacing--50) var(--wp--preset--spacing--70);
}

.site-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start;
	gap: 1.25rem;
}

.site-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 2rem;
	line-height: 1.1;
	padding: 0;
}

.site-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	padding: 0.75rem 0 0 1rem !important;
	gap: 0.75rem;
	border: 0 !important;
	box-shadow: none;
	background: transparent !important;
}

.site-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1.0625rem;
	padding: 0 !important;
}

.site-nav .wp-block-navigation__responsive-container-open,
.site-nav .wp-block-navigation__responsive-container-close {
	padding: 0.5rem;
	margin: -0.5rem;
}

.site-nav .wp-block-navigation__responsive-container-open svg,
.site-nav .wp-block-navigation__responsive-container-close svg {
	width: 28px;
	height: 28px;
}

@media (max-width: 781px) {
	/* The persistent WhatsApp | Call bar takes over the CTA on phones. */
	.site-header .site-header__cta.wp-block-buttons {
		display: none;
	}
}

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

.site-footer .wp-block-site-title.site-footer__wordmark {
	margin: 0;
	font-size: clamp(3rem, 1rem + 7vw, 8rem);
	font-weight: 300;
	line-height: 0.95;
	letter-spacing: -0.025em;
}

.site-footer .wp-block-site-title.site-footer__wordmark a {
	color: var(--wp--preset--color--base);
}

.site-footer__heading {
	margin-bottom: 1rem;
	font-family: var(--wp--preset--font-family--sans) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em !important;
	color: color-mix(in srgb, var(--wp--preset--color--base) 60%, transparent) !important;
}

.site-footer__top {
	gap: var(--wp--preset--spacing--60) !important;
}

.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 2rem;
	max-width: 44rem;
	margin: 0;
}

.site-footer__links li {
	margin: 0;
}

.site-footer__practice {
	color: var(--wp--preset--color--base);
	line-height: 1.6;
}

.site-footer__disclaimer {
	max-width: 46rem;
	margin-inline-start: 0 !important;
}

.site-footer__disclaimer {
	color: color-mix(in srgb, var(--wp--preset--color--base) 62%, transparent);
}

/* ---------------------------------------------------------------------------
 * Block style variations (inc/block-styles.php)
 * ------------------------------------------------------------------------ */

/* Group › Voice lines: serif lines with air. No rules, no indents. */
.is-style-cascade > * {
	margin: 0 !important;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.6rem);
	font-weight: 400;
	line-height: 1.32;
	letter-spacing: -0.005em;
	color: inherit;
}

.is-style-cascade > * + * {
	margin-top: 1.05em !important;
}

/* Tone-on-tone decal colour for each surface, mixed only from the brief's
   palette: a whisper darker on light grounds, lighter on dark ones. */
:root {
	--mwm-tonal: color-mix(in srgb, var(--wp--preset--color--base) 55%, var(--wp--preset--color--sand));
}

[class*="is-style-section-sand"] {
	--mwm-tonal: color-mix(in srgb, var(--wp--preset--color--sand) 95%, var(--wp--preset--color--contrast));
}

[class*="is-style-section-feature"] {
	--mwm-tonal: color-mix(in srgb, var(--wp--preset--color--contrast) 95%, var(--wp--preset--color--base));
}

[class*="is-style-section-charcoal"] {
	--mwm-tonal: color-mix(in srgb, var(--wp--preset--color--contrast) 95%, var(--wp--preset--color--base));
}

[class*="is-style-section-accent"] {
	--mwm-tonal: color-mix(in srgb, var(--wp--preset--color--accent) 90%, var(--wp--preset--color--base));
}

/* Colour sections that don't run edge to edge become rounded panels. */
.wp-block-group.alignwide[class*="is-style-section-"] {
	border-radius: var(--wp--custom--radius--large);
}

/* Image › Editorial frame. */
.wp-block-image.is-style-editorial img {
	width: 100%;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--small);
}

/* Button › Text with arrow. */
.wp-block-button.is-style-text-arrow .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.35rem 0;
	background: transparent !important;
	color: inherit !important;
	border-radius: 0;
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
	text-underline-offset: 0.35em;
}

.wp-block-button.is-style-text-arrow .wp-block-button__link::after {
	content: "";
	width: 1.1em;
	height: 1.1em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15.5M13.5 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15.5M13.5 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.3s var(--wp--custom--ease);
}


/* Outline buttons: quiet, inherit the section's text colour. */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: currentColor;
	border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
	padding: calc(0.95rem - 1px) calc(1.75rem - 1px);
}


/* List › Plain. */
.wp-block-list.is-style-plain {
	list-style: none;
	padding-left: 0;
}

/* Separator › Short accent. */
.wp-block-separator.is-style-short {
	width: 3rem;
	max-width: 3rem;
	margin-inline: 0 !important;
	border: 0;
	border-top: 2px solid var(--wp--preset--color--accent) !important;
	opacity: 1;
}

/* ---------------------------------------------------------------------------
 * Section helpers (class names added in patterns)
 * ------------------------------------------------------------------------ */

/* Sticky column: the heading stays put while its content scrolls past. */
@media (min-width: 782px) {
	.is-sticky {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--header-height, 5.25rem) + 2.5rem);
		align-self: flex-start !important;
	}
}

.mwm-measure {
	max-width: var(--wp--custom--measure, 38rem);
}

/* Breadcrumb-style wayfinding above page titles. */
.mwm-trail {
	font-size: var(--wp--preset--font-size--small);
	color: color-mix(in srgb, var(--wp--preset--color--body) 85%, transparent);
}

.mwm-trail a {
	color: inherit;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

/* Topic grids: a lone last item sits in the middle column, not stranded left. */
@media (min-width: 1000px) {
	.mwm-topics > :last-child:nth-child(3n + 1) {
		grid-column: 2;
	}
}

/* The pull quote on the Addiction page. */
.mwm-pull {
	margin-block: var(--wp--preset--spacing--50) !important;
	font-size: var(--wp--preset--font-size--xx-large) !important;
	line-height: 1.15 !important;
	color: var(--wp--preset--color--contrast);
}

/* Light text on the dark sections reads heavier; ease the weight a touch. */
[class*="is-style-section-feature"],
[class*="is-style-section-charcoal"] {
	font-weight: 370;
}

/* Small print at the foot of a page. */
.mwm-small-print {
	max-width: 46rem;
	color: color-mix(in srgb, var(--wp--preset--color--body) 85%, transparent);
}

/* Contact methods on the contact page. */
.mwm-contact-method {
	padding-block: var(--wp--preset--spacing--50);
	border-top: 1px solid var(--wp--custom--color--line);
}

.mwm-contact-method:last-child {
	border-bottom: 1px solid var(--wp--custom--color--line);
}

.mwm-contact-method h3 {
	margin: 0;
}

.mwm-contact-method p {
	margin-block: 0.35rem 0;
}

/* ---------------------------------------------------------------------------
 * Hero: the one orchestrated page-load moment.
 * ------------------------------------------------------------------------ */

/* Hero: the practice name sits small above the statement (doc: hero left). */
.mwm-hero__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 500 !important;
	line-height: 1.5 !important;
	letter-spacing: 0.015em !important;
	color: var(--wp--preset--color--body) !important;
}

/* Phones: the tagline takes its own line instead of wrapping mid-phrase. */
@media (max-width: 600px) {
	.mwm-hero__sep {
		display: none;
	}

	.mwm-hero__tagline {
		display: block;
	}
}

.mwm-hero__title + .mwm-display {
	margin-top: var(--wp--preset--spacing--50) !important;
}

.mwm-display {
	margin-top: var(--wp--preset--spacing--40) !important;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(2.25rem, 1.35rem + 2.4vw, 3.5rem);
	font-weight: 300;
	line-height: 1.04;
	letter-spacing: -0.015em;
	color: var(--wp--preset--color--contrast);
	text-wrap: pretty;
}

.mwm-hero__image img {
	aspect-ratio: 4 / 5;
	width: 100%;
	height: auto;
	object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
	.mwm-hero .mwm-hero__copy > * {
		animation: mwm-rise 0.9s var(--wp--custom--ease) both;
	}

	.mwm-hero .mwm-hero__copy > *:nth-child(2) { animation-delay: 0.08s; }
	.mwm-hero .mwm-hero__copy > *:nth-child(3) { animation-delay: 0.16s; }
	.mwm-hero .mwm-hero__copy > *:nth-child(4) { animation-delay: 0.24s; }
	.mwm-hero .mwm-hero__copy > *:nth-child(5) { animation-delay: 0.32s; }

	.mwm-hero /* Hero: the practice name sits small above the statement (doc: hero left). */
.mwm-hero__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 500 !important;
	line-height: 1.5 !important;
	letter-spacing: 0.015em !important;
	color: var(--wp--preset--color--body) !important;
}

/* Phones: the tagline takes its own line instead of wrapping mid-phrase. */
@media (max-width: 600px) {
	.mwm-hero__sep {
		display: none;
	}

	.mwm-hero__tagline {
		display: block;
	}
}

.mwm-hero__title + .mwm-display {
	margin-top: var(--wp--preset--spacing--50) !important;
}

.mwm-display {
	margin-top: var(--wp--preset--spacing--40) !important;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(2.25rem, 1.35rem + 2.4vw, 3.5rem);
	font-weight: 300;
	line-height: 1.04;
	letter-spacing: -0.015em;
	color: var(--wp--preset--color--contrast);
	text-wrap: pretty;
}

.mwm-hero__image img {
		animation: mwm-reveal 1.4s var(--wp--custom--ease) 0.1s both;
	}
}

@keyframes mwm-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
}

@keyframes mwm-reveal {
	from {
		clip-path: inset(8% 0 0 0);
		opacity: 0;
	}
}

/* ---------------------------------------------------------------------------
 * Compositions (art direction)
 * ------------------------------------------------------------------------ */

/* Display headline: Cormorant at full size, the one big moment of a page. */
.wp-block-heading.mwm-display-heading {
	max-width: 15em;
	font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.9rem) !important;
	font-weight: 300 !important;
	line-height: 1.06 !important;
	letter-spacing: -0.015em !important;
	text-wrap: balance;
}

/* Recognition: one centred axis. The title, then "Maybe you're" once with
   every ending reading on from it, so the line that is someone's own is on
   the page rather than behind a timer. */
.mwm-recognition__inner > * {
	margin-block: 0 !important;
}

.wp-block-heading.mwm-recognition__title {
	text-align: center;
	font-size: clamp(2.1rem, 1.3rem + 2.4vw, 3.6rem) !important;
	font-weight: 300 !important;
	line-height: 1.08 !important;
	letter-spacing: -0.012em !important;
	text-wrap: balance;
}

.mwm-recognition__cols {
	--mwm-rec-text: clamp(1.2rem, 1.02rem + 0.5vw, 1.5rem);
	--mwm-rec-lead: clamp(1.75rem, 1.3rem + 1.4vw, 2.6rem);

	max-width: 58rem;
	margin: var(--wp--preset--spacing--60) auto 0 !important;
}

/* The opening sits on the first ending's line, so the two read as one
   sentence rather than as a label above a list. */
.mwm-recognition__lead {
	/* Sit the opening on the first ending's baseline, not its cap line, so
	   the two read as one sentence: half-leading plus ascender, one size
	   against the other. */
	margin: calc(1.13 * var(--mwm-rec-text) - 0.925 * var(--mwm-rec-lead)) 0 0 !important;
	text-align: right;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--mwm-rec-lead) !important;
	font-style: italic;
	font-weight: 400;
	line-height: 1.1;
	color: var(--wp--preset--color--contrast);
}

.mwm-recognition__list {
	margin: 0 !important;
	padding: 0;
	list-style: none;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--mwm-rec-text);
	line-height: 1.5;
	color: var(--wp--preset--color--contrast);
}

.mwm-recognition__list li {
	position: relative;
	padding-inline-start: 1.15em;
}

.mwm-recognition__list li + li {
	margin-top: 1.05em;
}

/* A small accent dot, set on the first line's midline. */
.mwm-recognition__list li::before {
	content: "";
	position: absolute;
	left: 0.1em;
	top: 0.72em;
	width: 0.3em;
	height: 0.3em;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
}

@media (max-width: 781px) {
	.mwm-recognition__cols {
		max-width: none;
	}

	/* Stacked: the opening sits above the list, so the baseline nudge goes. */
	.mwm-recognition__lead {
		margin: 0 0 0.25em !important;
		text-align: left;
	}
}

/* The lede under a page's italic subtitle. */
.mwm-subtitle-lede {
	margin-top: var(--wp--preset--spacing--50) !important;
	max-width: 26rem;
}

/* A narrow reading column pushed to the right of a wide section. */
.mwm-offset > * {
	max-width: 34rem;
	margin-inline-start: auto !important;
	margin-inline-end: 0 !important;
}

.mwm-closing-line {
	margin-top: 2.2em !important;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.75rem);
	font-style: italic;
	font-weight: 400;
	line-height: 1.28;
	color: var(--wp--preset--color--contrast);
	text-wrap: balance;
}

/* Statement sections: centred heading over a narrow column. */
.wp-block-heading.mwm-statement__title {
	max-width: 15em !important;
	margin-inline: auto !important;
	font-size: clamp(2.25rem, 1.5rem + 2.2vw, 3.6rem) !important;
	font-weight: 300 !important;
	line-height: 1.06 !important;
	letter-spacing: -0.015em !important;
	text-wrap: balance;
}

.mwm-statement__body > .is-style-cascade {
	margin-block: 2.2rem !important;
}

/* The hero photograph runs off the right edge of the screen and fills the
   column's height, so it reads as the editorial photograph the brief asks
   for rather than a small framed box. */
@media (min-width: 782px) {
	.mwm-hero {
		overflow-x: clip;
	}

	/* Narrower than the wide layout there is no gutter to bleed into, so the
	   photograph simply fills its column. */
	.mwm-hero__image {
		margin: 0 !important;
		margin-right: min(0px, calc(var(--wp--style--global--wide-size, 76rem) / 2 - 50vw)) !important;
	}

	/* Height tracks the copy beside it rather than the crop's own ratio. */
	.mwm-hero__image img {
		height: clamp(20rem, 38vw, 36rem);
		aspect-ratio: auto !important;
		border-radius: var(--wp--custom--radius--small) 0 0 var(--wp--custom--radius--small);
	}
}

/* Layering 1: Matt's photo rises above the dark section's top edge. */
@media (min-width: 782px) {
	.mwm-meet .wp-block-columns {
		align-items: flex-start !important;
	}

	/* A taller portrait frame so photo + quote match the story's length. */
	.mwm-meet .mwm-rise-above img {
		aspect-ratio: 2 / 3 !important;
	}

	.mwm-meet .mwm-rise-above {
		position: relative;
		z-index: 2;
		margin-top: calc(-1 * (var(--wp--preset--spacing--90) + 5rem)) !important;
	}

	.mwm-meet .mwm-rise-above img {
		box-shadow: 0 40px 70px -40px rgba(30, 24, 20, 0.55);
	}

	/* The photo starts high, so the quote drops to the foot of the column and
	   closes the band level with the end of the story. */
	.mwm-meet .mwm-meet__media {
		align-self: stretch !important;
		display: flex;
		flex-direction: column;
	}

	.mwm-meet .mwm-pullquote {
		margin-top: auto !important;
		margin-bottom: 0 !important;
	}
}

/* Layering 2: the closing accent panel overlaps the footer when it ends a page. */
@media (min-width: 782px) {
	.site-content > .mwm-cta-section:last-child {
		position: relative;
		z-index: 2;
		margin-bottom: -7rem !important;
		padding-bottom: 0 !important;
	}

	.wp-site-blocks:has(.site-content > .mwm-cta-section:last-child) .site-footer {
		padding-top: calc(var(--wp--preset--spacing--80) + 7rem) !important;
	}

	.site-content > .mwm-cta-section:last-child .mwm-cta {
		box-shadow: 0 50px 80px -50px rgba(30, 24, 20, 0.5);
	}
}

/* The closing panel's heading holds three lines beside the copy. */
.mwm-cta .wp-block-heading {
	font-size: clamp(2.1rem, 1.4rem + 2vw, 3.25rem) !important;
	line-height: 1.06 !important;
}

/* Micro-typography. */
.wp-block-heading,
.wp-block-site-title,
.mwm-display,
.is-style-cascade,
.mwm-closing-line,
.is-style-text-statement {
	font-kerning: normal;
	font-feature-settings: "kern", "liga";
	font-variant-numeric: oldstyle-nums proportional-nums;
}

.mwm-pull {
	text-indent: -0.42em;
	hanging-punctuation: first;
}

/* ---------------------------------------------------------------------------
 * Interaction: hover, focus and press states
 * ------------------------------------------------------------------------ */

a {
	transition:
		color 0.25s var(--wp--custom--ease),
		text-decoration-color 0.25s var(--wp--custom--ease);
}

/* Buttons: colour eases over, the button lifts a touch, the press settles it. */
.wp-element-button,
.wp-block-button__link {
	transition:
		background-color 0.35s var(--wp--custom--ease),
		color 0.35s var(--wp--custom--ease),
		border-color 0.35s var(--wp--custom--ease),
		box-shadow 0.35s var(--wp--custom--ease),
		transform 0.35s var(--wp--custom--ease);
}

.wp-block-button:not(.is-style-text-arrow) > .wp-block-button__link:hover,
button.wp-element-button:not(:disabled):hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 26px -16px rgba(37, 37, 37, 0.6);
}

.wp-block-button:not(.is-style-text-arrow) > .wp-block-button__link:active,
button.wp-element-button:not(:disabled):active {
	transform: translateY(0);
	box-shadow: 0 4px 10px -6px rgba(37, 37, 37, 0.45);
	transition-duration: 0.08s;
}

/* Outline buttons fill solid on hover: dark on light sections… */
.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* On the accent panel the primary button is the off-white pill, so the
   secondary ones step back to an outline and fill in on hover. */
[class*="is-style-section-accent"] .wp-block-buttons {
	gap: 0.625rem;
}

[class*="is-style-section-accent"] .wp-block-button.is-style-outline > .wp-block-button__link {
	padding-inline: 1.3rem;
	background-color: transparent;
	border-color: color-mix(in srgb, var(--wp--preset--color--base) 60%, transparent);
	color: var(--wp--preset--color--base);
}

[class*="is-style-section-accent"] .wp-block-button.is-style-outline > .wp-block-button__link:hover,
[class*="is-style-section-accent"] .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* Phones: the closing panel's buttons stack full width. */
@media (max-width: 600px) {
	.mwm-cta .wp-block-buttons > .wp-block-button {
		flex: 1 1 100%;
	}

	.mwm-cta .wp-block-buttons > .wp-block-button > .wp-block-button__link {
		width: 100%;
		box-sizing: border-box;
	}
}

/* …and light on the dark feature and charcoal sections. */
[class*="is-style-section-feature"] .wp-block-button.is-style-outline > .wp-block-button__link:hover,
[class*="is-style-section-charcoal"] .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* Text-with-arrow links: underline firms up, arrow steps forward. */
.wp-block-button.is-style-text-arrow .wp-block-button__link:hover,
.wp-block-button.is-style-text-arrow .wp-block-button__link:focus-visible {
	text-decoration-color: currentColor;
}

.wp-block-button.is-style-text-arrow .wp-block-button__link:hover::after,
.wp-block-button.is-style-text-arrow .wp-block-button__link:focus-visible::after {
	transform: translateX(5px);
}

/* Site title. */
.wp-block-site-title a:hover {
	color: var(--wp--preset--color--body);
}

.site-footer .wp-block-site-title a:hover {
	color: var(--wp--preset--color--sand);
}

/* Navigation: links shift colour on hover; the current page keeps a quiet,
   static underline. */
.site-nav .wp-block-navigation-item__content {
	transition: color 0.25s var(--wp--custom--ease);
}

.site-nav .wp-block-navigation-item__content:hover,
.site-nav .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--body);
}

.site-nav .current-menu-item > .wp-block-navigation-item__content .wp-block-navigation-item__label,
.site-nav .current-menu-ancestor > .wp-block-navigation-item__content .wp-block-navigation-item__label {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.5em;
}

/* Dropdown: fades and settles into place; chevron flips. */
@media (min-width: 600px) {
	.site-nav .has-child > .wp-block-navigation__submenu-container {
		transform: translateY(8px);
		transition:
			opacity 0.3s var(--wp--custom--ease),
			transform 0.3s var(--wp--custom--ease);
	}

	.site-nav .has-child:hover > .wp-block-navigation__submenu-container,
	.site-nav .has-child:focus-within > .wp-block-navigation__submenu-container {
		transform: translateY(0);
	}
}

.site-nav .wp-block-navigation__submenu-icon svg {
	transition: transform 0.3s var(--wp--custom--ease);
}

.site-nav .has-child:hover > .wp-block-navigation__submenu-icon svg,
.site-nav .has-child:focus-within > .wp-block-navigation__submenu-icon svg {
	transform: rotate(180deg);
}

.site-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	transition: background-color 0.25s var(--wp--custom--ease);
}

.site-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.site-nav .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--base);
}

/* Footer links: a simple colour shift. */
.site-footer__links a {
	text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible,
.site-footer__links a[aria-current="page"] {
	color: var(--wp--preset--color--sand);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link:hover,
	button.wp-element-button:hover,
	.site-nav .has-child > .wp-block-navigation__submenu-container {
		transform: none !important;
	}
}

/* ---------------------------------------------------------------------------
 * Motion: scroll reveals, page transitions, header on scroll, mobile menu
 * ------------------------------------------------------------------------ */

/* Scroll reveals (assets/js/motion.js). Only active when <html> has
   .mwm-motion: i.e. JavaScript is on and reduced motion is off. */
.mwm-motion [data-mwm-reveal] {
	opacity: 0;
	transform: translateY(32px);
	transition:
		opacity 1s var(--wp--custom--ease) var(--mwm-delay, 0ms),
		transform 1.1s var(--wp--custom--ease) var(--mwm-delay, 0ms);
}

.mwm-motion [data-mwm-reveal].is-revealed {
	opacity: 1;
	transform: none;
}

/* Images unveil from the bottom with a gentle settle. */
.mwm-motion .wp-block-image[data-mwm-reveal] {
	opacity: 1;
	transform: none;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--small);
}

.mwm-motion .wp-block-image[data-mwm-reveal] img {
	clip-path: inset(100% 0 0 0);
	transform: scale(1.08);
	transition:
		clip-path 1.4s var(--wp--custom--ease) var(--mwm-delay, 0ms),
		transform 1.8s var(--wp--custom--ease) var(--mwm-delay, 0ms);
}

.mwm-motion .wp-block-image[data-mwm-reveal].is-revealed img {
	clip-path: inset(0 0 0 0);
	transform: none;
}

/* The "Maybe…" lines slide in from the left, one after another. */
.mwm-motion .is-style-cascade > [data-mwm-reveal] {
	transform: translateX(-24px);
}

.mwm-motion .is-style-cascade > [data-mwm-reveal].is-revealed {
	transform: none;
}

/* The closing panel grows into place. */
.mwm-motion .mwm-cta[data-mwm-reveal] {
	transform: translateY(40px) scale(0.98);
}

/* The one signature moment: as the recognition section arrives, each glyph
   draws itself in turn and its line fades in with it. */
.mwm-motion .wp-block-mwm-thought[data-mwm-reveal] {
	transition-delay: calc(var(--mwm-delay, 0ms) * 3.5);
}

.mwm-motion .wp-block-mwm-thought[data-mwm-reveal] .wp-block-mwm-thought__glyph * {
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
	transition: stroke-dashoffset 1.9s var(--wp--custom--ease) calc(var(--mwm-delay, 0ms) * 3.5 + 0.1s);
}

.mwm-motion .wp-block-mwm-thought[data-mwm-reveal].is-revealed .wp-block-mwm-thought__glyph * {
	stroke-dashoffset: 0;
}

/* Page-to-page transitions (cross-document View Transitions). The header and
   mobile bar stay put; the page content fades across. */
@view-transition {
	navigation: auto;
}

.site-header-part {
	view-transition-name: mwm-header;
}

.wp-block-mwm-action-bar {
	view-transition-name: mwm-action-bar;
}

::view-transition-old(root) {
	animation: mwm-page-out 0.3s var(--wp--custom--ease) both;
}

::view-transition-new(root) {
	animation: mwm-page-in 0.6s var(--wp--custom--ease) 0.05s both;
}

@keyframes mwm-page-out {
	to {
		opacity: 0;
		transform: translateY(-8px);
	}
}

@keyframes mwm-page-in {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
}

/* Header gains a soft shadow once the page scrolls (scroll-driven, no JS). */
@supports (animation-timeline: scroll()) {
	.site-header-part {
		animation: mwm-header-lift linear both;
		animation-timeline: scroll(root);
		animation-range: 0 140px;
	}

	@keyframes mwm-header-lift {
		from {
			box-shadow: 0 0 0 rgba(37, 37, 37, 0);
		}
		to {
			box-shadow: 0 10px 30px -18px rgba(37, 37, 37, 0.35);
		}
	}
}

/* Mobile menu: overlay fades in, links cascade. */
@media (prefers-reduced-motion: no-preference) {
	.site-nav .wp-block-navigation__responsive-container.is-menu-open {
		animation: mwm-menu-in 0.45s var(--wp--custom--ease) both;
	}

	.site-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
		animation: mwm-rise 0.7s var(--wp--custom--ease) both;
	}

	.site-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(1) { animation-delay: 0.08s; }
	.site-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(2) { animation-delay: 0.14s; }
	.site-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(3) { animation-delay: 0.2s; }
	.site-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:nth-child(4) { animation-delay: 0.26s; }
}

@keyframes mwm-menu-in {
	from {
		opacity: 0;
		transform: translateY(-12px);
	}
}

/* ---------------------------------------------------------------------------
 * Utilities
 * ------------------------------------------------------------------------ */

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

/* Reduced motion: no movement, no animations: colour fades stay. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

	@view-transition {
		navigation: none;
	}
}
