/**
 * MPF child theme — layout, header, home, CTAs.
 * Colours also defined in theme.json (source of truth for the editor).
 */

/* -------------------------------------------------------------------------
   CSS variables (logo-led: black, bright blue, white)
   ------------------------------------------------------------------------- */
:root {
	--mpf-black: #0a0a0a;
	--mpf-blue: #00a3e0;
	--mpf-blue-dark: #0077a8;
	--mpf-white: #ffffff;
	--mpf-muted: #f2f4f7;
	--mpf-industrial: #141414;
	--mpf-radius: 4px;
	--mpf-header-bg: var(--mpf-white);
	--mpf-header-border: rgba(10, 10, 10, 0.08);
	--mpf-shadow: 0 1px 0 var(--mpf-header-border);
	--mpf-max: 1140px;
	--mpf-gutter: clamp(1rem, 3vw, 1.5rem);
	--mpf-section-y: clamp(3rem, 7vw, 5rem);
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */
body {
	-webkit-font-smoothing: antialiased;
}

/* Shortcodes often wrap in .wp-block-shortcode — keep layout tight */
.wp-block-shortcode {
	margin: 0;
}

.mpf-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	padding: 0.75rem 1rem;
	background: var(--mpf-blue);
	color: var(--mpf-white);
}

.mpf-skip-link:focus {
	left: var(--mpf-gutter);
	top: 0.5rem;
}

/* -------------------------------------------------------------------------
   Buttons / CTAs
   ------------------------------------------------------------------------- */
.mpf-btn,
a.mpf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.75rem 1.35rem;
	border-radius: var(--mpf-radius);
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.2;
	text-decoration: none !important;
	border: 2px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.mpf-btn:focus-visible {
	outline: 2px solid var(--mpf-blue);
	outline-offset: 2px;
}

.mpf-btn--call,
a.mpf-btn--call {
	background: var(--mpf-black);
	color: var(--mpf-white) !important;
	border-color: var(--mpf-black);
}

.mpf-btn--call:hover,
.mpf-btn--call:focus-visible,
a.mpf-btn--call:hover {
	background: #000;
	color: var(--mpf-white) !important;
}

.mpf-btn--quote,
a.mpf-btn--quote {
	background: var(--mpf-blue);
	color: var(--mpf-white) !important;
	border-color: var(--mpf-blue);
}

.mpf-btn--quote:hover,
.mpf-btn--quote:focus-visible,
a.mpf-btn--quote:hover {
	background: var(--mpf-blue-dark);
	border-color: var(--mpf-blue-dark);
	color: var(--mpf-white) !important;
}

.mpf-cta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.mpf-cta-row--center {
	justify-content: center;
}

/* Core button block alignment with brand */
.wp-block-button__link {
	border-radius: var(--mpf-radius);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-color: var(--mpf-black);
	color: var(--mpf-black);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--mpf-black);
	color: var(--mpf-white);
}

/* -------------------------------------------------------------------------
   Header + logo
   ------------------------------------------------------------------------- */
.mpf-site-header {
	background: var(--mpf-header-bg);
	border-bottom: 1px solid var(--mpf-header-border);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: var(--mpf-shadow);
}

.mpf-header {
	width: 100%;
}

.mpf-header__inner {
	max-width: var(--mpf-max);
	margin-inline: auto;
	padding: 1rem var(--mpf-gutter);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	column-gap: 2rem;
	row-gap: 0.85rem;
}

/* Keep shortcode wrappers from breaking flex layout */
.mpf-header__inner > .wp-block-shortcode {
	display: contents;
}

.mpf-brand {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	line-height: 0;
	text-decoration: none;
	max-width: min(320px, 44vw);
}

.mpf-brand__img,
.mpf-brand img {
	display: block !important;
	height: auto !important;
	width: auto !important;
	max-height: 100px;
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
	image-rendering: auto;
}

.mpf-header__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	align-items: center;
	min-width: 0;
	padding-inline: 0.75rem 1rem;
}

.mpf-header__ctas {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem;
	flex: 0 0 auto;
}

/* Primary nav — fixed order via [mpf_primary_nav] */
.mpf-nav {
	position: relative;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

.mpf-nav__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid rgba(10, 10, 10, 0.12);
	border-radius: var(--mpf-radius);
	background: var(--mpf-white);
	cursor: pointer;
}

