/* Site footer (partials/site-footer.php), from the prototype footer and cmc.css §5 link-rule, §8b buttons, §8e3, §8j. */

.cmc-footer-wrap {
	background: var(--wp--preset--color--off-white);
}

.cmc-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: 50px 44px;
	border-start-start-radius: var(--wp--custom--radius--section);
	border-start-end-radius: var(--wp--custom--radius--section);
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--white);
	font-weight: 400;
}

/* Watermark: the hero's arc, 30%, bleeding off the right edge. z-index -1 keeps it behind everything incl. the form. */
.cmc-footer__mark {
	position: absolute;
	z-index: -1;
	inset-block: 0;
	right: 0;
	width: 66%;
	opacity: 0.3;
	pointer-events: none;
}

.cmc-footer__mark img {
	position: absolute;
	top: 50%;
	right: -3%;
	width: 100%;
	height: auto;
	max-width: none;
	transform: translateY(-50%);
}

.cmc-footer__inner {
	width: 100%;
	max-width: 1440px;
	margin-inline: auto;
	padding-inline: clamp(20px, 5vw, 72px);
}

.cmc-footer__top {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.cmc-footer__news {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
	max-width: 630px;
}

.cmc-footer__intro {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cmc-footer__heading {
	margin: 0;
	font-size: clamp(1.875rem, 1.521rem + 1.574vw, 2.938rem);
	line-height: 1.1;
	color: var(--wp--preset--color--salmon);
}

.cmc-footer__standfirst {
	margin: 0;
	font-size: 1.375rem;
	line-height: 1.2;
	color: var(--wp--preset--color--white);
}

.cmc-footer__side {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.cmc-footer__nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
}

.cmc-footer__list,
.cmc-footer__legal {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cmc-footer__list a {
	font-size: var(--wp--preset--font-size--text-8);
	line-height: 1.3;
	color: var(--wp--preset--color--off-white);
}

.cmc-footer__rule {
	display: block;
	width: 100%;
	height: 1px;
	margin-top: 40px;
	background: color-mix(in srgb, var(--wp--preset--color--off-white) 15%, transparent);
}

.cmc-footer__bottom {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 40px;
	margin-top: 40px;
}

.cmc-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cmc-footer__logo {
	width: fit-content;
}

.cmc-footer__logo img {
	width: auto;
	height: 50px;
}

.cmc-footer__copy {
	margin: 0;
	font-size: var(--wp--preset--font-size--text-11);
	line-height: 1.3;
	color: color-mix(in srgb, var(--wp--preset--color--off-white) 70%, transparent);
}

.cmc-footer__legal {
	flex-flow: row wrap;
	align-items: center;
	gap: 28px;
}

.cmc-footer__legal a {
	font-size: var(--wp--preset--font-size--text-11);
	line-height: 1.3;
	color: color-mix(in srgb, var(--wp--preset--color--off-white) 70%, transparent);
}

@media (width >= 1024px) {
	.cmc-footer__top {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
		gap: 88px;
	}

	.cmc-footer__side {
		width: fit-content;
		margin-left: auto;
	}

	.cmc-footer__bottom {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

/* Text links: the animated underline (cmc.css link-rule). Menu links and the footer's own links share it. */
.cmc-footer a {
	text-decoration: none;
}

.cmc-link-rule,
.cmc-footer__list a,
.cmc-footer__legal a {
	position: relative;
}

.cmc-link-rule::after,
.cmc-footer__list a::after,
.cmc-footer__legal a::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.35s var(--wp--custom--ease);
}

.cmc-link-rule:hover::after,
.cmc-link-rule:focus-visible::after,
.cmc-link-rule-host:hover .cmc-link-rule::after,
.cmc-link-rule-host:focus-visible .cmc-link-rule::after,
.cmc-footer__list a:hover::after,
.cmc-footer__list a:focus-visible::after,
.cmc-footer__list a[aria-current="page"]::after,
.cmc-footer__legal a:hover::after,
.cmc-footer__legal a:focus-visible::after,
.cmc-footer__legal a[aria-current="page"]::after {
	transform: scaleX(1);
}

.cmc-footer__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	padding-bottom: 2px;
	font-size: var(--wp--preset--font-size--text-11);
	font-weight: 700;
	line-height: 1.3;
	color: var(--wp--preset--color--white);
}

.cmc-footer__cta svg,
.cmc-footer__form button svg {
	flex-shrink: 0;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 300ms var(--wp--custom--ease);
}

.cmc-footer__cta:hover svg,
.cmc-footer__cta:focus-visible svg,
.cmc-footer__form button:hover svg,
.cmc-footer__form button:focus-visible svg {
	transform: translateX(3px);
}

.cmc-footer__linkedin {
	display: inline-flex;
	align-items: flex-end;
	gap: 15px;
	width: fit-content;
	font-size: var(--wp--preset--font-size--text-8);
	line-height: 1.3;
	color: var(--wp--preset--color--white);
}

.cmc-footer__linkedin svg {
	flex-shrink: 0;
}

.cmc-footer__linkedin .cmc-link-rule {
	padding-bottom: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.cmc-link-rule::after,
	.cmc-footer__list a::after,
	.cmc-footer__legal a::after,
	.cmc-footer__cta svg,
	.cmc-footer__form button svg {
		transition: none;
	}

	.cmc-footer__cta:hover svg,
	.cmc-footer__cta:focus-visible svg,
	.cmc-footer__form button:hover svg,
	.cmc-footer__form button:focus-visible svg {
		transform: none;
	}
}

/* Newsletter form (Gravity Forms 3, its own CSS off: inc/forms.php). The form is the prototype's white box. */
.cmc-footer *,
.cmc-footer *::before,
.cmc-footer *::after {
	box-sizing: border-box;
}

.cmc-footer__form form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 10px;
	border-radius: var(--wp--custom--radius--btn);
	background: var(--wp--preset--color--white);
}

.cmc-footer__form .gform_validation_container,
.cmc-footer__form .gform_validation_errors,
.cmc-footer__form .gform_anchor,
.cmc-footer__form .gfield_required,
.cmc-footer__form .hidden_label .gfield_label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.cmc-footer__form .gform-body {
	flex: 1;
	min-width: 0;
}

.cmc-footer__form .gform_fields {
	display: block;
}

.cmc-footer__form .gfield {
	margin: 0;
}

.cmc-footer__form input[type="email"] {
	display: block;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 12px 18px;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--off-white) 30%, transparent);
	border-radius: 0;
	background: transparent;
	font: inherit;
	font-size: var(--wp--preset--font-size--text-7);
	line-height: 1.3;
	color: var(--wp--preset--color--charcoal);
	appearance: none;
}

