/* Stable footer layout for the production SPA and SEO-enhanced navigation. */
.site-footer,
.site-footer * {
  box-sizing: border-box;
}

.site-footer__primary {
  grid-template-columns: minmax(5.5rem, auto) minmax(15rem, 0.8fr) minmax(28rem, 1.2fr);
  grid-template-areas:
    "brand tagline guides"
    "brand support guides";
  align-items: center;
  column-gap: clamp(1.5rem, 4vw, 4.5rem);
  row-gap: 0.85rem;
}

.site-footer__brand-row {
  grid-area: brand;
  align-self: center;
}

.site-footer__primary > p {
  grid-area: tagline;
  max-width: 31rem;
  line-height: 1.55;
}

.site-footer__support {
  grid-area: support;
  justify-content: flex-start !important;
  gap: 0.65rem !important;
}

.site-footer__support > button,
.site-footer__support > a,
#mutakami-partners-footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.45rem;
  padding: 0.45rem 0.7rem;
  color: var(--color-graphite, #34383f);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(218, 222, 229, 0.94);
  border-radius: 0.5rem;
  font: 700 var(--text-small, 0.9rem)/1.25 inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.site-footer__support > button:hover,
.site-footer__support > button:focus-visible,
.site-footer__support > a:hover,
.site-footer__support > a:focus-visible {
  color: var(--color-ink, #111214);
  background: #fff;
  border-color: rgba(229, 57, 53, 0.34);
  text-decoration: none;
}

.site-footer__support svg {
  flex: 0 0 auto;
  color: var(--color-red, #e53935);
}

.site-footer__seo {
  grid-area: guides;
  align-self: center;
  justify-content: flex-end !important;
  gap: 0.75rem 1.35rem !important;
  margin: 0 !important;
  line-height: 1.45;
}

.site-footer__legal {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2rem;
}

.site-footer__legal nav {
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.site-footer__legal #mutakami-cookie-settings {
  position: static;
  inset: auto;
  z-index: auto;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.22em;
}

.site-footer__legal #mutakami-cookie-settings:hover,
.site-footer__legal #mutakami-cookie-settings:focus-visible {
  color: var(--color-red, #e53935);
  text-decoration-color: currentColor;
}

@media (max-width: 1120px) {
  .site-footer__primary {
    grid-template-columns: minmax(5rem, auto) minmax(0, 1fr);
    grid-template-areas:
      "brand tagline"
      "brand guides"
      "brand support";
    column-gap: clamp(1.5rem, 5vw, 3.5rem);
  }

  .site-footer__seo {
    justify-content: flex-start !important;
  }
}

@media (max-width: 700px) {
  .site-footer {
    width: calc(100% - 1.25rem);
    padding-inline: 0.25rem;
  }

  .site-footer__primary {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "tagline"
      "guides"
      "support";
    gap: 1rem;
  }

  .site-footer__brand-row {
    width: 100%;
  }

  .site-footer__seo {
    align-items: flex-start;
    justify-content: flex-start !important;
  }

  .site-footer__support {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .site-footer__support > button,
  .site-footer__support > a,
  #mutakami-partners-footer-link {
    width: 100%;
    white-space: normal;
  }

  #mutakami-partners-footer-link {
    grid-column: 1 / -1;
  }

  .site-footer__legal {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .site-footer__legal nav {
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  .site-footer__support {
    grid-template-columns: minmax(0, 1fr);
  }

  #mutakami-partners-footer-link {
    grid-column: auto;
  }

  .site-footer__legal nav {
    gap: 0.75rem 1rem;
  }
}
