/*
 * "Products by FUNDING matters Inc." footer strip, ported from fundingmatters.com
 * (fmi-website components/ProductFamily.module.css). Keep the values in step with it.
 * Sizes are in px: the root font size here changes with the viewport.
 */
/*
 * The office columns above have 2em of padding on every side (main.css,
 * `footer .column-item`). The strip drops that 2em from its top margin so the
 * gap above the border matches the 48px below it, and from 800px, where the
 * columns sit side by side, takes the same 2em as side margins to line up with
 * their text. Stacked on a phone, the columns' dividers run full width, and so
 * does the strip.
 *
 * Logo heights are set per logo in layout.html (--logo-height). iShare is 33px,
 * not 26px: its symbol fills the whole SVG height, so at 26px its circle came
 * out smaller than the FMI and Giftabulator circles. The column gaps (30px, and
 * 16px on a phone) are sized so the row still fits that width: one line at
 * 1200px and up, and three logos on a phone's first line, none left alone.
 */
.product-family {
  margin: calc(48px - 2em) 0 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.product-family-label {
  margin: 0 0 28px;
  color: #939393;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-wrap: balance;
}

.product-family-label sup {
  font-size: 0.6em;
  letter-spacing: 0;
  vertical-align: super;
}

.product-family-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-family-link {
  display: block;
  line-height: 0;
  border-radius: 4px;
}

a.product-family-link:focus-visible {
  outline: 2px solid #ecad2c;
  outline-offset: 6px;
}

.product-family-logo {
  display: block;
  width: auto;
  max-width: 200px;
  height: var(--logo-height, 28px);
  /* Muted greyscale for every logo; real colours on hover/focus. */
  filter: grayscale(1) brightness(1.6);
  opacity: 0.6;
  transition: filter 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

a.product-family-link:hover .product-family-logo,
a.product-family-link:focus-visible .product-family-logo {
  filter: none;
  opacity: 1;
}

@media (min-width: 800px) {
  .product-family {
    margin-right: 2em;
    margin-left: 2em;
  }
}

/* Wide desktop: all seven fit on one line, so line them up with the
   footer's edges. Narrower widths wrap, where centring reads better. */
@media (min-width: 1200px) {
  .product-family-logos {
    justify-content: space-between;
  }
}

@media (max-width: 767px) {
  .product-family-label {
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .product-family-logos {
    gap: 18px 16px;
  }

  .product-family-logo {
    height: calc(var(--logo-height, 28px) * 0.75);
  }
}

/* "A FUNDING matters Inc. company" at the end of the copyright line, kept on
   one line so a narrow screen wraps before the phrase rather than inside it.
   Only the company name is a link, and it reads like the rest of the line
   (the Privacy Policy link's hover, set in main.css, is matched here). */
.copyright-company {
  white-space: nowrap;
}

/* main.css's `footer span, footer a { font-size: 0.9em }` would shrink the
   link a second time inside this span. */
.copyright-company a {
  font-size: inherit;
  color: inherit;
  text-decoration: none;
}

.copyright-company a:hover,
.copyright-company a:focus-visible {
  color: #fdb81c;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .product-family-logo {
    transition: none;
  }
}
