.site-footer {
  background: #000;
  border-top: 0.5px solid #505050;
  color: var(--muted);

  /* Same idea as the header: layout height capped, visual size via transform. */
  --footer-logo-h: clamp(1.15rem, 2vw, 1.9rem);
  --footer-logo-slot-scale: 1;
  --footer-logo-slot: calc(clamp(1.5rem, 2.4vw, 2.25rem) * var(--footer-logo-slot-scale));
  --footer-logo-scale: 1;
}

.site-footer__inner {
  max-width: var(--layout-inner-max);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.25rem) var(--layout-pad-x)
    clamp(1.25rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-footer__columns {
  display: grid;
  grid-template-columns: repeat(3, auto);
  align-items: start;
  justify-content: center;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.site-footer__col--brand {
  display: flex;
  justify-content: center;
}

.site-footer__brand {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  line-height: 0;
}

.site-footer__brand img {
  height: min(var(--footer-logo-h), var(--footer-logo-slot));
  width: auto;
  object-fit: contain;
  display: block;
  transform: scale(var(--footer-logo-scale));
  transform-origin: top center;
}

.site-footer__links,
.site-footer__social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.site-footer__links a,
.site-footer__social a {
  color: #f3f5f7;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  transition: color 140ms ease, opacity 140ms ease;
}

.site-footer__links a:hover,
.site-footer__social a:hover {
  color: #fff;
}

.site-footer__copyright {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  width: 100%;
  max-width: 36rem;
}

@media (max-width: 640px) {
  .site-footer__columns {
    grid-template-columns: 1fr;
    justify-items: center;
    width: 100%;
  }

  .site-footer__links,
  .site-footer__social {
    align-items: center;
    text-align: center;
  }
}
