/* 首页大图轮播 + 缓慢缩放(Ken Burns)+ 底部波浪 */
#page-header {
  position: relative;
  overflow: hidden;
  background-image: none !important;
  background-color: #10243e;
}
#bg-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
#bg-carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1);
  transition: opacity 2.4s ease-in-out;
  animation: bg-kenburns 26s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
#bg-carousel img.active { opacity: 1; }
@keyframes bg-kenburns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.45) translate3d(-1.5%, -1.2%, 0); }
}
#page-header > nav,
#page-header > div:not(#bg-carousel):not(#bg-wave) {
  position: relative;
  z-index: 3;
}
#bg-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 160px;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}
#bg-wave svg {
  width: 200%;
  height: 100%;
  display: block;
  animation: bg-wave-move 20s linear infinite;
}
@keyframes bg-wave-move {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (max-width: 768px) {
  #bg-wave { height: 64px; }
  #bg-carousel img { animation-duration: 32s; }
  #bg-carousel img.active { transition-duration: 1.6s; }
}

/* 遮罩:提升标题与菜单在亮色图上的可读性 */
#bg-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0.42) 0%,
    rgba(0, 0, 0, 0.12) 45%,
    rgba(0, 0, 0, 0.55) 100%);
}
#page-header .site-name,
#page-header #site-subtitle,
#page-header #nav a,
#page-header #nav span {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}
#bg-wave svg path:first-child { fill: rgba(255, 255, 255, 0.42); }
#bg-wave svg path:last-child { fill: rgba(255, 255, 255, 0.22); }
#bg-wave svg { filter: drop-shadow(0 -2px 8px rgba(0, 0, 0, 0.25)); }