.mpf-nav__toggle-bars,
.mpf-nav__toggle-bars::before,
.mpf-nav__toggle-bars::after {
	display: block;
	width: 1.15rem;
	height: 2px;
	background: var(--mpf-black);
	border-radius: 1px;
	position: relative;
}

.mpf-nav__toggle-bars::before,
.mpf-nav__toggle-bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.mpf-nav__toggle-bars::before {
	top: -6px;
}

.mpf-nav__toggle-bars::after {
	top: 6px;
}

.mpf-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.15rem 0.15rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mpf-nav__link {
	display: inline-block;
	padding: 0.45rem 0.75rem;
	color: var(--mpf-black);
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	border-radius: var(--mpf-radius);
	white-space: nowrap;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.mpf-nav__link:hover,
.mpf-nav__link:focus-visible {
	color: var(--mpf-blue);
	background: rgba(0, 163, 224, 0.08);
	outline: none;
}

.mpf-nav__item.is-current .mpf-nav__link {
	color: var(--mpf-blue);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (max-width: 900px) {
	.mpf-header__inner {
		padding-block: 0.8rem;
		column-gap: 1rem;
	}

	.mpf-brand {
		max-width: min(210px, 52vw);
	}

	.mpf-brand__img,
	.mpf-brand img {
		max-height: 72px;
	}

	.mpf-header__nav {
		order: 3;
		flex: 1 1 100%;
		justify-content: stretch;
		padding-inline: 0;
	}

	.mpf-header__ctas {
		margin-left: auto;
	}

	.mpf-header__ctas .mpf-btn,
	.mpf-header__ctas a.mpf-btn {
		padding: 0.55rem 0.9rem;
		font-size: 0.8125rem;
	}

	.mpf-nav {
		justify-content: flex-start;
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	.mpf-nav__toggle {
		display: inline-flex;
	}

	.mpf-nav__list {
		display: none;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		padding: 0.35rem 0 0.15rem;
		gap: 0.15rem;
	}

	.mpf-nav.is-open .mpf-nav__list {
		display: flex;
	}

	.mpf-nav__link {
		padding: 0.65rem 0.75rem;
		width: 100%;
	}
}

/* Large desktop: stronger logo */
@media (min-width: 1100px) {
	.mpf-brand {
		max-width: 340px;
	}

	.mpf-brand__img,
	.mpf-brand img {
		max-height: 108px;
	}

	.mpf-nav__link {
		padding: 0.5rem 0.85rem;
	}
}

@media (max-width: 480px) {
	.mpf-header__ctas {
		width: 100%;
		margin-left: 0;
	}

	.mpf-header__ctas .mpf-btn,
	.mpf-header__ctas a.mpf-btn {
		flex: 1 1 auto;
		text-align: center;
	}
}

/* -------------------------------------------------------------------------
   Sections (shared)
   ------------------------------------------------------------------------- */
.mpf-section {
	padding-block: var(--mpf-section-y);
	padding-inline: var(--mpf-gutter);
}

.mpf-section--muted {
	background: var(--mpf-muted);
}

.mpf-section--dark {
	background: var(--mpf-industrial);
	color: var(--mpf-white);
}

.mpf-section__lead {
	max-width: 36rem;
	margin-inline: auto;
	color: #444;
}

.mpf-lead {
	font-size: var(--wp--preset--font-size--large, 1.25rem);
	max-width: 40rem;
	color: #333;
}

/* -------------------------------------------------------------------------
   Home — Hero (balanced two-column on desktop)
   ------------------------------------------------------------------------- */
.mpf-hero {
	position: relative;
	background:
		radial-gradient(ellipse 55% 70% at 78% 45%, rgba(0, 163, 224, 0.22) 0%, transparent 60%),
		linear-gradient(125deg, #0a0a0a 0%, #111111 42%, #0a2430 100%);
	color: var(--mpf-white);
	padding-block: clamp(2.5rem, 5.5vw, 4.25rem);
	padding-inline: var(--mpf-gutter);
	border-bottom: 4px solid var(--mpf-blue);
	overflow: hidden;
}

.mpf-hero__shell {
	max-width: min(1240px, 100%);
	margin-inline: auto;
}

/* Force side-by-side on desktop even if WP stacks columns */
.mpf-hero__grid.wp-block-columns {
	margin: 0 !important;
	align-items: center !important;
	gap: clamp(1.5rem, 3.5vw, 2.75rem) !important;
	display: flex !important;
	flex-wrap: nowrap !important;
}

.mpf-hero__copy {
	min-width: 0;
	flex: 1 1 48% !important;
}

.mpf-hero__media-col {
	min-width: 0;
	flex: 1 1 52% !important;
}

/* Location pill */
.mpf-hero__eyebrow {
	display: inline-flex !important;
	align-items: center;
	gap: 0.55rem;
	width: fit-content;
	max-width: 100%;
	margin: 0 0 1.25rem !important;
	padding: 0.42rem 1rem 0.42rem 0.75rem;
	background: rgba(0, 163, 224, 0.1);
	border: 1px solid rgba(0, 163, 224, 0.55);
	border-radius: 999px;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	font-size: 0.72rem !important;
	font-weight: 700;
	line-height: 1.35;
	color: #e8f7fc !important;
}

.mpf-hero__eyebrow::before {
	content: "";
	display: inline-block;
	width: 0.42rem;
	height: 0.42rem;
	border-radius: 50%;
	background: var(--mpf-blue);
	box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.28);
	flex-shrink: 0;
}

.mpf-hero__title,
.mpf-hero h1 {
	color: var(--mpf-white) !important;
	margin-top: 0 !important;
	margin-bottom: 1.1rem !important;
	line-height: 1.1 !important;
	font-size: clamp(1.9rem, 2.2vw + 1rem, 2.85rem) !important;
	font-weight: 700;
	max-width: 15ch;
	letter-spacing: -0.025em;
}

.mpf-hero__text {
	color: rgba(255, 255, 255, 0.88) !important;
	max-width: 34rem;
	margin: 0 0 1.85rem !important;
	font-size: clamp(1.02rem, 0.35vw + 0.92rem, 1.15rem) !important;
	line-height: 1.65 !important;
}

.mpf-hero .mpf-cta-row,
.mpf-hero .mpf-header__ctas {
	margin-top: 0.1rem;
	gap: 0.85rem;
}

.mpf-hero .mpf-btn {
	padding: 0.9rem 1.5rem;
	font-size: 0.95rem;
	min-height: 3rem;
}

.mpf-hero .mpf-btn--call {
	background: var(--mpf-white);
	color: var(--mpf-black) !important;
	border-color: var(--mpf-white);
}

.mpf-hero .mpf-btn--call:hover {
	background: transparent;
	color: var(--mpf-white) !important;
	border-color: var(--mpf-white);
}

.mpf-hero .mpf-btn--quote {
	background: var(--mpf-blue);
	border-color: var(--mpf-blue);
}

.mpf-hero .mpf-btn--quote:hover {
	background: var(--mpf-blue-dark);
	border-color: var(--mpf-blue-dark);
}

.mpf-hero__media-col > .wp-block-shortcode {
	display: block;
	width: 100%;
	height: 100%;
}

.mpf-hero__media {
	position: relative;
	margin: 0;
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow:
		0 28px 56px rgba(0, 0, 0, 0.5),
		0 0 0 1px rgba(0, 163, 224, 0.18);
	background: #1a1a1a;
	aspect-ratio: 4 / 3;
	min-height: 280px;
}

.mpf-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.mpf-hero__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 2rem 1.1rem 0.95rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--mpf-white) !important;
	background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0) 100%);
}

