/* A short ripple on arrival and logo interaction; always still for reduced motion.
   Only transforms the letters, so the masthead and home-link hit area stay put. */
a:is(.anton-wordmark, .riseup-letter-wordmark) > :is(span, b):not(.header-ribbon) {
  display: inline-block;
  opacity: 1 !important;
  transform: none;
  transform-origin: 50% 80%;
  animation: none;
}

a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(1) { --wordmark-letter: 0; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(2) { --wordmark-letter: 1; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(3) { --wordmark-letter: 2; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(4) { --wordmark-letter: 3; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(5) { --wordmark-letter: 4; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(6) { --wordmark-letter: 5; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(7) { --wordmark-letter: 6; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(8) { --wordmark-letter: 7; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(9) { --wordmark-letter: 8; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(10) { --wordmark-letter: 9; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(11) { --wordmark-letter: 10; }
a:is(.anton-wordmark, .riseup-letter-wordmark) > :nth-child(12) { --wordmark-letter: 11; }

@keyframes riseup-wordmark-wave {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  28% { transform: translateY(-0.12em) rotate(-2deg); }
  65% { transform: translateY(0.04em) rotate(1deg); }
}
@keyframes riseup-wordmark-wave-replay {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  28% { transform: translateY(-0.12em) rotate(-2deg); }
  65% { transform: translateY(0.04em) rotate(1deg); }
}

@media (prefers-reduced-motion: no-preference) {
  a:is(.anton-wordmark, .riseup-letter-wordmark) > :is(span, b):not(.header-ribbon) {
    animation: riseup-wordmark-wave 1.5s ease-in-out 1 both;
    /* Override the old inline entrance delays without editing every page. */
    animation-delay: calc(var(--wordmark-letter, 0) * 70ms) !important;
  }
  a:is(.anton-wordmark, .riseup-letter-wordmark):focus-visible > :is(span, b):not(.header-ribbon) {
    animation-name: riseup-wordmark-wave-replay;
  }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  a:is(.anton-wordmark, .riseup-letter-wordmark):hover > :is(span, b):not(.header-ribbon) {
    animation-name: riseup-wordmark-wave-replay;
  }
}

@media (prefers-reduced-motion: reduce), print {
  a:is(.anton-wordmark, .riseup-letter-wordmark) > :is(span, b):not(.header-ribbon) {
    animation: none !important;
    transform: none !important;
  }
}
