/**
 * Footer (design: .ac-footer in design/html/site/index.html, the approved
 * homepage footer, used site-wide). Breakpoints from the design:
 * 1000px (three columns, contact spans two) and 680px (two columns,
 * centred). Loaded with core/navigation via wp_enqueue_block_style.
 */

/* stylelint-disable no-descending-specificity --
 * Hover and breakpoint overrides deliberately follow their base rules. */

.ac-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border-radius: var(--wp--preset--border-radius--xl) var(--wp--preset--border-radius--xl) 0 0;
}

.ac-footer a {
	text-decoration: none;
}

/* ---------- Call to action ---------- */

.ac-footer .ac-footer__kicker {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	margin: 0;
	font-weight: var(--wp--custom--font-weight--label);
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	text-transform: uppercase;
}

/* Decorative spark before the kicker (hidden from assistive tech). */
.ac-footer__kicker::before {
	content: "✳" / "";
	color: var(--wp--preset--color--sky);
	font-size: 18px;
	line-height: 1;
}

.ac-footer .ac-footer__title {
	margin-block: 22px 25px;
	letter-spacing: -0.075em;
	line-height: 1.03;
}

.ac-footer .ac-footer__lead {
	max-width: 475px;
	margin-block: 0 26px;
	line-height: var(--wp--custom--line-height--body);
}

/* Light pill button with a round gradient arrow
 * (design: .ac-footer-cta-button). Site-wide style `pill-light`. */
.wp-block-button.is-style-pill-light .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 26px;
	min-height: 53px;
	font-weight: 760;
	transition: transform 0.22s, box-shadow 0.22s;
}

.wp-block-button.is-style-pill-light .wp-block-button__link::after {
	content: "↗" / "";
	display: grid;
	place-items: center;
	width: 39px;
	height: 39px;
	border-radius: 50%;
	background: var(--wp--preset--gradient--brand);
	color: var(--wp--preset--color--white);
	font-size: 21px;
	font-weight: 400;
}

.wp-block-button.is-style-pill-light .wp-block-button__link:hover {
	box-shadow: var(--wp--custom--hover--footer-cta-shadow);
	color: var(--wp--preset--color--navy);
	filter: none;
	transform: translateY(-3px);
}

.ac-footer .ac-footer__mail {
	margin-block: 18px 0;
}

.ac-footer .ac-footer__mail a {
	color: var(--wp--preset--color--on-navy);
	transition: color 0.2s;
}

.ac-footer .ac-footer__email a {
	color: var(--wp--preset--color--sky-light);
}

/* Design .ac-footer-mail-hint:hover. */
.ac-footer .ac-footer__mail a:hover {
	color: var(--wp--custom--hover--mail-hint);
}

.ac-footer .ac-footer__email a:hover {
	color: var(--wp--preset--color--white);
}

/* ---------- Rail (line, diamond, line) ---------- */

.ac-footer .ac-footer__rail {
	position: relative;
	margin-block: 0;
	border: 0;
	border-top: 1px solid var(--wp--custom--line-on-navy);
	opacity: 0.8;
	overflow: visible;
}

.ac-footer .ac-footer__rail::after {
	content: "";
	position: absolute;
	top: -4px;
	left: 50%;
	width: 6px;
	height: 6px;
	background: var(--wp--preset--color--sky-light);
	box-shadow: 0 0 12px var(--wp--preset--color--sky-light);
	transform: translateX(-50%) rotate(45deg);
}

/* ---------- Columns ---------- */

.ac-footer .ac-footer__columns {
	grid-template-columns: 1.65fr 0.87fr 0.97fr 1.15fr;
	align-items: start;
}

.ac-footer .ac-footer__wordmark {
	margin: 0;
	font-weight: var(--wp--custom--font-weight--heading);
	letter-spacing: -0.068em;
	line-height: 0.98;
}

.ac-footer__wordmark a {
	color: var(--wp--preset--color--white);
}

.ac-footer .ac-footer__blurb {
	max-width: 295px;
	margin: 23px 0 0;
	line-height: 1.9;
}

/* Social profiles (core Social Icons, "logos only"): a small label and
 * round outline icons in the footer's on-navy colour; on hover the circle
 * fills white and the icon turns navy. */
.ac-footer .ac-footer__follow {
	margin: 26px 0 12px;
	color: var(--wp--preset--color--white);
	font-weight: var(--wp--custom--font-weight--label);
	letter-spacing: 0.065em;
	text-transform: uppercase;
}

.ac-footer .ac-footer__social.wp-block-social-links {
	gap: 10px;
	margin: 0;
	padding: 0;
}

