﻿/* 背景动效：独立文件，避免和 styles.css 的嵌套纠缠 */
.bg {
  position: fixed;
  inset: -10%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.bg.bg-ink { opacity: 1; }
.bg.bg-light { opacity: .9; }

.bg.bg-ink::before,
.bg.bg-ink::after {
  content: "";
  position: absolute;
  inset: -15%;
}
.bg.bg-ink::before {
  background: radial-gradient(ellipse 78% 78% at 24% 34%,
      rgba(23,19,14,.16) 0%,
      rgba(23,19,14,.145) 44%,
      rgba(23,19,14,.07) 72%,
      rgba(23,19,14,0) 100%);
  animation: breathe 7s ease-in-out infinite alternate;
}
.bg.bg-ink::after {
  background: radial-gradient(ellipse 80% 80% at 76% 68%,
      rgba(23,19,14,.14) 0%,
      rgba(23,19,14,.125) 42%,
      rgba(23,19,14,.06) 70%,
      rgba(23,19,14,0) 100%);
  animation: breathe 9s ease-in-out infinite alternate-reverse;
}
@keyframes breathe {
  from { opacity: .58; transform: scale(.74) translate3d(-7%, 4.5%, 0); }
  to   { opacity: 1;   transform: scale(1.48) translate3d(7%, -5%, 0); }
}

/* 窗影：一道很淡的暗带横着走 */
.bg-light {
  background: linear-gradient(71deg,
      rgba(23,19,14,0) 28%,
      rgba(23,19,14,.07) 41%,
      rgba(23,19,14,.12) 50%,
      rgba(23,19,14,.07) 59%,
      rgba(23,19,14,0) 72%);
  animation: sweep 44s ease-in-out infinite alternate;
}
@keyframes sweep {
  from { transform: translate3d(-10%,0,0) rotate(-.5deg); }
  to   { transform: translate3d(10%,0,0) rotate(.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-light, .bg.bg-ink::before, .bg.bg-ink::after { animation-duration: 16s; }
}
/* —— 背景布置：装裱绫边 + 水渍 + 浮尘 —— */
.mount {
  position: fixed; inset: 16px;
  z-index: 2; pointer-events: none;
  border: 1px solid rgba(120, 96, 62, .28);
  box-shadow:
    inset 0 0 0 6px rgba(246, 241, 230, .55),
    inset 0 0 0 7px rgba(120, 96, 62, .16),
    inset 0 0 90px rgba(120, 96, 62, .10);
}
.stainx {
  position: fixed; z-index: 2; pointer-events: none;
  right: -6vw; bottom: -12vh;
  width: 62vw; height: 54vh;
  background:
    radial-gradient(58% 62% at 52% 56%, rgba(120, 88, 46, .07) 0%, rgba(120, 88, 46, .045) 46%, rgba(120, 88, 46, 0) 74%),
    radial-gradient(30% 34% at 62% 48%, rgba(120, 88, 46, .05) 0%, rgba(120, 88, 46, 0) 70%);
  filter: blur(2px);
}
.dust { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.dust i {
  position: absolute; display: block;
  width: 2.5px; height: 2.5px; border-radius: 50%;
  background: rgba(60, 48, 30, .30);
  animation: mote 46s linear infinite;
  opacity: 0;
}
.dust i:nth-child(1) { left: 18%; top: 78%; animation-delay: 0s;   }
.dust i:nth-child(2) { left: 33%; top: 92%; animation-delay: -7s;  }
.dust i:nth-child(3) { left: 47%; top: 84%; animation-delay: -15s; }
.dust i:nth-child(4) { left: 61%; top: 96%; animation-delay: -22s; }
.dust i:nth-child(5) { left: 72%; top: 80%; animation-delay: -30s; }
.dust i:nth-child(6) { left: 84%; top: 90%; animation-delay: -11s; }
.dust i:nth-child(7) { left: 26%; top: 62%; animation-delay: -36s; }
.dust i:nth-child(8) { left: 55%; top: 58%; animation-delay: -19s; }
.dust i:nth-child(9) { left: 68%; top: 34%; animation-delay: -4s;  }
.dust i:nth-child(10){ left: 41%; top: 26%; animation-delay: -27s; }
@keyframes mote {
  0%   { opacity: 0;    transform: translate3d(0, 0, 0) scale(.8); }
  12%  { opacity: .32; }
  80%  { opacity: .22; }
  100% { opacity: 0;    transform: translate3d(34px, -46vh, 0) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .dust i { animation-duration: 120s; }
}
