/* Bigham Agency Footer widget — scoped styles for `.bigham-footer`.
 * Figma: Footer component (1:534), Theme = Dark. The footer sets the Dark theme
 * aliases on itself, so everything inside reads --theme-* as on a dark surface.
 * Social chips come from social.css (`bigham-social-css`).
 *
 * All colours, typography, spacing and radii consume CSS Manager tokens.
 *
 * Allowed exceptions (see references/token-system.md):
 *   - 2px focus-outline width / offset (project-wide focus-ring convention).
 *   - 28.125rem brand column / 35.6875rem link block: the Figma column widths
 *     (450px / 571px); one-off layout measures with no token equivalent.
 *   - 1024px media query: custom properties cannot be used in media queries;
 *     this matches Elementor's tablet breakpoint.
 *
 * Hardening: Hello's reset colours every <a> and the kit styles h2; the link and
 * heading colours carry !important (references/css-hardening.md).
 */

.bigham-footer {
	/* Dark theme, scoped (Figma Theme collection, Dark mode). */
	--theme-background: var(--blue);
	--theme-background-2: var(--blue);
	--theme-text: var(--light-100);
	--theme-border: var(--light-100-o20);

	background: var(--footer-background);
	color: var(--theme-text);
	font-family: var(--font-family-secondary);
	font-size: var(--font-size-text-main);
	line-height: var(--line-height-text-main);
}

.bigham-footer__inner {
	display: flex;
	flex-direction: column;
	gap: var(--space-7);
	width: min(var(--container--main), calc(100% - var(--site--margin) * 2));
	margin-inline: auto;
	padding-block: var(--section-space-small) var(--space-7);
}

/* --- Top: brand | menu + contact --- */

.bigham-footer__top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--space-7) var(--space-8);
}

.bigham-footer__brand {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	max-inline-size: 28.125rem;
}

.bigham-footer__title {
	margin: 0;
	color: var(--theme-text) !important;
	font-family: var(--font-family-primary) !important;
	font-size: var(--font-size-h4) !important;
	font-weight: var(--font-weight-regular) !important;
	line-height: var(--line-height-h4) !important;
	letter-spacing: var(--tracking-normal) !important;
}

.bigham-footer__text {
	margin: 0;
}

.bigham-footer__columns {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	column-gap: var(--space-5);
	inline-size: min(100%, 35.6875rem);
}

.bigham-footer__column {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.bigham-footer__label {
	margin: 0;
	color: var(--cream) !important;
	font-family: var(--font-family-secondary) !important;
	font-size: var(--font-size-text-small) !important;
	font-weight: var(--font-weight-semibold) !important;
	line-height: var(--line-height-text-small) !important;
	letter-spacing: var(--tracking-eyebrow) !important;
	text-transform: uppercase;
}

.bigham-footer__list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-3);
	margin: 0;
	padding: 0;
	list-style: none;
	font-style: normal; /* <address> */
}

.bigham-footer__link {
	color: var(--theme-text) !important;
	text-decoration-line: underline !important;
	text-decoration-color: var(--transparent) !important;
	text-decoration-thickness: var(--border-width-main);
	text-underline-offset: var(--space-1);
	transition: text-decoration-color var(--duration-fast) var(--ease-standard);
}

.bigham-footer__link:hover,
.bigham-footer__link:focus-visible,
.bigham-footer__link[aria-current="page"] {
	text-decoration-color: currentColor !important;
}

/* Desktop menu underline: a line that draws in from the left on hover and
 * leaves to the right on hover out. It is a ::after scaled on X; the trick is
 * the origin: `right` at rest (so the line shrinks towards the right as it
 * leaves) and `left` while hovered (so it grows from the left). The current
 * page keeps its line drawn. Touch screens and the mobile menu keep the plain
 * text underline above. */
@media (min-width: 1025px) and (hover: hover) {
	nav .bigham-footer__link {
		position: relative;
		text-decoration-line: none !important;
	}

	nav .bigham-footer__link::after {
		content: "";
		position: absolute;
		inset-inline: 0;
		inset-block-end: calc(-1 * var(--space-1));
		block-size: var(--border-width-main);
		background-color: currentColor;
		transform: scaleX(0);
		transform-origin: right center;
		transition: transform var(--duration-medium) var(--ease-standard);
	}

	nav .bigham-footer__link:hover::after,
	nav .bigham-footer__link:focus-visible::after {
		transform: scaleX(1);
		transform-origin: left center;
	}

	nav .bigham-footer__link[aria-current="page"]::after {
		transform: scaleX(1);
		transition: none;
	}
}

.bigham-footer__address {
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

/* --- Bottom: hairline, copyright | socials --- */

.bigham-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding-block-start: var(--space-7);
	border-block-start: var(--border-width-main) solid var(--theme-border);
}

.bigham-footer__legal {
	margin: 0;
	font-size: var(--font-size-text-small);
	font-weight: var(--font-weight-medium);
	line-height: var(--line-height-text-small);
}

/* Focus ring: brand crimson is too dark on ink, so the footer uses its text colour. */
.bigham-footer :focus-visible {
	outline: 2px solid var(--theme-text);
	outline-offset: 2px;
}

/* --- Tablet: brand above the link columns --- */
@media (max-width: 1024px) {
	.bigham-footer__top {
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bigham-footer__link,
	.bigham-footer__link::after {
		transition: none !important;
	}
}
