/*
 * Manic Millionaire - the site footer.
 *
 * One footer for every public page. Its contents are written by
 * site-footer.js; this file is its whole look, so it reads the same on pages
 * that use different stylesheets (styles.css, brand-kit.css, mm.css).
 *
 * Every rule starts from the footer's id, so that it outranks whatever the
 * page's own sheet says about paragraphs, lists and links.
 */

#mm-footer {
  --mm-footer-ink: #222222;
  --mm-footer-canvas: #ffd701;
  box-sizing: border-box;
  /* Sits on the line of whatever is above it, so the two never double up. */
  margin: -2px 0 0;
  border-top: 2px solid var(--mm-footer-ink);
  background: var(--mm-footer-canvas);
  color: var(--mm-footer-ink);
  font: 400 16px/1.5 Inter, system-ui, sans-serif;
  letter-spacing: normal;
  text-align: left;
}

#mm-footer *,
#mm-footer *::before,
#mm-footer *::after {
  box-sizing: border-box;
}

#mm-footer p,
#mm-footer ul,
#mm-footer li {
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  list-style: none;
}

#mm-footer a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

#mm-footer .mm-footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 16px;
}

#mm-footer .mm-footer__top {
  display: grid;
  gap: 40px;
}

#mm-footer .mm-footer__logo {
  display: block;
  height: 64px;
  width: auto;
}

#mm-footer .mm-footer__blurb {
  margin: 24px 0 0;
  max-width: 32rem;
  color: rgba(34, 34, 34, 0.8);
}

#mm-footer .mm-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#mm-footer .mm-footer__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 2px solid var(--mm-footer-ink);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  transition: background-color 0.15s, color 0.15s;
}

#mm-footer .mm-footer__links .mm-footer__wide {
  grid-column: 1 / -1;
}

#mm-footer .mm-footer__links .mm-footer__wide a {
  background: var(--mm-footer-ink);
  color: var(--mm-footer-canvas);
}

#mm-footer .mm-footer__links .mm-footer__wide a:hover {
  background: var(--mm-footer-paper, #fff7da);
  color: var(--mm-footer-ink);
}

#mm-footer .mm-footer__links a:hover {
  background: var(--mm-footer-ink);
  color: var(--mm-footer-canvas);
}

#mm-footer .mm-footer__links svg {
  width: 16px;
  height: 16px;
  flex: none;
}

#mm-footer .mm-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  border-top: 2px solid var(--mm-footer-ink);
  padding-top: 24px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#mm-footer .mm-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* A finger-sized target around each link, without moving anything. */
#mm-footer .mm-footer__legal a {
  display: inline-block;
  margin: -14px -8px;
  padding: 14px 8px;
}

#mm-footer .mm-footer__legal a:hover,
#mm-footer .mm-footer__legal a[aria-current="page"] {
  text-decoration: underline;
}

#mm-footer .mm-footer__motto {
  color: rgba(34, 34, 34, 0.7);
}

#mm-footer a:focus-visible {
  outline: 3px solid var(--mm-footer-ink);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  #mm-footer .mm-footer__inner {
    padding: 64px 40px;
  }
  #mm-footer .mm-footer__top {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }
  #mm-footer .mm-footer__logo {
    height: 96px;
  }
}

/* What shows inside the tag until the script runs, or if it never does. */
#mm-footer .mm-footer__fallback {
  display: flex;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
