.site-foot.studio-footer {
  display: block;
  width: auto;
  padding: 0 0 36px;
}

.studio-footer__layout {
  --footer-gap: clamp(12px, 2vw, 24px);
  display: grid;
  row-gap: 12px;
  padding-block-start: 12px;
  border-top: 1px solid var(--hair);
}

.studio-footer__brand,
.studio-footer .footer-meta {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 0 var(--footer-gap);
  width: 100%;
  justify-self: center;
}

.studio-footer__brand {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand social";
}

.studio-footer .footer-brandline {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  width: auto;
}

.studio-footer .footer-brandline .footer-tagline,
.studio-footer .footer-year {
  display: inline-block;
  margin: 0;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .14em;
}

.studio-footer .footer-brandline .footer-name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
}

.studio-footer .footer-brandline .footer-sep { letter-spacing: 0; }

.studio-footer .social {
  grid-area: social;
  display: flex;
  justify-content: center;
  justify-self: end;
  gap: clamp(2px, .5vw, 8px);
  margin: 0;
}

.studio-footer .social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
}

.studio-footer .social .soc .ic { margin-inline-start: 0; }

.studio-footer .footer-meta > .footer-year {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  color: var(--muted);
}

.studio-footer .footer-meta {
  grid-template-columns: minmax(0, 1fr) auto auto;
  justify-items: end;
  min-width: 0;
  margin: 0;
  padding-block-start: 6px;
  border-top: 1px solid var(--hair);
  font-size: .75rem;
  line-height: 1.45;
  text-align: end;
}

.studio-footer .footer-meta:not(:has(.cc-link)) {
  grid-template-columns: minmax(0, 1fr) auto;
}

.studio-footer .footer-meta > :is(.made-in, a, button.cc-link) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  font: inherit;
}

.studio-footer .footer-meta > :is(a, button.cc-link) {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: .22em;
}

.studio-footer .footer-meta > .made-in {
  grid-column: 1;
  justify-self: start;
  text-align: start;
}

.studio-footer .footer-meta > a { grid-column: 2; }
.studio-footer .footer-meta > button.cc-link { grid-column: 3; }
.studio-footer .footer-meta > :is(.made-in, a, button.cc-link) { grid-row: 1; }

.studio-footer .footer-meta > :is(a, button.cc-link):is(:hover, :focus-visible),
.studio-footer .footer-brandline .footer-name:is(:hover, :focus-visible) {
  color: var(--orange-text);
}

.studio-footer :is(a, button):focus-visible {
  outline: 2px solid var(--orange-text);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .site-foot.studio-footer {
    margin-top: 26px;
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }

  .studio-footer__layout { row-gap: 8px; }

  .studio-footer__brand {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "social";
    gap: 0;
  }

  .studio-footer .footer-brandline,
  .studio-footer .social { justify-self: center; }

  .studio-footer .footer-meta,
  .studio-footer .footer-meta:not(:has(.cc-link)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-foot.studio-footer .footer-meta > .made-in {
    grid-area: 1 / 1 / 2 / -1;
    justify-self: center;
    min-height: 30px;
    text-align: center;
  }

  .site-foot.studio-footer .footer-meta > :is(a, button.cc-link) {
    grid-row: 2;
    width: auto;
    text-align: center;
  }

  .site-foot.studio-footer .footer-meta > a { grid-column: 1; justify-self: end; }
  .site-foot.studio-footer .footer-meta > button.cc-link { grid-column: 2; justify-self: start; }
  .site-foot.studio-footer .footer-meta:not(:has(.cc-link)) > a { grid-column: 1 / -1; justify-self: center; }
  .site-foot.studio-footer .footer-meta > .footer-year { grid-row: 3; }
}

main.page:has(> #lead:nth-last-child(1 of :not(script, style, template))) + .site-foot.studio-footer {
  margin-block-start: clamp(14px, 2.8vw, 40px);
}
