.footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding: 2rem 1rem 1.25rem;
}

.footer a {
  color: var(--footer-fg);
  text-decoration: none;
  transition: opacity .2s ease;
}

.footer a:hover {
  opacity: .92;
}

.footer :is(a, button):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.footer__container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer__grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: clamp(.75rem, 1.2vw, 1.25rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.footer__col,
.footer__col--social {
  flex: 1 1 0;
  min-width: 0;
}

.footer__title {
  font-size: 1rem;
  letter-spacing: .04em;
  font-weight: 700;
  text-transform: uppercase;
  margin: .25rem 0 .9rem;
  color: #fff;
}

.footer__list,
.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer__list li,
.footer__links li {
  margin: .35rem 0;
}

.footer__list li {
  color: var(--footer-muted);
}

.footer__list a {
  color: var(--footer-fg);
}

.footer__links a {
  position: relative;
}

.footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width .2s ease;
}

.footer__links a:hover::after,
.footer__links a:focus-visible::after {
  width: 100%;
}

.footer a.footer__link--underline {
  --uln-w: 100%;
  --uln-th: 2px;
  --uln-offset: -2px;
  position: relative;
  text-decoration: none;
}

.footer a.footer__link--underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: var(--uln-offset);
  width: var(--uln-w);
  height: var(--uln-th);
  background: currentColor;
  transform: scaleX(1);
  transform-origin: left;
  transition: transform .2s ease;
}

.footer a.footer__link--underline:hover::after,
.footer a.footer__link--underline:focus-visible::after {
  transform: scaleX(0);
}

.footer__social {
  display: flex;
  gap: .6rem;
  margin-top: .4rem;
}

.footer__social .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  transition:
    transform .12s ease,
    background .2s ease,
    border-color .2s ease,
    opacity .2s ease;
  flex: 0 0 auto;
  padding: 0;
}

.footer__social .icon-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .28);
  opacity: .96;
}

.footer__social .icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.footer__bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.footer__legal {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  color: var(--footer-muted);
  font-size: .9rem;
}

.footer__legal a {
  color: var(--footer-fg);
}

.footer__legal a:hover {
  text-decoration: underline;
}

.footer__sep {
  opacity: .5;
}

@media (prefers-reduced-motion: reduce) {
  .footer__links a::after,
  .footer a.footer__link--underline::after {
    transition: none;
  }
}

@media (max-width: 720px) {
  .footer {
    padding: 1.25rem 1rem 1rem;
  }

  .footer__grid {
    flex-wrap: wrap;
    gap: 1rem;
    overflow-x: visible;
  }

  .footer__col,
  .footer__col--social {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .footer__title {
    font-size: .95rem;
    margin: .15rem 0 .6rem;
    text-align: center;
  }

  .footer__list,
  .footer__links {
    text-align: center;
  }

  .footer__social {
    justify-content: center;
    gap: .75rem;
    margin-top: .25rem;
  }

  .footer__social .icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .footer__social .icon-btn svg {
    width: 22px;
    height: 22px;
  }

  .footer__bottom {
    margin-top: 1.25rem;
    padding-top: .75rem;
  }

  .footer__legal {
    font-size: .85rem;
    gap: .4rem;
    line-height: 1.4;
  }

  .footer__sep {
    display: none;
  }
}

@media (max-width: 380px) {
  .footer__title {
    font-size: .9rem;
  }

  .footer__legal {
    font-size: .8rem;
  }
}