.cmc-footer__form input[type="email"]::placeholder {
	color: var(--wp--preset--color--charcoal);
	opacity: 1;
}

.cmc-footer__form .gfield_validation_message {
	margin: 8px 0 0;
	font-size: var(--wp--preset--font-size--text-11);
	line-height: 1.3;
	color: var(--wp--preset--color--burnt-sienna);
}

.cmc-footer__form .gform-footer {
	display: flex;
	flex-shrink: 0;
	margin: 0;
	padding: 0;
}

.cmc-footer__form button {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 18px 20px 16px 22px;
	border: 0;
	border-radius: var(--wp--custom--radius--btn);
	background: var(--wp--preset--color--charcoal);
	font: inherit;
	color: var(--wp--preset--color--white);
	cursor: pointer;
	transition: transform 300ms var(--wp--custom--ease);
}

.cmc-footer__form button:hover,
.cmc-footer__form button:focus-visible {
	transform: translateY(-2px);
}

.cmc-footer__form button span {
	font-size: var(--wp--preset--font-size--text-8);
	font-weight: 700;
	line-height: 1.3;
}

/* the button ripple (cmc.css 8b, charcoal variant) */
.cmc-footer__form button::after {
	content: "";
	position: absolute;
	z-index: -1;
	top: 50%;
	left: 50%;
	width: 6px;
	height: 6px;
	margin: -3px 0 0 -3px;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.16);
	opacity: 0;
	pointer-events: none;
}

.cmc-footer__form button:hover::after,
.cmc-footer__form button:focus-visible::after {
	animation: cmc-footer-ripple 900ms ease-out;
}

@keyframes cmc-footer-ripple {
	0% { transform: scale(0); opacity: 1; }
	20% { transform: scale(25); opacity: 1; }
	100% { transform: scale(45); opacity: 0; }
}

/* the message that replaces the form once it is sent */
.cmc-footer__form .gform_confirmation_wrapper {
	padding: 18px;
	border-radius: var(--wp--custom--radius--btn);
	background: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--text-7);
	line-height: 1.3;
	color: var(--wp--preset--color--charcoal);
}

@media (width >= 640px) {
	.cmc-footer__form form {
		flex-direction: row;
		align-items: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cmc-footer__form button {
		transition: none;
	}

	.cmc-footer__form button:hover,
	.cmc-footer__form button:focus-visible {
		transform: none;
	}

	.cmc-footer__form button:hover::after,
	.cmc-footer__form button:focus-visible::after {
		animation: none;
	}
}