/* Mobile / small tablet: stack */
@media (max-width: 781px) {
	.mpf-hero {
		padding-block: clamp(2.15rem, 7vw, 3rem);
	}

	.mpf-hero__grid.wp-block-columns {
		flex-wrap: wrap !important;
		flex-direction: column !important;
		gap: 1.6rem !important;
	}

	.mpf-hero__copy,
	.mpf-hero__media-col {
		flex: 1 1 100% !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	.mpf-hero__title,
	.mpf-hero h1 {
		max-width: none;
		font-size: clamp(1.7rem, 6.5vw, 2.2rem) !important;
	}

	.mpf-hero__media {
		aspect-ratio: 16 / 10;
		min-height: 0;
	}

	.mpf-hero .mpf-cta-row,
	.mpf-hero .mpf-header__ctas {
		width: 100%;
	}

	.mpf-hero .mpf-btn {
		flex: 1 1 auto;
	}
}

@media (min-width: 960px) {
	.mpf-hero__media {
		aspect-ratio: 5 / 4;
		min-height: 340px;
	}
}

@media (min-width: 1200px) {
	.mpf-hero {
		padding-block: 4.5rem;
	}

	.mpf-hero__media {
		min-height: 400px;
	}

	.mpf-hero__title,
	.mpf-hero h1 {
		max-width: 14ch;
	}
}

/* -------------------------------------------------------------------------
   Home — Intro / trust
   ------------------------------------------------------------------------- */
.mpf-intro h2 {
	margin-bottom: 1rem;
}

.mpf-intro__text {
	max-width: 40rem;
	margin-inline: auto;
	font-size: 1.0625rem;
	line-height: 1.7;
	color: #333;
}

/* -------------------------------------------------------------------------
   Home — Service cards
   ------------------------------------------------------------------------- */
.mpf-service-cards {
	align-items: stretch;
}

.mpf-card {
	height: 100%;
	background: var(--mpf-white);
	border: 1px solid rgba(10, 10, 10, 0.08);
	border-top: 3px solid var(--mpf-blue);
	border-radius: var(--mpf-radius);
	padding: 1.5rem 1.35rem 1.6rem;
	box-shadow: 0 8px 24px rgba(10, 10, 10, 0.04);
}

.mpf-card h3 {
	margin-top: 0.25rem;
	margin-bottom: 0.65rem;
}

.mpf-card p {
	margin-bottom: 0;
	color: #444;
}

.mpf-card__label {
	margin: 0 0 0.35rem;
	color: var(--mpf-blue) !important;
	font-weight: 700;
	letter-spacing: 0.06em;
}

@media (max-width: 781px) {
	.mpf-service-cards {
		display: flex;
		flex-direction: column;
	}
}

/* -------------------------------------------------------------------------
   Home — Work teaser
   ------------------------------------------------------------------------- */
.mpf-work .mpf-gallery-grid {
	margin-top: 2rem;
}

.mpf-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 1rem;
}

