/* Mathis Rail Loop - full landing page template */

/* Standalone reset (template skips theme header/footer). */
body.mrl-standalone {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background: #fff;
}
body.mrl-standalone img { max-width: 100%; }
body.mrl-standalone a { color: inherit; }

/* ============= Graceful image / video fade-in ============= */
.mrl-fade {
	opacity: 0;
	transition: opacity 600ms ease-out;
}
.mrl-fade.is-loaded {
	opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
	.mrl-fade { transition: none; }
}

body.mrl-rail-loop-template {
	--mrl-teal: #2BB59E;
	--mrl-teal-hover: #25a18b;
	--mrl-navy: #0F2438;
	--mrl-navy-hover: #18324d;
	--mrl-bg: #F4F6F8;
	--mrl-surface: #FFFFFF;
	--mrl-border: #D9DEE3;
	--mrl-text: #1A2638;
	--mrl-muted: #6B7280;
	--mrl-radius: 10px;

	overflow-x: hidden;
}

.mrl-rail-loop-page,
.mrl-rail-loop-page * { box-sizing: border-box; }

.mrl-rail-loop-page {
	color: var(--mrl-text);
	font-family: inherit;
}

/* Full-bleed sections that escape any constrained content area. */
.mrl-section {
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

/* ============= shared eyebrow ============= */
.mrl-eyebrow {
	font-weight: 700;
	letter-spacing: 0.10em;
	font-size: 13px;
	margin: 0 0 14px;
	text-transform: uppercase;
}
.mrl-eyebrow::before {
	content: "— ";
	margin-right: 4px;
}
.mrl-eyebrow-dark { color: var(--mrl-teal); }
.mrl-eyebrow-light { color: var(--mrl-teal); }

/* ============= shared buttons ============= */
.mrl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 22px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	line-height: 1;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	border: 2px solid transparent;
	white-space: nowrap;
}
.mrl-btn-primary { background: var(--mrl-teal); color: #fff; }
.mrl-btn-primary:hover,
.mrl-btn-primary:focus { background: var(--mrl-teal-hover); color: #fff; }

.mrl-btn-ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255,255,255,0.55);
}
.mrl-btn-ghost:hover,
.mrl-btn-ghost:focus {
	background: rgba(255,255,255,0.14);
	color: #fff;
	border-color: rgba(255,255,255,0.85);
}

