/* ============================================================================
   10 · FOOTER — band-deep, laid out as the Portal footer. The GESDA logo
   sits left of Follow GESDA; the funder marks (Confederation, Canton, Ville) sit
   under the rule, right-aligned below the social column. The social links
   are button-icon (§10.1), 44px targets.
   ========================================================================= */

/* No top padding: the close above ends on the same purple-900, so its own
   bottom padding is the gap, and the two read as one band. */
.site-footer { padding: 0 0 var(--space-16); }
.site-footer__grid {
  display: grid; gap: var(--space-12) var(--space-16); align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}
.site-footer__brand img { display: block; height: calc(var(--space-12) * 1.3); width: auto; max-width: 100%; }
.site-footer__funders { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6) var(--space-8); margin-left: auto; }
/* Heights are set per mark so the three read at an even visual size: the
   wide Confederation lockup sits lower, the stacked Canton emblem taller. */
.site-footer__funders img { display: block; width: auto; max-width: 100%; }
.site-footer__funders .site-footer__swiss  { height: calc(var(--space-8) + var(--space-2)); }
.site-footer__funders .site-footer__canton { height: var(--space-16); }
.site-footer__funders .site-footer__ville  { height: var(--space-16); }
.site-footer__group h3 { margin: 0 0 var(--space-3); font: 600 var(--type-h4) / 1.4 var(--font-body); color: var(--color-ink); }
.site-footer__group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__group a,
.site-footer__legal a {
  color: var(--color-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--motion-fast), background-color var(--motion-fast), border-color var(--motion-fast);
}
.site-footer__group a { font: 400 var(--type-body-sm) / 1.5 var(--font-body); }
.site-footer__group a:hover,
.site-footer__legal a:hover  { color: var(--color-ink); text-decoration: underline; }
.site-footer__group a:active,
.site-footer__legal a:active { color: var(--color-action-primary-active); }
.site-footer__group a:focus-visible,
.site-footer__legal a:focus-visible { outline: 3px solid var(--color-focus-ring); outline-offset: 2px; }

.site-footer__group .site-footer__social { flex-direction: row; gap: var(--space-3); }
.site-footer__social a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-full);
}
.site-footer__social svg { fill: currentColor; }
.site-footer__social a:hover { text-decoration: none; border-color: var(--color-muted); background: var(--color-canvas-tinted); }
.site-footer__social a:active { background: var(--color-canvas-pressed); }

.site-footer__legal {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6);
  margin-top: var(--space-12); padding-top: var(--space-6);
  border-top: 1px solid var(--color-hairline);
}
.site-footer__legal p,
.site-footer__legal a { margin: 0; font: 400 var(--type-caption) / 1.45 var(--font-body); color: var(--color-muted); }
.site-footer__legal ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }

@media (max-width: 979px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-12); justify-items: center; text-align: center; }
  .site-footer__group .site-footer__social { justify-content: center; }
  .site-footer__brand { display: none; }   /* the topbar already carries it */
  .site-footer__funders { margin-left: 0; justify-content: center; }
  /* Centre the legal row to match the centred column above it. */
  .site-footer__legal { flex-direction: column; text-align: center; }
  .site-footer__legal ul { justify-content: center; }
}
