/* ============================================================
   motion.css — animated explainers & process walkthroughs
   Palette matches site.css (--dark #132b38, --accent #c56339,
   --blue #24596d, --bg #f5f5f0). All motion is inline SVG + CSS.
   ============================================================ */

.motion {
  margin: 0;
  background: #203c4b;
  border: 1px solid #2c4d5d;
  display: flex;
  flex-direction: column;
}
.motion-stage { padding: 14px 16px 4px; }
.motion-stage svg { width: 100%; height: auto; display: block; }
.motion-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 14px; border-top: 1px solid #31505f;
}
.motion-tag {
  margin-left: auto; font: 10px/1 Arial, sans-serif; letter-spacing: 1.4px;
  color: #7d9aa6; text-transform: uppercase;
}
.mbtn {
  background: none; border: 1px solid #678794; color: #d5e4e9;
  padding: 5px 12px; font-size: 11px; line-height: 1.6; border-radius: 2px;
}
.mbtn:hover { border-color: #e6a37b; color: #f3c9a6; }
.motion-cap {
  padding: 4px 18px 18px; font-size: 12.5px; line-height: 1.75; color: #cfe1e7;
}
.motion-cap .muted { color: #93b0bc; }
.motion-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px; margin: 26px 0;
}
.motion-block { margin: 30px 0 34px; }
.motion-block > .eyebrow { margin-bottom: 12px; }
.motion.paused * { animation-play-state: paused !important; }

/* ---------- shared bits ---------- */
.motion svg .axl text, .motion svg text { user-select: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes softPulse { 0%,100% { opacity: .35; } 50% { opacity: .9; } }

/* ---------- 1 heat ramp ---------- */
.hr-line { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: drawLine 4.6s ease-in-out infinite; }
.hr-mark { animation: softPulse 3.4s ease-in-out infinite; }
.hr-mark2 { animation: softPulse 3.4s ease-in-out infinite 1.2s; }
.hr-band { animation: softPulse 3.4s ease-in-out infinite; }
.hr-pulse { transform-box: fill-box; transform-origin: center; animation: pulseRing 2.4s ease-out infinite 2.2s; opacity: 0; }
@keyframes pulseRing {
  0% { opacity: .9; transform: scale(.5); }
  70% { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* ---------- 2 field map ---------- */
.fm-glow { animation: softPulse 3.6s ease-in-out infinite; }
.fm-tip { animation: fmTip 5.2s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes fmTip {
  0%, 12% { transform: translateY(-16px); }
  30%, 46% { transform: translateY(6px); }
  62%, 100% { transform: translateY(-16px); }
}
.fm-tip, .fm-obj, .fm-dot { transform-box: fill-box; transform-origin: center; }
.fm-obj { animation: fmObj 5.2s ease-in-out infinite; }
@keyframes fmObj { 0%,44% { opacity: .25; } 56%,88% { opacity: 1; } 100% { opacity: .25; } }
.fm-dot { animation: fmDot 5.2s steps(1, end) infinite; }
@keyframes fmDot {
  0% { transform: translateY(0); }
  25% { transform: translateY(34px); }
  50% { transform: translateY(68px); }
  75% { transform: translateY(102px); }
  100% { transform: translateY(0); }
}

/* ---------- 3 vickers ---------- */
.vk-tip { transform-box: fill-box; transform-origin: center; animation: vkTip 5.6s ease-in-out infinite; }
@keyframes vkTip {
  0%, 10% { transform: translateY(-24px); }
  26%, 40% { transform: translateY(6px); }
  52%, 100% { transform: translateY(-24px); }
}
.vk-indent { animation: softPulse 3.2s ease-in-out infinite; }
.vk-d1 path, .vk-d2 path { animation: drawLine 1.6s ease 2.8s infinite; }
.vk-formula { animation: softPulse 4s ease-in-out infinite; }

/* ---------- 4 force-depth ---------- */
.fd-load { animation: fdLoad 6s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes fdLoad { 0% { stroke-dashoffset: 320; } 32%,100% { stroke-dashoffset: 0; } }
.fd-hold { animation: fdHold 6s ease infinite; }
@keyframes fdHold { 0%,32% { stroke-dashoffset: 120; } 52%,100% { stroke-dashoffset: 0; } }
.fd-unload { animation: fdUnload 6s ease infinite; }
@keyframes fdUnload { 0%,52% { stroke-dashoffset: 200; } 78%,100% { stroke-dashoffset: 0; } }
.fd-dot { transform-box: fill-box; animation: fdDot 6s ease-in-out infinite; }
@keyframes fdDot {
  0% { transform: translate(0,0); }
  32% { transform: translate(190px,-172px); }
  52% { transform: translate(290px,-178px); }
  78% { transform: translate(410px,-40px); }
  100% { transform: translate(410px,-40px); }
}
.fd-lab text, .fd-creep text { animation: softPulse 4s ease-in-out infinite; }

/* ---------- 5 creep ---------- */
.cr-curve { animation: drawLine 5.4s ease-in-out infinite; }
.cr-window { animation: softPulse 3.2s ease-in-out infinite; }
.cr-delta path { animation: softPulse 2.2s ease-in-out infinite; }
.cr-dl { animation: softPulse 3s ease-in-out infinite; }

/* ---------- 6 optics ---------- */
.op-zoom { transform-box: fill-box; transform-origin: 190px 150px; animation: opZoom 4.4s ease-in-out infinite; }
@keyframes opZoom { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.op-target { transform-box: fill-box; transform-origin: center; animation: opTarget 4.4s ease-in-out infinite; }
@keyframes opTarget { 0%,30% { opacity: 0; transform: scale(.7); } 55%,90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.op-cross { animation: softPulse 2.6s ease-in-out infinite; }

/* ---------- 7 gas flow ---------- */
.gf-p circle { animation: gfMove 3.2s linear infinite; }
.gf-p circle:nth-child(2) { animation-delay: .4s; }
.gf-p circle:nth-child(3) { animation-delay: .8s; }
.gf-p circle:nth-child(4) { animation-delay: 1.2s; }
.gf-p circle:nth-child(5) { animation-delay: 1.6s; }
.gf-p2 circle { animation: gfMove 2.4s linear infinite; animation-delay: .3s; }
@keyframes gfMove { from { transform: translateX(0); opacity: .2; } 30% { opacity: 1; } to { transform: translateX(300px); opacity: 0; } }
.gf-o2 circle { animation: gfOut 3.4s ease-in-out infinite; }
@keyframes gfOut { 0% { opacity: 1; transform: translateX(0); } 70% { opacity: .1; transform: translateX(60px); } 100% { opacity: 0; transform: translateX(100px); } }
.gf-bar { transform-box: fill-box; transform-origin: left center; animation: gfBar 4.6s ease-in-out infinite; }
@keyframes gfBar { 0% { transform: scaleX(1); } 55%,100% { transform: scaleX(.02); } }
.gf-val { animation: softPulse 3s ease-in-out infinite; }

/* ---------- 8 tip cycle ---------- */
.tc-tip { transform-box: fill-box; transform-origin: center; animation: tcTip 6.4s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes tcTip {
  0%, 8% { transform: translateY(-22px); }
  22%, 44% { transform: translateY(8px); }
  58%, 100% { transform: translateY(-22px); }
}
.tc-hole { animation: softPulse 3s ease-in-out infinite; }
.tc-hl { transform-box: fill-box; animation: tcHl 6.4s steps(4, end) infinite; }
@keyframes tcHl { 0% { transform: translateY(0); } 25% { transform: translateY(40px); } 50% { transform: translateY(80px); } 75% { transform: translateY(120px); } 100% { transform: translateY(0); } }

/* ---------- 9 drift ---------- */
.dr-raw { animation: softPulse 4s ease-in-out infinite; }
.dr-fix { animation: drawLine 4.4s ease-in-out infinite; }
.dr-band { animation: softPulse 3.6s ease-in-out infinite; }

/* ---------- 10 uniformity ---------- */
.un-val text { animation: unBlink 3.2s ease-in-out infinite; }
.un-val text:nth-child(2) { animation-delay: .5s; }
.un-val text:nth-child(3) { animation-delay: 1s; }
@keyframes unBlink { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.un-band rect:last-child { transform-box: fill-box; transform-origin: left center; animation: gfBar 4s ease-in-out infinite alternate; }
.un-zone rect { animation: softPulse 4.4s ease-in-out infinite; }

/* ---------- 11 uncertainty ---------- */
.uc-bars rect { transform-box: fill-box; transform-origin: bottom center; animation: ucGrow 4.2s ease-in-out infinite; }
.uc-bars rect:nth-child(2) { animation-delay: .15s; }
.uc-bars rect:nth-child(3) { animation-delay: .3s; }
.uc-bars rect:nth-child(4) { animation-delay: .45s; }
.uc-bars rect:nth-child(5) { animation-delay: .6s; }
@keyframes ucGrow { 0% { transform: scaleY(.15); opacity: .45; } 45%,100% { transform: scaleY(1); opacity: 1; } }
.uc-err { animation: softPulse 3.4s ease-in-out infinite; }
.uc-line { stroke-dasharray: 8 6; animation: softPulse 3.6s ease-in-out infinite; }

/* ---------- 12 sample change ---------- */
.sc-s1 { transform-box: fill-box; animation: scS1 5.4s ease-in-out infinite; }
.sc-s2 { transform-box: fill-box; animation: scS2 5.4s ease-in-out infinite; }
@keyframes scS1 { 0%,32% { opacity: 1; transform: translateX(0); } 46%,100% { opacity: 0; transform: translateX(-60px); } }
@keyframes scS2 { 0%,38% { opacity: 0; transform: translateX(56px); } 55%,100% { opacity: 1; transform: translateX(0); } }
.sc-arm { animation: scArm 5.4s ease-in-out infinite; }
@keyframes scArm { 0%,32% { transform: translateX(0); } 50%,64% { transform: translateX(-24px); } 100% { transform: translateX(0); } }
.sc-timer text { animation: softPulse 2.4s ease-in-out infinite; }

/* ============================================================
   stepper — 流程演示
   ============================================================ */
.stepper {
  margin: 30px 0 36px; padding: 26px 28px 22px;
  background: #fff; border: 1px solid var(--line, #dce1df);
  border-top: 3px solid var(--accent, #c56339);
}
.stp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.stp-head .eyebrow { margin: 0; }
.stp-count { font: 12px/1 Arial, sans-serif; color: var(--muted, #667780); letter-spacing: 1px; }
.stp-count b { color: var(--accent, #c56339); font-size: 15px; }
.stp-progress { height: 2px; background: #e4e9e7; margin: 14px 0 6px; }
.stp-progress i { display: block; height: 100%; width: 0; background: var(--accent, #c56339); transition: width .5s ease; }
.stp-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 22px; }
.stp-list li {
  display: flex; gap: 12px; padding: 14px 0 12px; border-top: 1px solid #eef1ef;
  opacity: .42; transition: opacity .45s ease, transform .45s ease;
}
.stp-list li.on { opacity: 1; transform: translateX(2px); }
.stp-list li.on .stp-n { background: var(--accent, #c56339); color: #fff; border-color: var(--accent, #c56339); }
.stp-n {
  flex: 0 0 auto; width: 26px; height: 26px; border: 1px solid #c9d4d1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 11px/1 Arial, sans-serif; color: var(--muted, #667780); transition: all .45s ease;
}
.stp-list h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.stp-list p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted, #667780); }
.stp-bar { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef1ef; }
.stp-bar .mbtn { border-color: #c9d4d1; color: var(--ink, #172731); }
.stp-bar .mbtn:hover { border-color: var(--accent, #c56339); color: var(--accent, #c56339); }

/* ============================================================
   responsive & reduced motion
   ============================================================ */
@media (max-width: 900px) {
  .motion-grid { grid-template-columns: 1fr; }
  .stp-list { grid-template-columns: 1fr; }
  .stp-list li { padding: 11px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .motion *, .stepper * { animation: none !important; transition: none !important; }
  .motion-cap .muted::after { content: " · motion off"; }
}

/* ---- v5 demos: thermal-expansion / arrhenius / shock / flux / area / pop-in / ISE / rate / visco / cryo / calibration / statistics ---- */
@keyframes txGrow { 0% { transform: scaleX(.72); opacity: 0; } 45%,100% { transform: scaleX(1); opacity: .95; } }
@keyframes txSwap { 0%,38% { opacity: 1; } 60%,100% { opacity: .18; } }
@keyframes mvDown { 0% { transform: translateY(0); opacity: 0; } 25% { opacity: 1; } 85% { opacity: .9; } 100% { transform: translateY(88px); opacity: 0; } }
@keyframes afGrow { 0% { transform: scale(.35); opacity: .2; } 55%,100% { transform: scale(1); opacity: 1; } }
.tx-cool { transform-box: fill-box; transform-origin: left center; animation: txSwap 5.2s ease-in-out infinite; }
.tx-hot  { transform-box: fill-box; transform-origin: left center; animation: txGrow 5.2s ease-in-out infinite; }
.tx-dl, .tx-temp, .tx-note { animation: softPulse 3.4s ease-in-out infinite; }
.ar-line { animation: drawLine 4.6s ease-in-out infinite; }
.ar-p1, .ar-p2 { transform-box: fill-box; transform-origin: center; animation: unBlink 2.6s ease-in-out infinite; }
.ar-p2 { animation-delay: 1.2s; }
.ar-note, .ar-warn { animation: softPulse 4s ease-in-out infinite; }
.sh-core, .sh-skin, .sh-skin2, .sh-warn { animation: softPulse 3.8s ease-in-out infinite; }
.sh-skin2 { animation-delay: .6s; }
.sh-arrows path { animation: unBlink 2.8s ease-in-out infinite; }
.sh-arrows path:last-child { animation-delay: .9s; }
.hf-arrows path { animation: mvDown 3.2s linear infinite; }
.hf-arrows path:nth-child(2) { animation-delay: .5s; }
.hf-arrows path:nth-child(3) { animation-delay: 1s; }
.af-tri { transform-box: fill-box; transform-origin: 50% 100%; animation: afGrow 4.6s ease-in-out infinite; }
.af-h, .af-note { animation: softPulse 3.2s ease-in-out infinite; }
.pi-curve { animation: drawLine 5.2s ease-in-out infinite; }
.pi-burst { transform-box: fill-box; transform-origin: center; animation: pulseRing 2.6s ease-out infinite 1.8s; }
.pi-note { animation: softPulse 4s ease-in-out infinite; }
.se-curve { animation: drawLine 4.8s ease-in-out infinite; }
.se-asymp, .se-note { animation: softPulse 3.6s ease-in-out infinite; }
.sr-c1, .sr-c2, .sr-c3 { animation: drawLine 4.6s ease-in-out infinite; }
.sr-c2 { animation-delay: .7s; } .sr-c3 { animation-delay: 1.4s; }
.ve-load, .ve-hold, .ve-unload, .ve-recov { animation: drawLine 5.6s ease-in-out infinite; }
.ve-hold { animation-delay: .8s; } .ve-unload { animation-delay: 1.8s; } .ve-recov { animation-delay: 2.8s; }
.ve-note { animation: softPulse 4.2s ease-in-out infinite; }
.cy-dewar, .cy-finger, .cy-note { animation: softPulse 3.6s ease-in-out infinite; }
.cy-tip { transform-box: fill-box; transform-origin: center; animation: fmTip 5.2s cubic-bezier(.5,0,.5,1) infinite; }
.cal-arrows path { animation: unBlink 2.4s ease-in-out infinite; }
.cal-arrows path:nth-child(2) { animation-delay: .6s; }
.cal-arrows path:nth-child(3) { animation-delay: 1.2s; }
.cal-check text { animation: unBlink 3s ease-in-out infinite; }
.cal-check text:nth-child(2) { animation-delay: .5s; }
.cal-check text:nth-child(3) { animation-delay: 1s; }
.cal-check text:nth-child(4) { animation-delay: 1.5s; }
.cal-note { animation: softPulse 4s ease-in-out infinite; }
.st-dots circle { animation: unBlink 2.8s ease-in-out infinite; }
.st-dots circle:nth-child(2n) { animation-delay: .4s; }
.st-dots circle:nth-child(3n) { animation-delay: .9s; }
.st-mean { animation: drawLine 4.4s ease-in-out infinite; }
.st-band { animation: softPulse 4.2s ease-in-out infinite; }
