footer {
  background-color: var(--color-footer-primary);
  width: 100%;
  font-size: 12px;
}

footer section {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

@keyframes footer-layout-fade-a {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes footer-layout-fade-b {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.footer-main {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2rem;
  padding: 2rem;
  align-items: center;
  max-width: var(--max-page-width);
  margin: 0 auto;
  animation: footer-layout-fade-a var(--transition-header-speed) ease;
}

.footer-company {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding-right: 2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-company .logo {
  height: 60px;
}

.footer-company h2 {
  margin: 0;
  font-size: 13px;
  color: var(--color-text);
}

.footer-company p {
  margin: 0;
  line-height: 1.5;
}

.footer-list-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.footer-list-sections section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100px;
}

footer h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0px;
}

footer address {
  font-style: normal;
}

footer ul {
  list-style: none;
  padding-left: 0px;
  margin: 0;
  max-width: 100px;
}

footer ul li {
  margin: 8px 0;
  line-height: 1.4;
}

footer a {
  text-decoration: underline;
  transition: var(--transition-header-speed);
}

footer hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 8px 0;
}

.footer-legal {
  background-color: var(--color-footer-secondary);
  text-align: center;
  height: 30px;
  padding: 6px 2rem;
  font-size: 11px;
  color: var(--color-text-hover);
}

@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: 1fr;
    animation: footer-layout-fade-b var(--transition-header-speed) ease;
  }

  .footer-company {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
  }

  /* Fixed steps instead of a fluid auto-fit grid, so the wrap happens at
     known widths and can fade smoothly at each one (auto-fit reflows
     continuously with no point to hook a transition on). Thresholds are
     sized for this footer's current content (min-width: 120px sections,
     longest strings like "Precision Grinding" / "705 Old Hwy 9") -
     nudge them if a row ever looks cramped right before it steps down. */

  .footer-list-sections {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, max-content));
    justify-content: center;
    animation: footer-layout-fade-a var(--transition-header-speed) ease;
    margin-left: 25px;
  }

  @media (max-width: 620px) {
    .footer-list-sections {
      grid-template-columns: repeat(2, minmax(120px, max-content));
      animation: footer-layout-fade-b var(--transition-header-speed) ease;
    }
  }

  @media (max-width: 420px) {
    .footer-list-sections {
      grid-template-columns: repeat(1, minmax(120px, max-content));
      animation: footer-layout-fade-a var(--transition-header-speed) ease;
    }
  }

}
