/**
 *  @package michael-travels-theme
 *
 *  The site footer. The colours come from .background-dark in default.css —
 *  this file only lays it out.
 */

.site-footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--mt-space-7);
  padding-bottom: var(--mt-space-7);
  border-bottom: 1px solid var(--mt-line-dark);
}

.site-footer-name {
  display: flex;
  align-items: center;
  gap: var(--mt-space-3);
  margin: 0 0 var(--mt-space-2);
  font-family: var(--mt-font-display);
  font-size: var(--mt-brand-size);
  line-height: 1.1;
}

.site-footer-name .site-logo {
  width: var(--mt-brand-mark);
  height: var(--mt-brand-mark);
}

.site-footer-tagline {
  max-width: 34ch;
  margin: 0;
  color: var(--mt-on-dark-muted);
}

.site-footer-list,
.site-footer-legal-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/**
 *  The two menus sit side by side; each one is a single column.
 *
 *  They were one menu grid-wrapping into columns, which put the break
 *  wherever the items ran out rather than where the meaning changes. Each
 *  list now runs straight down and the columns are the two menus.
 *
 *  The spacing is split between the link's own padding and the gap rather
 *  than living entirely in the gap. WCAG 2.2 SC 2.5.8 wants a target of at
 *  least 24px, and these links are 19px of text: 3px above and below carries
 *  them over it, and the gap gives back what the padding took so the list
 *  looks exactly as it did. Do not move the padding back into the gap.
 */
.site-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--mt-space-6);
}

.site-footer-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-footer-list a {
  display: block;

  /**
   *  24px of target, and no more. As a block the link takes the body's line
   *  height, which is set for reading paragraphs and is far taller than a
   *  menu item needs; left alone it pushed the list back open by 6px an item.
   *  Tightened here and the padding makes up the height instead.
   */
  padding: 3px 0;
  line-height: 1.25;
  color: var(--mt-on-dark);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-footer-list a:hover,
.site-footer-list a:focus {
  color: var(--mt-accent-light);
  text-decoration: underline;
}

/**
 *  The copyright and the studio credit.
 *
 *  Stacked and centred on a narrow screen, a row with one at each end from the
 *  breakpoint up. align-items: center serves both -- across the column, down
 *  the row -- so only the text alignment has to be undone up there.
 */
.site-footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mt-space-4);
  padding-top: var(--mt-space-6);
  text-align: center;
}

.site-footer-copyright {
  margin: 0;
  color: var(--mt-on-dark-muted);
  font-size: 0.8125rem;
}

/**
 *  The studio credit, at the other end of the copyright line.
 *
 *  Underlined, unlike the small print beside it: this one sits inside a
 *  sentence, where an unmarked link does not read as a link at all.
 *
 *  Both selectors carry .site-footer, because default.css colours every link
 *  on a dark ground with `.background-dark a:not(.button)` -- two classes, and
 *  a bare `.site-footer-credit a` is a class and a type. It would lose.
 */
.site-footer-credit {
  margin: 0;
  color: var(--mt-on-dark-muted);
  font-size: 0.8125rem;
}

.site-footer .site-footer-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-footer .site-footer-credit a:hover,
.site-footer .site-footer-credit a:focus {
  color: var(--mt-on-dark);
}

.site-footer-legal-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mt-space-2) var(--mt-space-5);
}

/*  Prefixed for the same reason as the credit above: it would lose otherwise.  */
.site-footer .site-footer-legal-list a {
  color: var(--mt-on-dark-muted);
  font-size: 0.8125rem;
  text-decoration: none;
}

.site-footer .site-footer-legal-list a:hover,
.site-footer .site-footer-legal-list a:focus {
  color: var(--mt-on-dark);
  text-decoration: underline;
}




@media screen and (min-width: 768px) {

  .site-footer-top {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--mt-space-9);
  }

  /*  Only as wide as the two menus need, so they sit together rather than
      stretching to the far edge of the footer.  */
  .site-footer-nav {
    gap: var(--mt-space-9);
  }

  .site-footer-nav > nav {
    min-width: 8rem;
  }

  .site-footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

}
