/*
 * Mamer Global Foundation v1
 * Source of truth: Mamer Design System v1.0.1 — FINAL / FROZEN
 */

:root {
	--mamer-page: #FAF8F4;
	--mamer-surface: #FFFFFF;
	--mamer-surface-secondary: #F4F1EC;
	--mamer-text: #21333B;
	--mamer-text-secondary: #5F6B73;
	--mamer-text-muted: #69747C;
	--mamer-border: #E5E0D8;
	--mamer-border-strong: #C9C2B8;
	--mamer-primary: #2E6A61;
	--mamer-primary-hover: #25584F;
	--mamer-sage: #8EA99B;
	--mamer-sage-subtle: #E6EFEB;
	--mamer-dusty-blue: #7FA0B8;
	--mamer-warm-clay: #C9856A;
	--mamer-sand: #E8D8C3;
	--mamer-success: #2D7D63;
	--mamer-warning: #8A5416;
	--mamer-critical: #B23A3A;
	--mamer-information: #2F6FB2;
	--mamer-link: #256A78;
	--mamer-focus: #4D91D9;

	--mamer-font-display: "Literata", Georgia, "Times New Roman", serif;
	--mamer-font-ui: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	--mamer-container: 1200px;
	--mamer-reading: 720px;
	--mamer-wide-article: 960px;
	--mamer-mobile-pad: 16px;

	--mamer-radius-s: 6px;
	--mamer-radius-m: 10px;
	--mamer-radius-l: 16px;
	--mamer-radius-xl: 24px;
	--mamer-shadow-subtle: 0 8px 24px rgba(31, 41, 51, 0.06);

	--mamer-transition-fast: 120ms cubic-bezier(0.2, 0, 0, 1);
	--mamer-transition: 180ms cubic-bezier(0.2, 0, 0, 1);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-width: 320px;
	background: var(--mamer-page);
	color: var(--mamer-text);
	font-family: var(--mamer-font-ui);
	font-size: 16px;
	line-height: 1.625;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body.menu-open {
	overflow: hidden;
}

img,
picture,
svg,
video {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

button,
input,
textarea,
select {
	font: inherit;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

a {
	color: var(--mamer-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--mamer-primary-hover);
}

:focus-visible {
	outline: 2px solid var(--mamer-focus);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	color: var(--mamer-text);
	font-family: var(--mamer-font-display);
	font-weight: 600;
	text-wrap: balance;
}

h1 {
	font-size: 48px;
	line-height: 56px;
	letter-spacing: -0.02em;
}

h2 {
	font-size: 36px;
	line-height: 44px;
	letter-spacing: -0.015em;
}

h3 {
	font-size: 28px;
	line-height: 36px;
	letter-spacing: -0.01em;
}

h4 {
	font-size: 22px;
	line-height: 30px;
}

p,
ul,
ol,
blockquote,
figure {
	margin-top: 0;
}

p:last-child,
ul:last-child,
ol:last-child {
	margin-bottom: 0;
}

.mamer-container {
	width: min(calc(100% - 32px), var(--mamer-container));
	margin-inline: auto;
}

.mamer-reading {
	width: min(calc(100% - 32px), var(--mamer-reading));
	margin-inline: auto;
}

.mamer-wide-article {
	width: min(calc(100% - 32px), var(--mamer-wide-article));
	margin-inline: auto;
}

.site {
	min-height: 100vh;
	min-height: 100dvh;
	overflow-x: clip;
}

.site-main {
	min-height: 55vh;
}

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

.screen-reader-text:focus,
.skip-link:focus {
	position: fixed !important;
	top: 12px;
	left: 12px;
	z-index: 9999;
	width: auto;
	height: auto;
	margin: 0;
	padding: 10px 14px;
	clip: auto;
	background: var(--mamer-surface);
	border: 1px solid var(--mamer-border-strong);
	border-radius: var(--mamer-radius-m);
	color: var(--mamer-text);
}

/* Header */
.site-header {
	position: relative;
	z-index: 100;
	background: rgba(250, 248, 244, 0.96);
	border-bottom: 1px solid var(--mamer-border);
}

.site-header__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) minmax(220px, 300px);
	align-items: center;
	gap: 28px;
	min-height: 72px;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	min-width: max-content;
	color: var(--mamer-text);
	text-decoration: none;
}

.site-brand:hover {
	color: var(--mamer-text);
}

.site-brand__wordmark,
.site-footer__wordmark {
	font-family: var(--mamer-font-display);
	font-size: 30px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.035em;
}

.site-brand--custom .custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.site-brand--custom .custom-logo {
	width: auto;
	max-height: 36px;
}

.site-navigation__list,
.site-navigation .menu {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-navigation a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--mamer-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-decoration: none;
	transition: color var(--mamer-transition-fast);
}

.site-navigation__planned {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: #7a878c;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	cursor: default;
}

.site-navigation .mamer-menu-link--planned,
.site-footer .mamer-menu-link--planned {
	color: var(--mamer-text-muted);
	cursor: default;
	pointer-events: none;
}

.site-navigation .mamer-menu-link--planned:hover,
.site-footer .mamer-menu-link--planned:hover {
	color: var(--mamer-text-muted);
}

.site-navigation a:hover,
.site-navigation .current-menu-item > a,
.site-navigation .current_page_item > a {
	color: var(--mamer-primary);
}

.site-search {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.site-search__icon {
	position: absolute;
	left: 14px;
	color: var(--mamer-text-secondary);
	pointer-events: none;
}

.site-search__input {
	width: 100%;
	min-height: 44px;
	padding: 10px 14px 10px 42px;
	border: 1px solid var(--mamer-border);
	border-radius: 12px;
	background: var(--mamer-surface);
	color: var(--mamer-text);
	font-size: 14px;
	line-height: 20px;
	transition: border-color var(--mamer-transition-fast), box-shadow var(--mamer-transition-fast);
}

.site-search__input::placeholder {
	color: var(--mamer-text-muted);
}

.site-search__input:focus {
	border-color: var(--mamer-focus);
	outline: 0;
	box-shadow: 0 0 0 2px rgba(77, 145, 217, 0.16);
}

.site-header__menu-toggle,
.site-header__search-mobile {
	display: none;
}

/* Generic content */
.site-main > article,
.site-main > .page,
.site-main > .post {
	width: min(calc(100% - 32px), var(--mamer-reading));
	margin: 64px auto 96px;
}

.site-main > article > * + *,
.site-main > .page > * + *,
.site-main > .post > * + * {
	margin-top: 24px;
}

/* Buttons */
.mamer-button,
.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 11px 18px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--mamer-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-decoration: none;
	transition: background var(--mamer-transition), border-color var(--mamer-transition), color var(--mamer-transition);
}

.mamer-button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover {
	background: var(--mamer-primary-hover);
	color: #fff;
}

/* Foundation state blocks */
.mamer-info,
.mamer-warning,
.mamer-critical,
.mamer-reviewed {
	padding: 16px 18px;
	border: 1px solid var(--mamer-border);
	border-radius: 16px;
	background: var(--mamer-surface);
}

.mamer-info {
	background: #EEF5F8;
	border-color: #D8E7EE;
}

.mamer-warning {
	background: #FFF6EB;
	border-color: #F1D9B7;
}

.mamer-critical {
	background: #FFF0F0;
	border-color: #EBCACA;
}

.mamer-reviewed {
	background: var(--mamer-sage-subtle);
	border-color: #CFE1D9;
}

/* Footer */
.site-footer {
	margin-top: 80px;
	background: var(--mamer-surface);
	border-top: 1px solid var(--mamer-border);
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr;
	gap: 48px;
	padding-top: 56px;
	padding-bottom: 40px;
}

.site-footer__brand p {
	max-width: 360px;
	margin: 16px 0 0;
	color: var(--mamer-text-secondary);
	font-size: 14px;
	line-height: 22px;
}

.site-footer__wordmark {
	color: var(--mamer-text);
	text-decoration: none;
}

.site-footer__menu,
.site-footer__meta {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer a {
	color: var(--mamer-text-secondary);
	font-size: 14px;
	line-height: 22px;
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--mamer-primary);
}

.site-footer__planned {
	color: var(--mamer-text-muted);
	font-size: 14px;
	line-height: 22px;
	cursor: default;
}

.site-footer__bottom {
	padding-top: 20px;
	padding-bottom: 28px;
	border-top: 1px solid var(--mamer-border);
}

.site-footer__bottom p {
	margin: 0;
	color: var(--mamer-text-muted);
	font-size: 12px;
	line-height: 18px;
}

@media (max-width: 1023px) {
	.site-header__inner {
		grid-template-columns: auto 1fr minmax(180px, 240px);
		gap: 18px;
	}

	.site-navigation__list,
	.site-navigation .menu {
		gap: 14px;
	}

	.site-navigation a {
		font-size: 13px;
	}
}

@media (max-width: 767px) {
	h1 {
		font-size: 40px;
		line-height: 46px;
	}

	h2 {
		font-size: 30px;
		line-height: 36px;
	}

	h3 {
		font-size: 24px;
		line-height: 30px;
	}

	h4 {
		font-size: 20px;
		line-height: 28px;
	}

	.mamer-container,
	.mamer-reading,
	.mamer-wide-article,
	.site-main > article,
	.site-main > .page,
	.site-main > .post {
		width: calc(100% - 32px);
	}

	.site-header {
		position: sticky;
		top: 0;
	}

	.admin-bar .site-header {
		top: 46px;
	}

	.site-header__inner {
		position: relative;
		grid-template-columns: 44px 1fr 44px;
		gap: 8px;
		min-height: 64px;
	}

	.site-header__menu-toggle,
	.site-header__search-mobile {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background: transparent;
		color: var(--mamer-text);
		border-radius: 10px;
	}

	.site-header__menu-toggle {
		cursor: pointer;
	}

	.site-header__menu-icon,
	.site-header__menu-icon::before,
	.site-header__menu-icon::after {
		display: block;
		width: 18px;
		height: 1.75px;
		background: currentColor;
		border-radius: 999px;
		transition: transform var(--mamer-transition), opacity var(--mamer-transition);
	}

	.site-header__menu-icon {
		position: relative;
	}

	.site-header__menu-icon::before,
	.site-header__menu-icon::after {
		position: absolute;
		left: 0;
		content: "";
	}

	.site-header__menu-icon::before {
		top: -6px;
	}

	.site-header__menu-icon::after {
		top: 6px;
	}

	.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon {
		background: transparent;
	}

	.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon::before {
		transform: translateY(6px) rotate(45deg);
	}

	.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon::after {
		transform: translateY(-6px) rotate(-45deg);
	}

	.site-brand {
		justify-self: center;
	}

	.site-brand__wordmark,
	.site-footer__wordmark {
		font-size: 28px;
	}

	.site-brand--custom .custom-logo-link {
		justify-content: center;
	}

	.site-brand--custom .custom-logo {
		max-height: 32px;
	}

	.site-search {
		display: none;
	}

	.site-navigation {
		position: fixed;
		top: 64px;
		left: 0;
		right: 0;
		bottom: 0;
		display: none;
		overflow-y: auto;
		padding: 20px 16px 40px;
		background: var(--mamer-page);
		border-top: 1px solid var(--mamer-border);
	}

	.admin-bar .site-navigation {
		top: 110px;
	}

	.site-navigation.is-open {
		display: block;
	}

	.site-navigation__list,
	.site-navigation .menu {
		display: grid;
		gap: 0;
	}

	.site-navigation li {
		border-bottom: 1px solid var(--mamer-border);
	}

	.site-navigation a,
	.site-navigation__planned {
		width: 100%;
		min-height: 52px;
		font-size: 16px;
		line-height: 24px;
	}

	.site-main > article,
	.site-main > .page,
	.site-main > .post {
		margin-top: 48px;
		margin-bottom: 64px;
	}

	.site-footer {
		margin-top: 64px;
	}

	.site-footer__inner {
		grid-template-columns: 1fr;
		gap: 28px;
		padding-top: 40px;
		padding-bottom: 32px;
	}
}

@media (min-width: 768px) {
	.site-navigation {
		display: block !important;
	}
}

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