/* Motion stays inside the existing product compositions. */
@property --fit-progress {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 60%;
}

.progress-ring {
  --fit-progress: 60%;
  background: conic-gradient(var(--forest) 0 var(--fit-progress), #cfdac2 var(--fit-progress) 100%);
}

.demo-animate .bar-chart i {
  transform-origin: center bottom;
  animation: demo-bar-in .9s cubic-bezier(.2,.7,.2,1) both;
}
.demo-animate .bar-chart > div:nth-child(2) i { animation-delay: .06s; }
.demo-animate .bar-chart > div:nth-child(3) i { animation-delay: .12s; }
.demo-animate .bar-chart > div:nth-child(4) i { animation-delay: .18s; }
.demo-animate .bar-chart > div:nth-child(5) i { animation-delay: .24s; }
.demo-animate .bar-chart > div:nth-child(6) i { animation-delay: .3s; }
.demo-animate .bar-chart > div:nth-child(7) i { animation-delay: .36s; }
.demo-animate .metric-line,
.demo-animate .completion-track i {
  transform-origin: left center;
  animation: demo-line-in 1s .12s cubic-bezier(.2,.7,.2,1) both;
}
.demo-animate .progress-ring { animation: demo-ring-in 1.15s .1s ease-out both; }
.demo-animate .job-card { animation: demo-row-in .55s .25s ease-out both; }
.demo-animate .job-card + .job-card { animation-delay: .4s; }

.workout-preview .workout-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% 42%;
}
.workout-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0b211cee 0%, #0b211c99 48%, #0b211c15 100%),
    linear-gradient(0deg, #0b211ce8 0%, transparent 65%);
}
.workout-preview > .mini-label,
.workout-preview > strong,
.workout-preview > div {
  position: relative;
  z-index: 1;
}
.workout-preview > .mini-label { color: #e0e8d7; }
.profile-avatar { object-fit: cover; object-position: center 34%; }

.story-rail::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 5px #ff8b4a18, 0 0 18px #ff8b4a70;
  left: var(--progress);
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: left .8s ease-in-out, top .8s ease-in-out, opacity .25s;
}
.story-visual.is-playing .story-rail::after { opacity: 1; }
.story-node::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid var(--orange);
  border-radius: 50%;
  opacity: 0;
}
.story-visual.is-playing .is-current .story-node::after {
  animation: story-node-pulse 1.4s ease-out;
}

@keyframes demo-bar-in { from { transform: scaleY(.08); } to { transform: scaleY(1); } }
@keyframes demo-line-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes demo-ring-in { from { --fit-progress: 0%; } to { --fit-progress: 60%; } }
@keyframes demo-row-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes story-node-pulse { from { opacity: .6; transform: scale(.85); } to { opacity: 0; transform: scale(1.3); } }

@media (max-width:600px) {
  .story-rail::after { left: 50%; top: var(--progress); }
}
@media (prefers-reduced-motion:reduce) {
  .demo-animate * { animation: none !important; }
  .story-rail::after, .story-node::after { display: none; }
}
