/* A quiet, shallow horizon behind the footer content. */
.contact {
  padding-bottom: 40px;
}

.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 48px;
  border-top: 0;
}

.site-footer > .wrap {
  position: relative;
  z-index: 2;
}

.footer-horizon {
  --horizon-apex: 64px;
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 0;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  opacity: 0.34;
  mask-image: linear-gradient(transparent, black 18%, black 72%, transparent);
  pointer-events: none;
  user-select: none;
}

.horizon-atmosphere {
  position: absolute;
  inset: -90px 0 0;
  background:
    radial-gradient(ellipse 19% 45% at 50% 61%, #ffa65538, transparent 80%),
    radial-gradient(ellipse 49% 80% at 50% 80%, #b858252e, transparent 80%);
  mask-image: linear-gradient(transparent, black 32%);
}

.horizon-symbols {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.28;
  mask-image: linear-gradient(transparent, #000a 30%, black 65%);
  animation: horizon-drift 16s ease-in-out infinite alternate;
}

.horizon-sun {
  position: absolute;
  left: 50%;
  top: calc(var(--horizon-apex) - 20px);
  width: clamp(200px, 26vw, 440px);
  height: 160px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, #ffedc9b3 0%, #ffc48380 16%, #ff9b504a 35%, #e86e2520 57%, transparent 75%);
  filter: blur(17px);
  animation: horizon-breathe 8s ease-in-out infinite alternate;
}

.horizon-sun-core {
  position: absolute;
  left: 50%;
  top: calc(var(--horizon-apex) - 7px);
  width: clamp(65px, 8vw, 125px);
  height: 24px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff0d3;
  filter: blur(13px);
  opacity: 0.8;
}

.horizon-earth {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: var(--horizon-apex);
  width: 300vw;
  height: 80vw;
  transform: translateX(-50%);
  border: 1.5px solid #ffd5af;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 32% 11% at 50% 0%, #30180f 0%, #190e0a 45%, transparent 100%),
    #0c0d0f;
  box-shadow:
    0 -1px 3px #fff0d0b3,
    0 -4px 12px #ffba8580,
    0 -12px 34px #ff8c494d,
    0 -32px 88px #fb7d2424,
    inset 0 3px 10px #ffb57721;
}

@keyframes horizon-drift {
  from { transform: translateY(5px); }
  to { transform: translateY(-5px); }
}

@keyframes horizon-breathe {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

@media (max-width: 959px) and (min-width: 700px) {
  .horizon-sun { opacity: 0.75; }
}

@media (max-width: 699px) {
  .contact {
    padding-bottom: 32px;
  }
  .site-footer {
    padding-top: 40px;
  }
  .footer-horizon {
    --horizon-apex: 60px;
    opacity: 0.3;
  }
  .horizon-earth {
    width: 320vw;
    height: 110vw;
  }
  .horizon-atmosphere {
    inset: -35px -20% 0;
    background: radial-gradient(ellipse 50% 74% at 50% 70%, #ffa05233, transparent 78%);
  }
  .horizon-symbols {
    opacity: 0.24;
  }
  .horizon-sun { width: 180px; height: 120px; }
  .horizon-sun-core { width: 65px; height: 18px; opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  .horizon-symbols, .horizon-sun { animation: none; }
}
