/* ---------- Подвал: чёрный, закрытая таблица на сетке, реквизиты строкой, логотип во всю ширину ---------- */
.footer {
	--line: var(--grid-line-dark);
	--cross: var(--grid-cross-dark);
	padding: var(--space-xl) var(--gutter) var(--space-m);
	background: var(--c-black);
	color: var(--c-white);
}

.footer__grid,
.footer__legal,
.footer__word,
.footer__bottom {
	max-width: var(--container);
	margin-inline: auto;
}

.footer__grid {
	position: relative;
	display: grid;
	grid-template-columns: 1.3fr 0.8fr 1.3fr 0.8fr 1.3fr;
	border: 1px solid var(--line); /* taste-skill-ignore: сетка — фирменный приём */
}

.footer__cell {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
	padding: 32px 28px 40px;
}

.footer__cell + .footer__cell {
	border-left: 1px solid var(--line); /* taste-skill-ignore: граница ячейки */
}

/* Крестики на всех пересечениях: сверху и снизу у каждой границы, по углам таблицы */
.footer__cell::before,
.footer__cell::after,
.footer__grid::before,
.footer__grid::after {
	content: "";
	position: absolute;
	z-index: 1;
	width: 11px;
	height: 11px;
	background:
		linear-gradient(var(--cross), var(--cross)) center / 1px 100% no-repeat, /* taste-skill-ignore: крестик сетки */
		linear-gradient(var(--cross), var(--cross)) center / 100% 1px no-repeat; /* taste-skill-ignore: крестик из двух линий */
	pointer-events: none;
}

.footer__cell::before { right: -6px; top: -6px; }
.footer__cell::after { right: -6px; bottom: -6px; }
.footer__grid::before { left: -6px; top: -6px; }
.footer__grid::after { left: -6px; bottom: -6px; }

.footer__brand img {
	width: 168px;
	height: auto;
}

.footer__sign {
	font-size: 15px;
	line-height: 1.4;
	color: var(--text-muted-dark);
}

.footer__coord {
	margin-top: auto;
	color: var(--text-muted-dark);
}

.footer__head {
	color: var(--text-muted-dark);
}

.footer__list {
	display: grid;
	gap: 10px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.footer__list a,
.footer__mail,
.footer__bottom a {
	color: rgba(255, 255, 255, 0.86);
	transition: color var(--dur-fast) var(--ease-out);
}

.footer__list a {
	font-size: 16px;
	line-height: 1.3;
}

.footer__list a:hover,
.footer__mail:hover,
.footer__bottom a:hover {
	color: var(--accent);
}

.footer__phone {
	margin-top: 4px;
	font-size: clamp(1.25rem, 1rem + 0.7vw, 1.625rem); /* 20 → 26 */
	font-weight: var(--fw-medium);
	letter-spacing: -0.02em;
	white-space: nowrap;
	transition: color var(--dur-fast) var(--ease-out);
}

.footer__phone:hover {
	color: var(--accent);
}

.footer__mail {
	font-size: 16px;
}

.footer__hours {
	font-size: 15px;
	line-height: 1.45;
	color: var(--text-muted-dark);
}

.footer__cta {
	min-height: 48px;
	margin-top: auto;
	font-size: 12px;
}

/* Реквизиты: моно-подписи, значения, штрихкод ИНН справа */
.footer__legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 40px;
	margin-block: 0;
	padding: 18px 28px;
	border: 1px solid var(--line); /* taste-skill-ignore: строка таблицы */
	border-top: 0;
}

.footer__legal div {
	display: flex;
	align-items: baseline;
	gap: 12px;
}

.footer__legal dt {
	color: var(--text-muted-dark);
}

.footer__legal dd {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.86);
	font-variant-numeric: tabular-nums;
}

.footer__legal-code {
	margin-left: auto;
}

.footer__legal-code img {
	width: auto;
	height: 22px;
	filter: invert(1);
	opacity: 0.55;
}

/* Логотип во всю ширину — тихо, графитом по чёрному */
.footer__word {
	margin-top: clamp(40px, 6vw, 96px);
}

.footer__word img {
	display: block;
	width: 100%;
	height: auto;
	opacity: 0.1;
}

.footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 32px;
	margin-top: var(--space-m);
	padding-top: var(--space-s);
	border-top: 1px solid var(--line); /* taste-skill-ignore */
	font-size: 14px;
	color: var(--text-muted-dark);
}

.footer__bottom a {
	color: var(--text-muted-dark);
}

.footer__up {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

.footer__up .icon {
	rotate: -45deg;
	transition: transform var(--dur-fast) var(--ease-out);
}

.footer__up:hover .icon {
	transform: translateY(-2px);
}

/* Планшет: бренд и контакты во всю ширину, между ними три колонки ссылок */
@media (max-width: 1100px) {
	.footer__grid { grid-template-columns: repeat(3, 1fr); }
	.footer__brand,
	.footer__contact { grid-column: 1 / -1; }
	.footer__brand { border-bottom: 1px solid var(--line); /* taste-skill-ignore */ }
	.footer__contact { border-top: 1px solid var(--line); /* taste-skill-ignore */ }
	.footer__cell:nth-child(2),
	.footer__contact { border-left: 0; }
	.footer__brand::before,
	.footer__brand::after,
	.footer__contact::before,
	.footer__contact::after { display: none; }
	.footer__cta { align-self: flex-start; padding-inline: 32px; }
}

/* Телефон: «Компания» и «Вагоны» рядом, «Услуги» ниже во всю ширину */
@media (max-width: 640px) {
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.footer__cell { padding: 24px 16px 28px; }
	.footer__cell::before,
	.footer__cell::after { display: none; }
	.footer__cell:nth-child(3) {
		order: 1;
		grid-column: 1 / -1;
		border-left: 0;
		border-top: 1px solid var(--line); /* taste-skill-ignore */
	}
	.footer__contact { order: 2; }
	.footer__cta { align-self: stretch; }
	.footer__legal { padding: 16px; gap: 10px 24px; }
	.footer__legal-code { margin-left: 0; }
	.footer__up { margin-left: 0; }
}

/* «Документы» — в колонке бренда, под подписью; координаты остаются внизу колонки */
.footer__head--docs {
	margin-top: 28px;
}