/* ============= 1. Hero ============= */
.mrl-hero {
	min-height: 88vh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	background: var(--mrl-navy);
	background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 22px);
	color: #fff;
}
.mrl-hero-media {
	position: absolute;
	inset: 0;
	z-index: 0;
}
.mrl-hero-video,
.mrl-hero-fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border: 0;
}
.mrl-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top,
		rgba(15,36,56,0.92) 0%,
		rgba(15,36,56,0.55) 45%,
		rgba(15,36,56,0.10) 100%);
}
.mrl-hero-content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 60px 22px 56px;
}
.mrl-hero-eyebrow {
	color: var(--mrl-teal);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.12em;
	margin: 0 0 14px;
	text-transform: uppercase;
}
.mrl-hero-heading {
	font-size: clamp(34px, 6.5vw, 60px);
	line-height: 1.05;
	font-weight: 800;
	margin: 0 0 16px;
	max-width: 14ch;
	letter-spacing: -0.015em;
	color: #fff;
}
.mrl-hero-sub {
	font-size: clamp(16px, 2vw, 19px);
	line-height: 1.5;
	max-width: 38ch;
	color: rgba(255,255,255,0.92);
	margin: 0 0 28px;
}
.mrl-hero-ctas {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
@media (max-width: 480px) {
	.mrl-hero-ctas .mrl-btn {
		flex: 1 1 auto;
		min-width: 140px;
	}
}

/* ============= 2. Stats strip ============= */
.mrl-stats {
	background: var(--mrl-navy);
	background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 22px);
	color: #fff;
	padding: 22px 18px 28px;
}
.mrl-stats-grid {
	max-width: 1100px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
@media (min-width: 860px) {
	.mrl-stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.mrl-stat {
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 12px;
	padding: 26px 16px;
	text-align: center;
}
.mrl-stat-value {
	color: var(--mrl-teal);
	font-size: clamp(26px, 4vw, 34px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1;
}
.mrl-stat-label {
	color: rgba(255,255,255,0.72);
	font-size: 13px;
	margin-top: 8px;
	line-height: 1.3;
}

/* ============= 3. Narrative ============= */
.mrl-narrative {
	background: #fff;
	padding: 64px 22px 72px;
}
.mrl-narrative-inner {
	max-width: 760px;
	margin: 0 auto;
}
.mrl-narrative-heading {
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 20px;
	color: var(--mrl-text);
}
.mrl-narrative-p {
	font-size: 17px;
	line-height: 1.6;
	color: var(--mrl-text);
	margin: 0 0 18px;
}
.mrl-narrative-p:last-child { margin-bottom: 0; }

/* ============= 4. Rig video ============= */
.mrl-rig {
	min-height: 70vh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	background: #1a2c40;
	background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 22px);
	color: #fff;
}
.mrl-rig-media {
	position: absolute;
	inset: 0;
	z-index: 0;
}
.mrl-rig-video,
.mrl-rig-fallback {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border: 0;
}

/* Cloudflare Stream iframes don't honor object-fit, so the player
 * letterboxes the video inside its 100% × 100% box. Scale the iframe
 * itself to be the larger of (container width × 16:9) or (container
 * height × 16:9), center it, and let the section's overflow:hidden
 * crop the excess. */
.mrl-hero-media,
.mrl-rig-media {
	overflow: hidden;
}
iframe.mrl-hero-video,
iframe.mrl-rig-video {
	position: absolute;
	inset: auto;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: max(100vw, 177.78vh);
	height: max(56.25vw, 100vh);
	border: 0;
}
.mrl-rig-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top,
		rgba(15,36,56,0.85) 0%,
		rgba(15,36,56,0.45) 50%,
		rgba(15,36,56,0.10) 100%);
}
.mrl-rig-content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 80px 22px 56px;
}
.mrl-rig-caption {
	font-size: 13px;
	letter-spacing: 0.06em;
	color: rgba(255,255,255,0.78);
	margin: 0 0 14px;
}
.mrl-rig-heading {
	font-size: clamp(28px, 4.5vw, 44px);
	line-height: 1.1;
	font-weight: 800;
	margin: 0 0 14px;
	color: #fff;
	letter-spacing: -0.015em;
}
.mrl-rig-body {
	font-size: clamp(15px, 1.8vw, 18px);
	line-height: 1.5;
	color: rgba(255,255,255,0.92);
	margin: 0;
	max-width: 48ch;
}

/* ============= 5. Operational cards ============= */
.mrl-cards {
	background: #fff;
	padding: 72px 22px 80px;
}
.mrl-cards-inner {
	max-width: 1100px;
	margin: 0 auto;
}
.mrl-cards-heading {
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 36px;
	color: var(--mrl-text);
	max-width: 680px;
}
.mrl-cards-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}
@media (min-width: 720px) {
	.mrl-cards-grid {
		grid-template-columns: 1fr 1fr;
		gap: 22px;
	}
}
.mrl-card {
	border-radius: 16px;
	overflow: hidden;
	color: #fff;
	box-shadow: 0 8px 24px rgba(15,36,56,0.10);
	display: flex;
	flex-direction: column;
}
.mrl-card-teal { background: var(--mrl-teal); }
.mrl-card-navy { background: var(--mrl-navy); }
.mrl-card-photo {
	width: 100%;
	aspect-ratio: 16 / 10;
	background-color: rgba(0,0,0,0.18);
	overflow: hidden;
	position: relative;
}
.mrl-card-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mrl-card-body {
	padding: 24px 24px 28px;
}
.mrl-card-title {
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 10px;
	color: #fff;
	letter-spacing: -0.005em;
}
.mrl-card-desc {
	font-size: 15px;
	line-height: 1.55;
	margin: 0;
	color: rgba(255,255,255,0.94);
}

/* ============= 6. ~140 callout ============= */
.mrl-callout {
	background: var(--mrl-navy);
	background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 22px);
	color: #fff;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 80px 24px;
	text-align: center;
}
.mrl-callout-bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
	z-index: 0;
}
.mrl-callout-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/* Override .mrl-fade.is-loaded final opacity (1 → 0.35) for the callout backdrop. */
.mrl-callout-bg img.mrl-fade.is-loaded {
	opacity: 0.35;
}
.mrl-callout-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15,36,56,0.55) 0%, rgba(15,36,56,0.82) 100%);
	z-index: 0;
}
.mrl-callout-inner {
	max-width: 900px;
	position: relative;
	z-index: 1;
}
.mrl-callout-big {
	font-size: clamp(120px, 30vw, 280px);
	font-weight: 900;
	color: var(--mrl-teal);
	line-height: 0.92;
	letter-spacing: -0.04em;
	margin: 0 0 24px;
}
.mrl-callout-sub {
	font-size: clamp(18px, 2.4vw, 24px);
	color: rgba(255,255,255,0.86);
	max-width: 600px;
	margin: 0 auto;
	line-height: 1.4;
}

