/* Fiesta de los 10 años en /festival: la misma animación del flyer animado
   (social/10-anos/flyer-fecha-anim.html) adaptada a la página. Bucle de 6 s:
   papelitos que caen, gallina y ganso que saltan sobre el panel de la fecha, abejas
   alrededor del logo y honguitos que crecen y se achican, cambian de tono y sueltan esporas.
   El prefers-reduced-motion global de styles.css la apaga entera. */

.fest--page { overflow: hidden; }
.fest--page > .shell { position: relative; z-index: 1; }

/* Papelitos: detrás del contenido; el panel tiene fondo propio y los tapa al pasar. */
.fz-stage { position: absolute; inset: 0; pointer-events: none; container-type: size; }
.fz-c {
  position: absolute; top: -40px; opacity: .9;
  animation: fz-fall var(--dur, 6s) linear infinite;
  animation-delay: calc(var(--d, 0s) * -1);
}
@keyframes fz-fall { to { transform: translate(var(--sway), calc(100cqh + 60px)) rotate(var(--rot)); } }

/* Personajes: anclados al logo y al panel, para que sigan a su elemento en cualquier ancho. */
.fest__head, .fest__next { position: relative; }
.fz { position: absolute; pointer-events: none; z-index: 2; }
.fz img { display: block; width: 100%; height: auto; }
.fz .fz-a { animation-iteration-count: infinite; animation-delay: calc(var(--d, 0s) * -1); }
.fz--flip img { transform: scaleX(-1); }

/* gallina y ganso: saltito con aplastamiento + balanceo */
.fz-hop { animation: fz-hop var(--dur, 1s) cubic-bezier(.4, 0, .6, 1); transform-origin: 50% 100%; }
@keyframes fz-hop {
  0%, 100% { transform: translateY(0) scale(1.06, .94); }
  50% { transform: translateY(var(--h, -34px)) scale(.97, 1.04); }
}
.fz-sway { animation: fz-sway var(--dur, 2s) ease-in-out; transform-origin: 50% 100%; }
@keyframes fz-sway { 0%, 100% { transform: rotate(var(--a, -7deg)); } 50% { transform: rotate(calc(var(--a, -7deg) * -1)); } }

/* abejas: una cruza la sección, las otras revolotean en óvalos */
.fz-cross { animation: fz-cross 6s linear infinite; }
@keyframes fz-cross { from { transform: translateX(-160px); } to { transform: translateX(calc(100cqw + 160px)); } }
.fz-bob { animation: fz-bob var(--dur, 1s) ease-in-out; }
@keyframes fz-bob { 0%, 100% { transform: translateY(calc(var(--b, 12px) * -1)) rotate(-6deg); } 50% { transform: translateY(var(--b, 12px)) rotate(6deg); } }
.fz-ox { animation: fz-ox var(--dur, 3s) ease-in-out; }
@keyframes fz-ox { 0%, 100% { transform: translateX(calc(var(--rx, 40px) * -1)); } 50% { transform: translateX(var(--rx, 40px)); } }
.fz-oy { animation: fz-oy var(--dur, 3s) ease-in-out; }
@keyframes fz-oy { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(var(--ry, 36px)); } }
.fz-buzz { animation: fz-buzz .25s ease-in-out; }
@keyframes fz-buzz { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* honguitos: crecen y se achican, cambian de tono, halo arcoíris que gira y esporas */
.fz-mush img { position: relative; }
.fz-breathe { animation: fz-breathe var(--dur, 3s) ease-in-out; transform-origin: 50% 100%; }
@keyframes fz-breathe {
  0%, 100% { transform: scale(.8) rotate(calc(var(--w, 2deg) * -1)); }
  50% { transform: scale(1.2) rotate(var(--w, 2deg)); }
}
.fz-trip { animation: fz-trip 6s ease-in-out; }
@keyframes fz-trip {
  0%, 100% { filter: hue-rotate(0deg) saturate(1); }
  50% { filter: hue-rotate(var(--hue, 40deg)) saturate(1.2); }
}
.fz-halo {
  position: absolute; left: 50%; top: var(--ht, 30%); width: 130%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; filter: blur(22px); opacity: .32;
  background: conic-gradient(#b48cf0, #6cc9c3, #a6d64a, #f2c14e, #f08a7e, #e57ad1, #b48cf0);
  animation: fz-halo 6s linear;
}
@keyframes fz-halo { to { transform: rotate(360deg); } }
.fz-sp {
  position: absolute; width: var(--s, 9px); aspect-ratio: 1; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 10px 2px var(--c);
  animation: fz-spore var(--dur, 3s) ease-out; opacity: 0;
}
@keyframes fz-spore {
  0% { transform: translate(0, 0) scale(.3); opacity: 0; }
  25% { opacity: .9; }
  100% { transform: translate(var(--dx, 20px), var(--dy, -120px)) scale(1); opacity: 0; }
}

/* Ubicación. Gallina y ganso paran sobre el borde superior del panel, en un carril propio
   (más aire arriba del panel) para no tapar el texto; los honguitos brotan de las esquinas
   libres de abajo, lejos de los botones; las abejas rondan el logo. */
.fest--page .fest__next { margin-top: clamp(7.5rem, 6rem + 4vw, 9.5rem); }
.fz--hen   { width: clamp(72px, 3rem + 5vw, 130px); bottom: calc(100% - 10px); left: 7%; }
.fz--goose { width: clamp(74px, 3rem + 5vw, 130px); bottom: calc(100% - 8px); right: 26%; }
.fz--m1 { width: clamp(64px, 3rem + 4vw, 110px); bottom: -14px; right: -18px; }
.fz--m2 { width: clamp(80px, 3.5rem + 6vw, 150px); bottom: -18px; right: 14%; }
.fz--m3 { width: clamp(44px, 2rem + 3vw, 72px); bottom: -10px; left: -40px; }
.fz--b1 { width: clamp(52px, 2rem + 3vw, 80px); top: -4%; right: clamp(9rem, 5rem + 12vw, 15rem); }
.fz--b2 { width: clamp(46px, 2rem + 2.5vw, 70px); bottom: 4%; right: -2%; }
.fz--b3 { width: clamp(56px, 2rem + 3vw, 84px); top: 8px; }

/* En móvil el logo pasa arriba del título y los botones se apilan a la izquierda. */
@media (max-width: 640px) {
  .fz--b1, .fz--m3 { display: none; }
  .fz--goose { right: 8%; }
  .fz--m2 { right: 24%; width: 76px; }
}
