.site-footer {
  background: linear-gradient(180deg, var(--surface) 0%, var(--canvas) 100%);
  position: relative;
  z-index: 1;
  margin-top: -4rem;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -20px 40px -20px rgba(17, 17, 17, 0.22);
}

.footer-main {
  width: min(1240px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 3rem 0 2.2rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 2.4rem;
}

.footer-brand__logo { display: block; height: 6.3rem; width: auto; }

.footer-col h3 {
  margin: 0 0 1rem; font-size: 1.1rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.footer-col a {
  text-decoration: none; color: var(--ink-muted); font-size: 1.3rem;
  transition: color 180ms var(--ease);
}
.footer-col a:hover, .footer-col a:focus-visible { color: var(--ink); }

.footer-col__disclosure { display: none; }

.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom__inner {
  width: min(1240px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 1.2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.6rem;
  font-size: 1.2rem;
  color: var(--ink-muted);
}
.legal-links { display: flex; gap: 2rem; flex-wrap: wrap; }
.legal-links a { text-decoration: none; color: var(--ink-muted); transition: color 180ms var(--ease); }
.legal-links a:hover, .legal-links a:focus-visible { color: var(--ink); }

.social-links { display: flex; align-items: center; }
.social-links__link {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  transition: color 180ms var(--ease);
}
.social-links__link:hover, .social-links__link:focus-visible { color: var(--ink); }

@media (max-width: 700px) {
  .footer-main {
    grid-template-columns: 1fr;
    padding: 2.6rem 0 0.4rem;
    gap: 1rem;
  }
  .footer-brand__logo { height: 4rem; }

  .footer-col { width: 100%; }
  .footer-col h3 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .footer-col ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.6rem;
    row-gap: 0;
  }
  .footer-col a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 5.2rem;
    font-size: 1.4rem;
  }

  /* Resources collapses into a single disclosure on mobile instead of a
     second full link grid — keeps Navigate's footprint unchanged and
     the SEO/resource links quiet-but-not-hidden rather than crowding
     the page by default. */
  .footer-col--resources > h3,
  .footer-col--resources > .footer-col__list {
    display: none;
  }
  .footer-col__disclosure {
    display: block;
    border-top: 1px solid var(--line);
  }
  .footer-col__disclosure summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    list-style: none;
    cursor: pointer;
    min-height: 5.2rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ink);
  }
  .footer-col__disclosure summary::-webkit-details-marker { display: none; }
  .footer-col__disclosure summary .material-symbols-rounded {
    color: var(--ink-muted);
    transition: transform 220ms var(--ease);
    flex-shrink: 0;
  }
  .footer-col__disclosure[open] summary .material-symbols-rounded { transform: rotate(180deg); }
  .footer-col__disclosure ul {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 1rem;
    margin: 0.2rem 0 1.6rem;
    padding: 0;
  }
  .footer-col__disclosure ul a {
    display: block;
    min-height: auto;
    font-size: 1.4rem;
  }

  .footer-bottom__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.6rem 0;
    font-size: 1.2rem;
  }
  .legal-links { gap: 1.6rem 2.4rem; }
}

/* The homepage wraps the footer with the lead form in .lead-footer-wrap
   (see lead-form.css), which paints one shared red field behind both on
   mobile — so only there does the footer switch to the inverted/white
   treatment below. Standalone pages (privacy policy, 404, SEO guides)
   keep the plain light footer instead of inheriting a background that
   isn't actually behind them. */
@media (max-width: 700px) {
  .lead-footer-wrap .site-footer {
    background: none;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    position: relative;
  }
  .lead-footer-wrap .site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
  }
  .lead-footer-wrap .footer-brand__logo { filter: brightness(0) invert(1); }

  .lead-footer-wrap .footer-col a { color: #ffffff; }
  .lead-footer-wrap .footer-col a:hover, .lead-footer-wrap .footer-col a:focus-visible { color: rgba(255, 255, 255, 0.75); }

  .lead-footer-wrap .footer-col__disclosure { border-top-color: rgba(255, 255, 255, 0.2); }
  .lead-footer-wrap .footer-col__disclosure summary { color: #ffffff; }
  .lead-footer-wrap .footer-col__disclosure summary .material-symbols-rounded { color: rgba(255, 255, 255, 0.7); }

  .lead-footer-wrap .footer-bottom { border-top: none; }
  .lead-footer-wrap .footer-bottom__inner { color: rgba(255, 255, 255, 0.8); }

  .lead-footer-wrap .legal-links a { color: rgba(255, 255, 255, 0.8); }
  .lead-footer-wrap .legal-links a:hover, .lead-footer-wrap .legal-links a:focus-visible { color: #ffffff; }

  .lead-footer-wrap .social-links__link { color: rgba(255, 255, 255, 0.8); }
  .lead-footer-wrap .social-links__link:hover, .lead-footer-wrap .social-links__link:focus-visible { color: #ffffff; }

  .lead-footer-wrap .site-footer a:focus-visible { outline-color: #ffffff; }
}
@media (max-width: 560px) {
  .footer-main { width: calc(100% - 3.2rem); }
  .footer-bottom__inner { width: calc(100% - 3.2rem); }
}
