/*
 * MP Profile – component CSS.
 * Colour, type and spacing tokens come from theme.json. Section tones mirror the
 * Figma collections theme-light / theme-muted / theme-dark: they re-declare the
 * palette presets for everything inside the section.
 */

:root {
	--mp-gutter: 24px;
	--mp-section-y: 64px;
	--mp-block-gap: 32px;
	--mp-card-gap: 24px;
}

@media (min-width: 768px) {
	:root {
		--mp-gutter: 48px;
		--mp-section-y: 96px;
		--mp-block-gap: 48px;
		--mp-card-gap: 32px;
	}
}

@media (min-width: 1100px) {
	:root {
		--mp-gutter: 120px;
	}
}

/* ---------- Tones ---------- */

.mp-tone-light,
.mp-tone-muted,
.mp-tone-dark {
	background-color: var(--wp--preset--color--page);
	color: var(--wp--preset--color--text);
}

.mp-tone-muted {
	--wp--preset--color--page: #f4f1ea;
	--wp--preset--color--surface: #fbfaf7;
	--wp--preset--color--subtle: #eae5d9;
	--wp--preset--color--text: #121e24;
	--wp--preset--color--muted: #2a3e48;
	--wp--preset--color--accent: #9a3412;
	--wp--preset--color--border: #d8d1c0;
	--wp--preset--color--border-strong: #5f7480;
	--wp--preset--color--action: #121e24;
	--wp--preset--color--action-text: #fbfaf7;
	--wp--preset--color--action-hover: #2a3e48;
	--wp--preset--color--focus: #c2410c;
	--wp--preset--color--accent-fill: #c2410c;
}

.mp-tone-dark {
	--wp--preset--color--page: #0b1418;
	--wp--preset--color--surface: #121e24;
	--wp--preset--color--subtle: #1b2b33;
	--wp--preset--color--text: #fbfaf7;
	--wp--preset--color--muted: #aebbc2;
	--wp--preset--color--accent: #f5a37d;
	--wp--preset--color--border: #2a3e48;
	--wp--preset--color--border-strong: #8497a1;
	--wp--preset--color--action: #fbfaf7;
	--wp--preset--color--action-text: #0b1418;
	--wp--preset--color--action-hover: #eae5d9;
	--wp--preset--color--focus: #ee7e4c;
	--wp--preset--color--accent-fill: #dd5a22;
}

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

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--focus);
	outline-offset: 2px;
}

.wp-site-blocks > * + *,
.mp-main > * + * {
	margin-block-start: 0;
}

/* ---------- Sections ---------- */

.mp-section {
	padding: var(--mp-section-y) var(--mp-gutter);
}

.mp-section > * {
	margin-block: 0;
}

.mp-section > * + * {
	margin-block-start: var(--mp-block-gap);
}

.mp-hero {
	--mp-section-y: 48px;
}

@media (min-width: 768px) {
	.mp-hero {
		--mp-section-y: 80px;
	}
}

.mp-sec-head {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mp-sec-head > * {
	margin: 0;
}

.mp-sec-head .mp-lead {
	max-width: 760px;
}

/* ---------- Typography helpers ---------- */

.mp-eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--eyebrow);
	font-weight: 500;
	line-height: 16px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.mp-lead {
	margin: 0;
	font-size: var(--wp--preset--font-size--base);
	line-height: 28px;
	color: var(--wp--preset--color--muted);
}

.mp-small {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 22px;
	color: var(--wp--preset--color--muted);
}

/* ---------- Header and footer ---------- */

.mp-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 16px var(--mp-gutter);
	background-color: var(--wp--preset--color--page);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

@media (min-width: 768px) {
	.mp-header {
		padding-block: 24px;
	}
}

.mp-header__right {
	display: flex;
	align-items: center;
	gap: 32px;
}

.mp-header-nav {
	display: none;
}

@media (min-width: 768px) {
	.mp-header-nav {
		display: block;
	}
}