.mpf-gallery-grid--teaser {
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 781px) {
	.mpf-gallery-grid--teaser {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 782px) and (max-width: 1000px) {
	.mpf-gallery-grid--teaser {
		grid-template-columns: repeat(3, 1fr);
	}
}

.mpf-gallery-grid img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--mpf-radius);
	object-fit: cover;
	aspect-ratio: 4 / 3;
	background: var(--mpf-muted);
}

.mpf-gallery-grid__item {
	margin: 0;
	overflow: hidden;
	border-radius: var(--mpf-radius);
	background: var(--mpf-muted);
}

/* -------------------------------------------------------------------------
   Home — Final CTA band
   ------------------------------------------------------------------------- */
.mpf-cta-band {
	background: var(--mpf-black);
	color: var(--mpf-white);
	text-align: center;
}

.mpf-cta-band h2,
.mpf-cta-band p {
	color: var(--mpf-white) !important;
}

.mpf-cta-band p {
	max-width: 36rem;
	margin-inline: auto;
	opacity: 0.92;
}

.mpf-final-cta {
	margin-top: 1.5rem;
}

.mpf-final-cta__phone {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	font-weight: 700;
}

.mpf-final-cta__phone a {
	color: var(--mpf-blue) !important;
	text-decoration: none;
}

.mpf-final-cta__phone a:hover {
	color: var(--mpf-white) !important;
	text-decoration: underline;
}

.mpf-cta-band .mpf-btn--call {
	background: var(--mpf-white);
	color: var(--mpf-black) !important;
	border-color: var(--mpf-white);
}

.mpf-cta-band .mpf-btn--call:hover {
	background: transparent;
	color: var(--mpf-white) !important;
	border-color: var(--mpf-white);
}

/* -------------------------------------------------------------------------
   Legacy page hero (inner pages)
   ------------------------------------------------------------------------- */
.mpf-page-hero {
	background: var(--mpf-muted);
	padding-block: clamp(2.5rem, 6vw, 4rem);
	padding-inline: var(--mpf-gutter);
}

.mpf-page-hero__inner,
.mpf-section__inner {
	max-width: var(--mpf-max);
	margin-inline: auto;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.mpf-footer {
	background: var(--mpf-black);
	color: var(--mpf-white);
	padding-block: 2.5rem;
}

.mpf-footer a {
	color: var(--mpf-blue);
}

.mpf-footer a:hover {
	color: var(--mpf-white);
}

.mpf-footer__inner {
	max-width: var(--mpf-max);
	margin-inline: auto;
	padding-inline: var(--mpf-gutter);
}

.mpf-footer .mpf-btn--call {
	background: var(--mpf-white);
	color: var(--mpf-black) !important;
	border-color: var(--mpf-white);
}

.mpf-footer .mpf-btn--quote {
	background: var(--mpf-blue);
}
