/*
 * ManditPress - modern full-bleed editorial layout.
 *
 * The goal: content runs edge to edge on large screens, typography stays
 * readable in the measure, cards feel like a news product, and the masthead
 * behaves like a real site header (sticky, with a category rail).
 */

:root {
	--mp-max: 1320px;
	--mp-gutter: clamp(16px, 3vw, 40px);
	--mp-accent: #c8102e;
	--mp-accent-dark: #8f0b20;
	--mp-ink: #0d1117;
	--mp-muted: #5b6572;
	--mp-line: #e3e6ea;
	--mp-surface: #f5f6f8;
	--mp-radius: 8px;
	--mp-shadow: 0 1px 2px rgba(13, 17, 23, .06), 0 8px 24px rgba(13, 17, 23, .07);
	--mp-shadow-hover: 0 2px 4px rgba(13, 17, 23, .08), 0 16px 40px rgba(13, 17, 23, .12);
}

/* Border-box everywhere: the shell is width:100% plus a gutter, so
 * content-box sizing would push the page wider than the viewport. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	overflow-x: hidden;
}

body {
	overflow-x: hidden;
}

/* ---------------------------------------------------------------- shell */

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

/* Break the theme's own narrow containers out to the full viewport. */
body > * {
	max-width: none;
}

.mp-shell {
	width: 100%;
	max-width: var(--mp-max);
	margin-inline: auto;
	padding-inline: var(--mp-gutter);
}

.mp-shell--wide {
	max-width: 1600px;
}

.mp-section {
	padding-block: clamp(28px, 4vw, 56px);
}

.mp-section + .mp-section {
	border-top: 1px solid var(--mp-line);
}

/* ------------------------------------------------------------- masthead */

.mp-topbar {
	background: var(--mp-ink);
	color: #fff;
	font-size: 12px;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.mp-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 34px;
	font-weight: 600;
}

.mp-topbar a {
	color: rgba(255, 255, 255, .78);
	text-decoration: none;
}

.mp-topbar a:hover {
	color: #fff;
}

.mp-topbar__tag {
	color: rgba(255, 255, 255, .55);
}

.mp-masthead {
	background: #fff;
	border-bottom: 1px solid var(--mp-line);
}

.mp-masthead__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding-block: clamp(20px, 3vw, 34px);
	text-align: center;
}

.mp-masthead .wp-block-site-title {
	margin: 0;
}

.mp-masthead .wp-block-site-title a {
	color: var(--mp-ink);
	text-decoration: none;
}

.mp-masthead .wp-block-site-tagline {
	margin: 0;
}

/* Sticky category rail. */
.mp-rail {
	position: sticky;
	top: 0;
	z-index: 90;
	background: rgba(255, 255, 255, .94);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--mp-line);
}

.mp-rail__inner {
	display: flex;
	align-items: center;
	gap: clamp(14px, 2vw, 26px);
	min-height: 52px;
	overflow-x: auto;
	scrollbar-width: none;
}

.mp-rail__inner::-webkit-scrollbar {
	display: none;
}

.mp-rail__brand {
	font-weight: 800;
	letter-spacing: -.01em;
	font-size: 15px;
	color: var(--mp-ink);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.mp-rail__nav {
	display: flex;
	align-items: center;
	gap: clamp(12px, 1.8vw, 22px);
	list-style: none;
	margin: 0;
	padding: 0;
	white-space: nowrap;
}

.mp-rail__nav a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--mp-ink);
	text-decoration: none;
	padding-block: 6px;
	border-bottom: 2px solid transparent;
}

.mp-rail__nav a:hover,
.mp-rail__nav .current-menu-item > a {
	color: var(--mp-accent);
	border-bottom-color: var(--mp-accent);
}

/* ------------------------------------------------------------ hero lead */

.mp-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: clamp(20px, 2.6vw, 40px);
	align-items: start;
}

@media (max-width: 900px) {
	.mp-hero {
		grid-template-columns: 1fr;
	}
}

.mp-hero__media {
	display: block;
	overflow: hidden;
	border-radius: var(--mp-radius);
	background: var(--mp-surface);
	box-shadow: var(--mp-shadow);
}

.mp-hero__media img {
	width: 100%;
	height: 100%;
	max-height: 520px;
	object-fit: cover;
	display: block;
	transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.mp-hero__media:hover img {
	transform: scale(1.035);
}

.mp-hero__body {
	padding-top: 4px;
}

.mp-kicker {
	display: inline-block;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--mp-accent);
	margin-bottom: 10px;
}

.mp-hero__body h2 {
	margin: 0 0 10px;
	font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.75rem);
	line-height: 1.08;
	letter-spacing: -.025em;
	font-weight: 820;
}

.mp-hero__body h2 a {
	color: var(--mp-ink);
	text-decoration: none;
}

.mp-hero__body h2 a:hover {
	color: var(--mp-accent);
}

.mp-hero__excerpt {
	color: var(--mp-muted);
	font-size: 1.05rem;
	line-height: 1.55;
	margin: 0 0 14px;
}

.mp-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--mp-muted);
}

.mp-meta__dot::before {
	content: "·";
	margin-inline: 4px;
}

/* --------------------------------------------------------- card grids */

