/*
Theme Name: PHM Block Theme
Theme URI: https://phmtechnology.com/
Author: PHM Technology
Description: Custom block theme for the PHM Technology website.
Version: 0.13.2
Requires at least: 7.1
Requires PHP: 8.2
Text Domain: phm-block-theme
*/

/*
 * Site-wide layout guardrails.
 * Section backgrounds may span the viewport, but their content is capped at
 * 1200px and receives responsive side gutters on smaller screens.
 */
:root {
	--phm-content-max: 1200px;
	--phm-page-gutter: clamp(20px, 4vw, 48px);
	--phm-ink: #0f2a2b;
	--phm-house: #17856f;
	--phm-made: #5eb76e;
	--phm-modelling: #0f2a2b;
	--phm-sra: #e93f3a;
	--phm-ram: #83bb59;
	--phm-module-phm: #2f6b96;
	--phm-mode: #204ecf;
	--phm-syndrome: #ff5100;
	--phm-line: #d9e2e1;
	--phm-muted: #526767;
	--phm-ease: cubic-bezier(0.2, 0, 0, 1);
	--phm-entry-ease: cubic-bezier(0, 0, 0.3, 1);
	--phm-motion-marketing: 500ms;
	--phm-motion-hero: 700ms;
	--phm-motion-travel: 24px;
	--phm-motion-section-stagger: 160ms;
	--phm-motion-stagger: 120ms;
}

.wp-site-blocks > header > .wp-block-group > .wp-block-group,
.wp-site-blocks > footer > .wp-block-group > .wp-block-group,
.wp-site-blocks main > :where(:not(.alignfull)),
.wp-site-blocks .alignfull > :where(.wp-block-group__inner-container, .wp-block-cover__inner-container),
.wp-site-blocks .alignfull > .wp-block-group {
	box-sizing: border-box;
	width: min(calc(100% - (2 * var(--phm-page-gutter))), var(--phm-content-max));
	max-width: var(--phm-content-max);
	margin-inline: auto;
}

.wp-site-blocks .alignwide,
.wp-site-blocks .is-layout-constrained > .alignwide {
	width: min(calc(100% - (2 * var(--phm-page-gutter))), var(--phm-content-max));
	max-width: var(--phm-content-max);
}

/* Match the public 1200px canvas and responsive gutters inside Gutenberg. */
.editor-styles-wrapper .is-root-container > :where(:not(.alignfull)),
.editor-styles-wrapper .is-root-container > .alignfull > :where(.wp-block-group, .wp-block-cover__inner-container),
.editor-styles-wrapper .is-root-container .alignwide {
	box-sizing: border-box;
	width: min(calc(100% - (2 * var(--phm-page-gutter))), var(--phm-content-max));
	max-width: var(--phm-content-max);
	margin-inline: auto;
}

