/* Ilustrações (js/art.js): tamanho das cenas e todas as animações. */

.scene {
  display: block;
  width: min(100%, 340px, 46dvh);
  height: auto;
  margin-bottom: 18px;
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--line), 0 0 60px color-mix(in oklab, var(--aura) 16%, transparent);
}

.cards__art {
  width: 84px;
  height: 84px;
}

.cards--compact .cards__art {
  width: 64px;
  height: 64px;
}

/* Toda peça animada gira/escala em torno da própria caixa, não da origem do SVG. */
.scene [class^="a-"],
.cards__art [class^="a-"] {
  transform-box: fill-box;
  transform-origin: center;
}

.a-glow { animation: art-glow 4.5s ease-in-out infinite; }
.a-wax { animation: art-wax 5s ease-in-out infinite; }
.a-twinkle { animation: art-twinkle 3.2s ease-in-out infinite; }
.a-breathe { animation: art-breathe 4.5s ease-in-out infinite; }
.a-ray { animation: art-ray 4.2s ease-in-out infinite; }
.a-ring { opacity: 0.2; animation: art-ring 4.2s ease-in-out infinite; }
.a-blink { animation: art-blink 5.5s ease-in-out infinite; }
.a-wisp { stroke-dasharray: 5 7; animation: art-wisp 2.6s linear infinite; }
.a-wave { stroke-dasharray: 10 8; animation: art-wave 3s linear infinite; }
.a-fall { animation: art-fall 3.6s linear infinite; }
.a-flow-right { animation: art-flow-right 3s linear infinite; }
.a-flow-left { animation: art-flow-left 3s linear infinite; }

.scene .a-tail { transform-origin: 0% 100%; animation: art-tail 2.8s ease-in-out infinite; }
.scene .a-nod { transform-origin: 70% 90%; animation: art-nod 5s ease-in-out infinite; }
.scene .a-swing { transform-origin: 50% 0%; animation: art-swing 1.6s ease-in-out infinite; }
.scene .a-leaf,
.scene .a-flicker,
.scene .a-sway { transform-origin: 50% 100%; }
.a-leaf { animation: art-leaf 5s ease-in-out infinite; }
.a-flicker { animation: art-flicker 1.1s ease-in-out infinite; }
.a-sway { animation: art-sway 3.4s ease-in-out infinite; }

.a-d1 { animation-delay: -0.6s; }
.a-d2 { animation-delay: -1.2s; }
.a-d3 { animation-delay: -1.8s; }
.a-d4 { animation-delay: -2.4s; }
.a-d5 { animation-delay: -3s; }
.a-d6 { animation-delay: -3.6s; }

@keyframes art-glow { 50% { transform: scale(1.12); opacity: 0.75; } }
@keyframes art-wax { 0%, 100% { transform: scale(0.55); opacity: 0.35; } 50% { transform: scale(1); opacity: 1; } }
@keyframes art-twinkle { 0%, 100% { transform: scale(0.5); opacity: 0.25; } 50% { transform: scale(1); opacity: 1; } }
@keyframes art-breathe { 50% { transform: translateY(-1.2px); } }
@keyframes art-ray { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.95; } }
@keyframes art-ring { 50% { opacity: 0.75; } }
@keyframes art-blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes art-wisp { from { stroke-dashoffset: 0; opacity: 0.9; } to { stroke-dashoffset: 48; opacity: 0.25; } }
@keyframes art-wave { to { stroke-dashoffset: -36; } }
@keyframes art-fall { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(96px); opacity: 0; } }
@keyframes art-flow-right { from { transform: translateX(-42px); opacity: 0; } 20%, 80% { opacity: 1; } to { transform: translateX(42px); opacity: 0; } }
@keyframes art-flow-left { from { transform: translateX(42px); opacity: 0; } 20%, 80% { opacity: 1; } to { transform: translateX(-42px); opacity: 0; } }
@keyframes art-tail { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(10deg); } }
@keyframes art-nod { 50% { transform: rotate(-7deg); } }
@keyframes art-swing { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
@keyframes art-leaf { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes art-flicker {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  30% { transform: scale(0.94, 1.08) skewX(-3deg); }
  60% { transform: scale(1.04, 0.95) skewX(2deg); }
}
@keyframes art-sway {
  0%, 100% { transform: skewX(-4deg) scaleY(1); }
  50% { transform: skewX(4deg) scaleY(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .scene [class^="a-"],
  .cards__art [class^="a-"] {
    animation: none;
  }

  .a-ring { opacity: 0.5; }
}
