/*
  Footer — Website Refresh 2026 1e (Figma), "Footer" frame.
  Source: https://www.figma.com/design/2W6CyIAW3cKDEqdv26CeE2/Website-Refresh-2026-1e?node-id=59-11886

  Requires tokens.css and typography.css loaded first.

  This is the global footer — present on every page, not nested
  inside anything else, so it deliberately doesn't depend on
  content-block.css. It reimplements the same responsive-margin +
  1344px-cap system used there (48px margin >=1280px, 32px minimum
  640-1280px, 16px minimum <640px, content never exceeding 1344px)
  so the footer's own content aligns with the page content above it,
  without the footer needing to be a "content block" itself.

  Figma's Menus row only shows the Desktop layout (5 fixed 243px
  columns, totalling exactly 1344px with their gaps — no coincidence,
  that's the same cap this row sits inside). Below Desktop, columns
  wrap via flex-wrap rather than staying fixed-width, since 5 rigid
  243px columns would overflow well before the 640px breakpoint.
*/

.rs-footer {
  box-sizing: border-box;
  width: 100%;
  padding: var(--space-72) var(--space-48);
  background-color: var(--color-blue-800);
}

@media (max-width: 1280px) {
  .rs-footer {
    padding-left: var(--space-32);
    padding-right: var(--space-32);
  }
}

@media (max-width: 640px) {
  .rs-footer {
    padding-top: var(--space-32);
    padding-right: var(--space-16);
    padding-bottom: var(--space-32);
    padding-left: var(--space-16);
  }
}

.rs-footer__inner {
  max-width: 1344px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Menus ---------- */

.rs-footer__menus {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-32);
  width: 100%;
}

.rs-footer-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-16);
  flex: 1 1 180px;
  max-width: 243px;
}

.rs-footer-menu__header {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  color: var(--color-neutral-white-50);
}

.rs-footer-menu__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rs-footer-menu__item {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.4;
  color: var(--color-transparency-light-80);
  text-decoration: none;
}

.rs-footer-menu__item:hover {
  color: var(--color-neutral-white-50);
}

/* Small size — added to the Footer Menu Item component for the
   Privacy policy / Terms & conditions links in the Credit row,
   which sit at Body/Small (16px) rather than the 20px every other
   footer menu item uses. */
.rs-footer-menu__item--small {
  font-size: 16px;
}

/* ---------- Logos ---------- */

.rs-footer__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-64);
  padding-top: var(--space-64);
}

.rs-footer-logo {
  display: block;
  height: 90px;
  width: auto;
}

.rs-footer-logo--employee-owned {
  height: 65px;
  opacity: 0.9;
}

.rs-footer-logo--crown {
  height: 70px;
}

.rs-footer-logo--ecologi {
  height: 70px;
  opacity: 0.8;
}

.rs-footer-logo--iso {
  opacity: 0.8;
}

.rs-footer-bcorp {
  position: relative;
  width: 53px;
  height: 90px;
}

.rs-footer-bcorp img {
  position: absolute;
  left: 0;
  width: 100%;
}

.rs-footer-bcorp__piece--1 {
  top: 0.09%;
}
.rs-footer-bcorp__piece--2 {
  top: 16.21%;
}
.rs-footer-bcorp__piece--3 {
  top: 75.75%;
}
.rs-footer-bcorp__piece--4 {
  top: 90.47%;
}

/* ---------- Credit ---------- */

.rs-footer__credit {
  padding-top: var(--space-32);
}

.rs-footer__montala {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-32);
  width: 100%;
}

.rs-footer__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  flex: 1 1 320px;
  min-width: 0;
}

.rs-footer__copyright {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-transparency-light-80);
}

.rs-footer__legal {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.rs-footer__legal .rs-footer-menu__item {
  white-space: nowrap;
}

.rs-footer__legal-divider {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-transparency-light-50);
}

.rs-footer__social {
  display: flex;
  align-items: center;
  gap: var(--space-32);
  flex-shrink: 0;
}

.rs-footer__social a {
  display: block;
  line-height: 0;
}

.rs-footer__social img {
  display: block;
}

/* Placed after the base rules above (not grouped with .rs-footer's
   own mobile padding near the top of this file) so it actually wins
   the cascade — a same-specificity override sitting earlier in the
   file than the rule it's meant to override loses regardless of its
   @media condition matching. Headers stay bold (that's still the
   only thing distinguishing them from links at this size), just
   matched down to the same 16px. */
@media (max-width: 640px) {
  .rs-footer-menu__header,
  .rs-footer-menu__item {
    font-size: 16px;
  }

  .rs-footer__logos {
    padding-top: var(--space-32);
    gap: var(--space-32);
  }

  /* X is 44x40 and LinkedIn is 48x48 at desktop (set via width/
     height attributes in the markup, not CSS) — this overrides both
     to a consistent 32px square. */
  .rs-footer__social img {
    width: 32px;
    height: 32px;
  }
}
