/* ==========================================================================
   Site footer
   ========================================================================== */

.ffb-footer {
  margin-top: clamp(40px, 8vw, 94px);
  background: var(--ffb-footer-bg);
  color: var(--ffb-footer-link);
}

/* Sits flush when the preceding element is a full-bleed band. */
.ffb-footer--flush {
  margin-top: 0;
}

/* Public pages (final handoff): the footer lines up with the 1480px frame,
   keeps its thin gutter at every width, and sits a little closer. */
.ffb-footer--public:not(.ffb-footer--flush) {
  margin-top: clamp(28px, 3.2vw, 48px);
}

.ffb-footer--public .ffb-footer__inner,
.ffb-footer--public .ffb-footer__bar-inner {
  max-width: var(--ffb-frame);
  padding-inline: var(--ffb-frame-pad);
}

.ffb-footer__inner {
  width: 100%;
  max-width: var(--ffb-container);
  margin-inline: auto;
  padding: 44px var(--ffb-gutter) 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
}

.ffb-footer__brand {
  flex: 0 1 420px;
  max-width: 460px;
}

.ffb-footer__logo {
  height: 48px;
  width: auto;
}

.ffb-footer__blurb {
  margin-top: 30px;
  font-size: var(--ffb-body-size);
  line-height: 1.6;
  color: var(--ffb-footer-text);
}

.ffb-footer__cols {
  display: flex;
  flex-direction: row;
  gap: 100px;
  align-items: flex-start;
}

.ffb-footer__heading {
  margin-bottom: 30px;
  height: 48px;
  display: flex;
  align-items: flex-end;
  font-family: var(--ffb-body);
  font-weight: 500;
  font-size: var(--ffb-eyebrow);
  letter-spacing: var(--ffb-track-eyebrow);
  text-transform: uppercase;
  color: var(--ffb-footer-heading);
}

.ffb-footer__links {
  display: grid;
  gap: 0;
  font-size: var(--ffb-body-size);
  line-height: 1.6;
}

.ffb-footer__links a {
  color: var(--ffb-footer-link);
}

.ffb-footer__links a:hover {
  color: var(--ffb-green);
}

/* -------- Bottom bar -------- */

.ffb-footer__bar {
  border-top: 1px solid var(--ffb-footer-border);
}

.ffb-footer__bar-inner {
  width: 100%;
  max-width: var(--ffb-container);
  margin-inline: auto;
  padding: 26px var(--ffb-gutter);
}

.ffb-footer__bar p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ffb-footer-copy);
}

/* -------- Breakpoints -------- */

/* Edge-to-edge at the container cap; wider link-column gap. */
@media (min-width: 1440px) {
  .ffb-footer__inner,
  .ffb-footer__bar-inner {
    padding-inline: 0;
  }

  .ffb-footer__cols {
    gap: 160px;
  }
}

/* The design's narrower link gap starts at 1024 on public pages (the
   stacked ≤420 gap below still applies). */
@media (min-width: 421px) and (max-width: 1024px) {
  .ffb-footer--public .ffb-footer__cols {
    gap: 60px;
  }
}

/* Footer becomes a column; heading alignment box collapses. */
@media (max-width: 840px) {
  .ffb-footer__inner {
    flex-direction: column;
    gap: 40px;
  }

  /* Its 420px flex-basis is a width in the row; in the column it would
     become a height and leave a gap under the blurb. */
  .ffb-footer__brand {
    flex: none;
  }

  .ffb-footer__cols {
    gap: 60px;
  }

  .ffb-footer__heading {
    margin-bottom: 10px;
    height: auto;
  }
}

/* Link columns stack; copyright wraps. */
@media (max-width: 420px) {
  .ffb-footer__cols {
    flex-direction: column;
    gap: 28px;
  }
}

@media (max-width: 375px) {
  .ffb-footer__bar p {
    line-height: 2;
  }

  .ffb-footer__sep {
    display: none;
  }

  .ffb-footer__mark {
    display: block;
    white-space: nowrap;
  }
}

/* Never shrink in the body's flex column. The footer is pushed to the bottom
   on short pages by main's flex-grow, not by margin-top: auto — auto would
   win over the margins declared above and flatten them on every page. */
.ffb-footer {
  flex: none;
}
