.bg-filter {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(0);
  transition: opacity 0.4s ease;
}
body.loaded .bg-filter {
  opacity: 1;
}

.bg-filter.filter-3d::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: calc(100% + 160px);
  height: calc(100% + 160px);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 29px,
      rgba(255, 255, 255, 0.12) 29px,
      rgba(255, 255, 255, 0.12) 30px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 29px,
      rgba(255, 255, 255, 0.12) 29px,
      rgba(255, 255, 255, 0.12) 30px
    ),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 42px,
      rgba(255, 255, 255, 0.09) 42px,
      rgba(255, 255, 255, 0.09) 43px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 42px,
      rgba(255, 255, 255, 0.09) 42px,
      rgba(255, 255, 255, 0.09) 43px
    );
  animation: meshMove 25s linear infinite;
}

@keyframes meshMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(120px, 80px); }
}

.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(
    ellipse at center,
    transparent 20%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.85) 80%,
    rgba(0, 0, 0, 0.95) 100%
  );
}
body.loaded .vignette {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .bg-filter.filter-3d::before {
        animation: none !important;
    }
}
