.site-footer {
  --footer-surface: #282834;
  --footer-divider: #3f415f;
  --footer-heading: #9292b0;
  --footer-text: #ffffff;

  display: flex;
  width: calc(100% - 16px);
  flex-direction: column;
  gap: 0;
  margin: 0 auto 8px;
  padding: 40px;
  box-sizing: border-box;
  border-radius: 20px;
  background-color: var(--footer-surface);
  color: var(--footer-text);
}

.site-footer__inner {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 40px;
  margin-inline: auto;
}

.site-footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.site-footer__logo img {
  display: block;
  width: 116px;
  height: 56px;
  flex-shrink: 0;
}

.site-footer__nav,
.site-footer__secondary {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 8px;
}

.site-footer__column,
.site-footer__secondary > .site-footer__link {
  grid-column: span 3;
}

.site-footer__column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.site-footer__title,
.site-footer__link,
.site-footer__copyright {
  font-family: Inter, -apple-system, Roboto, Arial, sans-serif;
}

.site-footer__title {
  margin: 0;
  color: var(--footer-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 18px;
}

.site-footer__link {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  gap: 0;
  border: none;
  background: none;
  color: var(--footer-text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 18px;
  text-decoration: none;
  transition: gap 150ms ease, color 150ms ease;
  white-space: nowrap;
}

.site-footer__column .site-footer__link {
  align-self: flex-start;
}

.site-footer__link::after {
  width: 20px;
  height: 20px;
  max-width: 0;
  flex-shrink: 0;
  overflow: hidden;
  background-color: currentColor;
  content: "";
  opacity: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12M11 5l5 5-5 5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12M11 5l5 5-5 5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
  transition: opacity 150ms ease, max-width 150ms ease;
}

.site-footer__link:hover {
  gap: 4px;
}

.site-footer__link:hover::after {
  max-width: 20px;
  opacity: 1;
}

.site-footer__link:active {
  color: rgba(255, 255, 255, 0.7);
}

.site-footer__link:focus-visible {
  border-radius: 2px;
  outline: 2px solid #434ce4;
  outline-offset: 2px;
}

.site-footer__logo:focus-visible,
.site-footer__social-link:focus-visible {
  border-radius: 2px;
  outline: 2px solid #434ce4;
  outline-offset: 4px;
}

.site-footer__secondary {
  padding-top: 40px;
  border-top: 1px solid var(--footer-divider);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 40px;
  border-top: 1px solid var(--footer-divider);
}

.site-footer__copyright {
  margin: 0;
  color: var(--footer-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 15px;
}

.site-footer__social {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

.site-footer__social-link {
  display: flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--footer-text);
  text-decoration: none;
  opacity: 1;
  transition: opacity 150ms ease;
}

.site-footer__social-link img {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.site-footer__social-link:hover {
  opacity: 0.7;
}

@media (max-width: 767px) {
  .site-footer {
    padding: 24px;
  }

  .site-footer__nav,
  .site-footer__secondary {
    display: flex;
    flex-direction: column;
  }

  .site-footer__nav {
    gap: 40px;
  }

  .site-footer__secondary {
    gap: 20px;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__link,
  .site-footer__link::after,
  .site-footer__social-link {
    transition: none;
  }
}
