/* Shared footer: isolated from the typography and resets of each page. */
#footer {
  --surface: #0c0f11;
  --surface3: #161b1f;
  --border: rgba(255, 255, 255, 0.07);
  --text: #e2e8f0;
  --muted: #64748b;
  --muted2: #94a3b8;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  text-align: left;
  color: var(--text);
  width: 100%;
  flex-shrink: 0;
  margin-top: auto;
  z-index: 41;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}
#footer,
#footer *,
#footer *::before,
#footer *::after {
  box-sizing: border-box;
}
#footer * {
  margin: 0;
  padding: 0;
}
#footer .wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
#footer p { line-height: inherit; letter-spacing: normal; }
/* FOOTER */
#footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
#footer .footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 4rem 0 3rem;
}
#footer .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 1rem;
}
#footer .footer-logo img {
  width: 28px;
  height: 28px;
}
#footer .footer-logo span {
  font-size: 1rem;
  font-weight: 700;
  color: white;
}
#footer .footer-tagline {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 240px;
  margin-bottom: 1.5rem;
}
#footer .footer-socials {
  display: flex;
  gap: 8px;
}
#footer .social-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}
#footer .social-btn:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}
#footer .social-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
#footer .footer-col-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
#footer .footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
#footer .footer-links a {
  font-size: 0.875rem;
  color: var(--muted2);
  text-decoration: none;
  transition: color 0.2s;
}
#footer .footer-links a:hover {
  color: white;
}
#footer .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}
#footer .footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
}
#footer .footer-legal {
  display: flex;
  gap: 1.25rem;
}
#footer .footer-legal a {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
#footer .footer-legal a:hover {
  color: var(--muted2);
}

@media (max-width: 900px) {
  #footer .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  #footer .footer-brand-col {
    grid-column: 1/-1;
  }
}
@media (max-width: 640px) {
  #footer .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  #footer .footer-brand-col {
    grid-column: auto;
  }
  #footer .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* The historical docs prototype uses a horizontal flex body. */
body.flex:not(.flex-col) { flex-wrap: wrap; }
