/* ═══════════════════════════════════════════
   animations.css — Ambient background flowers
═══════════════════════════════════════════ */

/* ── Side-drifting ambient flowers per chapter ── */
.chapter::after {
  content: none; /* reset — we use pseudo on inner wrappers */
}

/* Ambient flower strip — left & right sides of chapters */
.chapter-inner::before,
.chapter-inner::after {
  content: '';
  display: none; /* purely decorative via floater divs below */
}

/* Floater flowers injected via CSS on the chapter sections */
.chapter {
  --f-opacity: 0.22;
}

/* Left-side ambient blossoms */
.chapter .ambient-flowers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ambient-flowers span {
  position: absolute;
  font-size: 1.6rem;
  opacity: 0;
  animation: ambientRise 12s ease-in-out infinite;
}

/* Positions & delays — spread tastefully */
.ambient-flowers span:nth-child(1) {
  left: 3%;
  bottom: 10%;
  animation-delay: 0s;
  font-size: 1.4rem;
}
.ambient-flowers span:nth-child(2) {
  left: 6%;
  bottom: 40%;
  animation-delay: 4s;
  font-size: 1.8rem;
}
.ambient-flowers span:nth-child(3) {
  right: 4%;
  bottom: 20%;
  animation-delay: 2s;
  font-size: 1.5rem;
}
.ambient-flowers span:nth-child(4) {
  right: 7%;
  bottom: 55%;
  animation-delay: 6s;
  font-size: 1.3rem;
}
.ambient-flowers span:nth-child(5) {
  left: 9%;
  bottom: 70%;
  animation-delay: 8s;
  font-size: 1.6rem;
}
.ambient-flowers span:nth-child(6) {
  right: 3%;
  bottom: 75%;
  animation-delay: 3s;
  font-size: 1.4rem;
}

@keyframes ambientRise {
  0%   { opacity: 0;    transform: translateY(0)   rotate(0deg)   scale(0.8); }
  15%  { opacity: 0.22; }
  70%  { opacity: 0.18; }
  100% { opacity: 0;    transform: translateY(-90px) rotate(20deg) scale(1.1); }
}
