/* Footer: shared by the home, support and 404 pages. Two tiers: who we are, where to go and
   how to reach us, then the small print. */
.site-footer {
  padding-block: 0 var(--space-section);
}

.site-footer .wrap {
  display: grid;
  gap: var(--space-xxl);
}

.site-footer .footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-top: var(--space-xxl);
  border-top: 1px solid var(--hairline);
}

.site-footer .wordmark {
  justify-self: start;
}

.site-footer .logo {
  height: 26px;
}

.site-footer .footer-tagline {
  font-size: 15px;
  color: var(--ink-secondary);
}

.site-footer .footer-nav {
  margin-top: var(--space-md);
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-lg);
  margin-left: calc(var(--space-xs) * -1);
}

.site-footer .footer-links a,
.site-footer .footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding-inline: var(--space-xs);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

/* The email is a way to reach us, not a page: it sits apart under its own label. */
.site-footer .footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-sm);
}

.site-footer .footer-contact a {
  font-family: var(--font-rounded);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--ink-quaternary);
}

.site-footer .footer-links a:active,
.site-footer .footer-contact a:active {
  color: var(--jet);
}

.site-footer .footer-bottom {
  display: grid;
  gap: var(--space-sm);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--hairline);
}

@media (hover: hover) {
  .site-footer .footer-links a:hover,
  .site-footer .footer-contact a:hover {
    color: var(--jet);
  }

  .site-footer .footer-contact a:hover {
    text-decoration-color: currentColor;
  }
}

@media (min-width: 720px) {
  .site-footer .wrap {
    gap: var(--space-xxxl);
  }

  .site-footer .footer-top {
    grid-template-columns: 1fr auto;
    column-gap: var(--space-xxl);
    padding-top: var(--space-section);
  }

  /* Same line box as the contact row beside it, so the two share a centre line. */
  .site-footer .footer-tagline {
    display: flex;
    align-items: center;
    min-height: var(--tap-min);
  }

  .site-footer .footer-nav,
  .site-footer .footer-contact {
    grid-column: 2;
    justify-self: end;
    margin-top: 0;
  }

  .site-footer .footer-nav {
    grid-row: 1;
  }

  .site-footer .footer-contact {
    grid-row: 2;
    margin-right: calc(var(--space-xs) * -1);
  }

  .site-footer .footer-links {
    column-gap: var(--space-xxl);
    margin-left: 0;
    margin-right: calc(var(--space-xs) * -1);
  }

  .site-footer .footer-bottom {
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: var(--space-xxl);
  }
}

/* Support page: the email address is a full-size touch target. */
.simple .email a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
}
