@keyframes marquee-loop {
  to { transform: translate3d(-50%, 0, 0); }
}

@keyframes cue-dash {
  0% { transform: scaleX(0.2); transform-origin: left; }
  50% { transform: scaleX(1); transform-origin: left; }
  51% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

@keyframes stamp-hit {
  0% { opacity: 0; transform: scale(1.18) rotate(-14deg); filter: blur(3px); }
  58% { opacity: 0.88; transform: scale(0.99) rotate(-12deg); filter: blur(0); }
  100% { opacity: 0.88; transform: scale(1) rotate(-12deg); }
}

@keyframes stamp-ring {
  0% { opacity: 0; transform: scale(0.94); }
  40% { opacity: 0.26; }
  100% { opacity: 0; transform: scale(1.16); }
}

@keyframes glitch-base {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-1px, 0, 0); }
  50% { transform: translate3d(1px, -1px, 0); }
  75% { transform: translate3d(0, 1px, 0); }
}

@keyframes glitch-cyan {
  0%, 100% { clip-path: inset(0 0 88%); transform: translate3d(-1px, 0, 0); }
  40% { clip-path: inset(38% 0 44%); transform: translate3d(2px, 0, 0); }
  70% { clip-path: inset(79% 0 5%); transform: translate3d(-1px, 0, 0); }
}

@keyframes glitch-red {
  0%, 100% { clip-path: inset(72% 0 10%); transform: translate3d(1px, 0, 0); }
  40% { clip-path: inset(8% 0 76%); transform: translate3d(-2px, 0, 0); }
  75% { clip-path: inset(50% 0 32%); transform: translate3d(1px, 0, 0); }
}

@keyframes ripple {
  0% { opacity: 0.48; transform: translate(-50%, -50%) scale(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

@keyframes blackout-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes panel-enter {
  from { opacity: 0; transform: translate3d(0, 1rem, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.marquee__track {
  animation: marquee-loop 32s linear infinite;
}

.tape__track {
  animation: marquee-loop 56s linear infinite;
}

.scroll-cue::before {
  animation: cue-dash 1.8s var(--ease-out) infinite;
}

.stamp.is-stamping {
  animation: stamp-hit 460ms var(--ease-out) both;
}

.stamp.is-stamping::after {
  position: absolute;
  inset: -7%;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
  animation: stamp-ring 420ms var(--ease-out) 40ms both;
}

.wordmark__nm.is-glitching .wordmark__base {
  animation: glitch-base 220ms steps(3, end) 1;
}

.wordmark__nm.is-glitching .wordmark__ghost {
  opacity: 0.34;
}

.wordmark__nm.is-glitching .wordmark__ghost--cyan {
  animation: glitch-cyan 240ms steps(3, end) 1;
}

.wordmark__nm.is-glitching .wordmark__ghost--red {
  animation: glitch-red 210ms steps(3, end) 1 reverse;
}

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 1rem, 0);
  transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.thes__grid > span {
  transition: color 200ms var(--ease-out), transform 300ms var(--ease-out);
}

.mood__cta,
.mood__cta::before,
.mood__arrow {
  transition: transform 240ms var(--ease-standard), background-color 240ms var(--ease-standard);
}

.mood__cta.is-rippling::after {
  animation: ripple 420ms var(--ease-out) both;
}

.blackout {
  animation: blackout-enter 220ms var(--ease-standard) both;
}

.developer-panel {
  animation: panel-enter 420ms var(--ease-out) both;
}

@media (hover: hover) and (pointer: fine) {
  .wordmark__button:hover .wordmark__base {
    transform: translate3d(1px, -1px, 0);
  }

  .wordmark__button:hover .wordmark__dot {
    background: var(--color-seal);
    box-shadow: 0 0 0.65rem rgb(183 53 61 / 0.24);
  }

  .thes__grid > span:hover {
    color: var(--color-accent);
    transform: translate3d(0, -1px, 0);
  }

  .mood__cta:hover {
    transform: translate3d(0, -1px, 0);
  }

  .mood__cta:hover::before {
    transform: translateY(0);
  }

  .mood__cta:hover .mood__arrow {
    transform: translate3d(2px, 0, 0);
  }

  .about__email:hover,
  .foot__bottom a:hover {
    color: var(--color-accent);
  }

  .foot__contact:hover {
    border-color: var(--color-muted);
  }
}

.mood__cta:active {
  transform: translate3d(0, 0, 0) scale(0.985);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .marquee__track,
  .tape__track,
  .scroll-cue::before {
    animation: none;
  }

  .wordmark,
  .js [data-reveal],
  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}
