:root {
  --motion-ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

.motion-ready .motion-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 760ms var(--motion-ease),
    transform 760ms var(--motion-ease);
  transition-delay: var(--motion-delay, 0ms);
}

.motion-ready .motion-reveal.motion-in,
.motion-reduced .motion-reveal {
  opacity: 1;
  transform: none;
}

.ref-header {
  animation: nav-drop 720ms var(--motion-ease) both;
}

.ref-hero-description {
  animation: hero-copy-in 760ms var(--motion-ease) 360ms both;
}

.ref-hero-title-cutout h1 {
  animation: none;
}

.ref-hero-title-cutout .ref-hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.58em);
  filter: blur(7px);
  animation: hero-word-in 620ms var(--motion-ease) both;
}

.ref-hero-title-cutout h1 > .ref-hero-word:nth-of-type(1) { animation-delay: 140ms; }
.ref-hero-title-cutout h1 > .ref-hero-word:nth-of-type(2) { animation-delay: 230ms; }
.ref-hero-title-cutout h1 > .ref-hero-word:nth-of-type(3) { animation-delay: 320ms; }
.ref-hero-title-cutout h1 > .ref-hero-word:nth-of-type(4) { animation-delay: 430ms; }

.ref-hero-note {
  animation: hero-note-in 800ms var(--motion-ease) 520ms both, hero-note-float 8s ease-in-out 1.4s infinite;
}

.ref-hero-note a,
.ref-partner-cta,
.ref-registration-button,
.ref-ticket-button {
  transition:
    transform 220ms var(--motion-ease),
    background 220ms ease,
    color 220ms ease,
    border-color 220ms ease;
}

.ref-hero-note a:hover,
.ref-partner-cta:hover,
.ref-registration-button:hover,
.ref-ticket-button:hover {
  transform: translateY(-3px);
}

.ref-stat-grid article,
.ref-board-card,
.ref-format-tabs button,
.ref-partner-logo {
  transition:
    transform 320ms var(--motion-ease),
    box-shadow 320ms var(--motion-ease),
    border-color 220ms ease,
    background 220ms ease;
}

@media (hover: hover) {
  .ref-stat-grid article:hover,
  .ref-board-card:hover,
  .ref-partner-logo:hover {
    transform: translateY(-7px);
  }

  .ref-format-tabs button:not(.is-active):hover {
    transform: translateX(8px);
  }
}

.ref-stat-grid article:nth-child(1) { --motion-delay: 40ms; }
.ref-stat-grid article:nth-of-type(2) { --motion-delay: 110ms; }
.ref-stat-grid article:nth-of-type(3) { --motion-delay: 180ms; }
.ref-stat-grid article:nth-of-type(4) { --motion-delay: 250ms; }

.ref-board-card:nth-child(1) { --motion-delay: 50ms; }
.ref-board-card:nth-child(2) { --motion-delay: 120ms; }
.ref-board-card:nth-child(3) { --motion-delay: 190ms; }
.ref-board-card:nth-child(4) { --motion-delay: 260ms; }

.ref-partner-logo:nth-child(1) { --motion-delay: 80ms; }
.ref-partner-logo:nth-child(2) { --motion-delay: 150ms; }
.ref-partner-logo:nth-child(3) { --motion-delay: 220ms; }
.ref-partner-logo:nth-child(4) { --motion-delay: 290ms; }
.ref-partner-logo:nth-child(5) { --motion-delay: 360ms; }

.ref-ctf-poster.is-visible .ref-ctf-pill {
  animation: ref-ctf-float 6s ease-in-out 760ms infinite;
}

.ref-ctf-poster.is-visible .ref-pixel-icon {
  translate: 0 0;
  animation:
    ref-ctf-icon-pop 520ms cubic-bezier(0.2, 0.8, 0.25, 1.1) both,
    ref-ctf-float 5.7s ease-in-out 760ms infinite;
}

.ref-ctf-poster.is-visible .ref-pixel-icon:hover,
.ref-ctf-poster.is-visible .ref-ctf-pill:hover {
  animation-play-state: paused;
}

.ref-ctf-poster.is-visible .ref-pixel-icon,
.ref-ctf-poster.is-visible .ref-ctf-pill {
  will-change: transform, translate;
}

#day .ref-format-panel.is-swapping {
  animation: format-panel-swap 460ms var(--motion-ease) both;
}

@keyframes nav-drop {
  from { opacity: 0; transform: translate(-50%, -18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes hero-word-in {
  from { opacity: 0; transform: translateY(0.58em); filter: blur(7px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes hero-copy-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-note-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-note-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes format-panel-swap {
  0% { opacity: 0.35; transform: translateY(12px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ref-ctf-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

@media (prefers-reduced-motion: reduce) {
  .ref-hero-title-cutout .ref-hero-word {
    opacity: 1;
    transform: none;
    filter: none;
  }

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