/* Blue paper stays continuous as a transparent ink overlay fades in below the social links. */
.site-footer {
  --footer-bottom-padding: 34px;
  --footer-wave-height: clamp(72px, 9vw, 140px);
  --footer-copyright-gap: 24px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0;
  /* The overlapping body mask avoids a seam under the curved top edge. */
  -webkit-mask-image: url("../../images/decorations/footer-wave.svg"), linear-gradient(#000, #000);
  mask-image: url("../../images/decorations/footer-wave.svg"), linear-gradient(#000, #000);
  -webkit-mask-size: 100% var(--footer-wave-height), 100% calc(100% - var(--footer-wave-height) + 1px);
  mask-size: 100% var(--footer-wave-height), 100% calc(100% - var(--footer-wave-height) + 1px);
  -webkit-mask-position: top, bottom;
  mask-position: top, bottom;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background: var(--action-blue);
  color: #fff;
  padding: calc(var(--footer-wave-height) + 27px) 0 var(--footer-bottom-padding);
}

.site-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: soft-light;
  background-image: url("../../images/decorations/washi-texture.svg");
  background-size: 256px 256px;
}

.footer-content {
  width: min(1320px, calc(100% - 88px));
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 0;
  border-bottom: 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  flex: 0 1 auto;
  min-width: 0;
  color: #fff;
  text-align: left;
}

.footer-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  flex: 0 0 auto;
  aspect-ratio: 2 / 1;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.footer-logo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: 50% 52%;
  mix-blend-mode: normal;
}

.footer-brand .festival-title {
  font-size: 25px;
}

.footer-brand .festival-university {
  font-size: 12px;
  color: inherit;
}

.footer-back-to-top {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border: 2px solid currentColor;
  border-radius: 50%;
  padding: 9px;
  color: #fff;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms ease;
}

.footer-back-to-top .icon {
  width: 27px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.footer-back-to-top:hover,
.footer-back-to-top:focus-visible {
  color: #fff;
  background: #ffffff1a;
  text-decoration: none;
}

.footer-back-to-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

.site-footer .social-links {
  justify-content: flex-end;
  gap: 12px;
  margin: 22px 0 0;
  color: #fff;
}

.site-footer .social-links a {
  width: 44px;
  height: 44px;
  border-color: #d3e0f299;
}

.site-footer .social-links a:hover,
.site-footer .social-links a:focus-visible {
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.site-footer .footer-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  gap: 3px 29px;
  margin-top: 29px;
  padding-top: 18px;
  border-top: 1px solid #d3e0f259;
}

.footer-nav a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 5px 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  color: #fff;
  text-decoration: none;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-nav .nav-item-label {
  min-width: 0;
}
.footer-nav .nav-item-icon,
.footer-nav .nav-item-chevron {
  display: grid;
  place-items: center;
}
.footer-nav .nav-item-icon .icon {
  width: 18px;
  height: 18px;
}
.footer-nav .nav-item-chevron {
  justify-self: end;
}
.footer-nav .nav-item-chevron .icon {
  width: 16px;
  height: 16px;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
  text-decoration: none;
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .footer-nav a,
  .footer-back-to-top,
  .site-footer .social-links a {
    transition: none;
  }
}

.site-footer .footer-copyright {
  position: relative;
  isolation: isolate;
  margin: var(--footer-copyright-gap) 0 0;
  padding-top: 20px;
  color: #eff5ff;
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

.site-footer .footer-copyright::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-1 * var(--footer-copyright-gap));
  bottom: calc(-1 * var(--footer-bottom-padding));
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(7, 14, 22, 0) 0%,
    rgba(7, 14, 22, 0.04) 12%,
    rgba(7, 14, 22, 0.3) 40%,
    rgba(7, 14, 22, 0.75) 72%,
    #070e16 100%
  );
}

@media (max-width: 1000px) {
  .site-footer .footer-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .site-footer {
    --footer-bottom-padding: calc(110px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 760px) {
  .site-footer {
    --footer-copyright-gap: 22px;
    --footer-wave-height: 56px;
    padding: calc(var(--footer-wave-height) + 20px) 0 var(--footer-bottom-padding);
  }

  .footer-content {
    width: calc(100% - 40px);
  }

  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
  }

  .footer-brand {
    gap: clamp(8px, 2vw, 16px);
  }

  .site-footer .social-links {
    justify-content: flex-end;
  }

  .footer-logo {
    width: clamp(56px, 18vw, 96px);
  }

  .footer-brand .festival-title {
    font-size: 21px;
  }

  .footer-brand .festival-university {
    font-size: 10px;
  }

  .footer-back-to-top {
    width: 50px;
    height: 50px;
    padding: 5px;
    font-size: 11px;
  }

  .footer-back-to-top .icon {
    width: 22px;
    height: 20px;
  }

  .site-footer .footer-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 18px;
    margin-top: 24px;
    padding-top: 18px;
  }

  .footer-nav a {
    grid-template-columns: 16px minmax(0, 1fr) 14px;
    gap: 7px;
    min-height: 44px;
    font-size: 12px;
  }
  .footer-nav .nav-item-icon .icon {
    width: 16px;
    height: 16px;
  }
  .footer-nav .nav-item-chevron .icon {
    width: 14px;
    height: 14px;
  }

  .site-footer .footer-copyright {
    text-align: center;
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .footer-top {
    gap: 12px;
  }

  .footer-brand {
    gap: 8px;
  }

  .footer-brand .festival-title {
    font-size: 18px;
  }

  .footer-logo {
    width: 56px;
  }

  .footer-back-to-top {
    width: 46px;
    height: 46px;
  }
}

@media print {
  .site-footer {
    border-radius: 0;
    -webkit-mask: none;
    mask: none;
    padding: 30px 0;
    background: #fff;
    color: var(--ink);
  }

  .site-footer::before,
  .site-footer .footer-copyright::before,
  .footer-back-to-top,
  .site-footer .social-links,
  .site-footer .footer-nav {
    display: none;
  }

  .footer-brand,
  .site-footer .footer-copyright {
    color: var(--ink);
  }

  .site-footer .footer-copyright {
    padding-top: 0;
  }
}
