/* Back to top: appears once the first screen is behind you, on the nav's right margin. */
.to-top {
  position: fixed;
  right: max(48px, calc(env(safe-area-inset-right, 0px) + 24px));
  bottom: max(48px, calc(env(safe-area-inset-bottom, 0px) + 24px));
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 0;
  background: rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  font-family: "Source Code Pro", SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .6s cubic-bezier(.165, .84, .44, 1), visibility 0s linear .6s,
    background-color .2s ease, color .2s ease, border-color .2s ease;
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top-arrow { display: inline-block; transition: transform .35s cubic-bezier(.165, .84, .44, 1); }
.to-top:hover,
.to-top:focus-visible { background: #fff; color: #000; border-color: #fff; }
.to-top:hover .to-top-arrow,
.to-top:focus-visible .to-top-arrow { transform: translateY(-3px); }
.to-top:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 767px) {
  .to-top {
    right: max(24px, calc(env(safe-area-inset-right, 0px) + 16px));
    bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px));
    height: 34px;
    padding: 0 12px;
  }
}
@media (hover: none) {
  .to-top:hover { background: rgba(0, 0, 0, .6); color: #fff; border-color: rgba(255, 255, 255, .24); }
  .to-top:hover .to-top-arrow { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .to-top { transform: none; transition: opacity .2s linear, visibility 0s linear .2s, background-color .2s, color .2s, border-color .2s; }
  .to-top-arrow { transition: none; }
}
/* Phones: the footer's last line sits clear of the button when you reach the bottom. */
@media (max-width: 767px) {
  .matt-home footer.contact,
  footer.mm-footer { padding-bottom: 96px; }
}
