.footer {
  padding-block: 5rem 2.5rem;
  background-color: var(--text);
  color: #a3a3a3;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 3.75rem;
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  flex: 0 1 25rem;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 25rem;
}

.footer__logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.footer__logo-image {
  display: block;
  max-height: 2.5rem;
  width: auto;
}

.footer__logo-fallback {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
}

.footer__logo-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 1.25rem;
  background-color: var(--primary);
  color: white;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.footer__logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: white;
}

.footer__description {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.575;
}

.footer__nav,
.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer__nav {
  flex: 0 0 12.5rem;
  width: 12.5rem;
}

.footer__contacts {
  flex: 0 0 18.75rem;
  width: 18.75rem;
  gap: 1.25rem;
}

.footer__heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: white;
}

.footer__menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__menu a {
  color: #a3a3a3;
  font-size: 0.875rem;
  line-height: 1.3;
  text-decoration: none;
  transition: color 400ms;
}

.footer__menu a:hover,
.footer__menu a:focus,
.footer__menu a:active {
  color: white;
}

.footer__contacts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__phone {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: white;
  text-decoration: none;
  transition: color 400ms;
}

.footer__phone:hover,
.footer__phone:focus,
.footer__phone:active {
  color: var(--primary);
}

.footer__email,
.footer__address,
.footer__copyright,
.footer__credit {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.3;
  color: #a3a3a3;
}

.footer__email {
  text-decoration: none;
  transition: color 400ms;
}

.footer__email:hover,
.footer__email:focus,
.footer__email:active,
.footer__credit:hover,
.footer__credit:focus,
.footer__credit:active {
  color: white;
}

.footer__credit {
  text-decoration: none;
  transition: color 400ms;
}

.footer__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.875rem;
  border-top: 1px solid #404040;
}

@media (max-width: 1024px) {
  .footer {
    padding-block: 4rem 2rem;
  }

  .footer__inner {
    gap: 2.5rem;
  }

  .footer__top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }

  .footer__brand {
    grid-column: 1 / -1;
    flex: none;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .footer {
    padding-block: 3rem 1.5rem;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 0.75rem;
  }
}
