/*
 * Site footer.
 *
 * Four blocks stacked 64px apart inside the 1280 column: the closing pitch with the sign-up form, a
 * hairline, three columns of details, and the legal bar. Measured from the published page.
 */

.as-footer {
	padding: 124px 32px 32px;
	color: var(--as-white);
	background: var(--as-navy);
}

.as-footer__inner {
	display: flex;
	flex-direction: column;
	gap: 64px;
	max-width: var(--as-container);
	margin: 0 auto;
}

/* Closing pitch ----------------------------------------------------------- */

.as-footer__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 64px;
}

/*
 * The two blocks are percentages of the column, not fixed widths: 50% and 30% at desktop, which is
 * why space-between leaves the remaining 20% between them. They were read at 1440 and 1200 and the
 * same two percentages hold at both.
 */
.as-footer__lead {
	display: flex;
	flex: 0 0 50%;
	flex-direction: column;
	gap: 24px;
}

.as-footer__heading {
	margin: 0;
	font-family: var(--as-font);
	font-size: 36px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
}

.as-social {
	display: flex;
	/* The row is as wide as its icons, not as wide as the column it sits in. */
	align-self: flex-start;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.as-social__link {
	display: block;
	color: var(--as-white);
	transition: color var(--as-duration) var(--as-ease);
}

.as-social__link:hover,
.as-social__link:focus-visible {
	color: var(--as-white-50);
}

.as-social__icon {
	display: block;
	width: 24px;
	height: 24px;
}

/* Sign-up ----------------------------------------------------------------- */

.as-footer__signup {
	display: flex;
	flex: 0 0 30%;
	flex-direction: column;
	gap: 24px;
}

/*
 * Uppercase is applied rather than typed, which is how the design does it — the text in Framer reads
 * "Let's talk" and "Contact Us". It matters: a screen reader says a typed-caps word letter by letter,
 * and a translator has nowhere to put a language that has no capitals.
 */
.as-footer__label {
	margin: 0;
	font-family: var(--as-font);
	font-size: 16px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
	text-transform: uppercase;
}

.as-signup {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

/*
 * The design gives this field no border, no radius and the same fill as the footer behind it, so the
 * placeholder is the only thing showing where to type. Reproduced as drawn; flagged for the
 * designer rather than quietly corrected.
 */
.as-signup__field {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	height: 40px;
	padding: 12px;
	background: var(--as-navy);
}

.as-signup__input {
	width: 100%;
	/*
	 * The field fills its slot rather than sizing itself from the type, which is how the design gets
	 * a 16px-tall input: the 40px box less its 12px padding.
	 */
	height: 100%;
	margin: 0;
	padding: 0;
	color: var(--as-white);
	font-family: var(--as-font);
	font-size: 14px;
	font-weight: 400;
	line-height: var(--as-lh-snug);
	background: transparent;
	border: 0;
	border-radius: 0;
	appearance: none;
}

.as-signup__input::placeholder {
	color: var(--as-white-50);
	opacity: 1;
}

.as-signup__action {
	flex: 0 0 auto;
}

.as-signup__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 20px;
	color: var(--as-black);
	font-family: var(--as-font);
	font-size: 16px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
	background: var(--as-white);
	border: 0;
	border-radius: 0;
	cursor: pointer;
}

/* Not in the design: it only exists once a submission has been made. */
.as-signup__message {
	flex: 1 1 100%;
	margin: 0;
	font-family: var(--as-font);
	font-size: 14px;
	line-height: var(--as-lh-body);
	color: var(--as-white-50);
}

.as-signup__trap {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Hairline ---------------------------------------------------------------- */

.as-footer__rule {
	height: 1px;
	background: var(--as-rule-inverted);
}

/* Detail columns ---------------------------------------------------------- */

.as-footer__cols {
	display: flex;
	gap: 64px;
}

.as-footer__col {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.as-footer__col--brand {
	gap: 24px;
}

.as-footer__logo {
	display: block;
	width: 327px;
}

.as-footer__logo img {
	display: block;
	width: 327px;
	height: auto;
	aspect-ratio: 2002 / 256;
}

.as-footer__blurb {
	margin: 0;
	color: var(--as-white-50);
	font-family: var(--as-font);
	font-size: 20px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
}

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

/* Same roll-up as the nav, at the same 19px label and 6px gap. */
.as-footer__link,
.as-footer__text {
	/*
	 * Content width, not column width: the design sizes each of these to its own text, which is what
	 * keeps the hover target off the empty space beside it.
	 */
	display: block;
	width: max-content;
	overflow: hidden;
	height: 22px;
	padding: 1px;
	color: var(--as-white-50);
	font-family: var(--as-font);
	font-size: 16px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
	text-decoration: none;
}

.as-footer__roll {
	display: flex;
	flex-direction: column;
	gap: 6px;
	transition: transform var(--as-duration) var(--as-ease);
}

.as-footer__label-line {
	display: block;
	white-space: nowrap;
}

.as-footer__link:hover .as-footer__roll,
.as-footer__link:focus-visible .as-footer__roll {
	transform: translateY(calc(-1 * (1.2em + 6px)));
}

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

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

.as-footer__bottom {
	display: flex;
	gap: 120px;
}

.as-footer__legal,
.as-footer__legal-nav {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	color: var(--as-white-50);
	font-family: var(--as-font);
	font-size: 16px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
	text-transform: uppercase;
}

/*
 * The legal links sit against the right edge of the page, not against the copyright. Their half of
 * the bar is the same 580px width; the text is simply aligned to its far side.
 */
.as-footer__legal-nav {
	text-align: right;
}

.as-footer__legal-menu {
	display: flex;
	gap: 24px;
	justify-content: flex-end;
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * Block, so the link is exactly as tall as its line. The design makes this link the full 580px half
 * of the bar, which means a large area of empty footer is clickable; the text lands in the same place
 * either way, so it is kept to its own width here.
 */
.as-footer__legal-menu a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.as-footer__legal-menu a:hover,
.as-footer__legal-menu a:focus-visible {
	color: var(--as-white);
}

/*
 * Same layout as Gorman: “Powered By” then the rePrecinct mark, centred under the legal bar,
 * linking out to the CRM.
 */
.as-powered-by {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 10px;
}

.as-powered-by__label {
	margin: 0;
	color: var(--as-white);
	font-family: var(--as-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.04em;
}

.as-powered-by__link {
	display: block;
	line-height: 0;
}

.as-powered-by__link img {
	display: block;
	width: 161px;
	height: 32px;
}

/* Tablet ------------------------------------------------------------------ */

@media (max-width: 1199px) and (min-width: 810px) {
	.as-footer__heading {
		font-size: 32px;
	}

	/* 55% and 45% with nothing between them: 410 and 336 of 746. */
	.as-footer__top {
		gap: 0;
	}

	.as-footer__lead {
		flex-basis: 55%;
	}

	.as-footer__signup {
		flex-basis: 45%;
	}

	.as-footer__blurb {
		max-width: 460px;
		font-size: 16px;
	}

	/*
	 * The brand block takes a row of its own and the two detail columns share the row below, 349
	 * each with 48 between and 40 above. Until the October 2026 revision the design squeezed all three
	 * into one row, where the logo and the email address ran across the column beside them; this
	 * build already stacked them, and the design now does the same with these numbers.
	 */
	.as-footer__cols {
		flex-wrap: wrap;
		column-gap: 48px;
		row-gap: 40px;
	}

	.as-footer__col--brand {
		flex: 0 0 100%;
	}

	.as-footer__bottom {
		gap: 48px;
	}
}

/* Phone ------------------------------------------------------------------- */

@media (max-width: 809px) {
	.as-footer {
		padding: 80px 20px 20px;
	}

	.as-footer__heading {
		font-size: 30px;
	}

	.as-footer__blurb {
		font-size: 18px;
	}

	/* The sign-up moves above the heading on phone, which is the design's own order. */
	.as-footer__top {
		flex-direction: column;
		align-items: stretch;
		gap: 60px;
	}

	.as-footer__lead,
	.as-footer__signup {
		flex-basis: auto;
	}

	.as-footer__signup {
		order: -1;
	}

	.as-footer__cols {
		flex-direction: column;
		gap: 60px;
	}

	.as-footer__bottom {
		flex-direction: column;
		gap: 32px;
	}
}