.mp-grid {
	display: grid;
	gap: clamp(18px, 2.2vw, 32px);
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.mp-grid--3 {
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.mp-card {
	background: #fff;
	border: 1px solid var(--mp-line);
	border-radius: var(--mp-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .28s ease, transform .28s ease, border-color .28s ease;
	height: 100%;
}

.mp-card:hover {
	box-shadow: var(--mp-shadow-hover);
	transform: translateY(-3px);
	border-color: transparent;
}

.mp-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--mp-surface);
	overflow: hidden;
}

.mp-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.mp-card:hover .mp-card__media img {
	transform: scale(1.05);
}

.mp-card__body {
	padding: 16px 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.mp-card__cat {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--mp-accent);
}

.mp-card__title {
	margin: 0;
	font-size: 1.14rem;
	line-height: 1.28;
	font-weight: 740;
	letter-spacing: -.01em;
}

.mp-card__title a {
	color: var(--mp-ink);
	text-decoration: none;
}

.mp-card__title a:hover {
	color: var(--mp-accent);
}

.mp-card__excerpt {
	margin: 0;
	font-size: .93rem;
	line-height: 1.55;
	color: var(--mp-muted);
}

.mp-card__meta {
	margin-top: auto;
	padding-top: 8px;
	font-size: 12px;
	color: var(--mp-muted);
}

/* --------------------------------------------------------- section head */

.mp-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: clamp(18px, 2.4vw, 30px);
	padding-bottom: 12px;
	border-bottom: 3px solid var(--mp-ink);
}

.mp-head h2 {
	margin: 0;
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
	font-weight: 820;
	letter-spacing: -.02em;
	text-transform: uppercase;
}

.mp-head__more {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--mp-accent);
	text-decoration: none;
	white-space: nowrap;
}

.mp-head__more:hover {
	text-decoration: underline;
}

/* ------------------------------------------------------- article pages */

.mp-article {
	max-width: 780px;
	margin-inline: auto;
	padding-block: clamp(24px, 3vw, 48px);
}

.mp-article__header {
	margin-bottom: 26px;
}

.mp-article__title {
	margin: 0 0 14px;
	font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem);
	line-height: 1.08;
	letter-spacing: -.025em;
	font-weight: 830;
}

.mp-article__lead {
	font-size: 1.18rem;
	line-height: 1.55;
	color: var(--mp-muted);
	margin: 0 0 18px;
}

.mp-article__figure {
	margin: 0 0 26px;
}

.mp-article__figure img {
	width: 100%;
	border-radius: var(--mp-radius);
	display: block;
}

.mp-article__figure figcaption {
	margin-top: 8px;
	font-size: 12px;
	color: var(--mp-muted);
}

.mp-article__body {
	font-size: 1.09rem;
	line-height: 1.72;
}

.mp-article__body p {
	margin: 0 0 1.15em;
}

.mp-article__body h2 {
	margin: 1.7em 0 .55em;
	font-size: clamp(1.3rem, 1.1rem + .9vw, 1.7rem);
	font-weight: 780;
	letter-spacing: -.015em;
}

.mp-article__body h3 {
	margin: 1.4em 0 .45em;
	font-weight: 730;
}

.mp-article__body a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mp-article__body ul,
.mp-article__body ol {
	margin: 0 0 1.15em;
	padding-left: 1.35em;
}

.mp-article__body li {
	margin-bottom: .45em;
}

.mp-article__body blockquote,
.mp-article__body .wp-block-quote {
	margin: 1.6em 0;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--mp-accent);
	font-size: 1.14rem;
	line-height: 1.6;
	color: var(--mp-muted);
}

.mp-article__body img {
	max-width: 100%;
	height: auto;
	border-radius: var(--mp-radius);
}

/* Related grid under an article. */
.mp-related {
	border-top: 1px solid var(--mp-line);
	margin-top: 40px;
	padding-top: 28px;
}

/* ------------------------------------------------------------- footer */

.mp-footer {
	background: var(--mp-ink);
	color: rgba(255, 255, 255, .72);
	margin-top: clamp(40px, 5vw, 80px);
	padding-block: clamp(30px, 4vw, 56px);
	font-size: 14px;
}

.mp-footer a {
	color: #fff;
	text-decoration: none;
}

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

.mp-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
	gap: 28px;
	align-items: start;
}

.mp-footer__title {
	color: #fff;
	font-size: 17px;
	font-weight: 820;
	letter-spacing: -.015em;
	margin: 0 0 8px;
}

.mp-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 7px;
}

.mp-footer__list a {
	color: rgba(255, 255, 255, .72);
	font-size: 13px;
}

.mp-footer__bottom {
	margin-top: 26px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, .14);
	font-size: 12px;
	color: rgba(255, 255, 255, .5);
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
}

/* --------------------------------------------------------- utilities */

.mp-skip {
	position: absolute;
	left: -9999px;
}

.mp-skip:focus {
	left: 12px;
	top: 12px;
	z-index: 999;
	background: var(--mp-ink);
	color: #fff;
	padding: 10px 16px;
	border-radius: 4px;
}

.mp-pagination {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 36px;
}

.mp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding-inline: 12px;
	border: 1px solid var(--mp-line);
	border-radius: 4px;
	text-decoration: none;
	color: var(--mp-ink);
	font-weight: 650;
	font-size: 14px;
}

.mp-pagination .page-numbers:hover,
.mp-pagination .page-numbers.current {
	background: var(--mp-accent);
	border-color: var(--mp-accent);
	color: #fff;
}

/* Hide the previous theme's chrome where it duplicates the new shell. */
.wp-site-blocks > header > .wp-block-group,
.wp-site-blocks > footer {
	display: none;
}
