@property --neural-turbulence-strength {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

@media (prefers-reduced-motion: no-preference) {
  /* Move the art inside the fixed figure so pointer coordinates stay stable. */
  .neural-turbulence-enabled [data-neural-study] > :is([data-neural-network], .neural-core) {
    --neural-turbulence-strength: 0;
    pointer-events: none;
    transition: --neural-turbulence-strength 220ms ease-out;
  }

  .neural-turbulence-enabled [data-neural-travel]:is([data-depth-state='active'], [data-depth-state='returning'])
    + .neural-founder-aside [data-neural-study] > :is([data-neural-network], .neural-core) {
    animation: neural-turbulence 560ms ease-in-out infinite;
  }

  .neural-turbulence-enabled [data-neural-travel][data-depth-state='active']
    + .neural-founder-aside [data-neural-study] > :is([data-neural-network], .neural-core) {
    --neural-turbulence-strength: 1;
  }

  @keyframes neural-turbulence {
    0%, 100% { transform: translateY(0); }
    17% { transform: translateY(calc(-1.32px * var(--neural-turbulence-strength))); }
    37% { transform: translateY(calc(1.14px * var(--neural-turbulence-strength))); }
    56% { transform: translateY(calc(-.86px * var(--neural-turbulence-strength))); }
    78% { transform: translateY(calc(1.36px * var(--neural-turbulence-strength))); }
  }
}
