/*
 * Our Brands page styles.
 *
 * Four sections:
 *  1. Visual hero (full-bleed image + dark gradient overlay + left copy)
 *  2. Four alternating brand highlights (image / content split, with
 *     background variants --light, --off-white, --dark and a --reverse
 *     modifier that swaps image and content via CSS grid order)
 *  3. Matrix Connection text divider
 *  4. Light closing CTA (NOT the heavy dark block on About / homepage)
 *
 * Mobile-first; 768 / 1024 breakpoints align with the rest of the theme.
 * Page-scoped — does NOT duplicate component CSS from other stylesheets.
 */

/* ============================================================
 * Section 1 — VISUAL HERO
 * ============================================================ */
.mhg-brands-hero {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: 420px;
	background-color: var(--mhg-color-charcoal);
	/* Full-bleed even when a parent layout has constraints. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

.mhg-brands-hero__image {
	display: contents;
}

.mhg-brands-hero__image img {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.mhg-brands-hero__image--placeholder {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 60%, #0f0f0f 100%);
}

.mhg-brands-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background-image: linear-gradient(
		to right,
		rgba(0, 0, 0, 0.7) 0%,
		rgba(0, 0, 0, 0.5) 35%,
		rgba(0, 0, 0, 0.15) 70%,
		rgba(0, 0, 0, 0) 100%
	);
	pointer-events: none;
}

.mhg-brands-hero__inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex: 1;
	width: 100%;
	max-width: var(--mhg-container-max);
	margin: 0 auto;
	padding: var(--mhg-space-xl) var(--mhg-space-sm);
	box-sizing: border-box;
	align-items: center;
}

.mhg-brands-hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	max-width: 550px;
}

.mhg-brands-hero__eyebrow {
	display: inline-block;
	margin: 0 0 var(--mhg-space-sm);
	font-family: var(--mhg-font-body);
	font-size: var(--mhg-font-size-eyebrow);
	font-weight: 600;
	color: var(--mhg-color-gold);
	text-transform: uppercase;
	letter-spacing: var(--mhg-letter-spacing-eyebrow);
}

.mhg-brands-hero__heading {
	margin: 0 0 var(--mhg-space-sm);
	font-family: var(--mhg-font-heading);
	font-size: 2.2rem;
	font-weight: 400;
	color: var(--mhg-color-white);
	line-height: 1.15;
}

.mhg-brands-hero__rule {
	display: block;
	width: 48px;
	height: 3px;
	margin: 0 0 var(--mhg-space-md);
	background-color: var(--mhg-color-gold);
}

.mhg-brands-hero__lede {
	margin: 0;
	font-family: var(--mhg-font-body);
	font-weight: 300;
	font-size: var(--mhg-font-size-body);
	line-height: var(--mhg-line-height-body);
	color: rgba(255, 255, 255, 0.85);
}

@media (min-width: 768px) {
	.mhg-brands-hero {
		min-height: 500px;
	}

	.mhg-brands-hero__inner {
		padding: var(--mhg-space-xl) var(--mhg-space-md);
	}

	.mhg-brands-hero__heading {
		font-size: 3rem;
	}
}

/* ============================================================
 * Section 2 — BRAND HIGHLIGHTS
 * Each brand sits in its own section with a background-variant modifier
 * and an optional --reverse modifier that swaps image and content via
 * CSS grid `order`. Mobile is single-column with image always on top.
 * ============================================================ */
.mhg-brand-highlight {
	display: block;
}

.mhg-brand-highlight--light {
	background-color: var(--mhg-color-white);
}

.mhg-brand-highlight--off-white {
	background-color: #f8f7f5;
}

.mhg-brand-highlight--dark {
	background-color: #111111;
}

.mhg-brand-highlight__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--mhg-space-lg);
	width: 100%;
	max-width: var(--mhg-container-max);
	margin: 0 auto;
	padding: var(--mhg-space-xl) var(--mhg-space-sm);
	align-items: center;
}

.mhg-brand-highlight__image {
	aspect-ratio: 4 / 3;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: var(--mhg-radius-lg);
}

.mhg-brand-highlight__image--placeholder {
	background-image: linear-gradient(135deg, #e8dfd0 0%, #d6c9b2 60%, #c5b59a 100%);
}

.mhg-brand-highlight__image--placeholder-dark {
	background-image: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 60%, #0f0f0f 100%);
}

.mhg-brand-highlight__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	max-width: 540px;
}

.mhg-brand-highlight__label {
	display: inline-block;
	margin: 0 0 var(--mhg-space-sm);
	font-family: var(--mhg-font-body);
	font-size: var(--mhg-font-size-eyebrow);
	font-weight: 600;
	color: var(--mhg-color-teal);
	text-transform: uppercase;
	letter-spacing: var(--mhg-letter-spacing-eyebrow);
}

.mhg-brand-highlight__heading {
	margin: 0 0 var(--mhg-space-sm);
	font-family: var(--mhg-font-heading);
	font-size: 1.85rem;
	color: var(--mhg-color-charcoal);
	line-height: 1.2;
}

.mhg-brand-highlight__rule {
	display: block;
	width: 40px;
	height: 3px;
	margin: 0 0 var(--mhg-space-md);
	background-color: var(--mhg-color-gold);
}

.mhg-brand-highlight__body {
	margin: 0 0 var(--mhg-space-md);
	font-family: var(--mhg-font-body);
	font-weight: 300;
	font-size: var(--mhg-font-size-body);
	line-height: var(--mhg-line-height-body);
	color: #555;
}

