/*
 * The site footer.
 *
 * Light, like the French one. The previous footer was a dark navy band, which
 * on an otherwise white page is the single loudest thing on the site — and the
 * loudest thing on a page should not be the legal small print.
 *
 * Rhythm: a call to action on its own line, then the columns, then the legal
 * matter separated by a rule and set smaller. Three tiers, each quieter than
 * the one above it.
 */

.site-footer {
  background: var(--ds-surface);
  border-top: 1px solid var(--ds-line);
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
}

/* Top row ------------------------------------------------------------- */

.site-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-bottom: clamp(1.75rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--ds-line);
}

.site-footer__logo img {
  display: block;
  width: 148px;
  height: auto;
}

/* Columns ------------------------------------------------------------- */

.site-footer__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  padding-block: clamp(2rem, 4vw, 3rem);
}

@media (min-width: 860px) {
  .site-footer__main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
  }
}

.site-footer__tagline {
  margin: 0;
  max-width: 22ch;
  color: var(--ds-ink);
  font-size: var(--ds-text-lead);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: var(--ds-tracking-tight);
  text-wrap: balance;
}

.site-footer__columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(1.75rem, 3vw, 2.5rem);
}

.site-footer__heading {
  margin: 0 0 0.85rem;
  color: var(--ds-ink);
  font-size: var(--ds-text-small);
  font-weight: 600;
  letter-spacing: 0;
}

.site-footer__column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.site-footer__column a {
  color: var(--ds-muted);
  font-size: var(--ds-text-small);
  text-decoration: none;
}

.site-footer__column a:hover,
.site-footer__column a:focus-visible {
  color: var(--ds-ink);
}

/* Note and legal ------------------------------------------------------ */

.site-footer__note {
  margin: 0 0 clamp(1.5rem, 3vw, 2rem);
  color: var(--ds-muted);
  font-size: var(--ds-text-small);
}

.site-footer__note a {
  color: var(--ds-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__legal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--ds-line);
}

.site-footer__legal-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer__legal-links a {
  color: var(--ds-muted);
  font-size: var(--ds-text-small);
  text-decoration: none;
}

.site-footer__legal-links a:hover,
.site-footer__legal-links a:focus-visible {
  color: var(--ds-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer__copyright {
  margin: 0;
  color: var(--ds-muted);
  font-size: var(--ds-text-small);
}

/*
 * The risk warning. Long by law and by nature, so it is set at the smallest
 * step and given a wide measure — but still at a contrast that passes AA,
 * because print nobody can read is the oldest trick in the book and this is a
 * financial-education site. Measured: 4.83:1 at 12px.
 *
 * Not justified — at this size and measure it opens rivers between the words.
 */
.site-footer__disclaimer {
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  color: var(--ds-muted);
  font-size: 0.75rem;
  line-height: 1.7;
}
