/* ==========================================================================
   Site footer — shared by every page (markup: js/site-footer.js)
   ========================================================================== */

site-footer {
	display: contents;
}

.footer {
	padding: 8px;
}
.footer__inner {
	position: relative;
	padding-top: 48px;
	border-radius: 16px;
	overflow: hidden;
	background: #01020a;
	color: var(--white);
	/* side inset of the footer content: 56px at 1440px; the content grows up
	   to Figma's 1600px max width and then stays centred, while the card,
	   halo and guides keep running edge to edge */
	--fx: max(56px, calc(50% - 800px));
}

.footer__halo {
	position: absolute;
	left: calc(50% + 196.82px);
	top: calc(50% - 234.78px);
	width: 4389.636px;
	height: 3777.431px;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}
.footer__halo img {
	flex: none;
	width: 3825.641px;
	height: 2153.067px;
	transform: rotate(150deg) scaleY(-1);
}

/* "pattern dots" — the tiling comes from the shared .pattern-dots class */
.footer__dots {
	top: -10px;
	height: 777px;
}

.footer__grid {
	left: -8px;
	right: -8px;
}

.footer__top {
	position: relative;
	display: flex;
	height: 273px;
	padding: 0 var(--fx);
}
.footer__cta {
	position: relative;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	width: 656px;
	height: max-content;
	padding: 4px 8px;
}
/* Figma "Button contact" is a 255x56 box with the pill inset 14px / 4px;
   the cta padding already gives 8px of the left inset */
.footer__cta .btn-group {
	margin: 4px 0 0 6px;
}
.footer__title {
	width: 100%;
	font-weight: 300;
	font-size: 40px;
	line-height: 1.2;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: var(--white);
}
.footer__title span {
	display: block;
}
.footer__title-r {
	text-align: right;
}

.footer__nav {
	position: absolute;
	top: 48px;
	bottom: 0;
	right: var(--fx);
	display: flex;
	align-items: flex-start;
}
.footer__col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	width: 218px;
	height: 100%;
	padding: 0 8px;
	border-left: 1px solid var(--brand-blue-32);
	color: var(--white);
}
.footer__col--wide {
	width: 219px;
}

/* giant wordmark: spans the content width (max 1600px) and
   scales with it, which also sets the footer height (557px at 1440px) */
.footer__logo-wrap {
	position: relative;
	margin: 0 var(--fx) calc((100% - 2 * var(--fx)) * -0.008963);
	aspect-ratio: 1312 / 247.757;
	pointer-events: none;
}
.footer__logo {
	position: absolute;
	inset: 0;
	-webkit-mask-image: url("../assets/footer-logo-mask.svg");
	mask-image: url("../assets/footer-logo-mask.svg");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	/* = 1588x270 at -138px -22px on the 1312x247.757 Figma box */
	-webkit-mask-size: 121.037% 108.978%;
	mask-size: 121.037% 108.978%;
	-webkit-mask-position: 50% 98.9%;
	mask-position: 50% 98.9%;
	mask-mode: alpha;
}
.footer__logo > span {
	position: absolute;
	inset: 0 0 -1.46% 0;
}
.footer__logo img {
	width: 100%;
	height: 100%;
}

@media (max-width: 1023px) {
	/* footer */
	.footer__inner {
		padding-top: var(--section-y);
	}
	.footer__grid {
		--gx: var(--gutter);
	}
	.footer__top {
		height: auto;
		padding: 0 var(--gutter);
	}
	.footer__cta {
		width: 100%;
		max-width: 600px;
	}
	.footer__title {
		font-size: clamp(24px, 6.2vw, 40px);
	}
	.footer__nav {
		position: relative;
		top: auto;
		right: auto;
		bottom: auto;
		flex-wrap: wrap;
		row-gap: 24px;
		margin: 56px var(--gutter) 0;
	}
	.footer__col {
		flex: 1 1 170px;
		width: auto;
		height: auto;
		gap: 0;
	}
	.footer__col .nav__item {
		height: 40px; /* comfortable tap targets */
	}
	.footer__logo-wrap {
		margin: 48px var(--gutter) calc((100% - 2 * var(--gutter)) * -0.008963);
	}
}
