/* ============================================================================
 * footer — the band that closes a page
 * ============================================================================
 *
 * TWO VARIANTS, ONE SHELL. The marketing site adds four columns of links, which
 * are its site map; a page whose chrome is already a sidebar adds nothing,
 * because that column lists more than those columns ever did. Everything they
 * share — the surface, the triad, the wordmark, the bottom line — is the shell,
 * and it is stated once here.
 *
 *   <link rel="stylesheet" href="/shared/components/footer/footer.css">
 *
 * Same light "desk" surface as the rest of the page, not the ink surface —
 * that is reserved for code blocks (BRAND.html, "Code blocks"), never for whole
 * sections.
 *
 * LAYER: component. `page` still outranks it, which is what lets docs.css
 * restate the footer's column for the docs' wider measure — and what retired the
 * six `body > .site-footer` prefixes that existed only to win a specificity tie
 * against this file. */
@layer component {

.site-footer {
  width: 100vw;
  background: var(--bg);
  border-top: 2px solid var(--ink);
}

/* Echoes .navbar-accent at the very top of the page — same ABC triad
   mark, bookending the site instead of only opening it. */
.site-footer .footer-accent {
  display: flex;
  width: 100%;
  height: 4px;
}
.site-footer .footer-accent span { flex: 1; }
.site-footer .footer-accent span:nth-child(1) { background: var(--brand-1); }
.site-footer .footer-accent span:nth-child(2) { background: var(--brand-2); }
.site-footer .footer-accent span:nth-child(3) { background: var(--brand-3); }

.site-footer .wrap {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 3rem var(--padding) 2rem;
  box-sizing: border-box;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 2rem;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}
/* Two columns all the way down, rather than collapsing to one at 560px.
   Measured at 390px: the single column made the footer 1015px tall — 37% of the
   whole page — for four groups of short labels ("Atomic", "Status", "Why
   Drift"), none of which needs 342px to itself. Two columns of ~155px fit them
   comfortably and halve the scroll.
   minmax(0, …) rather than a bare 1fr: `1fr` is minmax(auto, 1fr) and that auto
   floor is min-content, so one long label would silently push the track wider
   than its share and overflow the grid — the same trap that pinned the hero's
   Azure table open. */
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
}

/* Brand column — the logo reuses the exact per-letter underline idiom
   from the navbar (BRAND.html: "always on"), just smaller. */
.footer-brand .footer-logo {
  display: inline-block;
  font-family: 'Tinos', serif;
  font-weight: 700;
  font-style: italic;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 0.9rem;
}
.footer-brand .footer-logo .lg {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.footer-brand .footer-logo .lg-1 { text-decoration-color: var(--brand-1); }
.footer-brand .footer-logo .lg-2 { text-decoration-color: var(--brand-2); }
.footer-brand .footer-logo .lg-3 { text-decoration-color: var(--brand-3); }
.footer-brand .footer-logo .lg-4,
.footer-brand .footer-logo .lg-5 { text-decoration-color: var(--ink); }

.footer-brand p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 30ch;
  line-height: 1.5;
}

.footer-col {
  display: flex;
  flex-direction: column;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 1rem;
}
.footer-col a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 300;
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
  width: fit-content;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--brand-1); }

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(27, 40, 68, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--muted);
}
.footer-bottom .alpha-tag { margin-left: 0.6rem; vertical-align: 1px; }

} /* @layer component */
