.footer {
  background: var(--color-sky-mist);
}

.footer.section-padding {
  padding-bottom: 32px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.footer-main {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 640px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--type-logo-footer-family);
  font-style: var(--type-logo-footer-style);
  font-size: var(--type-logo-footer-size);
  line-height: var(--type-logo-footer-height);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: fit-content;
  text-decoration: none;
}

.footer-logo-primary {
  font-weight: var(--font-weight-bold);
  color: var(--color-ink);
}

.footer-logo-secondary {
  font-weight: var(--font-weight-thin);
  color: var(--color-magenta-mist);
}

.footer-logo-image {
  display: block;
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links > li {
  display: flex;
  align-items: center;
}

.footer-links a {
  font-family: var(--type-footer-link-family);
  font-weight: var(--type-footer-link-weight);
  font-style: var(--type-footer-link-style);
  font-size: var(--type-footer-link-size);
  line-height: var(--type-footer-link-height);
  color: var(--color-muted);
  transition: color var(--dur-base) var(--ease-out-soft);
}

.footer-links a:hover {
  color: var(--color-magenta);
}

.footer-legal {
  position: relative;
}

.footer-legal-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--type-footer-link-family);
  font-weight: var(--type-footer-link-weight);
  font-style: var(--type-footer-link-style);
  font-size: var(--type-footer-link-size);
  line-height: 1;
  color: var(--color-muted);
  transition: color var(--dur-base) var(--ease-out-soft);
}

.footer-legal-toggle:hover,
.footer-legal-open .footer-legal-toggle {
  color: var(--color-magenta);
}

.footer-legal-caret {
  display: block;
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  margin-top: -1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform var(--dur-base) var(--ease-out-soft);
}

.footer-legal-open .footer-legal-caret,
.footer-legal:hover .footer-legal-caret {
  transform: rotate(225deg);
}

.footer-legal-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: none;
  min-width: 180px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--color-gray);
  border-radius: 12px;
  background: var(--color-page-background);
  box-shadow: 0 12px 32px -18px var(--color-shadow-soft);
}

.footer-legal:hover .footer-legal-menu,
.footer-legal:focus-within .footer-legal-menu,
.footer-legal-open .footer-legal-menu {
  display: block;
}

.footer-legal-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
}

.footer-legal-menu a:hover {
  color: var(--color-magenta);
  background: var(--color-sky-fog);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  max-width: 448px;
}

@media (min-width: 640px) {
  .footer-contact {
    text-align: end;
    justify-self: end;
  }

  .footer-email {
    margin-left: auto;
  }
}

.footer-prompt {
  margin: 0;
  font-family: var(--type-footer-prompt-family);
  font-weight: var(--type-footer-prompt-weight);
  font-style: var(--type-footer-prompt-style);
  font-size: var(--type-footer-prompt-size);
  line-height: var(--type-footer-prompt-height);
  color: var(--color-ink);
}

.footer-prompt-accent {
  font-family: var(--type-accent-word-family);
  font-weight: var(--type-accent-word-weight);
  font-style: var(--type-accent-word-style);
  font-size: var(--type-accent-word-size);
  line-height: var(--type-accent-word-height);
  color: var(--color-magenta);
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--color-ink);
  font-family: var(--type-footer-email-family);
  font-weight: var(--type-footer-email-weight);
  font-style: var(--type-footer-email-style);
  font-size: var(--type-footer-email-size);
  line-height: var(--type-footer-email-height);
}

.footer-email-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-magenta);
}

.footer-email-text {
  position: relative;
}

.footer-email-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--color-magenta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out-soft);
}

.footer-email:hover .footer-email-text::after {
  transform: scaleX(1);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding-top: var(--gap);
  border-top: 1px solid var(--color-gray);
}

.footer-credit {
  margin: 0;
  text-align: left;
  color: var(--color-muted);
  font-family: var(--type-footer-credit-family);
  font-weight: var(--type-footer-credit-weight);
  font-style: var(--type-footer-credit-style);
  font-size: var(--type-footer-credit-size);
  line-height: var(--type-footer-credit-height);
}

.footer-credit-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-credit-link:hover {
  color: var(--color-magenta);
}

.footer-bottom .social-links {
  margin-left: auto;
}
