/* ==========================================================================
   flock.css
   Ambient doves for about.html. The CSS keyframes are the no-script fallback;
   flock.js takes over and drives the same elements with transforms.
   ========================================================================== */

.flock-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 800;
  overflow: hidden;
  contain: layout paint;
}

.flying-bird {
  position: absolute;
  top: 0;
  left: 0;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  will-change: transform;
}

.bird-lift {
  display: block;
  animation: lift 2.4s linear infinite;
  will-change: transform;
}

.bird-glyph {
  display: block;
  font-size: 32px;
  line-height: 1;
  transform-origin: 50% 55%;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.3));
  animation: wingbeat 2.4s ease-in-out infinite;
  will-change: transform;
}

.bird-1 { top: 6%;  animation-name: crossA; animation-duration: 26s; animation-delay: -4s; }
.bird-2 { top: 22%; animation-name: crossB; animation-duration: 34s; animation-delay: -11s; }
.bird-3 { top: 14%; animation-name: crossA; animation-duration: 30s; animation-delay: -19s; }
.bird-4 { top: 30%; animation-name: crossB; animation-duration: 40s; animation-delay: -27s; }

.bird-2 .bird-glyph { font-size: 28px; }
.bird-3 .bird-glyph { font-size: 24px; }
.bird-4 .bird-glyph { font-size: 20px; }

@keyframes crossA {
  0%   { transform: translate3d(-18vw, 0, 0) scaleX(-1); }
  16%  { transform: translate3d(24vw, 4vh, 0) scaleX(-1); }
  32%  { transform: translate3d(66vw, -2vh, 0) scaleX(-1); }
  46%  { transform: translate3d(118vw, 3vh, 0) scaleX(-1); }
  50%  { transform: translate3d(118vw, 3vh, 0) scaleX(1); }
  66%  { transform: translate3d(64vw, 6vh, 0) scaleX(1); }
  82%  { transform: translate3d(20vw, 1vh, 0) scaleX(1); }
  96%  { transform: translate3d(-18vw, 0, 0) scaleX(1); }
  100% { transform: translate3d(-18vw, 0, 0) scaleX(-1); }
}

@keyframes crossB {
  0%   { transform: translate3d(118vw, 0, 0) scaleX(1); }
  18%  { transform: translate3d(70vw, -5vh, 0) scaleX(1); }
  34%  { transform: translate3d(28vw, 2vh, 0) scaleX(1); }
  47%  { transform: translate3d(-18vw, -3vh, 0) scaleX(1); }
  50%  { transform: translate3d(-18vw, -3vh, 0) scaleX(-1); }
  68%  { transform: translate3d(30vw, -7vh, 0) scaleX(-1); }
  84%  { transform: translate3d(74vw, -1vh, 0) scaleX(-1); }
  97%  { transform: translate3d(118vw, 0, 0) scaleX(-1); }
  100% { transform: translate3d(118vw, 0, 0) scaleX(1); }
}

@keyframes lift {
  0% {
    transform: translateY(0.8vh);
    animation-timing-function: cubic-bezier(0.2, 0.85, 0.4, 1);
  }
  52% {
    transform: translateY(-0.8vh);
    animation-timing-function: cubic-bezier(0.55, 0, 0.75, 0.45);
  }
  100% {
    transform: translateY(0.8vh);
  }
}

@keyframes wingbeat {
  0%   { transform: scale(1, 1); }
  5%   { transform: scale(1.06, 0.84); }
  10%  { transform: scale(0.92, 1.15); }
  15%  { transform: scale(1.06, 0.84); }
  20%  { transform: scale(0.92, 1.15); }
  25%  { transform: scale(1.05, 0.86); }
  30%  { transform: scale(0.93, 1.13); }
  35%  { transform: scale(1.04, 0.88); }
  40%  { transform: scale(0.95, 1.10); }
  45%  { transform: scale(1.02, 0.94); }
  50%  { transform: scale(1, 1); }
  100% { transform: scale(1, 1); }
}

@media (prefers-reduced-motion: reduce) {
  .flock-container { display: none; }
}
