/**
 * Component: Site Footer — styles
 * Scoped to .apt-footer (BEM root). All rules confined to this component — no
 * global/site-wide selectors. Site-wide tokens from style.css via var(--*).
 *
 * Global chrome: renders on every page via generate_footer. A full-bleed dark
 * bar; the inner row (logo | legal links | socials) is capped at 1440px so the
 * edges track a centered container on wide screens. Stacks centered below 900px.
 */

/* ── Root (full-bleed, dark) ──────────────────────────────────── */
.apt-footer {
	background: var(--color-text-pri); /* #191d2b */
	color: var(--color-text-inv);
}

/* ── Inner row ────────────────────────────────────────────────── */
.apt-footer__bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: var(--space-2xl);
	max-width: 1440px;
	min-height: 104px;
	margin-inline: auto;
	padding: var(--space-xl) clamp(16px, 6vw, 85px);
}

/* ── Logo (left) ──────────────────────────────────────────────── */
.apt-footer__logo {
	justify-self: start;
	display: flex;
	color: var(--color-text-inv);
	border-radius: 4px;
	transition: opacity 0.15s ease;
}

.apt-footer__logo:hover,
.apt-footer__logo:focus {
	color: var(--color-text-inv); /* beat GeneratePress's a:hover colour */
	opacity: 0.8;
}

.apt-footer__logo-svg {
	display: block;
	width: 164px;
	height: auto;
}

/* ── Legal row (center) ───────────────────────────────────────── */
.apt-footer__legal {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-xl); /* 24px */
}

.apt-footer__legal-text,
.apt-footer__legal-link {
	font-family: var(--font-body);
	font-size: var(--text-body);
	line-height: 1.5;
	color: var(--color-text-inv);
}

.apt-footer__legal-link {
	text-decoration: none;
	border-radius: 4px;
}

.apt-footer__legal-link:hover,
.apt-footer__legal-link:focus {
	color: var(--color-text-inv);
	text-decoration: underline;
}

/* ── Socials (right) ──────────────────────────────────────────── */
.apt-footer__social {
	justify-self: end;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: var(--space-2xl); /* 32px */
}

.apt-footer__social li {
	margin: 0;
}

.apt-footer__social-link {
	display: inline-flex;
	color: var(--color-text-inv);
	border-radius: 4px;
	transition: opacity 0.15s ease;
}

.apt-footer__social-link:hover,
.apt-footer__social-link:focus {
	color: var(--color-text-inv);
	opacity: 0.75;
}

.apt-footer__social-icon {
	display: block;
	width: 24px;
	height: 24px;
}

/* ── Focus indicators ─────────────────────────────────────────── */
.apt-footer__logo:focus-visible,
.apt-footer__legal-link:focus-visible,
.apt-footer__social-link:focus-visible {
	outline: 2px solid var(--color-text-inv);
	outline-offset: 3px;
}

/* ── Tablet ≤900px — stack, centered ──────────────────────────── */
@media (max-width: 900px) {
	.apt-footer__bar {
		grid-template-columns: 1fr;
		justify-items: center;
		gap: var(--space-xl);
		padding: var(--space-3xl) var(--space-2xl);
	}

	.apt-footer__logo,
	.apt-footer__social {
		justify-self: center;
	}
}

/* ── Mobile ≤480px ────────────────────────────────────────────── */
@media (max-width: 480px) {
	.apt-footer__bar {
		padding-inline: var(--space-lg);
	}

	.apt-footer__legal {
		gap: var(--space-md) var(--space-lg);
	}

	.apt-footer__legal-text {
		flex-basis: 100%;
		text-align: center;
	}
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.apt-footer__logo,
	.apt-footer__social-link {
		transition: none;
	}
}
