/*
 * Site footer (shared/_footer): a frosted sheet across the full width of the screen, under the
 * page card, in the same light palette. Navy text and gold-deep headings. Its content keeps to
 * the header's width, from the header logo's line to the Sign in line (--site-gutter and
 * --site-inset, set in site.css). Phones: brand, the two link groups side by side, then contact.
 * 768px: brand on top, three groups below. 1200px: four columns. From 768px the columns size to
 * their content and spread out, so the last one ends on the Sign in line.
 */

.mx-footer {
  border-top: 1px solid color-mix(in srgb, var(--mx-color-surface) 70%, transparent);
  border-radius: 28px 28px 0 0;
  background: color-mix(in srgb, var(--mx-color-surface) 45%, transparent);
  color: var(--mx-color-muted);
}

.mx-footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--mx-space-xl) var(--mx-space-lg);
  padding-block: var(--mx-space-xxl) var(--mx-space-md);
}

.mx-footer__inner,
.mx-footer__base {
  width: min(1180px, 100% - 2 * var(--site-gutter, 12px));
  margin-inline: auto;
  padding-inline: var(--site-inset, 15px);
}

.mx-footer__brand {
  grid-column: 1 / -1;
}

/* The emblem with a navy wordmark: the full logo's gold wordmark is too pale on white. */
.mx-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mx-color-navy);
  text-decoration: none;
}

.mx-footer__logo img {
  width: 44px;
}

.mx-footer__name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mx-footer__wordmark {
  font-family: var(--mx-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mx-footer__tagline {
  margin-top: var(--mx-space-md);
  color: var(--mx-color-navy);
  font-family: var(--mx-font-display);
  font-size: 1.25rem;
  font-style: italic;
}

/*
 * Instagram and email as round icon buttons under the tagline; 44px targets. A white rim like
 * the panel's own edge, not the warm line colour, which reads muddy on the cool frost.
 */
.mx-footer__social {
  display: flex;
  gap: 12px;
  margin: var(--mx-space-md) 0 0;
  padding: 0;
  list-style: none;
}

.mx-footer__social-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--mx-color-surface);
  border-radius: var(--mx-rounded-pill);
  background: color-mix(in srgb, var(--mx-color-surface) 55%, transparent);
  box-shadow: var(--mx-shadow-sm);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.mx-footer__social-link:hover,
.mx-footer__social-link:focus-visible {
  border-color: var(--mx-color-gold-deep);
  background: var(--mx-color-surface);
}

.mx-footer__social .mx-footer__icon {
  width: 20px;
  height: 20px;
}

.mx-footer__heading {
  margin: 0 0 var(--mx-space-xs);
  color: var(--mx-color-gold-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mx-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 44px tall targets; the underline arrives on hover and focus. */
.mx-footer__links a {
  display: inline-block;
  padding: 10px 0;
  color: var(--mx-color-navy);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: text-decoration-color 160ms ease;
}

.mx-footer__links a:hover,
.mx-footer__links a:focus-visible,
.mx-footer__links a[aria-current="page"] {
  text-decoration-color: var(--mx-color-gold-deep);
}

/* Contact: a gold line icon beside each channel, lined up with the first line of text. */
.mx-footer__contact {
  grid-column: 1 / -1;
}

.mx-footer__contact address {
  font-style: normal;
}

.mx-footer__channel {
  display: grid;
  grid-template-columns: 18px auto;
  column-gap: 12px;
  justify-content: start;
  justify-items: start;
}

.mx-footer__icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--mx-color-gold-deep);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mx-footer__channel .mx-footer__icon {
  margin-top: 12px;
}

.mx-footer__icon-dot {
  fill: var(--mx-color-gold-deep);
  stroke: none;
}

.mx-footer__base {
  padding-bottom: calc(var(--mx-space-lg) + env(safe-area-inset-bottom));
  font-size: 0.8125rem;
}

/* The divider sits on the text, so it lines up with the columns above. A cool navy tint: the warm
   line colour all but vanishes on the frost. */
.mx-footer__base p {
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--mx-color-navy) 12%, transparent);
}

@media (min-width: 768px) {
  .mx-footer {
    border-radius: 40px 40px 0 0;
  }

  .mx-footer__inner {
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
    padding-block: 64px var(--mx-space-md);
  }

  .mx-footer__contact {
    grid-column: auto;
  }
}

@media (min-width: 1200px) {
  /* The brand's icon buttons are now the lowest thing, with no space under them like the links. */
  .mx-footer__inner {
    grid-template-columns: minmax(0, 22rem) repeat(3, auto);
    padding-bottom: var(--mx-space-lg);
  }

  .mx-footer__brand {
    grid-column: auto;
  }
}
