/**
 * Uplift site footer.
 *
 * Matches the Uplift Bank footer: a white surface under a 24px brand
 * gradient strip, Poppins headings and links in Dark Blue, and a bottom row
 * with the Equal Housing mark and the copyright line. Its colours are the
 * page roles, so in dark mode it sits on the near-black page under the same
 * strip.
 */

.sp-site-footer {
	position: relative;
	padding: 5rem 1rem 2.5rem;
	background: var(--sp-color-layer-canvas);
	color: var(--sp-color-text-primary);
	font-family: var(--sp-type-family-heading);
}

/* Brand gradient strip separating the footer from the page. */
.sp-site-footer::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 1.5rem;
	background: var(--uplift-gradient-full);
}

.wp-site-blocks .sp-site-footer__content {
	width: 100%;
	max-width: 1080px;
	margin-inline: auto;
}

.sp-site-footer__main {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2rem 4rem;
	margin-bottom: 4rem;
}

.sp-site-footer__summary {
	flex: 1 1 15rem;
	max-width: 17.5rem;
}

.sp-site-footer__heading {
	margin: 0 0 0.75rem;
	color: var(--sp-color-text-heading);
	font-family: var(--sp-type-family-heading);
	font-size: 1rem;
	font-weight: var(--sp-type-weight-semibold);
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}

.sp-site-footer__copy {
	margin: 0;
	color: var(--sp-color-text-primary);
	font-family: var(--sp-type-family-heading);
	font-size: 0.875rem;
	line-height: 1.5;
}

/* Footer menu columns sit beside the summary, like the info columns on the
   Uplift Bank footer. */
.sp-site-footer__link-grid {
	display: flex;
	flex: 3 1 32rem;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2rem 4rem;
}

.sp-site-footer__column {
	display: block;
	flex: 1 1 8rem;
}

.sp-site-footer__list {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sp-site-footer__link,
.sp-footer-menu__link {
	color: var(--sp-color-text-heading);
	font-family: var(--sp-type-family-heading);
	font-size: 0.875rem;
	font-weight: var(--sp-type-weight-regular);
	line-height: 1.4;
	text-decoration: none;
	transition: color 0.2s ease;
}

.sp-site-footer__link:hover,
.sp-site-footer__link:focus-visible,
.sp-footer-menu__link:hover,
.sp-footer-menu__link:focus-visible {
	color: var(--sp-color-text-accent);
	text-decoration: none;
}

.sp-site-footer a:focus-visible {
	border-radius: var(--uplift-radius-xs);
	outline: 2px solid var(--sp-color-text-accent);
	outline-offset: 2px;
}

.sp-site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--sp-color-border-subtle);
}

.sp-site-footer__bottom-start {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.sp-site-footer__equal-housing {
	display: block;
	width: 32px;
	height: auto;
}

.sp-site-footer__legal,
.sp-site-footer__legal-link {
	margin: 0;
	color: var(--sp-color-text-muted);
	font-size: 0.75rem;
	line-height: 1.4;
}

/* Also a <button> (cookie preferences); base.css already gives buttons the
   inherited font and colour, so only the chrome is reset here. */
.sp-site-footer__legal-link {
	padding: 0;
	border: 0;
	background: none;
	text-align: inherit;
	text-decoration: none;
	cursor: pointer;
}

.sp-site-footer__legal-link:hover {
	color: var(--sp-color-text-accent);
}

@media (max-width: 980px) {
	.sp-site-footer__bottom {
		flex-direction: column;
		text-align: center;
	}
}

@media (max-width: 580px) {
	.sp-site-footer {
		padding: 3.5rem 1rem 1.5rem;
	}

	.sp-site-footer__main,
	.sp-site-footer__link-grid {
		flex-direction: column;
		gap: 1.5rem;
	}

	/* Stacked, a flex basis would become a height (32rem for the link grid). */
	.sp-site-footer__summary,
	.sp-site-footer__link-grid,
	.sp-site-footer__column {
		flex: none;
	}

	.sp-site-footer__summary {
		max-width: none;
	}

	.sp-site-footer__bottom-start {
		flex-direction: column;
		gap: 1rem;
	}
}
