/* anim.css — transform/opacity only, so every beat stays on the compositor. */

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-1.6rem) scale(0.72);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tile-flip {
  from {
    opacity: 0;
    transform: rotateX(-82deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.4rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slam {
  0% {
    opacity: 0;
    transform: scale(2.4);
  }
  55% {
    opacity: 1;
    transform: scale(0.94);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes chip-land {
  from {
    transform: scaleX(1.5) scaleY(0.35);
  }
  to {
    transform: none;
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.anim-drop {
  animation: drop-in 460ms var(--ease-slam) both;
}

.anim-rise {
  animation: rise 520ms var(--ease-out) both;
}

.anim-slam {
  animation: slam 520ms var(--ease-slam) both;
}

.chip {
  animation: chip-land 260ms var(--ease-slam) both;
}

.code__tile {
  animation: tile-flip 520ms var(--ease-out) both;
  transform-origin: center top;
}

.meta--live::before {
  content: "\25CF";
  margin-right: 0.5em;
  animation: pulse-soft 1.6s ease-in-out infinite;
}

/* Stagger helper: elements set --i to their index. */
.stagger {
  animation-delay: calc(var(--i, 0) * 70ms);
}
