/**
 * HTPLaw Footer widget.
 *
 * Measured from the 4x Figma export (design px, footer top = 0 at y5888,
 * main area 403px): #0f2a3f. Columns 397 / 172 / 228 / 303px (Figma's 1100px layout),
 * used as proportions so they match at 1440 and scale below. Brand: white
 * logo 248×49 at 78; description Inter 14/21 (max 285px) 16px below; social
 * icons 24px, 19px apart, 28px below. Column headings Inter 13px uppercase
 * at 77 (25px line); lists Inter 14/25 from 109; inquiry groups separated by
 * one blank 25px line. 69px below the lists.
 *
 * Column-heading copper: Figma's #b87333 is 3.9:1 on this navy, so it uses
 * #bf8147 (4.5:1), the smallest lightening that passes WCAG AA.
 * Not in Figma: the copyright/legal bar. Links are underlined on hover;
 * phone and email are always underlined, as in Figma.
 */

.htplaw-footer {
	--_bg: var(--htplaw-footer-bg, var(--htplaw-color-secondary));
	--_text: var(--htplaw-footer-text, #ffffff);
	--_heading: var(--htplaw-footer-heading, var(--htplaw-color-accent-on-dark));
	--_logo-w: var(--htplaw-footer-logo-width, 248px);

	background: var(--_bg);
	color: var(--_text);
	font-family: var(--htplaw-font-body);
	font-size: 14px;
	line-height: 25px;
}

.htplaw-footer a {
	color: inherit;
	text-decoration: none;
}

.htplaw-footer a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* White focus ring on navy (the copper ring is too low-contrast here). */
.htplaw-footer :focus-visible {
	outline-color: #ffffff;
}

.htplaw-footer__main {
	display: grid;
	grid-template-columns: 397fr 172fr 228fr 303fr;
	align-items: start;
	padding-top: 77px;
	padding-bottom: 69px;
}

/* Brand */
.htplaw-footer__logo {
	display: block;
	width: fit-content;
	margin-top: 1px;
}

.htplaw-footer__logo-img {
	display: block;
	width: var(--_logo-w);
	max-width: 100%;
	height: auto;
}

.htplaw-footer__about {
	max-width: 285px;
	margin: 16px 0 0;
	line-height: 21px;
}

.htplaw-footer__social {
	display: flex;
	gap: 19px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.htplaw-footer__social a {
	display: block;
}

.htplaw-footer__social svg {
	display: block;
	width: 24px;
	height: 24px;
}

/* Columns */
.htplaw-footer__heading {
	margin: 0 0 7px;
	color: var(--_heading);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.htplaw-footer__menu,
.htplaw-footer__links,
.htplaw-footer__legal-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.htplaw-footer__address {
	font-style: normal;
}

.htplaw-footer__address p {
	margin: 0 0 25px;
}

.htplaw-footer__address a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.htplaw-footer__links a::after {
	content: " →";
	content: " →" / "";
}

/* Copyright bar */
.htplaw-footer__bottom {
	border-top: 1px solid rgb(255 255 255 / 15%);
	font-size: 13px;
	line-height: 20px;
}

.htplaw-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	padding-block: 20px;
}

.htplaw-footer__copyright {
	margin: 0;
}

.htplaw-footer__legal-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

@media (max-width: 1024px) {
	.htplaw-footer__main {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: 40px;
		padding-top: 56px;
		padding-bottom: 48px;
	}

	.htplaw-footer__brand {
		grid-column: 1 / -1;
	}
}

/*
 * Phones (not in Figma): brand, then the link lists side by side, then the
 * inquiry block as a contact card: thin rules separate the three groups,
 * the address flows as one paragraph (the desktop line break splits the
 * street number), and the inquiry links become full-width buttons, the
 * first copper. DOM order is kept so focus order matches the layout.
 */
@media (max-width: 640px) {
	.htplaw-footer__main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 20px;
		row-gap: 28px;
		padding-top: 44px;
		padding-bottom: 40px;
	}

	.htplaw-footer__brand {
		padding-bottom: 28px;
		border-bottom: 1px solid rgb(255 255 255 / 15%);
	}

	.htplaw-footer__about {
		max-width: 340px;
	}

	.htplaw-footer__heading {
		margin-bottom: 4px;
	}

	/* Tap rows for the link lists: 37px (25px on desktop). */
	.htplaw-footer__menu a,
	.htplaw-footer__legal-menu a {
		display: inline-block;
		padding-block: 6px;
	}

	.htplaw-footer__inquiry {
		grid-column: 1 / -1;
		padding-top: 28px;
		border-top: 1px solid rgb(255 255 255 / 15%);
	}

	.htplaw-footer__address p:first-child:not(:last-child) br {
		display: none;
	}

	.htplaw-footer__address p {
		margin-bottom: 12px;
	}

	/* Phone and email lines: room to tap without moving the text. */
	.htplaw-footer__address a {
		display: inline-block;
		padding-block: 9px;
		margin-block: -9px;
	}

	.htplaw-footer__address p + p {
		line-height: 32px;
	}

	.htplaw-footer__links {
		display: grid;
		gap: 12px;
		margin-top: 24px;
	}

	.htplaw-footer__links a {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: .35em; /* flex drops the arrow's leading space */
		min-height: 48px;
		padding: 10px 20px;
		border: 1px solid rgb(255 255 255 / 60%);
		border-radius: var(--htplaw-radius);
		font-size: 15px;
		font-weight: 700;
		line-height: 1.3;
		text-align: center;
		transition: background-color var(--htplaw-duration) var(--htplaw-ease), border-color var(--htplaw-duration) var(--htplaw-ease);
	}

	.htplaw-footer__links li:first-child a {
		border-color: var(--htplaw-color-accent-strong);
		background: var(--htplaw-color-accent-strong);
	}

	.htplaw-footer__links a:hover {
		border-color: #ffffff;
		text-decoration: none;
	}

	.htplaw-footer__social {
		gap: 8px;
	}

	.htplaw-footer__social a {
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		margin-inline-start: -10px;
	}

	.htplaw-footer__social li + li a {
		margin-inline-start: 0;
	}

	.htplaw-footer__bottom-inner {
		flex-direction: column;
	}
}