@media (min-width: 768px) {
	.mp-header-nav ul,
	.mp-header-nav .wp-block-navigation__container {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		gap: 32px;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.mp-header-nav li {
		margin: 0;
		padding: 0;
		list-style: none;
	}
}

@media (max-width: 767px) {
	nav.mp-header-nav,
	.mp-header-nav ul {
		display: none;
	}
}

.mp-header-nav a {
	text-decoration: none;
	color: var(--wp--preset--color--text);
}

.mp-header-nav a:hover {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

.mp-wordmark {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mp-wordmark > * {
	margin: 0;
}

.mp-mark {
	position: relative;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--serif);
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--text);
}

.mp-mark::after {
	content: "";
	position: absolute;
	top: -1px;
	right: -1px;
	width: 8px;
	height: 8px;
	background: var(--wp--preset--color--accent-fill);
}

.mp-wordmark__name {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--heading-4);
	font-weight: 500;
	line-height: 30px;
}

.mp-wordmark__name a {
	text-decoration: none;
	color: var(--wp--preset--color--text);
}

.mp-footer {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	padding: 32px var(--mp-gutter);
	border-top: 1px solid var(--wp--preset--color--border);
}

@media (min-width: 900px) {
	.mp-footer {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.mp-footer > * {
	margin: 0;
}

.mp-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	font-size: var(--wp--preset--font-size--small);
	line-height: 22px;
	color: var(--wp--preset--color--muted);
}

.mp-footer__links > * {
	margin: 0;
}

.mp-footer__links a {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.mp-footer__links a:hover {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

/* ---------- Hero ---------- */

.mp-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--mp-block-gap);
	align-items: start;
}

@media (min-width: 1024px) {
	.mp-hero__grid:has(.mp-portrait) {
		grid-template-columns: minmax(0, 1fr) 440px;
		gap: 64px;
	}
}

.mp-hero__grid > *,
.mp-hero__text > * {
	margin-block: 0;
}

.mp-hero__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
}

.mp-hero__text h1 {
	max-width: 14em;
}

.mp-hero__text .mp-lead {
	max-width: 640px;
}

.mp-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--full);
	background: var(--wp--preset--color--surface);
	font-size: var(--wp--preset--font-size--small);
	line-height: 22px;
	color: var(--wp--preset--color--text);
}

.mp-badge::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-fill);
}

.mp-trust {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-top: 16px;
	border-top: 1px solid var(--wp--preset--color--border);
}

.mp-trust > * {
	margin: 0;
}

.mp-portrait {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	aspect-ratio: 4 / 5;
	width: 100%;
	padding: 24px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--subtle);
	text-align: center;
}

.mp-portrait > * {
	margin: 0;
}

.mp-portrait img,
.wp-block-image.mp-portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--md);
}

/* ---------- Grids ---------- */

.mp-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--mp-card-gap);
}

.mp-grid > * {
	margin: 0;
}

@media (min-width: 900px) {
	.mp-grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.mp-grid--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.mp-grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 600px) and (max-width: 899px) {
	.mp-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.mp-cols {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--mp-block-gap);
}

.mp-cols > * {
	margin: 0;
}

@media (min-width: 900px) {
	.mp-cols--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 48px;
	}
}

/* ---------- Stats ---------- */

.mp-stat > * {
	margin: 0;
}

.mp-stat {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mp-stat::before {
	content: "";
	display: block;
	width: 32px;
	height: 2px;
	background: var(--wp--preset--color--accent-fill);
}

.mp-stat__value {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--heading-2);
	line-height: 1.09;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--text);
}

/* ---------- Cards ---------- */

.mp-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 32px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface);
}

.mp-card > * {
	margin: 0;
}

.mp-card__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--heading-4);
	font-weight: 500;
	line-height: 1.25;
}

.mp-card__rule {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--wp--preset--color--border);
}

.mp-card__rule > * {
	margin: 0;
}

.mp-card__result {
	font-size: var(--wp--preset--font-size--heading-6);
	font-weight: 600;
	line-height: 22px;
	color: var(--wp--preset--color--text);
}

