/*
 * Design System - AELITA
 * components/footer.css - global site footer.
 *
 * Single dark block: brand (logo + descriptor + contacts + socials), the
 * navigation columns built from the main menu, and a legal bar with the
 * language switcher.
 *
 * The markup no longer uses the legacy .bottommenu / .mainfooter classes, so
 * the legacy rules in main.css / media.css simply do not match and no
 * specificity overrides are needed. Consumes tokens.css only; no new tokens.
 */

.a-footer {
	background-color: var(--c-ink-900); /* #161618 */
	color: var(--c-ink-300);             /* #8c98ad */
	font-family: var(--font-body);
	font-size: var(--fs-small);          /* 14px */
	line-height: var(--lh-body);
}

.a-footer__inner {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding: var(--space-8) var(--space-5) var(--space-6); /* 64 24 32 */
}

/* -------------------------------------------------------------------- */
/* Top: brand + navigation                                              */
/* -------------------------------------------------------------------- */
.a-footer__top {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-7) var(--space-6); /* 48 32 */
}

@media (min-width: 768px) {
	.a-footer__top {
		grid-template-columns: minmax(220px, 1fr) minmax(0, 2.4fr);
		align-items: start;
	}
}

/* Brand ---------------------------------------------------------------- */
.a-footer__brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-4);
}

.a-footer__logo {
	display: inline-flex;
}

.a-footer__logo img {
	display: block;
	width: 150px;
	height: auto;
	/* Subdued by default so the logo does not dominate the dark footer. */
	opacity: 0.72;
	filter: brightness(0.6) saturate(0.9);
	transition:
		opacity var(--dur-modal) var(--ease-out),
		filter var(--dur-modal) var(--ease-out);
}

.a-footer__logo:hover img,
.a-footer__logo:focus-visible img {
	opacity: 1;
	filter: none;
}

.a-footer__desc {
	margin: 0;
	max-width: 34ch;
	color: var(--c-ink-300);
	font-size: var(--fs-small);
}

.a-footer__contacts {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-2);
}

.a-footer__mail {
	color: var(--c-ink-100);
	text-decoration: none;
	transition: color var(--dur-press) var(--ease-out);
}

.a-footer__mail:hover {
	color: var(--c-white);
}

.a-footer__all-contacts {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--c-ink-300);
	text-decoration: none;
	transition: color var(--dur-press) var(--ease-out);
}

.a-footer__all-contacts span {
	transition: transform var(--dur-popover) var(--ease-out);
}

.a-footer__all-contacts:hover {
	color: var(--c-white);
}

.a-footer__all-contacts:hover span {
	transform: translateX(4px);
}

/* Socials -------------------------------------------------------------- */
.a-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: var(--space-2) 0 0;
	padding: 0;
	list-style: none;
}

.a-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--c-ink-300);
	border: var(--border-w) solid rgba(213, 220, 232, 0.18);
	border-radius: 50%;
	transition:
		color var(--dur-popover) var(--ease-out),
		border-color var(--dur-popover) var(--ease-out),
		background-color var(--dur-popover) var(--ease-out);
}

.a-footer__social-link:hover {
	color: var(--c-white);
	border-color: var(--c-red-600);
	background-color: rgba(203, 0, 44, 0.12);
}

/* Navigation ----------------------------------------------------------- */
.a-footer__nav {
	display: flex;
	flex-direction: column;
	gap: var(--space-6);
}

.a-footer__cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-6) var(--space-5);
}

@media (min-width: 480px) {
	.a-footer__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 992px) {
	.a-footer__cols {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

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

.a-footer__heading {
	margin: 0;
	color: var(--c-white);
	font-family: var(--font-display);
	font-size: var(--fs-small); /* 14px - one step above the links */
	font-weight: var(--fw-semibold);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}

a.a-footer__heading {
	transition: color var(--dur-press) var(--ease-out);
}

a.a-footer__heading:hover {
	color: var(--c-red-500);
}

.a-footer__list {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.a-footer__link {
	color: var(--c-ink-300);
	font-size: var(--fs-caption); /* 12px */
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color var(--dur-press) var(--ease-out);
}

.a-footer__link:hover {
	color: var(--c-white);
}

/* Quick links (childless top-level items) ------------------------------ */
/* Childless top-level items are rendered as heading columns inside
 * .a-footer__cols (see template-parts/footer/nav.php), so they need no
 * dedicated row/grid of their own. */

/* -------------------------------------------------------------------- */
/* Bottom legal bar                                                     */
/* -------------------------------------------------------------------- */
.a-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	margin-top: var(--space-7);
	padding-top: var(--space-5);
	border-top: var(--border-w) solid rgba(213, 220, 232, 0.12);
}

.a-footer__legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2) var(--space-5);
	color: var(--c-ink-500);
	font-size: var(--fs-caption);
}

.a-footer__policy {
	color: var(--c-ink-300);
	text-decoration: none;
	transition: color var(--dur-press) var(--ease-out);
}

.a-footer__policy:hover {
	color: var(--c-white);
}

/* Language switcher ---------------------------------------------------- */
.a-footer__lang .switcher-list {
	display: flex;
	gap: var(--space-3);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--fs-caption);
}

.a-footer__lang .switcher-list li + li {
	padding-inline-start: var(--space-3);
	border-inline-start: var(--border-w) solid var(--c-ink-700);
}

.a-footer__lang .switcher-list li:not(.active) a,
.a-footer__lang .switcher-list li:not(.active) > span {
	color: var(--c-ink-300);
}

.a-footer__lang .switcher-list li.active a,
.a-footer__lang .switcher-list li.active > span {
	color: var(--c-white);
}

.a-footer__lang a {
	text-decoration: none;
	transition: color var(--dur-press) var(--ease-out);
}

.a-footer__lang a:hover {
	color: var(--c-white);
}

/* Focus visibility ----------------------------------------------------- */
.a-footer a:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.a-footer__inner {
		padding-block: var(--space-7) var(--space-5);
	}
}
