/* ==========================================================================
   Footer
   Опорный кадр 1920, поля 120 слева и справа.

   Верхняя часть, 1674 × 130:
     слева    лого 99.8 × 22.9 (отступ 9), соц-иконки внизу, y 107…124
     центр    «Контакты» + телефон + email, выключка по центру
     справа   «Компания» + три ссылки, прижат к правому краю
     строки   заголовок y 8.5, далее 49.5 / 84.5 / 119.5 (шаг 35)

   Нижняя часть: линия сверху #f3f4f6, отступ 64, строка 24:
     слева    плашка «All systems normal» 142.5 × 22 с зелёной точкой
     центр    копирайт
     справа   три кнопки 40 × 24 с иконками 16 × 16

   Цвета этого блока не из палитры сайта — это тёмно-серый и серый из
   макета. Вынесены в переменные ниже, чтобы позже было легко свести
   к общей палитре.
   ========================================================================== */

.footer {
  --footer-text: #1f2937;
  --footer-muted: #6b7280;
  --footer-line: #f3f4f6;

  background-color: var(--bg-base);
  padding-inline: clamp(1.25rem, 6.25vw, 7.5rem);
  padding-block: clamp(2.5rem, 5.573vw, 6.6875rem) clamp(1.5rem, 2.0833vw, 2.5rem);
}

/* --- Верхняя часть -------------------------------------------------------- */

.footer__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 2rem;
  min-height: 130px;
}

/* Лого сверху, соц-сети прижаты к низу колонки */
.footer__brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  padding-top: 6px;
}

.footer__logo {
  margin-left: 9px;
}

.footer__logo img {
  width: 100px;
  height: auto;
}

/* --- Соц-сети ------------------------------------------------------------- */

.socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.socials__link {
  display: block;
  transition: opacity 0.25s ease;
}

.socials__link:hover,
.socials__link:focus-visible {
  opacity: 0.6;
}

.socials__divider {
  width: 1px;
  height: 16px;
  background-color: var(--footer-line);
}

/* --- Колонки ссылок ------------------------------------------------------- */

.footer__col {
  text-align: center;
}

.footer__col--end {
  justify-self: end;
}

.footer__title {
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: var(--fw-regular);
  line-height: 1.4286;
  color: var(--footer-text);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__link {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--footer-muted);
  transition: color 0.25s ease;
}

.footer__link:hover,
.footer__link:focus-visible {
  color: var(--footer-text);
}

/* --- Нижняя часть --------------------------------------------------------- */

.footer__bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  margin-top: 64px;
  padding-top: 64px;
  border-top: 1px solid var(--footer-line);
}

.footer__copy {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--footer-muted);
  text-align: center;
}

/* --- Плашка статуса ------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  height: 22px;
  padding-inline: 6px 12px;
  font-size: 0.75rem;
  line-height: 1.3333;
  color: var(--footer-text);
  border: 1px solid var(--footer-line);
  border-radius: 999px;
}

.status__dot {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  background-color: #f0fdf4;
  border-radius: 50%;
}

.status__dot::after {
  content: "";
  width: 4px;
  height: 4px;
  background-color: #22c55e;
  border-radius: 50%;
}

/* --- Переключатель темы ---------------------------------------------------- */

.theme-switch {
  display: flex;
  gap: 4px;
  justify-self: end;
}

.theme-switch__btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 24px;
  border-radius: 6px;
  transition: background-color 0.25s ease;
}

.theme-switch__btn:hover,
.theme-switch__btn:focus-visible {
  background-color: var(--footer-line);
}

/* --- Планшет и мобильные --------------------------------------------------- */

@media (max-width: 900px) {
  .footer__top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    min-height: 0;
  }

  .footer__brand {
    min-height: 0;
    gap: 1.5rem;
    padding-top: 0;
  }

  .footer__logo {
    margin-left: 0;
  }

  .footer__col,
  .footer__col--end {
    justify-self: start;
    text-align: left;
  }

  .footer__bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.25rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
  }

  .status,
  .theme-switch {
    justify-self: center;
  }
}