.mhg-brand-highlight__features {
	list-style: none;
	margin: 0 0 var(--mhg-space-md);
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--mhg-space-md);
	width: 100%;
}

.mhg-brand-highlight__feature {
	display: block;
}

.mhg-brand-highlight__feature-title {
	margin: 0 0 0.25rem;
	font-family: var(--mhg-font-body);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--mhg-color-charcoal);
}

.mhg-brand-highlight__feature-body {
	margin: 0;
	font-family: var(--mhg-font-body);
	font-weight: 300;
	font-size: 0.85rem;
	line-height: var(--mhg-line-height-body);
	color: #666;
}

.mhg-brand-highlight__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mhg-space-sm);
}

/* Dark variant — Kintara colour overrides */
.mhg-brand-highlight--dark .mhg-brand-highlight__label {
	color: var(--mhg-color-gold);
}

.mhg-brand-highlight--dark .mhg-brand-highlight__heading,
.mhg-brand-highlight--dark .mhg-brand-highlight__feature-title {
	color: var(--mhg-color-white);
}

.mhg-brand-highlight--dark .mhg-brand-highlight__body,
.mhg-brand-highlight--dark .mhg-brand-highlight__feature-body {
	color: rgba(255, 255, 255, 0.7);
}

.mhg-brand-highlight--dark .mhg-brand-highlight__ctas .mhg-btn--primary {
	background-color: var(--mhg-color-gold);
	color: #000;
	border-color: var(--mhg-color-gold);
}

.mhg-brand-highlight--dark .mhg-brand-highlight__ctas .mhg-btn--primary:hover,
.mhg-brand-highlight--dark .mhg-brand-highlight__ctas .mhg-btn--primary:focus {
	background-color: rgba(201, 168, 76, 0.85);
	border-color: rgba(201, 168, 76, 0.85);
	color: #000;
}

@media (min-width: 768px) {
	.mhg-brand-highlight__inner {
		grid-template-columns: 1fr 1fr;
		gap: var(--mhg-space-xl);
		padding: var(--mhg-space-xl) var(--mhg-space-md);
	}

	.mhg-brand-highlight__heading {
		font-size: 2.25rem;
	}

	.mhg-brand-highlight__features {
		grid-template-columns: 1fr 1fr;
		gap: var(--mhg-space-md) var(--mhg-space-lg);
	}

	/* --features--two locks at 2 columns; default --features grid is 2x2
	   when there are 4 children, 2x1 when there are 2. The modifier is
	   redundant but kept for explicit semantics on the two two-item brands. */
	.mhg-brand-highlight__features--two {
		grid-template-columns: 1fr 1fr;
	}

	/* Reverse layout: image to the right, content to the left.
	   HTML order stays image-first so mobile stacks image above text. */
	.mhg-brand-highlight--reverse .mhg-brand-highlight__image {
		order: 2;
	}

	.mhg-brand-highlight--reverse .mhg-brand-highlight__content {
		order: 1;
	}
}

/* ============================================================
 * Section 3 — THE MATRIX CONNECTION
 * Centred text block, off-white background.
 * ============================================================ */
.mhg-brands-divider {
	background-color: #f8f7f5;
	text-align: center;
}

.mhg-brands-divider__inner {
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	padding: var(--mhg-space-xl) var(--mhg-space-sm);
}

.mhg-brands-divider__label {
	display: inline-block;
	margin: 0 0 var(--mhg-space-sm);
	font-family: var(--mhg-font-body);
	font-size: var(--mhg-font-size-eyebrow);
	font-weight: 600;
	color: var(--mhg-color-teal);
	text-transform: uppercase;
	letter-spacing: var(--mhg-letter-spacing-eyebrow);
}

.mhg-brands-divider__heading {
	margin: 0 0 var(--mhg-space-md);
	font-family: var(--mhg-font-heading);
	font-size: 1.85rem;
	color: var(--mhg-color-charcoal);
	line-height: 1.2;
}

.mhg-brands-divider__body {
	margin: 0;
	font-family: var(--mhg-font-body);
	font-weight: 300;
	font-size: var(--mhg-font-size-body);
	line-height: var(--mhg-line-height-body);
	color: #555;
}

@media (min-width: 768px) {
	.mhg-brands-divider__inner {
		padding: var(--mhg-space-xl) var(--mhg-space-md);
	}

	.mhg-brands-divider__heading {
		font-size: 2.25rem;
	}
}

/* ============================================================
 * Section 4 — CLOSING CTA (LIGHT)
 * Centred text + two buttons, white background, subtle top border.
 * Deliberately light — different from the heavy charcoal CTA pattern.
 * ============================================================ */
.mhg-brands-explore {
	background-color: var(--mhg-color-white);
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	text-align: center;
}

.mhg-brands-explore__inner {
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	padding: var(--mhg-space-xl) var(--mhg-space-sm);
}

.mhg-brands-explore__heading {
	margin: 0 0 var(--mhg-space-sm);
	font-family: var(--mhg-font-heading);
	font-size: 1.5rem;
	color: var(--mhg-color-charcoal);
	line-height: 1.2;
}

.mhg-brands-explore__body {
	margin: 0 0 var(--mhg-space-md);
	font-family: var(--mhg-font-body);
	font-weight: 300;
	font-size: var(--mhg-font-size-body);
	line-height: var(--mhg-line-height-body);
	color: #666;
}

.mhg-brands-explore__ctas {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--mhg-space-sm);
}

@media (min-width: 768px) {
	.mhg-brands-explore__inner {
		padding: var(--mhg-space-xl) var(--mhg-space-md);
	}

	.mhg-brands-explore__heading {
		font-size: 1.75rem;
	}
}