.mp-card__status {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: var(--wp--preset--font-size--small);
	line-height: 22px;
	color: var(--wp--preset--color--muted);
}

.mp-card__status::before {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-fill);
}

.mp-card__link {
	font-size: var(--wp--preset--font-size--heading-6);
	font-weight: 600;
	line-height: 22px;
	color: var(--wp--preset--color--accent);
}

.mp-card__link a {
	color: inherit;
	text-decoration: none;
}

.mp-card__link a:hover {
	text-decoration: underline;
}

.mp-card__label {
	margin: 0;
	font-size: var(--wp--preset--font-size--heading-6);
	font-weight: 600;
	line-height: 22px;
	color: var(--wp--preset--color--text);
}

.mp-talk {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mp-talk > * {
	margin: 0;
}

/* ---------- Stations (experience, more projects) ---------- */

.mp-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mp-list > * {
	margin: 0;
}

.mp-station {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.mp-station > * {
	margin: 0;
}

.mp-station__company {
	font-size: var(--wp--preset--font-size--heading-6);
	font-weight: 600;
	line-height: 22px;
	color: var(--wp--preset--color--text);
}

.mp-subhead {
	margin: 0;
	margin-block-start: 56px;
	margin-block-end: 16px;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--heading-4);
	font-weight: 500;
	line-height: 30px;
}

.mp-stations-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 48px;
}

.mp-stations-split > * {
	margin: 0;
}

@media (min-width: 900px) {
	.mp-stations-split {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

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

.mp-contact__buttons {
	gap: 16px;
}

.mp-contact__buttons.wp-block-buttons {
	flex-direction: column;
	align-items: stretch;
}

.mp-contact__buttons .wp-block-button__link {
	text-align: center;
}

@media (min-width: 600px) {
	.mp-contact__buttons.wp-block-buttons {
		flex-direction: row;
		align-items: center;
	}
}

/* ---------- Prose pages (imprint, privacy, posts) ---------- */

.mp-prose {
	padding: 64px var(--mp-gutter);
}

.mp-prose > * {
	max-width: 760px;
	margin-inline: auto;
}

.mp-prose > * + * {
	margin-block-start: 1.25em;
}

.mp-prose h2,
.mp-prose h3 {
	margin-block-start: 2em;
}

.mp-prose h2 {
	font-size: var(--wp--preset--font-size--heading-3);
}

.mp-prose h3 {
	font-size: var(--wp--preset--font-size--heading-4);
	font-weight: 500;
}

.mp-prose .wp-block-post-content > * + * {
	margin-block-start: 1.25em;
}

.mp-prose .wp-block-post-content h2,
.mp-prose .wp-block-post-content h3 {
	margin-block-start: 2em;
}

.mp-prose .wp-block-post-content h2 {
	font-size: var(--wp--preset--font-size--heading-3);
}

.mp-prose .wp-block-post-content h3 {
	font-size: var(--wp--preset--font-size--heading-4);
	font-weight: 500;
}

.mp-prose .wp-block-post-content {
	max-width: 760px;
}

.mp-prose .wp-block-post-title {
	font-size: var(--wp--preset--font-size--heading-1);
}

.mp-post-list > * + * {
	margin-block-start: 32px;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
		animation: none !important;
	}
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 96px;
}

.mp-col {
	display: flex;
	flex-direction: column;
}

.mp-col > * {
	margin: 0;
}

.mp-wordmark__name {
	white-space: nowrap;
}

.mp-portrait {
	box-sizing: border-box;
}

/* Header button must never wrap */
.mp-header .wp-block-button__link {
	white-space: nowrap;
}

@media (max-width: 767px) {
	.mp-header .wp-block-button__link {
		padding: 10px 16px;
	}
}

/* Portrait photo */
.wp-block-image.mp-portrait {
	display: block;
	padding: 0;
	overflow: hidden;
	max-width: 360px;
	margin: 0;
	background: var(--wp--preset--color--subtle);
}

@media (min-width: 1024px) {
	.wp-block-image.mp-portrait {
		max-width: none;
	}
}
