/* Blake-Inspired Breathing Animations
   Subtle, organic movement like candlelight and living manuscripts
*/

/* === BREATHING PULSE ===
   Gentle expansion/contraction for decorative elements */
@keyframes breathe {
  0%, 100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* === CANDLELIGHT FLICKER ===
   Subtle warmth variation like firelight */
@keyframes flicker {
  0%, 100% {
    opacity: 0.9;
    filter: brightness(1);
  }
  25% {
    opacity: 0.95;
    filter: brightness(1.02);
  }
  50% {
    opacity: 0.88;
    filter: brightness(0.98);
  }
  75% {
    opacity: 0.92;
    filter: brightness(1.01);
  }
}

/* === GOLD SHIMMER ===
   Subtle metallic warmth shift for gold accents */
@keyframes goldShimmer {
  0%, 100% {
    filter: saturate(1) brightness(1);
  }
  50% {
    filter: saturate(1.1) brightness(1.05);
  }
}

/* === WARM GLOW PULSE ===
   For title text and emphasis */
@keyframes warmGlow {
  0%, 100% {
    text-shadow:
      1px 1px 2px var(--shadow-deep),
      0 0 8px rgba(201, 169, 98, 0.1);
  }
  50% {
    text-shadow:
      1px 1px 2px var(--shadow-deep),
      0 0 15px rgba(201, 169, 98, 0.2);
  }
}

/* === ANIMATION UTILITY CLASSES === */

.animate-breathe {
  animation: breathe var(--breathe-duration, 4s) ease-in-out infinite;
}

.animate-flicker {
  animation: flicker var(--flicker-duration, 3s) ease-in-out infinite;
}

.animate-shimmer {
  animation: goldShimmer 5s ease-in-out infinite;
}

.animate-glow {
  animation: warmGlow var(--breathe-duration, 4s) ease-in-out infinite;
}

/* Stagger animations for natural feel */
.corner--tr,
*:nth-child(2) > .animate-breathe { animation-delay: 0.5s; }

.corner--bl,
*:nth-child(3) > .animate-breathe { animation-delay: 1s; }

.corner--br,
*:nth-child(4) > .animate-breathe { animation-delay: 1.5s; }

.edge--right { animation-delay: 0.25s; }
.edge--bottom { animation-delay: 0.75s; }
.edge--left { animation-delay: 1.25s; }
