/*
 * Matlin LP — header/footer shell.
 *
 * The source theme's header.css is 12 KB, most of it navigation, mega-menu and
 * mobile-drawer rules for a menu this theme does not register. Only the parts
 * that actually apply to a logo + phone + CTA header are reproduced here, with
 * the base button rules lifted from main.css so the LP does not have to load
 * that whole stylesheet.
 *
 * Layout tokens that lived in main.css :root.
 */

:root {
	--gutter-x: 20px;
	--page-width: 1760px;
	--header-height: 64px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

main-header {
	display: block;
	background-color: var(--color-dark-blue);
	color: #fff;
	padding: 16px 0;
	position: relative;
	z-index: 9999;
	width: 100%;
	max-width: 100%;
}

/*
 * Sticky header, desktop only.
 *
 * The source did this with a body.scroll-sticky class, position:fixed and a
 * slide-down keyframe, driven by a JS scroll listener. position:sticky gets the
 * same result with no JS and no layout shift — fixed positioning removes the
 * header from flow, which is why the source also needed a compensating
 * margin-top on body.
 *
 * Desktop only, deliberately: on a phone the header is a large share of the
 * viewport, and pinning it pushes the form — the only thing on this page that
 * converts — further down every screen.
 */
main-header {
	position: sticky;
	top: 0;
	transition: box-shadow 0.25s ease, padding 0.2s ease;

	/*
	 * The header's height is content-driven and lands on a fractional pixel
	 * (69.015625px at the mobile breakpoint). On a 2x/3x screen that bottom edge
	 * falls mid-device-pixel, so the browser blends the header colour with
	 * whatever is scrolling underneath and paints a visible hairline across the
	 * full width.
	 *
	 * A 1px hard shadow in the header's own colour covers that partial pixel.
	 * A border would do the same but would add to the element's height and
	 * shift the sticky offset; a shadow paints outside the box and changes
	 * nothing about layout.
	 */
	box-shadow: 0 1px 0 0 var(--color-dark-blue);
}

main-header.is-stuck {
	/* Seam cover first, then the lift shadow. */
	box-shadow:
		0 1px 0 0 var(--color-dark-blue),
		0 10px 30px -12px rgba(0, 0, 0, 0.55);
}

/*
 * On a phone the header is a large share of a short viewport, so once it pins
 * it shrinks: less padding and a smaller logo. That keeps the phone number and
 * CTA permanently reachable without the header eating the screen.
 */
@media screen and (max-width: 991px) {
	main-header.is-stuck {
		padding: 8px 0;
	}

	main-header.is-stuck .logo-holder img {
		width: 112px;
		transition: width 0.2s ease;
	}
}

@media (prefers-reduced-motion: reduce) {
	main-header {
		transition: none;
	}
}

main-header .header-wrapper {
	padding: 0 var(--gutter-x);
	margin: 0 auto;
	width: 100%;
	max-width: var(--page-width);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 45px;
}

.logo-holder img {
	width: 175px;
	height: auto;
	display: block;
}

.extra-nav-header {
	display: flex;
	flex-direction: row;
	gap: 18px;
	align-items: center;
	justify-content: flex-end;
}

.extra-nav-header .btn-gold-secondary img {
	display: none;
}

/* ── Buttons (base rules from main.css) ─────────────────────────────────── */

.btn-gold-secondary {
	border-radius: 136.416px;
	border: 1.5px solid var(--color-yellow);
	display: flex;
	padding: 12px 30px;
	justify-content: center;
	align-items: center;
	gap: 10px;
	text-align: center;
	font-family: var(--font-body);
	font-size: 21px;
	font-weight: 450;
	line-height: 30.012px;
	text-transform: uppercase;
	background: var(--gold-gradient);
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	text-wrap: nowrap;
	text-decoration: none;
}

.btn-gold-secondary:hover {
	background: var(--gold-gradient);
	background-clip: border-box;
	-webkit-background-clip: border-box;
	-webkit-text-fill-color: var(--color-dark-blue);
}

.btn-gold-primary {
	border-radius: 173.015px;
	background: var(--gold-gradient);
	display: flex;
	padding: 16.012px 27px;
	justify-content: center;
	align-items: center;
	color: #000;
	font-family: var(--font-body);
	font-size: 21px;
	font-weight: 600;
	line-height: 26.045px;
	letter-spacing: 1.137px;
	text-transform: uppercase;
	text-decoration: none;
	text-wrap: nowrap;
}

.btn-gold-primary:hover {
	background: var(--color-dark-blue);
	color: var(--color-yellow);
	border: 1px solid var(--color-golden);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.lp-footer {
	background-color: var(--color-dark-blue);
	color: #fff;
	padding: 56px var(--gutter-x) 40px;
}

.lp-footer__inner {
	max-width: 900px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	text-align: center;
}

.lp-footer__brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.lp-footer__brand img {
	width: 200px;
	height: auto;
}

.lp-footer__phone {
	font-family: var(--font-body);
	font-size: 24px;
	letter-spacing: 0.5px;
	text-decoration: none;
	background: var(--gold-gradient);
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.lp-footer__disclaimer {
	font-family: var(--font-body-regular);
	font-size: 13px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.66);
	margin: 0;
	max-width: 780px;
}

.lp-footer__legal {
	font-family: var(--font-body-regular);
	font-size: 13px;
	color: rgba(255, 255, 255, 0.5);
	margin: 0;
}

.lp-footer__legal a {
	color: rgba(255, 255, 255, 0.72);
	text-decoration: underline;
	margin-left: 6px;
}

/* ── Testimonial pagination ─────────────────────────────────────────────── */

/*
 * 36 reviews means 20 dots at the carousel's limit, which wrap into two rows on
 * a phone and read as clutter rather than navigation — nobody is picking review
 * fourteen from a dot. The carousel still advances on its own and swipes, so
 * the dots are dropped on small screens.
 */
@media screen and (max-width: 767px) {
	/* Scoped to .tstm to outrank landing-page.css's unmediated
	   `.tstm__dots { display: flex }`, which loads after this file. */
	.tstm .tstm__dots {
		display: none;
	}
}

/* ── Mobile action bar ──────────────────────────────────────────────────── */

.lp-actionbar {
	display: none;
}

@media screen and (max-width: 991px) {
	.lp-actionbar {
		display: grid;
		grid-template-columns: auto 1fr;
		gap: 10px;
		align-items: center;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9998;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
		background: var(--color-dark-blue);
		border-top: 1px solid rgba(218, 177, 40, 0.35);
		box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.55);
		transform: translateY(0);
		transition: transform 0.28s var(--lp-ease, ease);
	}

	/* Hidden while the form is on screen — see lp-header.js. */
	.lp-actionbar.is-hidden {
		transform: translateY(120%);
	}

	.lp-actionbar__call,
	.lp-actionbar__cta {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		min-height: 48px;
		border-radius: 999px;
		font-family: var(--font-body);
		font-size: 15px;
		font-weight: 600;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		text-decoration: none;
		text-wrap: nowrap;
	}

	.lp-actionbar__call {
		padding: 0 16px;
		border: 1.5px solid var(--color-yellow);
		color: var(--color-yellow);
		background: transparent;
	}

	.lp-actionbar__cta {
		padding: 0 18px;
		background: var(--gold-gradient);
		color: #14122a;
	}

	.lp-actionbar__call:focus-visible,
	.lp-actionbar__cta:focus-visible {
		outline: 2px solid #fff;
		outline-offset: 2px;
	}

	/* Keep the bar from covering the last of the footer. */
	body {
		padding-bottom: 74px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lp-actionbar {
		transition: none;
	}
}

/* ── Generic page (privacy policy) ──────────────────────────────────────── */

.lp-page {
	background: var(--lp-white, #fff);
	padding: clamp(48px, 7vw, 88px) var(--gutter-x);
}

.lp-page__inner {
	max-width: 760px;
	margin: 0 auto;
}

.lp-page__header {
	padding-bottom: 22px;
	margin-bottom: 34px;
	border-bottom: 1px solid rgba(33, 23, 71, 0.12);
}

.lp-page__title {
	font-family: var(--font-header);
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1.12;
	color: var(--color-dark-blue);
	text-wrap: balance;
	margin: 0 0 10px;
}

.lp-page__meta {
	font-family: var(--font-body-regular);
	font-size: 14px;
	color: var(--lp-muted, #6b6680);
	margin: 0;
}

.lp-page__body {
	font-family: var(--font-body-regular);
	font-size: 17px;
	line-height: 1.75;
	color: var(--lp-body, #3a3550);
}

.lp-page__body h2 {
	font-family: var(--font-header);
	font-size: clamp(21px, 2.6vw, 26px);
	line-height: 1.25;
	color: var(--color-dark-blue);
	margin: 40px 0 12px;
}

.lp-page__body h2:first-child {
	margin-top: 0;
}

.lp-page__body p,
.lp-page__body ul {
	margin: 0 0 16px;
}

.lp-page__body ul {
	padding-left: 22px;
}

.lp-page__body li {
	margin-bottom: 8px;
}

.lp-page__body strong {
	color: var(--color-dark-blue);
	font-family: var(--font-body);
}

.lp-page__back {
	margin: 44px 0 0;
	padding-top: 24px;
	border-top: 1px solid rgba(33, 23, 71, 0.12);
	font-family: var(--font-body);
	font-size: 15px;
}

.lp-page__back a {
	color: var(--color-dark-blue);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* ── 404 ────────────────────────────────────────────────────────────────── */

.lp-404 {
	background-color: var(--color-dark-blue);
	color: #fff;
	padding: clamp(80px, 12vw, 160px) var(--gutter-x);
	min-height: 52vh;
	display: flex;
	align-items: center;
}

.lp-404__inner {
	max-width: 620px;
	margin: 0 auto;
	text-align: center;
}

.lp-404__code {
	font-family: var(--font-header);
	font-size: clamp(72px, 14vw, 132px);
	line-height: 1;
	margin: 0 0 8px;
	background: var(--gold-gradient);
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	font-variant-numeric: tabular-nums;
}

.lp-404__title {
	font-family: var(--font-header);
	font-size: clamp(28px, 4.5vw, 40px);
	line-height: 1.15;
	text-wrap: balance;
	margin: 0 0 14px;
	color: #fff;
}

.lp-404__body {
	font-family: var(--font-body-regular);
	font-size: 17px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.72);
	margin: 0 auto 34px;
	max-width: 46ch;
}

.lp-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	justify-content: center;
}

/* ── Accessibility ──────────────────────────────────────────────────────── */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.lp-skip-link:focus {
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	padding: 12px 22px;
	top: 8px;
	left: 8px;
	z-index: 100000;
	background: var(--color-dark-blue);
	color: #fff;
	border-radius: 6px;
	text-decoration: none;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media screen and (max-width: 1440px) {
	main-header .header-wrapper {
		gap: 30px;
	}

	main-header .header-wrapper .btn-gold-primary {
		font-size: 16px;
		padding: 15px 20px;
	}

	main-header .header-wrapper .btn-gold-secondary {
		font-size: 16px;
		padding: 10px 25px;
	}
}

@media screen and (max-width: 768px) {
	.logo-holder img {
		width: 140px;
	}

	.extra-nav-header {
		gap: 10px;
	}

	.extra-nav-header .btn-gold-primary {
		display: none;
	}

	.extra-nav-header .btn-gold-secondary {
		font-size: 15px;
		padding: 9px 18px;
	}

	.lp-footer {
		padding: 40px var(--gutter-x) 32px;
	}
}