.editor-styles-wrapper .is-root-container > .alignfull {
	width: 100%;
	max-width: none;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

/* Automatic heading hierarchy. Editors choose H1–H4; the theme handles the style. */
h1.wp-block-heading {
	font-size: clamp(2.5rem, 4.5vw, 3rem);
	font-weight: 800;
	line-height: 1.17;
	letter-spacing: -0.02em;
}

h2.wp-block-heading {
	font-size: clamp(1.75rem, 3vw, 2rem);
	font-weight: 800;
	line-height: 1.25;
}

h3.wp-block-heading {
	font-size: clamp(1.25rem, 2.25vw, 1.5rem);
	font-weight: 800;
	line-height: 1.33;
}

h4.wp-block-heading {
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.33;
}

/* Legacy classes remain for existing drafts but are no longer shown as choices. */
.wp-block-heading.is-style-phm-display {
	font-size: clamp(3rem, 6vw, 4.5rem);
	font-weight: 800;
	line-height: 1.11;
	letter-spacing: -0.03em;
}

.wp-block-heading.is-style-phm-h1 {
	font-size: clamp(2.5rem, 4.5vw, 3rem);
	font-weight: 800;
	line-height: 1.17;
	letter-spacing: -0.02em;
}

.wp-block-heading.is-style-phm-h2 {
	font-size: clamp(1.75rem, 3vw, 2rem);
	font-weight: 800;
	line-height: 1.25;
}

.wp-block-heading.is-style-phm-h3 {
	font-size: clamp(1.25rem, 2.25vw, 1.5rem);
	font-weight: 800;
	line-height: 1.33;
}

p.is-style-phm-deck {
	max-width: 62ch;
	font-size: clamp(1.0625rem, 1.5vw, 1.125rem);
	line-height: 1.56;
	color: var(--phm-muted);
}

p:is(.is-style-phm-kicker, .is-style-made-kicker, .is-style-mode-kicker, .is-style-syndrome-kicker) {
	margin-bottom: 8px;
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1.33;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

p.is-style-phm-kicker { color: var(--phm-house); }
p.is-style-made-kicker { color: var(--phm-made); }
p.is-style-mode-kicker { color: var(--phm-mode); }
p.is-style-syndrome-kicker { color: var(--phm-syndrome); }

p:is(.is-style-phm-stat, .is-style-made-stat, .is-style-mode-stat, .is-style-syndrome-stat) {
	margin-bottom: 8px;
	font-size: clamp(2.5rem, 5vw, 3rem);
	font-weight: 800;
	line-height: 1.17;
	letter-spacing: -0.02em;
}

p.is-style-phm-stat { color: var(--phm-house); }
p.is-style-made-stat { color: var(--phm-made); }
p.is-style-mode-stat { color: var(--phm-mode); }
p.is-style-syndrome-stat { color: var(--phm-syndrome); }

p.is-style-phm-quote {
	margin: 0;
	font-size: clamp(1.125rem, 2vw, 1.5rem);
	line-height: 1.55;
	letter-spacing: -0.01em;
}

/* Reusable internal spacing presets for Group and Columns blocks. */
.wp-block-group.is-style-phm-section {
	box-sizing: border-box;
	padding-block: clamp(32px, 5vw, 64px);
	padding-inline: var(--phm-page-gutter);
}

.wp-block-cover:is(.is-style-phm-hero, .is-style-made-hero, .is-style-mode-hero, .is-style-syndrome-hero) {
	box-sizing: border-box;
	min-height: clamp(520px, 65vh, 720px);
	padding-block: clamp(40px, 6vw, 80px);
	padding-inline: var(--phm-page-gutter);
	color: #fff;
	background-size: 220% 220%;
	background-position: 0% 50%;
}

.wp-block-cover.is-style-phm-hero {
	background-image: linear-gradient(120deg, #071f20, var(--phm-ink) 45%, var(--phm-house));
}

.wp-block-cover.is-style-made-hero {
	background-image: linear-gradient(120deg, #0f2a2b, #2f6b3b 45%, var(--phm-made));
}

.wp-block-cover.is-style-mode-hero {
	background-image: linear-gradient(120deg, #0f1a43, #12225c 45%, var(--phm-mode));
}

.wp-block-cover.is-style-syndrome-hero {
	background-image: linear-gradient(120deg, #32170b, #a63500 45%, var(--phm-syndrome));
}

.wp-block-cover:is(.is-style-phm-hero, .is-style-made-hero, .is-style-mode-hero, .is-style-syndrome-hero) > .wp-block-cover__background {
	opacity: 0 !important;
	background: transparent !important;
}

/* Image tints preserve the Cover image and replace WordPress's default overlay. */
.wp-block-cover:is(.is-style-phm-image-tint, .is-style-made-image-tint, .is-style-mode-image-tint, .is-style-syndrome-image-tint, .is-style-dark-image-tint, .is-style-no-image-tint) {
	box-sizing: border-box;
	min-height: clamp(520px, 65vh, 720px);
	padding-block: clamp(40px, 6vw, 80px);
	padding-inline: var(--phm-page-gutter);
	color: #fff;
}

.wp-block-cover:is(.is-style-phm-image-tint, .is-style-made-image-tint, .is-style-mode-image-tint, .is-style-syndrome-image-tint, .is-style-dark-image-tint) > .wp-block-cover__background {
	opacity: 1 !important;
}

.wp-block-cover.is-style-phm-image-tint > .wp-block-cover__background {
	background: linear-gradient(120deg, rgba(7, 31, 32, 0.88), rgba(23, 133, 111, 0.58)) !important;
}

.wp-block-cover.is-style-made-image-tint > .wp-block-cover__background {
	background: linear-gradient(120deg, rgba(15, 42, 43, 0.9), rgba(94, 183, 110, 0.55)) !important;
}

.wp-block-cover.is-style-mode-image-tint > .wp-block-cover__background {
	background: linear-gradient(120deg, rgba(15, 26, 67, 0.9), rgba(32, 78, 207, 0.55)) !important;
}

.wp-block-cover.is-style-syndrome-image-tint > .wp-block-cover__background {
	background: linear-gradient(120deg, rgba(50, 23, 11, 0.9), rgba(255, 81, 0, 0.56)) !important;
}

.wp-block-cover.is-style-dark-image-tint > .wp-block-cover__background {
	background: rgba(15, 42, 43, 0.72) !important;
}

/* The only selectable Cover variation: image hero with a consistent dark tint. */
.wp-block-cover.is-style-phm-dark-image-hero {
	box-sizing: border-box;
	min-height: clamp(520px, 65vh, 720px);
	padding-block: clamp(40px, 6vw, 80px);
	padding-inline: var(--phm-page-gutter);
	color: #fff;
}

/*
 * A PHM hero is always full-bleed, including older pages where the Cover was
 * inserted without WordPress's Full width alignment. Its editable content
 * remains aligned to the responsive 1200px site grid.
 */
.wp-site-blocks .wp-block-cover.is-style-phm-dark-image-hero {
	left: 50%;
	width: 100vw;
	max-width: none;
	margin-right: -50vw;
	margin-left: -50vw;
	padding-inline: 0;
}

.wp-site-blocks .wp-block-cover.is-style-phm-dark-image-hero > .wp-block-cover__inner-container {
	box-sizing: border-box;
	width: min(calc(100% - (2 * var(--phm-page-gutter))), var(--phm-content-max));
	max-width: var(--phm-content-max);
	margin-inline: auto;
}

.editor-styles-wrapper .wp-block-cover.is-style-phm-dark-image-hero {
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: 0;
}

.editor-styles-wrapper .wp-block-cover.is-style-phm-dark-image-hero > .wp-block-cover__inner-container {
	box-sizing: border-box;
	width: min(calc(100% - (2 * var(--phm-page-gutter))), var(--phm-content-max));
	max-width: var(--phm-content-max);
	margin-inline: auto;
}

.wp-block-cover.is-style-phm-dark-image-hero > .wp-block-cover__background {
	opacity: 1 !important;
	background: rgba(15, 42, 43, 0.72) !important;
}

.wp-block-cover.is-style-no-image-tint > .wp-block-cover__background {
	opacity: 0 !important;
	background: transparent !important;
}

.wp-block-group.is-style-phm-panel {
	box-sizing: border-box;
	padding: clamp(20px, 3vw, 24px);
}

.wp-block-group.is-style-phm-panel-compact {
	box-sizing: border-box;
	padding: 16px;
}

.wp-block-columns.is-style-phm-grid {
	box-sizing: border-box;
	width: min(100%, var(--phm-content-max));
	max-width: var(--phm-content-max);
	margin-inline: auto;
	gap: 24px;
}

.wp-block-columns.phm-card-grid-four > .wp-block-column {
	min-width: 0;
	flex: 1 1 0;
}

/* PHM button styles — selectable from the Button block's Styles panel. */
.wp-block-button[class*="is-style-"] .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 30px;
	border: 1px solid transparent;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-decoration: none;
}

.wp-block-buttons {
	gap: 12px;
}

.wp-block-button[class*="is-style-"] .wp-block-button__link:focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 3px;
}

.wp-block-button:is(.is-style-phm-primary, .is-style-made-primary, .is-style-mode-primary, .is-style-syndrome-primary) .wp-block-button__link {
	color: #fff;
	overflow: hidden;
	border: 0;
	background-repeat: no-repeat;
	background-size: 220% 220%;
	background-position: 0% 50%;
	transition: background-position 400ms var(--phm-ease), box-shadow 400ms var(--phm-ease), transform 160ms var(--phm-ease);
}

.wp-block-button.is-style-phm-primary .wp-block-button__link {
	background-image: linear-gradient(120deg, #0c5747, var(--phm-house) 40%, #2ea88c 70%, var(--phm-house));
}

.wp-block-button.is-style-made-primary .wp-block-button__link {
	background-image: linear-gradient(120deg, #2f6b3b, var(--phm-made) 40%, #a3e0ac 70%, var(--phm-made));
}

.wp-block-button.is-style-mode-primary .wp-block-button__link {
	background-image: linear-gradient(120deg, #12225c, var(--phm-mode) 40%, #7d9af0 70%, var(--phm-mode));
}

.wp-block-button.is-style-syndrome-primary .wp-block-button__link {
	background-image: linear-gradient(120deg, #a63500, var(--phm-syndrome) 40%, #ff9a63 70%, var(--phm-syndrome));
}

.wp-block-button:is(.is-style-phm-primary, .is-style-made-primary, .is-style-mode-primary, .is-style-syndrome-primary) .wp-block-button__link:hover,
.wp-block-button:is(.is-style-phm-primary, .is-style-made-primary, .is-style-mode-primary, .is-style-syndrome-primary) .wp-block-button__link:focus-visible {
	background-position: 100% 50%;
	box-shadow: 0 10px 24px -14px rgba(15, 42, 43, 0.4);
	transform: translateY(-1px);
}

.wp-block-button:is(.is-style-phm-secondary, .is-style-made-secondary, .is-style-mode-secondary, .is-style-syndrome-secondary) .wp-block-button__link {
	color: var(--phm-ink);
	background: rgba(15, 42, 43, 0.05);
	border-color: rgba(15, 42, 43, 0.16);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	transition: color 80ms var(--phm-ease), background-color 80ms var(--phm-ease), border-color 80ms var(--phm-ease);
}

.wp-block-button.is-style-phm-secondary .wp-block-button__link:hover,
.wp-block-button.is-style-phm-secondary .wp-block-button__link:focus-visible {
	color: var(--phm-house);
	background: rgba(23, 133, 111, 0.16);
	border-color: rgba(23, 133, 111, 0.5);
}

.wp-block-button.is-style-made-secondary .wp-block-button__link:hover,
.wp-block-button.is-style-made-secondary .wp-block-button__link:focus-visible {
	color: var(--phm-made);
	background: rgba(94, 183, 110, 0.18);
	border-color: rgba(94, 183, 110, 0.55);
}

.wp-block-button.is-style-mode-secondary .wp-block-button__link:hover,
.wp-block-button.is-style-mode-secondary .wp-block-button__link:focus-visible {
	color: var(--phm-mode);
	background: rgba(32, 78, 207, 0.16);
	border-color: rgba(32, 78, 207, 0.5);
}

.wp-block-button.is-style-syndrome-secondary .wp-block-button__link:hover,
.wp-block-button.is-style-syndrome-secondary .wp-block-button__link:focus-visible {
	color: var(--phm-syndrome);
	background: rgba(255, 81, 0, 0.14);
	border-color: rgba(255, 81, 0, 0.5);
}

/* Explicit light treatment for dark heroes, covers and sections. */
.wp-block-button.is-style-phm-secondary-light .wp-block-button__link {
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	transition: background-color 160ms var(--phm-ease), border-color 160ms var(--phm-ease), transform 160ms var(--phm-ease);
}

.wp-block-button.is-style-phm-secondary-light .wp-block-button__link:hover,
.wp-block-button.is-style-phm-secondary-light .wp-block-button__link:focus-visible {
	color: #fff;
	background: rgba(255, 255, 255, 0.24);
	border-color: rgba(255, 255, 255, 0.75);
	transform: translateY(-1px);
}

.has-ink-background-color .wp-block-button:is(.is-style-phm-secondary, .is-style-made-secondary, .is-style-mode-secondary, .is-style-syndrome-secondary) .wp-block-button__link,
.wp-block-group.is-style-phm-card-dark .wp-block-button:is(.is-style-phm-secondary, .is-style-made-secondary, .is-style-mode-secondary, .is-style-syndrome-secondary) .wp-block-button__link {
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.35);
}

.has-ink-background-color .wp-block-button.is-style-phm-secondary .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-phm-secondary .wp-block-button__link:focus-visible,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-phm-secondary .wp-block-button__link:hover,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-phm-secondary .wp-block-button__link:focus-visible {
	color: #fff;
	background: rgba(23, 133, 111, 0.3);
	border-color: rgba(23, 133, 111, 0.7);
}

.has-ink-background-color .wp-block-button.is-style-made-secondary .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-made-secondary .wp-block-button__link:focus-visible,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-made-secondary .wp-block-button__link:hover,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-made-secondary .wp-block-button__link:focus-visible {
	color: #fff;
	background: rgba(94, 183, 110, 0.3);
	border-color: rgba(94, 183, 110, 0.7);
}

.has-ink-background-color .wp-block-button.is-style-mode-secondary .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-mode-secondary .wp-block-button__link:focus-visible,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-mode-secondary .wp-block-button__link:hover,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-mode-secondary .wp-block-button__link:focus-visible {
	color: #fff;
	background: rgba(32, 78, 207, 0.3);
	border-color: rgba(32, 78, 207, 0.7);
}

.has-ink-background-color .wp-block-button.is-style-syndrome-secondary .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-syndrome-secondary .wp-block-button__link:focus-visible,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-syndrome-secondary .wp-block-button__link:hover,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-syndrome-secondary .wp-block-button__link:focus-visible {
	color: #fff;
	background: rgba(255, 81, 0, 0.3);
	border-color: rgba(255, 81, 0, 0.7);
}

.wp-block-button:is(.is-style-phm-ghost, .is-style-phm-ghost-light, .is-style-made-ghost, .is-style-mode-ghost, .is-style-syndrome-ghost) .wp-block-button__link {
	position: relative;
	color: var(--phm-ink);
	background: transparent;
}

.wp-block-button:is(.is-style-phm-ghost, .is-style-phm-ghost-light, .is-style-made-ghost, .is-style-mode-ghost, .is-style-syndrome-ghost) .wp-block-button__link::after {
	position: absolute;
	right: 24px;
	bottom: 6px;
	left: 24px;
	height: 2px;
	background: currentcolor;
	content: "";
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 160ms var(--phm-ease);
}

.wp-block-button.is-style-phm-ghost .wp-block-button__link:hover,
.wp-block-button.is-style-phm-ghost .wp-block-button__link:focus-visible {
	color: var(--phm-house);
}

.wp-block-button.is-style-made-ghost .wp-block-button__link:hover,
.wp-block-button.is-style-made-ghost .wp-block-button__link:focus-visible {
	color: var(--phm-made);
}

.wp-block-button.is-style-mode-ghost .wp-block-button__link:hover,
.wp-block-button.is-style-mode-ghost .wp-block-button__link:focus-visible {
	color: var(--phm-mode);
}

.wp-block-button.is-style-syndrome-ghost .wp-block-button__link:hover,
.wp-block-button.is-style-syndrome-ghost .wp-block-button__link:focus-visible {
	color: var(--phm-syndrome);
}

.wp-block-button.is-style-phm-ghost-light .wp-block-button__link {
	color: #fff;
}

.wp-block-button.is-style-phm-ghost-light .wp-block-button__link:hover,
.wp-block-button.is-style-phm-ghost-light .wp-block-button__link:focus-visible {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.has-ink-background-color .wp-block-button:is(.is-style-phm-ghost, .is-style-made-ghost, .is-style-mode-ghost, .is-style-syndrome-ghost) .wp-block-button__link,
.wp-block-group.is-style-phm-card-dark .wp-block-button:is(.is-style-phm-ghost, .is-style-made-ghost, .is-style-mode-ghost, .is-style-syndrome-ghost) .wp-block-button__link {
	color: #fff;
}

.has-ink-background-color .wp-block-button.is-style-phm-ghost .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-phm-ghost .wp-block-button__link:focus-visible,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-phm-ghost .wp-block-button__link:hover,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-phm-ghost .wp-block-button__link:focus-visible {
	color: var(--phm-house);
}

.has-ink-background-color .wp-block-button.is-style-made-ghost .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-made-ghost .wp-block-button__link:focus-visible,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-made-ghost .wp-block-button__link:hover,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-made-ghost .wp-block-button__link:focus-visible {
	color: var(--phm-made);
}

.has-ink-background-color .wp-block-button.is-style-mode-ghost .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-mode-ghost .wp-block-button__link:focus-visible,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-mode-ghost .wp-block-button__link:hover,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-mode-ghost .wp-block-button__link:focus-visible {
	color: var(--phm-mode);
}

.has-ink-background-color .wp-block-button.is-style-syndrome-ghost .wp-block-button__link:hover,
.has-ink-background-color .wp-block-button.is-style-syndrome-ghost .wp-block-button__link:focus-visible,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-syndrome-ghost .wp-block-button__link:hover,
.wp-block-group.is-style-phm-card-dark .wp-block-button.is-style-syndrome-ghost .wp-block-button__link:focus-visible {
	color: var(--phm-syndrome);
}

.wp-block-button:is(.is-style-phm-ghost, .is-style-phm-ghost-light, .is-style-made-ghost, .is-style-mode-ghost, .is-style-syndrome-ghost) .wp-block-button__link:hover::after,
.wp-block-button:is(.is-style-phm-ghost, .is-style-phm-ghost-light, .is-style-made-ghost, .is-style-mode-ghost, .is-style-syndrome-ghost) .wp-block-button__link:focus-visible::after {
	transform: scaleX(1);
}

/* PHM card styles — apply to a Group block from its Styles panel. */
.wp-block-group:is(.is-style-phm-card, .is-style-phm-card-made, .is-style-phm-card-mode, .is-style-phm-card-syndrome, .is-style-phm-card-dark) {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	height: 100%;
	padding: 24px;
	background: #fff;
	border: 1px solid var(--phm-line);
	border-radius: 4px;
}

.wp-block-group:is(.is-style-phm-card, .is-style-phm-card-made, .is-style-phm-card-mode, .is-style-phm-card-syndrome, .is-style-phm-card-dark) > * {
	margin-block-start: 0;
}

/*
 * Keep every card's editable content on the same left edge. WordPress'
 * constrained layout otherwise centres shorter headings by shrinking them.
 * Explicit block text alignment choices still work because this only
 * normalises width and horizontal margins.
 */
.wp-block-group:is(
	.is-style-phm-card,
	.is-style-phm-card-made,
	.is-style-phm-card-mode,
	.is-style-phm-card-syndrome,
	.is-style-phm-card-dark,
	.is-style-made-side-card,
	.is-style-modelling-side-card,
	.is-style-sra-side-card,
	.is-style-ram-side-card,
	.is-style-phm-module-side-card
) > :where(.wp-block-heading, p, ul, ol, blockquote) {
	box-sizing: border-box;
	width: 100%;
	margin-inline: 0 !important;
}

.wp-block-group:is(.is-style-phm-card, .is-style-phm-card-made, .is-style-phm-card-mode, .is-style-phm-card-syndrome, .is-style-phm-card-dark) > h3.wp-block-heading {
	margin-bottom: 8px;
	font-size: 1.125rem;
	line-height: 1.33;
}

.wp-block-group:is(.is-style-phm-card, .is-style-phm-card-made, .is-style-phm-card-mode, .is-style-phm-card-syndrome, .is-style-phm-card-dark) > p {
	margin-bottom: 16px;
	font-size: 0.875rem;
	line-height: 1.7;
	color: var(--phm-muted);
}

.wp-block-group:is(.is-style-phm-card, .is-style-phm-card-made, .is-style-phm-card-mode, .is-style-phm-card-syndrome, .is-style-phm-card-dark) > .wp-block-buttons:last-child {
	margin-top: auto;
	align-self: flex-start;
}

.wp-block-group:is(.is-style-phm-card, .is-style-phm-card-made, .is-style-phm-card-mode, .is-style-phm-card-syndrome, .is-style-phm-card-dark)::before {
	display: block;
	height: 8px;
	margin: -24px -24px 16px;
	background-size: 220% 220%;
	background-position: 0% 50%;
	content: "";
	transition: background-position 400ms var(--phm-ease);
}

.wp-block-group.is-style-phm-card::before,
.wp-block-group.is-style-phm-card-dark::before {
	background-image: linear-gradient(120deg, #0c5747, var(--phm-house) 40%, #2ea88c 70%, var(--phm-house));
}

.wp-block-group.is-style-phm-card-made::before {
	background-image: linear-gradient(120deg, #2f6b3b, var(--phm-made) 40%, #a3e0ac 70%, var(--phm-made));
}

.wp-block-group.is-style-phm-card-mode::before {
	background-image: linear-gradient(120deg, #12225c, var(--phm-mode) 40%, #7d9af0 70%, var(--phm-mode));
}

.wp-block-group.is-style-phm-card-syndrome::before {
	background-image: linear-gradient(120deg, #a63500, var(--phm-syndrome) 40%, #ff9a63 70%, var(--phm-syndrome));
}

.wp-block-group:is(.is-style-phm-card, .is-style-phm-card-made, .is-style-phm-card-mode, .is-style-phm-card-syndrome, .is-style-phm-card-dark):hover::before {
	background-position: 100% 50%;
}

.wp-block-group.is-style-phm-card-dark {
	color: #fff;
	background: var(--phm-ink);
	border-color: #365555;
}

.wp-block-group.is-style-phm-card-dark :is(h1, h2, h3, h4, h5, h6) {
	color: #fff;
}

.wp-block-group.is-style-phm-card-dark p {
	color: #a9bcbc;
}

/*
 * MADE module side-accent cards. These are unlocked core Group blocks: editors
 * can change every text block, its alignment, the background and the spacing.
 */
.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card) {
	--phm-side-accent: var(--phm-made);
	--phm-side-accent-dark: #2f6b3b;
	--phm-side-accent-light: #a3e0ac;
	--phm-side-kicker: var(--phm-side-accent-dark);
	--phm-side-kicker-on-dark: var(--phm-side-accent-light);
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	width: 100%;
	padding: clamp(40px, 5vw, 56px);
	padding-left: clamp(48px, 5.5vw, 64px);
	border: 1px solid var(--phm-line);
	border-radius: 4px;
}

.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card):not(.has-background) {
	background: #fff;
}

.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card):not(.has-text-color) {
	color: var(--phm-ink);
}

.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card)::before {
	position: absolute;
	inset: 0 auto 0 0;
	width: 6px;
	background-image: linear-gradient(180deg, var(--phm-side-accent-dark), var(--phm-side-accent) 42%, var(--phm-side-accent-light) 72%, var(--phm-side-accent));
	background-size: 100% 220%;
	background-position: 50% 0;
	border-radius: 4px 0 0 4px;
	content: "";
	transition: background-position 400ms var(--phm-ease);
}

.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card):hover::before,
.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card):focus-within::before {
	background-position: 50% 100%;
}

.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card) > * {
	margin-block-start: 0;
}

.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card) > .phm-side-card__kicker:not(.has-text-color) {
	color: var(--phm-side-kicker);
}

.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card) > .phm-side-card__kicker {
	margin-bottom: 16px;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card) > .wp-block-heading {
	margin-bottom: 16px;
}

.wp-block-group.is-style-modelling-side-card {
	--phm-side-accent: var(--phm-modelling);
	--phm-side-accent-dark: #051010;
	--phm-side-accent-light: #3f6b6d;
	--phm-side-kicker: var(--phm-modelling);
	--phm-side-kicker-on-dark: #d6dddd;
}

.wp-block-group.is-style-sra-side-card {
	--phm-side-accent: var(--phm-sra);
	--phm-side-accent-dark: #7a1220;
	--phm-side-accent-light: #f9948c;
}

.wp-block-group.is-style-ram-side-card {
	--phm-side-accent: var(--phm-ram);
	--phm-side-accent-dark: #3f5c29;
	--phm-side-accent-light: #c3e2ab;
}

.wp-block-group.is-style-phm-module-side-card {
	--phm-side-accent: var(--phm-module-phm);
	--phm-side-accent-dark: #16324a;
	--phm-side-accent-light: #8fb9d6;
}

.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card):is(.has-ink-background-color, .has-neutral-ink-background-color, .has-grey-11-background-color):not(.has-text-color) {
	color: #fdfdfd;
}

.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card):is(.has-ink-background-color, .has-neutral-ink-background-color, .has-grey-11-background-color) > .phm-side-card__kicker:not(.has-text-color) {
	color: var(--phm-side-kicker-on-dark);
}

/* Individual image-card pattern: replace the image; spacing remains locked. */
.wp-block-group.phm-card-has-media {
	padding-top: 0;
}

.wp-block-group.phm-card-has-media::before {
	display: none;
}

.wp-block-group.phm-card-has-media > .wp-block-image.phm-card-media {
	overflow: hidden;
	width: calc(100% + 48px);
	max-width: none;
	margin: 0 -24px 16px !important;
	aspect-ratio: 16 / 10;
}

.wp-block-group.phm-card-has-media > .wp-block-image.phm-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Branded media panels for screenshots, imagery and product demonstrations. */
.wp-block-group:is(.is-style-phm-media, .is-style-made-media, .is-style-mode-media, .is-style-syndrome-media) {
	position: relative;
	overflow: hidden;
	min-height: 200px;
	border-radius: 4px;
	background-size: 220% 220%;
	background-position: 0% 50%;
	transition: background-position 400ms var(--phm-ease);
}

.wp-block-group.is-style-phm-media {
	background-image: linear-gradient(120deg, #0c5747, var(--phm-house) 40%, #2ea88c 70%, var(--phm-house));
}

.wp-block-group.is-style-made-media {
	background-image: linear-gradient(120deg, #2f6b3b, var(--phm-made) 40%, #a3e0ac 70%, var(--phm-made));
}

.wp-block-group.is-style-mode-media {
	background-image: linear-gradient(120deg, #12225c, var(--phm-mode) 40%, #7d9af0 70%, var(--phm-mode));
}

.wp-block-group.is-style-syndrome-media {
	background-image: linear-gradient(120deg, #a63500, var(--phm-syndrome) 40%, #ff9a63 70%, var(--phm-syndrome));
}

.wp-block-group:is(.is-style-phm-media, .is-style-made-media, .is-style-mode-media, .is-style-syndrome-media):hover {
	background-position: 100% 50%;
}

/*
 * Automatic entry motion. Content remains visible when JavaScript is absent;
 * the ready class is added only after the motion targets have been discovered.
 */
html.phm-motion-ready .phm-entry:not(.phm-entry--stagger) {
	opacity: 0;
	transform: translate3d(0, var(--phm-motion-travel), 0);
	transition:
		opacity var(--phm-motion-marketing) var(--phm-entry-ease),
		transform var(--phm-motion-marketing) var(--phm-entry-ease);
	transition-delay: var(--phm-entry-delay, 0ms);
	will-change: opacity, transform;
}

html.phm-motion-ready .phm-entry.phm-entry--hero {
	transition-duration: var(--phm-motion-hero);
}

html.phm-motion-ready .phm-entry:not(.phm-entry--stagger).is-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

html.phm-motion-ready .phm-entry--stagger .phm-entry-item {
	opacity: 0;
	transform: translate3d(0, var(--phm-motion-travel), 0);
	transition:
		opacity var(--phm-motion-marketing) var(--phm-entry-ease),
		transform var(--phm-motion-marketing) var(--phm-entry-ease);
	will-change: opacity, transform;
}

html.phm-motion-ready .phm-entry--stagger.is-visible .phm-entry-item {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	transition-delay: calc(var(--phm-entry-delay, 0ms) + (var(--phm-entry-index, 0) * var(--phm-motion-stagger)));
}

/* Hold the hidden start state without briefly animating backwards on load. */
html.phm-motion-ready:not(.phm-motion-active) .phm-entry:not(.phm-entry--stagger),
html.phm-motion-ready:not(.phm-motion-active) .phm-entry--stagger .phm-entry-item {
	transition: none;
}

@media (max-width: 781px) {
	.wp-site-blocks .wp-block-columns:not(.is-not-stacked-on-mobile),
	.editor-styles-wrapper .wp-block-columns:not(.is-not-stacked-on-mobile) {
		gap: var(--wp--preset--spacing--40);
	}

	.wp-site-blocks .wp-block-buttons,
	.wp-site-blocks .wp-block-button,
	.wp-site-blocks .wp-block-button__link {
		width: 100%;
	}

	.wp-site-blocks .wp-block-button[class*="is-style-"] .wp-block-button__link {
		box-sizing: border-box;
		min-height: 48px;
		text-align: center;
	}

	.wp-block-group:is(.is-style-phm-card, .is-style-phm-card-made, .is-style-phm-card-mode, .is-style-phm-card-syndrome, .is-style-phm-card-dark) {
		padding: 20px;
	}

	.wp-block-group:is(.is-style-phm-card, .is-style-phm-card-made, .is-style-phm-card-mode, .is-style-phm-card-syndrome, .is-style-phm-card-dark)::before {
		margin: -20px -20px 16px;
	}

	.wp-block-group.phm-card-has-media > .wp-block-image.phm-card-media {
		width: calc(100% + 40px);
		margin: 0 -20px 16px !important;
	}

	.wp-block-columns.is-style-phm-grid {
		gap: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button[class*="is-style-"] .wp-block-button__link,
	.wp-block-button:is(.is-style-phm-ghost, .is-style-made-ghost, .is-style-mode-ghost, .is-style-syndrome-ghost) .wp-block-button__link::after,
	.wp-block-group[class*="is-style-phm-card"]::before,
	.wp-block-group:is(.is-style-made-side-card, .is-style-modelling-side-card, .is-style-sra-side-card, .is-style-ram-side-card, .is-style-phm-module-side-card)::before {
		transition-duration: 0ms;
	}

	html.phm-motion-ready .phm-entry,
	html.phm-motion-ready .phm-entry--stagger .phm-entry-item {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
		will-change: auto;
	}
}
/*
 * Top-of-page heroes sit behind the floating navigation. Remove WordPress'
 * template gap so the hero reaches the top edge, then reserve a clear content
 * zone beneath the navigation at every viewport size.
 */
.wp-site-blocks > header.wp-block-template-part + main:has(
	.wp-block-post-content > .wp-block-cover:first-child:is(
		.is-style-phm-hero,
		.is-style-made-hero,
		.is-style-mode-hero,
		.is-style-syndrome-hero,
		.is-style-phm-dark-image-hero
	)
) {
	margin-block-start: 0;
}

.wp-site-blocks .wp-block-post-content > .wp-block-cover:first-child:is(
	.is-style-phm-hero,
	.is-style-made-hero,
	.is-style-mode-hero,
	.is-style-syndrome-hero,
	.is-style-phm-dark-image-hero
) {
	padding-top: clamp(152px, 12vw, 184px);
}

/*
 * Equal card sets use a predictable title/description rhythm. Two-part cards
 * reserve one third for the title and two thirds for supporting copy. Cards
 * with a number or kicker keep that marker above the same 1:2 content split.
 */
.wp-block-columns.is-style-phm-grid:has(
	> .wp-block-column:first-child > .wp-block-group:is(
		.is-style-phm-card,
		.is-style-phm-card-made,
		.is-style-phm-card-mode,
		.is-style-phm-card-syndrome,
		.is-style-phm-card-dark,
		.is-style-made-side-card,
		.is-style-modelling-side-card,
		.is-style-sra-side-card,
		.is-style-ram-side-card,
		.is-style-phm-module-side-card
	)
):has(
	> .wp-block-column:nth-child(2) > .wp-block-group:is(
		.is-style-phm-card,
		.is-style-phm-card-made,
		.is-style-phm-card-mode,
		.is-style-phm-card-syndrome,
		.is-style-phm-card-dark,
		.is-style-made-side-card,
		.is-style-modelling-side-card,
		.is-style-sra-side-card,
		.is-style-ram-side-card,
		.is-style-phm-module-side-card
	)
) > .wp-block-column:has(
	> .wp-block-group:is(
		.is-style-phm-card,
		.is-style-phm-card-made,
		.is-style-phm-card-mode,
		.is-style-phm-card-syndrome,
		.is-style-phm-card-dark,
		.is-style-made-side-card,
		.is-style-modelling-side-card,
		.is-style-sra-side-card,
		.is-style-ram-side-card,
		.is-style-phm-module-side-card
	)
) {
	display: flex;
	align-self: stretch;
}

.wp-block-columns.is-style-phm-grid > .wp-block-column > .wp-block-group:is(
	.is-style-phm-card,
	.is-style-phm-card-made,
	.is-style-phm-card-mode,
	.is-style-phm-card-syndrome,
	.is-style-phm-card-dark,
	.is-style-made-side-card,
	.is-style-modelling-side-card,
	.is-style-sra-side-card,
	.is-style-ram-side-card,
	.is-style-phm-module-side-card
) {
	flex: 1 1 auto;
	height: 100%;
}

.wp-block-columns.is-style-phm-grid > .wp-block-column > .wp-block-group:is(
	.is-style-phm-card,
	.is-style-phm-card-made,
	.is-style-phm-card-mode,
	.is-style-phm-card-syndrome,
	.is-style-phm-card-dark
)::before {
	position: absolute;
	inset: 0 0 auto;
	width: 100%;
	margin: 0;
}

.wp-block-columns.is-style-phm-grid > .wp-block-column > .wp-block-group:is(
	.is-style-phm-card,
	.is-style-phm-card-made,
	.is-style-phm-card-mode,
	.is-style-phm-card-syndrome,
	.is-style-phm-card-dark,
	.is-style-made-side-card,
	.is-style-modelling-side-card,
	.is-style-sra-side-card,
	.is-style-ram-side-card,
	.is-style-phm-module-side-card
):not(:has(> :nth-child(3))) {
	display: grid;
	grid-template-rows: minmax(0, 1fr) minmax(0, 2fr);
	align-items: start;
}

.wp-block-columns.is-style-phm-grid > .wp-block-column > .wp-block-group:is(
	.is-style-phm-card,
	.is-style-phm-card-made,
	.is-style-phm-card-mode,
	.is-style-phm-card-syndrome,
	.is-style-phm-card-dark,
	.is-style-made-side-card,
	.is-style-modelling-side-card,
	.is-style-sra-side-card,
	.is-style-ram-side-card,
	.is-style-phm-module-side-card
):has(> p:first-child[class*="kicker"]):not(:has(> :nth-child(4))) {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) minmax(0, 2fr);
	align-items: start;
}

.wp-block-columns.is-style-phm-grid > .wp-block-column > .wp-block-group:is(
	.is-style-phm-card,
	.is-style-phm-card-made,
	.is-style-phm-card-mode,
	.is-style-phm-card-syndrome,
	.is-style-phm-card-dark,
	.is-style-made-side-card,
	.is-style-modelling-side-card,
	.is-style-sra-side-card,
	.is-style-ram-side-card,
	.is-style-phm-module-side-card
) > .wp-block-heading,
.wp-block-columns.is-style-phm-grid > .wp-block-column > .wp-block-group:is(
	.is-style-phm-card,
	.is-style-phm-card-made,
	.is-style-phm-card-mode,
	.is-style-phm-card-syndrome,
	.is-style-phm-card-dark,
	.is-style-made-side-card,
	.is-style-modelling-side-card,
	.is-style-sra-side-card,
	.is-style-ram-side-card,
	.is-style-phm-module-side-card
) > :is(p, ul, ol, blockquote):last-child {
	padding-top: 0.5rem;
	margin-bottom: 0;
}
