/* Site footer (Figma: home / Footer). Full-bleed white band + #07366F legal bar.
   Inner content is the 1180px column with 40px side padding. */

:root {
  /* Visible gray between the last green plate and the white footer. */
  --fl-footer-sep-gap: 100px;
}

@media (max-width: 900px) {
  :root {
    --fl-footer-sep-gap: 50px;
  }
}

.fl-main > .fl-footer {
  /*
   * Flex gap already separates sections. Sep plates bleed below their section
   * by --fl-sep-pad-bottom, so cancel the gap and add the desired visible gray.
   */
  margin-top: calc(
    var(--fl-footer-sep-gap) - var(--fl-section-gap) +
      var(--fl-sep-pad-bottom)
  );
  margin-bottom: calc(-1 * var(--fl-main-pad-bottom));
}

.fl-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  box-sizing: border-box;
  width: 100%;
  background: var(--fl-white);
  font-family: var(--fl-font-sans);
}

/* Figma: 446 brand | 133.33 spacer | 200.33 | 200.33, 40px gaps = 1100.
   The spacer is empty, so make it the flexible track: at 1100 it resolves to
   133.33 exactly, and as the band narrows it collapses first, keeping the
   brand at 446 and the link columns hard right instead of overflowing. */
.fl-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 446px) minmax(0, 1fr) 200.33px 200.33px;
  column-gap: 40px;
  row-gap: 40px;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--fl-main-width);
  margin: 0 auto;
  padding: 56px 40px;
}

.fl-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  grid-column: 1;
  gap: 0;
  max-width: 446px;
}

.fl-footer__logo {
  display: block;
  width: 95px;
  height: 32px;
}

.fl-footer__logo img {
  display: block;
  width: 95px;
  height: 32px;
}

.fl-footer__tagline {
  max-width: 320px;
  margin: 16px 0 0;
  color: var(--fl-text-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.fl-footer__badges {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-top: 24px;
}

.fl-footer__badges img {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  object-fit: contain;
}

.fl-footer__badges .fl-footer__badge--soc {
  width: 77px;
  height: 78px;
  mix-blend-mode: multiply;
}

.fl-footer__badges .fl-footer__badge--pci {
  width: 78px;
  height: 61px;
}

.fl-footer__badges .fl-footer__badge--openai {
  width: 122px;
  height: 57px;
}

.fl-footer__badges .fl-footer__badge--naphia {
  width: 108px;
  height: 57px;
}

.fl-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: start;
  gap: 8px;
}

.fl-footer__col:nth-of-type(1) {
  grid-column: 3;
}

.fl-footer__col:nth-of-type(2) {
  grid-column: 4;
}

.fl-footer__col a {
  align-self: stretch;
  color: var(--fl-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
  text-underline-offset: 2px;
  transition: color 0.15s ease, font-weight 0.15s ease;
}

.fl-footer__col a:hover,
.fl-footer__col a:focus-visible {
  color: var(--fl-green);
  font-weight: 600;
  text-decoration: underline;
}

.fl-footer__legal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  box-sizing: border-box;
  border-top: 1px solid #cbced3;
  background: #07366f;
}

.fl-footer__legal-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--fl-main-width);
  min-height: 64px;
  margin: 0 auto;
  padding: 24px 40px;
}

.fl-footer__copy {
  max-width: 410px;
  margin: 0;
  color: var(--fl-white);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

.fl-footer__legal-links {
  display: flex;
  flex: none;
  align-items: center;
  gap: 24px;
}

.fl-footer__legal-links a {
  color: var(--fl-white);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease, font-weight 0.15s ease;
}

.fl-footer__legal-links a:nth-child(1) {
  width: 93px;
}

.fl-footer__legal-links a:nth-child(2) {
  width: 87px;
}

.fl-footer__legal-links a:nth-child(3) {
  width: 65px;
}

.fl-footer__legal-links a:hover,
.fl-footer__legal-links a:focus-visible {
  color: var(--fl-green-light);
  font-weight: 600;
}

/* Once the spacer has collapsed the brand cell starts shrinking, so tighten the
   badge row to keep all four on one line. */
@media (max-width: 1219px) {
  .fl-footer__badges {
    gap: 16px;
  }
}

/* At 1000px the brand cell is down to ~390px — the width of the badge row — so
   below that give the brand its own full-width row (badges back to their Figma
   35px gap) and put the two link columns underneath at 200.33px. */
@media (max-width: 1000px) {
  .fl-footer__inner {
    grid-template-columns: 200.33px 200.33px minmax(0, 1fr);
    row-gap: 48px;
  }

  .fl-footer__brand {
    grid-column: 1 / -1;
    max-width: none;
  }

  .fl-footer__badges {
    gap: 20px;
  }

  .fl-footer__col:nth-of-type(1) {
    grid-column: 1;
  }

  .fl-footer__col:nth-of-type(2) {
    grid-column: 2;
  }

  /* Copyright plus the three legal links need ~750px on one line. */
  .fl-footer__legal-inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .fl-footer__inner,
  .fl-footer__legal-inner {
    padding-left: var(--fl-page-gutter);
    padding-right: var(--fl-page-gutter);
  }

  .fl-footer__badges {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
  }

  .fl-footer__badges .fl-footer__badge--soc,
  .fl-footer__badges .fl-footer__badge--pci,
  .fl-footer__badges .fl-footer__badge--openai,
  .fl-footer__badges .fl-footer__badge--naphia {
    flex: none;
    width: auto;
    height: 48px;
  }

  /* Two 200.33px tracks plus the gap overflow a phone viewport. */
  .fl-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fl-footer__legal-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .fl-footer__copy {
    width: auto;
  }

  .fl-footer__legal-links {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .fl-footer__legal-links a:nth-child(n) {
    width: auto;
  }
}