.ac-footer .ac-footer__social.wp-block-social-links .wp-social-link {
	margin: 0;
	border: 1px solid var(--wp--custom--line-on-navy);
	border-radius: 50%;
	background: rgb(255 255 255 / 4%);
	color: var(--wp--preset--color--on-navy);
	transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.ac-footer .ac-footer__social.wp-block-social-links .wp-social-link a {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	color: inherit;
}

.ac-footer .ac-footer__social.wp-block-social-links .wp-social-link svg {
	width: 17px;
	height: 17px;
	fill: currentcolor;
}

.ac-footer .ac-footer__social.wp-block-social-links .wp-social-link:hover {
	border-color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
	transform: translateY(-2px);
}

.ac-footer .ac-footer__social.wp-block-social-links .wp-social-link a:focus-visible {
	border-radius: 50%;
	outline: 2px solid var(--wp--preset--color--sky-light);
	outline-offset: 3px;
}

.ac-footer .ac-footer__heading {
	margin: 7px 0 12px;
	font-weight: var(--wp--custom--font-weight--label);
	letter-spacing: 0.065em;
	text-transform: uppercase;
}

.ac-footer .ac-footer__column > p {
	max-width: 230px;
	margin: 0 0 15px;
	line-height: 1.8;
}

.ac-footer .ac-footer__menu .wp-block-navigation-item__content {
	color: var(--wp--preset--color--on-navy);
	line-height: 1.4;
	transition: transform 0.22s, color 0.22s;
}

.ac-footer .ac-footer__menu .wp-block-navigation-item__content:hover,
.ac-footer .ac-footer__menu .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--white);
	transform: translateX(3px);
}

.ac-footer .ac-footer__email {
	display: inline-block;
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--sky-light) 45%, transparent);
	white-space: nowrap;
}

.ac-footer .ac-footer__email a::after {
	content: "↗" / "";
	margin-left: 4px;
}

/* ---------- Legal bar ---------- */

.ac-footer .ac-footer-legal {
	align-items: center;
	min-height: 76px;
}

.ac-footer .ac-footer-legal__disclaimer {
	text-align: center;
}

.ac-footer .ac-footer-legal__top {
	white-space: nowrap;
}

/* Design .ac-footer-bottom > a. */
.ac-footer .ac-footer-legal a {
	transition: color 0.2s;
}

.ac-footer .ac-footer-legal a:hover {
	color: var(--wp--preset--color--white);
}

.ac-footer .ac-footer-legal__top span {
	margin-left: 6px;
	color: var(--wp--preset--color--sky-light);
}

/* ---------- Breakpoints ---------- */

@media (max-width: 1000px) {

	.ac-footer .ac-footer__columns {
		grid-template-columns: 1.4fr 1fr 1fr;
	}

	.ac-footer .ac-footer__contact {
		grid-column: 2 / span 2;
	}

	.ac-footer .ac-footer__contact > p {
		max-width: 400px;
	}

	.ac-footer .ac-footer-legal {
		justify-content: center;
		text-align: center;
	}
}

@media (max-width: 680px) {

	.ac-footer .ac-footer__kicker {
		letter-spacing: 0.14em;
	}

	.ac-footer .ac-footer__lead {
		padding: 0 12px;
		font-size: var(--wp--preset--font-size--base);
	}

	.wp-block-button.is-style-pill-light .wp-block-button__link {
		gap: 12px;
		padding-left: 17px;
		font-size: var(--wp--preset--font-size--small);
	}

	.ac-footer .ac-footer__columns {
		grid-template-columns: 1fr 1fr;
		row-gap: 40px;
		column-gap: 18px;
	}

	.ac-footer .ac-footer__identity,
	.ac-footer .ac-footer__contact {
		grid-column: 1 / -1;
		text-align: center;
	}

	.ac-footer .ac-footer__wordmark {
		display: inline-block;
		text-align: left;
	}

	.ac-footer .ac-footer__blurb,
	.ac-footer .ac-footer__contact > p {
		margin-right: auto;
		margin-left: auto;
	}

	.ac-footer .ac-footer__social.wp-block-social-links {
		justify-content: center;
	}

	.ac-footer .ac-footer__column {
		text-align: center;
	}

	.ac-footer .ac-footer__menu {
		align-items: center;
	}

	.ac-footer .ac-footer__contact > p {
		max-width: 300px;
	}

	.ac-footer .ac-footer-legal {
		flex-direction: column;
		gap: 9px;
	}

	/* Stacked: the desktop flex-basis (360px) would become a height. */
	.ac-footer .ac-footer-legal__disclaimer {
		flex: none;
	}
}

@media (prefers-reduced-motion: reduce) {

	.ac-footer a,
	.ac-footer .ac-footer__menu .wp-block-navigation-item__content,
	.wp-block-button.is-style-pill-light .wp-block-button__link,
	.ac-footer .ac-footer__social.wp-block-social-links .wp-social-link {
		transition: none;
	}

	.ac-footer .ac-footer__social.wp-block-social-links .wp-social-link:hover {
		transform: none;
	}
}
