/* ==========================================================================
   OBJECT-268 / ambient background
   720p Yukino snowfall loop, fixed across every page.
   Source: MoeWalls live wallpaper preview; personal fan-site use.
   ========================================================================== */

.ambient-bg {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #06101a url("../images/yukino-loop-poster.jpg") center 32% / cover no-repeat;
}

.ambient-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  opacity: 0.55;
  filter: saturate(0.82) brightness(0.8) contrast(1.04);
}

.ambient-bg::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 9, 14, 0.9) 0%, rgba(5, 9, 14, 0.66) 42%, rgba(5, 9, 14, 0.3) 73%, rgba(5, 9, 14, 0.5) 100%),
    linear-gradient(180deg, rgba(5, 9, 14, 0.45) 0%, rgba(5, 9, 14, 0.06) 38%, rgba(11, 14, 11, 0.79) 82%, #0b0e0b 100%);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Let the fixed loop stay visible through the paper sections as a soft,
   frosted moving layer instead of disappearing below the hero. */
.section--paper {
  background: rgba(242, 238, 227, 0.92);
  -webkit-backdrop-filter: blur(12px) saturate(0.9);
  backdrop-filter: blur(12px) saturate(0.9);
}

.footer-credit {
  flex-basis: 100%;
  margin: 0.35rem 0 0;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.53rem;
  line-height: 1.65;
}

.footer-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.footer-credit a:hover {
  color: var(--acid);
}

@media (max-width: 680px) {
  .section--paper {
    background: rgba(242, 238, 227, 0.95);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }

  .ambient-bg video {
    object-position: 22% 30%;
    opacity: 0.46;
    filter: saturate(0.76) brightness(0.72) contrast(1.02);
  }

  .ambient-bg::after {
    background:
      linear-gradient(180deg, rgba(5, 9, 14, 0.58) 0%, rgba(5, 9, 14, 0.18) 42%, rgba(11, 14, 11, 0.9) 100%),
      linear-gradient(90deg, rgba(5, 9, 14, 0.72), rgba(5, 9, 14, 0.34));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-bg video {
    display: none;
  }
}
