/* Animated icons (js/site-icons.js). --spd scales every animation; hover/focus makes them livelier. */
.discipline-icon.has-anim, .benefit-glyph.has-anim { --spd: 1; }
.discipline-card:is(:hover, :focus-visible, .is-active) .discipline-icon.has-anim { --spd: .6; }
.benefit-card:hover .benefit-glyph.has-anim { --spd: .55; }

.discipline-icon.has-anim .anim-icon { width: 118px; height: 78px; overflow: visible; filter: drop-shadow(0 8px 19px #40eaa948); }
.benefit-glyph.has-anim { font-size: 0; }
.benefit-glyph.has-anim .anim-icon { width: 52px; height: 52px; overflow: visible; }
.anim-icon :is(path, circle, rect) { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.anim-icon * { transform-box: view-box; }
.anim-icon .ic-ground { stroke: #4b6158; stroke-width: 2; }

/* Gym: curl */
.ic-curl { transform-origin: 44px 58px; animation: icCurl calc(1.8s * var(--spd)) ease-in-out infinite; }
.ic-elbow { fill: currentColor !important; }
@keyframes icCurl { 0%, 100% { transform: rotate(38deg); } 50% { transform: rotate(-12deg); } }

/* Powerlifting: lift */
.ic-lift { animation: icLift calc(2.4s * var(--spd)) cubic-bezier(.4, 0, .2, 1) infinite; }
.ic-plate { fill: #72eac322 !important; }
@keyframes icLift { 0%, 100% { transform: translateY(20px); } 50% { transform: translateY(-4px); } }

/* Running: parallax */
.ic-layer { will-change: transform; }
.ic-mountains { color: #4f7365; animation: icSlide calc(14s * var(--spd)) linear infinite; }
.ic-trees { color: #6fb79a; animation: icSlide calc(5s * var(--spd)) linear infinite; }
.ic-birds { color: #9fd6c0; animation: icSlide calc(18s * var(--spd)) linear infinite; }
.ic-birds path { stroke-width: 1.6; }
.ic-dashes { color: #4b6158; animation: icSlideShort calc(.9s * var(--spd)) linear infinite; }
.ic-runner { animation: icBob calc(.45s * var(--spd)) ease-in-out infinite alternate; }
.ic-runner circle { fill: currentColor; }
.ic-limb { transform-origin: 55px 44px; }
.ic-arm-a, .ic-arm-b { transform-origin: 59px 33px; }
.ic-leg-a, .ic-arm-b { animation: icSwingA calc(.45s * var(--spd)) ease-in-out infinite alternate; }
.ic-leg-b, .ic-arm-a { animation: icSwingB calc(.45s * var(--spd)) ease-in-out infinite alternate; }
@keyframes icSlide { from { transform: translateX(0); } to { transform: translateX(-120px); } }
@keyframes icSlideShort { from { transform: translateX(0); } to { transform: translateX(-24px); } }
@keyframes icBob { from { transform: translateY(0); } to { transform: translateY(-2px); } }
@keyframes icSwingA { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes icSwingB { from { transform: rotate(18deg); } to { transform: rotate(-18deg); } }

/* Cycling */
.ic-wheel { transform-origin: var(--cx) var(--cy); animation: icSpin calc(.8s * var(--spd)) linear infinite; }
.ic-wheel path { stroke-width: 1.4; opacity: .8; }
.ic-road { color: #4b6158; animation: icSlideRoad calc(.6s * var(--spd)) linear infinite; }
.ic-wind path { stroke: #9fd6c0; stroke-width: 1.8; stroke-dasharray: 18 40; animation: icWind calc(1.1s * var(--spd)) linear infinite; }
.ic-wind path:nth-child(2) { animation-delay: -.35s; } .ic-wind path:nth-child(3) { animation-delay: -.7s; }
.ic-rider { animation: icBob calc(.5s * var(--spd)) ease-in-out infinite alternate; }
.ic-rider circle { fill: currentColor; }
@keyframes icSpin { to { transform: rotate(360deg); } }
@keyframes icSlideRoad { to { transform: translateX(-30px); } }
@keyframes icWind { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 58; } }

/* Swimming */
.ic-waves { color: #72eac3; animation: icSlideWave calc(2.2s * var(--spd)) linear infinite; }
.ic-waves-back { color: #3f6b5b; animation: icSlideWave calc(3.6s * var(--spd)) linear infinite; }
.ic-swimmer { animation: icFloat calc(1.4s * var(--spd)) ease-in-out infinite alternate; }
.ic-swimmer > circle { fill: currentColor; }
.ic-stroke { transform-origin: 62px 46px; animation: icStroke calc(1.1s * var(--spd)) linear infinite; }
.ic-bubbles circle { stroke-width: 1.4; animation: icBubble calc(1.6s * var(--spd)) ease-out infinite; }
.ic-bubbles circle:nth-child(2) { animation-delay: -.5s; } .ic-bubbles circle:nth-child(3) { animation-delay: -1s; }
@keyframes icSlideWave { to { transform: translateX(-30px); } }
@keyframes icFloat { from { transform: translateY(0); } to { transform: translateY(2px); } }
@keyframes icStroke { 0% { transform: rotate(0deg); } 50% { transform: rotate(-200deg); } 100% { transform: rotate(-360deg); } }
@keyframes icBubble { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(-14px, -10px); opacity: 0; } }

/* Benefits */
.ib-links { stroke: #72eac3 !important; stroke-width: 1.6 !important; stroke-dasharray: 3 5; animation: ibFlow calc(1.2s * var(--spd)) linear infinite; }
.ib-core { fill: #72eac333 !important; animation: ibPulse calc(2s * var(--spd)) ease-in-out infinite; transform-origin: 28px 28px; }
.ib-node { animation: ibBlink calc(2s * var(--spd)) ease-in-out infinite; }
.ib-d1 { animation-delay: .5s; } .ib-d2 { animation-delay: 1s; } .ib-d3 { animation-delay: 1.5s; }
.ib-moon { transform-origin: 28px 28px; animation: ibBreathe calc(3.2s * var(--spd)) ease-in-out infinite; }
.ib-z { stroke-width: 2 !important; animation: ibFloatZ calc(2.8s * var(--spd)) ease-in-out infinite; }
.ib-z2 { animation-delay: 1.4s; }
.ib-axis { stroke: #4b6158 !important; stroke-width: 2 !important; }
.ib-line { stroke-dasharray: 100; stroke-dashoffset: 100; }
.is-visible .ib-line { animation: ibDraw 1.6s .25s cubic-bezier(.4, 0, .2, 1) forwards; }
.ib-dot { fill: currentColor !important; opacity: 0; }
.is-visible .ib-dot { animation: ibDot .4s 1.7s ease-out forwards; }
.ib-ring-bg { stroke: #2b3a35 !important; stroke-width: 4 !important; }
.ib-ring { stroke-width: 4 !important; stroke-dasharray: 0 100; transform: rotate(-90deg); transform-origin: 28px 28px; }
.is-visible .ib-ring { animation: ibRing 1.6s .25s cubic-bezier(.4, 0, .2, 1) forwards; }
.ib-ecg { stroke-width: 2.2 !important; animation: ibEcg calc(1.8s * var(--spd)) linear infinite; }
.ib-pulse { stroke: #72eac3 !important; stroke-width: 1.6 !important; transform-origin: 28px 28px; animation: ibRipple calc(2.4s * var(--spd)) ease-out infinite; }
.ib-pulse-2 { animation-delay: 1.2s; }
.ib-plus { stroke-width: 3.4 !important; }
@keyframes ibFlow { to { stroke-dashoffset: -16; } }
@keyframes ibPulse { 50% { transform: scale(1.18); } }
@keyframes ibBlink { 50% { opacity: .35; } }
@keyframes ibBreathe { 50% { transform: scale(1.06); } }
@keyframes ibFloatZ { 0% { transform: translate(0, 6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(4px, -8px); opacity: 0; } }
@keyframes ibDraw { to { stroke-dashoffset: 0; } }
@keyframes ibDot { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes ibRing { to { stroke-dasharray: 72 100; } }
@keyframes ibEcg { to { transform: translateX(48px); } }
@keyframes ibRipple { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .anim-icon *, .anim-icon animate { animation: none !important; }
  .ib-line { stroke-dashoffset: 0; } .ib-dot { opacity: 1; } .ib-ring { stroke-dasharray: 72 100; }
}

/* Vision (js/vision-art.js): links follow the floating circles; the near one lights up. */
.vision-links line { stroke: #72eac366; stroke-width: 2; stroke-dasharray: 5 7; animation: visionFlow 1.6s linear infinite; }
.vision-node { cursor: default; }
.vision-node circle:first-child { transition: fill .25s ease, stroke .25s ease; }
.vision-node.is-near circle:first-child { fill: #24423a; stroke: var(--accent); }
@media (max-width: 700px) {
  .vision-art { max-width: 320px; width: 100%; margin: 4px auto 26px; display: block; }
}
@media (prefers-reduced-motion: reduce) { .vision-links line { animation: none; } }
