/* Canonical footer: locked to the homepage across every page. */
.footer {
  min-height: 465px;
  padding: 60px 0;
  background: #F5F5F5;
}

body.footer-white .footer {
  background: #ffffff;
}

.footer,
.footer * {
  box-sizing: border-box;
}

.footer .container {
  width: calc(100vw - (var(--gutter) * 2));
  max-width: var(--container);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 230px 255px 250px 230px 67px;
  gap: 112px;
  align-items: start;
}

.footer-logo {
  display: grid;
  width: 230px;
  height: 48px;
  place-items: center;
  border-radius: 0;
  background: #e8e8e8;
  color: #222222;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .18px;
  text-decoration: none;
}

.footer-links {
  display: grid;
  gap: 16px;
  font-size: 18px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer-address,
.footer-contact {
  display: block;
  color: rgba(34, 34, 34, .80);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: .18px;
  line-height: 1.35;
  white-space: nowrap;
}

.footer-contact a {
  display: inline;
}

.footer .to-top {
  display: grid;
  width: 67px;
  height: 67px;
  place-items: center;
  border: 1px solid rgba(42, 42, 42, .20);
  border-radius: 50%;
  background: transparent;
  transition: transform .25s ease, border-color .25s ease;
}

.footer .to-top:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.footer .to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.footer .to-top img {
  display: block;
  width: 20px;
  height: 25px;
}

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(34, 34, 34, .10);
  color: rgba(34, 34, 34, .80);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .16px;
  line-height: 1.35;
}

.footer-bottom span:last-child {
  text-align: right;
}

.footer-bottom a {
  justify-self: center;
  text-align: center;
}

@media (max-width: 1700px) {
  .footer {
    min-height: auto;
  }

  .footer-grid {
    grid-template-columns: 230px minmax(180px, 250px) minmax(170px, 1fr) minmax(170px, 1fr) 67px;
    gap: clamp(18px, 2.6vw, 56px);
  }
}

@media (max-width: 1360px) {
  .footer-grid {
    grid-template-columns: 230px 1fr 1fr;
    gap: 50px;
  }
}

@media (max-width: 920px) {
  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
  }

  .footer-bottom span:last-child {
    text-align: left;
  }

  .footer-bottom a {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .footer {
    padding: 28px 0 max(28px, env(safe-area-inset-bottom, 0px));
  }

  .footer-logo {
    display: none;
  }

  .footer .container {
    width: calc(100vw - 32px);
    max-width: none;
  }

  .footer-grid {
    gap: 20px;
  }

  .footer-links {
    gap: 0;
    font-size: 16px;
  }

  .footer-links a {
    display: flex;
    min-height: 44px;
    align-items: center;
    border-bottom: 1px solid rgba(34, 34, 34, .10);
    touch-action: manipulation;
  }

  .footer-address,
  .footer-contact {
    font-size: 16px;
    line-height: 1.45;
  }

  .footer-contact {
    display: grid;
  }

  .footer-contact br {
    display: none;
  }

  .footer-contact a {
    display: flex;
    min-height: 44px;
    align-items: center;
    touch-action: manipulation;
  }

  .footer-bottom {
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer .to-top {
    transition: none;
  }
}