/* ============= 7. Why Mathis ============= */
.mrl-why {
	background: #fff;
	padding: 72px 22px 80px;
}
.mrl-why-inner {
	max-width: 1100px;
	margin: 0 auto;
}
.mrl-why-heading {
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 36px;
	max-width: 680px;
	color: var(--mrl-text);
}
.mrl-why-grid {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 24px;
	grid-template-columns: 1fr;
}
@media (min-width: 720px) {
	.mrl-why-grid {
		grid-template-columns: 1fr 1fr;
		gap: 28px 36px;
	}
}
.mrl-why-item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}
.mrl-check {
	flex-shrink: 0;
	color: var(--mrl-teal);
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: rgba(43, 181, 158, 0.14);
}
.mrl-why-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 6px;
	color: var(--mrl-text);
	letter-spacing: -0.005em;
}
.mrl-why-desc {
	font-size: 15px;
	line-height: 1.55;
	color: var(--mrl-text);
	margin: 0;
	opacity: 0.86;
}

/* ============= Form section override on template ============= */
.mrl-rail-loop-template .mrl-form-section {
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* ============= Site header (custom, replaces theme header) ============= */
.mrl-site-header {
	background: #fff;
	border-bottom: 1px solid var(--mrl-border);
	padding: 14px 22px;
}
.mrl-site-header-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: center;
}
.mrl-site-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}
.mrl-site-logo img {
	height: 48px;
	width: auto;
	max-width: 260px;
	display: block;
}
.mrl-site-logo-text {
	font-weight: 800;
	font-size: 20px;
	color: var(--mrl-navy);
	letter-spacing: -0.01em;
}

.mrl-site-nav {
	display: none;
	margin-left: auto;
	align-items: center;
	gap: 28px;
}
@media (min-width: 720px) {
	.mrl-site-nav { display: flex; }
}
.mrl-site-nav-link {
	color: var(--mrl-text);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: color 0.15s ease, background 0.15s ease;
	padding: 6px 0;
	white-space: nowrap;
}
.mrl-site-nav-link:hover { color: var(--mrl-teal); }
.mrl-site-nav-cta {
	background: var(--mrl-teal);
	color: #fff;
	padding: 9px 18px;
	border-radius: 8px;
}
.mrl-site-nav-cta:hover {
	background: var(--mrl-teal-hover);
	color: #fff;
}

/* ============= Site footer (custom, replaces theme footer) ============= */
.mrl-site-footer {
	background: #F4F6F8;
	color: var(--mrl-text);
	padding: 56px 22px 24px;
	width: 100vw;
	margin-left: calc(50% - 50vw);
}
.mrl-site-footer-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--mrl-border);
}
@media (min-width: 720px) {
	.mrl-site-footer-inner {
		grid-template-columns: 1fr 1fr;
		gap: 48px;
	}
}
.mrl-site-footer-logo {
	height: 72px;
	width: auto;
	max-width: 320px;
	display: block;
	margin-bottom: 14px;
}
.mrl-site-footer-tagline {
	margin: 0;
	color: var(--mrl-muted);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 600;
}
.mrl-site-footer-contact .mrl-phone {
	color: var(--mrl-teal);
	text-decoration: none;
	font-weight: 700;
	font-size: 22px;
	display: inline-block;
	margin-bottom: 14px;
}
.mrl-site-footer-contact .mrl-phone:hover { color: var(--mrl-teal-hover); }
.mrl-site-footer-contact address {
	font-style: normal;
	color: var(--mrl-text);
	margin: 0 0 14px;
	line-height: 1.55;
}
.mrl-site-footer-contact .mrl-email {
	color: var(--mrl-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.mrl-site-footer-contact .mrl-email:hover { color: var(--mrl-teal); }
.mrl-site-footer-bottom {
	max-width: 1100px;
	margin: 24px auto 0;
	color: var(--mrl-muted);
	font-size: 14px;
}
.mrl-site-footer-bottom strong { color: var(--mrl-text); font-weight: 700; }
