.site-footer {
  --footer-secondary-color: color-mix(
    in srgb,
    var(--color-light-base) 62%,
    transparent
  );
  --footer-divider-color: color-mix(
    in srgb,
    var(--color-light-base) 8%,
    transparent
  );

  margin-top: auto;
  background: var(--color-dark-base);
  color: var(--color-light-base);
  text-align: center;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.625rem;
  padding-block: 3rem 2.375rem;
}

.site-footer__navigation,
.site-footer__trust {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.site-footer__branding a {
  display: inline-flex;
  color: var(--color-light-base);
  text-decoration: none;
}

.site-footer__logo {
  max-width: 12.5rem;
}

.site-footer__site-name {
  font-size: 1.125rem;
  font-weight: 700;
}

.site-footer__menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__menu :is(a, .menu-item-placeholder, .menu-item-current) {
  color: var(--color-light-base);
  text-decoration: none;
}

.site-footer__info a,
.site-footer__legal-copy a {
  color: var(--color-primary-border);
}

.site-footer__branding a:is(:hover, :focus-visible) {
  opacity: 0.82;
}

.site-footer__info a:is(:hover, :focus-visible),
.site-footer__legal-copy a:is(:hover, :focus-visible) {
  color: var(--color-light-base);
}

.site-footer__legal-navigation,
.site-footer__trust,
.site-footer__legal-copy {
  width: 100%;
  padding-top: 1.625rem;
  border-top: 1px solid var(--footer-divider-color);
}

.site-footer__menu--legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  text-align: center;
  gap: 0.75rem 1.25rem;
}

.site-footer__menu--legal :is(a, .menu-item-placeholder, .menu-item-current) {
  color: var(--footer-secondary-color);
}

.site-footer__menu a:is(:hover, :focus-visible) {
  color: var(--color-primary-border);
}

.site-footer__menu .menu-item-current {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: default;
}

.site-footer__menu--legal > li {
  min-width: 0;
  flex-basis: calc(50% - 0.625rem);
}

.site-footer__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--color-light-base) 24%, transparent);
  border-radius: 0.25rem;
}

.site-footer__badge--logo {
  min-height: 0;
  max-height: 3rem;
  padding: 0;
  border: 0;
}

.site-footer__badge-logo {
  width: auto;
  max-width: 100%;
  max-height: 3rem;
  object-fit: contain;
}

.site-footer__badge-link {
  display: inline-flex;
  align-items: center;
  max-height: 3rem;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
  transition:
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.site-footer__badge--text.site-footer__badge--linked {
  padding: 0;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.site-footer__badge--text .site-footer__badge-link {
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
}

.site-footer__badge--text.site-footer__badge--linked:is(:hover, :focus-within) {
  border-color: var(--color-primary-border);
  background: color-mix(in srgb, var(--color-light-base) 8%, transparent);
}

.site-footer__badge--text .site-footer__badge-link:is(:hover, :focus-visible) {
  color: var(--color-primary-border);
}

.site-footer__badge--logo .site-footer__badge-link:is(:hover, :focus-visible) {
  opacity: 0.8;
}

.site-footer__info {
  color: var(--color-muted);
}

.site-footer__info > :first-child,
.site-footer__legal-copy > :first-child {
  margin-top: 0;
}

.site-footer__info > :last-child,
.site-footer__legal-copy > :last-child {
  margin-bottom: 0;
}

.site-footer__legal-copy {
  color: var(--footer-secondary-color);
  font-size: 0.875rem;
  line-height: 1.48;
}

@media (min-width: 740px) {
  .site-footer {
    text-align: unset;
  }

  .site-footer__navigation,
  .site-footer__trust {
    align-items: center;
    flex-direction: row;
  }

  .site-footer__trust {
    flex-wrap: wrap;
  }

  .site-footer__menu {
    gap: 0.75rem 2rem;
  }

  .site-footer__menu--legal > li {
    flex-basis: calc((100% - 4rem) / 3);
  }

  .site-footer__info {
    text-align: right;
  }
}

@media (min-width: 1200px) {
  .site-footer__menu--legal {
    justify-content: space-evenly;
  }

  .site-footer__menu--legal > li {
    flex-basis: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__badge-link,
  .site-footer__badge--text.site-footer__badge--linked {
    transition: none;
  }
}
