/*
  The website's footer, the same on every page of movahelp.com: the landing page, its static pages,
  and the blog and the NMT trainer the CRM serves (which link this file under SITE_URL). The markup
  contract is ../crm/docs/features/site-footer.md; change it there first.

  Every rule names a `site-footer` class and sets what it relies on — font, colour, box sizing, the
  lists' and the button's defaults — so a page's own rules for `a`, `p`, `ul` or `button` do not
  reach the footer, and the footer's do not leak.
*/

.site-footer {
  --site-footer-ink: #0f172a;
  --site-footer-muted: rgba(255, 255, 255, 0.72);
  --site-footer-faint: rgba(255, 255, 255, 0.6);
  /* The keyboard's focus in the highlighter's yellow: the header's blue would not read on the ink. */
  --site-footer-focus: #ffe14a;
  /* The teacher's wavy red line, as the header draws it. */
  --site-footer-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M2 12C30 4 50 18 80 10S130 4 160 12S220 18 250 9S290 6 298 11' fill='none' stroke='%23d0202a' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");

  background: var(--site-footer-ink);
  color: #fff;
  font-family: Manrope, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.site-footer *,
.site-footer *::before,
.site-footer *::after {
  box-sizing: border-box;
}

/* As wide as the header's content: the website's name on the left, the columns to its right. */
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  column-gap: 3rem;
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
  padding-block: 3.5rem 1.75rem;
}

.site-footer__about,
.site-footer__nav {
  min-width: 0;
}

.site-footer__name {
  margin: 0;
  color: #fff;
  font-family: Unbounded, Manrope, system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.site-footer__text {
  max-width: 22rem;
  margin: 0.75rem 0 0;
  color: var(--site-footer-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/*
 * The project's author under the website's line, half the size it first had (the teacher found it
 * distracting): the scholar's cap on a faint tile, then her. The type stops at 10–11px to stay legible.
 */
.site-footer__author {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 22rem;
  margin: 1rem 0 0;
  color: var(--site-footer-muted);
  font-size: 0.625rem;
  line-height: 1.4;
}

.site-footer__author-icon {
  display: inline-flex;
  flex: none;
  justify-content: center;
  align-items: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.site-footer__author-icon svg {
  width: 0.75rem;
  height: 0.75rem;
}

.site-footer__author-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.site-footer__author-role {
  color: var(--site-footer-faint);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer__author-name {
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.5rem;
}

.site-footer__heading {
  margin: 0 0 0.6rem;
  color: var(--site-footer-faint);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-footer__links {
  display: grid;
  justify-items: start;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links > li {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* The analytics settings are a button that looks like the links beside it. */
.site-footer__link {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 0.3rem 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}

/* The link under the pointer, underlined with the wavy red line, as in the header. */
.site-footer__link:hover {
  background: var(--site-footer-wave) left bottom / 100% 7px no-repeat;
  color: #fff;
}

.site-footer__link:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--site-footer-focus);
  outline-offset: 3px;
  box-shadow: none;
}

.site-footer__note,
.site-footer__bottom {
  grid-column: 1 / -1;
}

/* On the trainer's pages only: the UCEQA's tasks are published under their source. */
.site-footer__note {
  margin: 2.75rem 0 0;
  color: var(--site-footer-faint);
  font-size: 0.8rem;
  line-height: 1.5;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.site-footer__note + .site-footer__bottom {
  margin-top: 1rem;
}

.site-footer__copy {
  margin: 0 auto 0 0;
  color: var(--site-footer-faint);
  font-size: 0.85rem;
  line-height: 1.4;
}

.site-footer__bottom .site-footer__link {
  color: var(--site-footer-muted);
  font-size: 0.85rem;
}

.site-footer__bottom .site-footer__link:hover {
  color: #fff;
}

/* The website's name and its line above the columns. */
@media (max-width: 899px) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-footer__nav {
    margin-top: 2.25rem;
  }
}

/* As narrow as the header's content on a phone. */
@media (max-width: 680px) {
  .site-footer__inner {
    width: calc(100% - 28px);
    padding-block: 2.75rem 1.5rem;
  }
}

/* Two columns, the contacts under them across the width, so the email address fits. */
@media (max-width: 560px) {
  .site-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1rem;
  }
  .site-footer__group:last-child {
    grid-column: 1 / -1;
  }
  .site-footer__bottom {
    gap: 0.25rem 1.25rem;
  }
  .site-footer__copy {
    flex-basis: 100%;
  }
}

/* The narrowest phones, down to 320px. */
@media (max-width: 359px) {
  .site-footer__inner {
    width: calc(100% - 24px);
  }
}

/* On paper: black on white, without the links; the copyright and the trainer's note remain. */
@media print {
  .site-footer {
    background: none;
    color: #000;
  }
  .site-footer__nav,
  .site-footer__bottom .site-footer__link {
    display: none;
  }
  .site-footer__name,
  .site-footer__text,
  .site-footer__author,
  .site-footer__author-role,
  .site-footer__author-name,
  .site-footer__note,
  .site-footer__copy {
    color: #000;
  }
}
