/* ria-kyron-calls motion. Brief section 8: on load bars grow, rings fill, panels fade up
   (500-1100 ms, ease-out); hover lifts panels 2px and brightens bars, only on fine pointers;
   nothing loops; everything stops under prefers-reduced-motion. */

@property --pct {
  syntax: "<number>";
  inherits: false;  /* set and used on .ring itself: a leaf value is cheaper to animate */
  initial-value: 0;
}

/* Default state is visible: motion only runs from an already-correct final layout. */
.m-grow-x { transform-origin: left center; }
.m-grow-y { transform-origin: center bottom; }

@media (prefers-reduced-motion: no-preference) {
  .m-fade-up { animation: m-fade-up 600ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
  .m-grow-x { animation: m-grow-x 900ms var(--ease-out) both; animation-delay: calc(150ms + var(--i, 0) * 70ms); }
  .m-grow-y { animation: m-grow-y 800ms var(--ease-out) both; animation-delay: calc(150ms + var(--i, 0) * 25ms); }
  .m-ring { animation: m-ring 1100ms var(--ease-out) both; animation-delay: calc(200ms + var(--i, 0) * 90ms); }
}

@keyframes m-fade-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes m-grow-x { from { transform: scaleX(0); } }
@keyframes m-grow-y { from { transform: scaleY(0); } }
@keyframes m-ring { from { --pct: 0; } }

/* Progress ring: conic gradient driven by --pct (0-100). Where @property is missing the ring
   simply shows its final value. */
.ring {
  --size: 112px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  background:
    radial-gradient(closest-side, var(--panel) 76%, transparent 77% 100%),
    conic-gradient(var(--ring-color, var(--accent)) calc(var(--pct) * 1%), var(--panel-2) 0);
  display: grid; place-items: center; text-align: center;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .m-lift { transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
  .m-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
  .m-bright { transition: filter 160ms var(--ease-out); }
  .m-bright:hover { filter: brightness(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    animation-delay: 0ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}
