/* Shared rules for the animated project covers (inline <svg> in .portfolio-wrap).
   The values below are the motion tokens from assets/covers/SPEC.md; each cover's own
   stylesheet (assets/css/covers/<prefix>.css) should use them instead of its own numbers.
   Load this file before the cover stylesheets. */

:root {
  /* Loops */
  --cover-story: 12s;      /* a cover that tells its project's story, in beats of ~3s */
  --cover-ambient: 7s;     /* background life: floats, drifts, glows */

  /* Easing */
  --cover-ease: cubic-bezier(0.4, 0, 0.2, 1);       /* default for everything */
  --cover-ease-pop: cubic-bezier(0.3, 0.8, 0.3, 1.1); /* at most one small "pop" per cover */

  /* Hover: the hero element lifts */
  --cover-hover-lift: -6px;
  --cover-hover-duration: 300ms;

  /* Ambient movement stays small */
  --cover-ambient-amplitude: 8px;
}

/* Off screen (or tab hidden), js/covers.js adds .is-paused to the cover's <svg>: every
   CSS animation inside it freezes where it is and resumes from there. SMIL animations
   are paused by the script itself (svg.pauseAnimations()). */
.portfolio-wrap > svg.is-paused,
.portfolio-wrap > svg.is-paused * {
  animation-play-state: paused !important;
}
