.site-footer {
  --footer-text: rgba(246, 240, 227, 0.92);
  --footer-hairline: rgba(232, 185, 95, 0.55);
  --footer-overlap: 64px;
  --frame-x: -50%;

  position: relative;
  overflow: hidden;
  background: var(--obsidian);
  color: var(--on-dark);
}

.site-footer__main {
  position: relative;
  z-index: 2;
  padding-top: clamp(48px, 4.4vw, 64px);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
}

.site-footer__logo {
  flex: none;
}

.site-footer__logo img {
  width: clamp(196px, 17.2vw, 248px);
  height: auto;
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.site-footer__social-link:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}

.site-footer__social-link:focus-visible {
  border-radius: 50%;
}

.site-footer__social .icon {
  width: 22px;
  height: 22px;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.04fr) minmax(0, 1fr);
  gap: 40px;
  margin-top: clamp(40px, 3.4vw, 50px);
}

.site-footer__heading {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gold);
}

.site-footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 18px;
  color: var(--footer-text);
  transition: color 0.2s var(--ease);
}

.site-footer__link:hover {
  color: var(--gold);
}

.site-footer__underline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1.5px solid rgba(246, 240, 227, 0.62);
  line-height: 1.4;
  transition: border-color 0.2s var(--ease);
}

.site-footer__link:hover .site-footer__underline {
  border-color: currentColor;
}

.site-footer__link--gold {
  color: var(--gold);
}

.site-footer__link--gold .site-footer__underline {
  border-color: currentColor;
}

.site-footer__link--gold:hover {
  color: var(--gold-bright);
}

.site-footer__link--gold .icon {
  transition: transform 0.25s var(--ease);
}

.site-footer__link--gold:hover .icon {
  transform: translate(2px, -2px);
}

.site-footer__address {
  padding-top: 7px;
  font-size: 18px;
  font-style: normal;
  line-height: 1.7;
  color: var(--footer-text);
}

.site-footer__horizon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  height: clamp(230px, 25vw, 520px);
  margin-top: calc(var(--footer-overlap) * -1);
  overflow: hidden;
}

/* Photo, fallback and orbit share this 16:9 box so the line tracks the curve. */
.site-footer__frame {
  position: absolute;
  top: 0;
  left: 50%;
  width: max(100%, 1000px);
  max-width: none;
  aspect-ratio: 16 / 9;
  transform: translate(var(--frame-x), -42%);
}

.site-footer__earth,
.site-footer__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.site-footer__photo {
  background: url("../images/hero-bg-desktop.webp") center / cover no-repeat;
}

.site-footer__horizon::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(var(--obsidian), rgba(7, 11, 18, 0) 14%),
    radial-gradient(60% 55% at 0 100%, rgba(7, 11, 18, 0.6), rgba(7, 11, 18, 0)),
    linear-gradient(rgba(7, 11, 18, 0.22), rgba(7, 11, 18, 0.22));
}

.site-footer__orbit-window,
.site-footer__orbit-track {
  position: absolute;
  inset: 0;
}

.site-footer__orbit-window {
  z-index: 2;
  overflow: hidden;
}

.site-footer__orbit path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5px;
  stroke-linecap: round;
}

.site-footer__horizon > .wrap {
  position: relative;
  z-index: 3;
}

.site-footer__copy {
  margin: 0;
  padding-bottom: 24px;
  font-size: 15px;
  color: rgba(246, 240, 227, 0.74);
}

.anim .site-footer__horizon[data-reveal] {
  transform: none;
}

/* Counter-translated pair wipes the line in left to right using transforms only. */
.anim .site-footer__orbit-window {
  transform: translateX(-100%);
}

.anim .site-footer__orbit-track {
  transform: translateX(100%);
}

.anim .site-footer__orbit-window,
.anim .site-footer__orbit-track {
  transition: transform 1.8s var(--ease) 0.35s;
}

.anim .site-footer__horizon.is-in .site-footer__orbit-window,
.anim .site-footer__horizon.is-in .site-footer__orbit-track {
  transform: none;
}

@media (max-width: 1099px) {
  .site-footer {
    --footer-overlap: 0px;
  }

  .site-footer__cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 28px 40px;
  }

  .site-footer__cols > :last-child {
    grid-column: 1 / -1;
  }

  .site-footer__contact {
    display: flex;
    flex-wrap: wrap;
    column-gap: 36px;
  }
}

@media (max-width: 699px) {
  .site-footer {
    --footer-overlap: 36px;
    --frame-x: -45%;
  }

  .site-footer__main {
    padding-top: 40px;
  }

  .site-footer__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .site-footer__logo img {
    width: 200px;
  }

  .site-footer__social {
    gap: 12px;
  }

  .site-footer__social-link {
    width: 46px;
    height: 46px;
  }

  .site-footer__cols {
    display: block;
    margin-top: 36px;
  }

  .site-footer__contact {
    display: block;
  }

  .site-footer__cols > * + * {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--footer-hairline);
  }

  .site-footer__heading {
    font-size: 18px;
  }

  .site-footer__link,
  .site-footer__address {
    font-size: 16px;
  }

  .site-footer__copy {
    padding-bottom: 20px;
    font-size: 13px;
  }
}
