/* Site footer — the single source of truth.
 *
 * Same arrangement as nav.css: @imported by src/index.css for the app, linked
 * by the static wiki pages, every selector scoped to .site-footer. The React
 * component (components/SiteFooter.tsx) and the markup in public/wiki/*.html
 * mirror each other class for class.
 *
 * It sits in the same --page-max column and on the same gutter as the bar and
 * the page content, so the wordmark lines up under the one in the header.
 */

.site-footer {
  --footer-rule: #cbd1d3;
  --footer-text: #20262a;
  --footer-muted: #657078;

  /* Sits after the page, not pinned to the viewport: every page here already
     fills at least one screen and scrolls, so the footer is what you reach at
     the end rather than something competing with the content for height. */
  background: transparent;
}

.site-footer-inner {
  box-sizing: border-box;
  width: min(100%, var(--page-max, 108rem));
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3.5vw, 4rem) 2rem;
  border-top: 1px solid var(--footer-rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  font-family:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', Inter,
    ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  /* Stated, not inherited: the wiki pages set a 1.78 body line-height for prose
     and the app does not, which otherwise makes the same footer 4px taller
     there. */
  line-height: 1.2;
}

.site-footer .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  color: var(--footer-text);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.site-footer .brand .logo {
  width: 18px;
  height: 18px;
  display: block;
  /* Preflight sets img { display: block } but the static pages do not, and an
     inline image would sit on the text baseline instead of centring. */
  flex-shrink: 0;
}

.site-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  min-width: 0;
}

.site-footer nav a {
  color: var(--footer-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 120ms ease;
}

.site-footer nav a:hover {
  color: var(--footer-text);
  text-decoration: none;
}

.site-footer nav a[aria-current='page'],
.site-footer nav a.active {
  color: var(--footer-text);
}

@media (max-width: 639px) {
  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    padding-block: 1.25rem 1.75rem;
  }
}
