/*
 * Librarium Militaris: the footer.
 *
 * What the archive is, where the standing pages are, the two calls to action
 * repeated for the reader who got all the way down here, and the notice about
 * whose trademarks and whose footage this all is.
 */

@layer components {
  .sitefooter {
    background-color: var(--color-surface);
    padding: var(--space-48) 0;
    margin-top: var(--space-48);
    position: relative;
    z-index: var(--z-raised);
  }

  .sitefooter__inner {
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-24);
    text-align: center;

    /* Two columns where there is room for two, one stacked column where there
       is not. */
    @media (min-width: 768px) {
      flex-direction: row;
      text-align: left;
    }
  }

  .sitefooter__about { max-width: 28rem; }

  .sitefooter__wordmark {
    font-family: var(--font-heading);
    font-size: var(--text-20);
    line-height: var(--leading-28);
    color: var(--color-ink-bright);
    text-transform: uppercase;
    letter-spacing: var(--tracking-xl);
    margin-bottom: var(--space-8);
  }

  .sitefooter__text {
    color: var(--color-ink-dim);
    font-size: var(--text-14);
    line-height: var(--leading-prose);
  }

  /* The two standing pages, on every page that has a footer, because a reader
     deciding whether to trust a record should not have to go looking. */
  .sitefooter__links {
    margin-top: var(--space-12);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
    font-size: var(--text-14);
    color: var(--color-ink-faint);

    & a {
      color: var(--color-ink-soft);
      transition: color var(--transition-fast);
    }

    & a:hover { color: var(--color-accent); }
  }

  .sitefooter__actions {
    @media (min-width: 768px) { text-align: right; }
  }

  /* Two calls to action, the sign-up leading. They sit on one line where there is
     room for it and stack, still aligned with the footer's text, where there is not. */
  .sitefooter__cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-12);
    margin-bottom: var(--space-16);

    @media (min-width: 768px) { justify-content: flex-end; }
  }

  .sitefooter__legal {
    color: var(--color-ink-faint);
    font-size: var(--text-12);
    line-height: var(--leading-16);
    margin-top: var(--space-8);
    max-width: 24rem;

    @media (min-width: 768px) { margin-left: auto; }
  }
}
