/* 사료시장 움직임 — feed-market-motion.js 가 body 에 fmk(움직여도 됨) 를, 칸마다 fmk-in · fmk-draw · fmk-cards · fmk-paper 를 붙이고 뗀다.
   ① 큰 단가가 지난달 값에서 굴러감(JS) · ▲▼ 톡  ② 그래프가 왼쪽부터 그려지고 점 차례로 · 마지막 달 고리 물결
   ③ 전망 카드 1 → 2 → 3 차례로 넘어옴 · % 가 0 에서 올라감(JS)  ④ 회사를 바꾸면 다시  ⑤ 보고서 종이가 위에서부터 드러남
   움직임 줄이기 · 태극이면 fmk 가 붙지 않는다. */
body { --fmk-ease: cubic-bezier(.22, 1, .36, 1); --fmk-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* ① */
body.fmk .fm-hero.fmk-in { animation: fmk-rise .5s var(--fmk-ease) both; }
body.fmk .fm-hero.fmk-in .fm-hero-delta[data-direction="up"] { display: inline-block; animation: fmk-up .55s var(--fmk-spring) both; animation-delay: .9s; }
body.fmk .fm-hero.fmk-in .fm-hero-delta[data-direction="down"] { display: inline-block; animation: fmk-down .55s var(--fmk-spring) both; animation-delay: .9s; }
/* ② */
/* 그래프 전체(svg)를 가리면 그동안 눌러도 안 잡혀서, 면 · 선 · 점만 움직인다 (값 보기 겹 hct-g 는 그대로) */
body.fmk .fm-history-chart.fmk-draw svg > polygon { animation: fmk-wipe 1.2s cubic-bezier(.5, 0, .3, 1) both; }
body.fmk .fm-history-chart.fmk-draw svg > line { animation: fmk-wipe .2s linear both; animation-delay: calc(var(--x, 0) * 1.1s); }
body.fmk .fm-history-chart.fmk-draw svg > circle { transform-box: fill-box; transform-origin: center; animation: fmk-pop .4s var(--fmk-spring) both; animation-delay: calc(.1s + var(--x, 0) * 1.1s); }
body.fmk .fm-history-chart.fmk-draw svg > circle[r="8"] { animation: fmk-pop .45s var(--fmk-spring) both, fmk-ping .9s ease-out both; animation-delay: 1.2s, 1.6s; }
/* ③ */
body.fmk .fm-forecast-grid { perspective: 900px; }
body.fmk .fm-forecast-grid.fmk-cards .fm-forecast-card { animation: fmk-flip .6s var(--fmk-ease) both; animation-delay: calc(.1s + var(--i, 0) * .15s); transform-origin: left center; }
/* ⑤ */
body.fmk .fm-report-preview.fmk-paper { animation: fmk-reveal .7s var(--fmk-ease) both; }

@keyframes fmk-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fmk-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fmk-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes fmk-wipe { from { clip-path: inset(-4px 100% -4px -4px); } to { clip-path: inset(-4px -4px -4px -4px); } }
@keyframes fmk-pop { 0% { opacity: 0; transform: scale(0); } 60% { opacity: 1; transform: scale(1.5); } 100% { opacity: 1; transform: none; } }
@keyframes fmk-ping { 0% { stroke-width: 2; stroke-opacity: 1; } 50% { stroke-width: 9; stroke-opacity: .25; } 100% { stroke-width: 2; stroke-opacity: 1; } }
@keyframes fmk-flip { from { opacity: 0; transform: rotateY(-70deg); } to { opacity: 1; transform: none; } }
@keyframes fmk-reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: reduce) {
  .fm-hero, .fm-hero *, .fm-history-chart *, .fm-forecast-card, .fm-report-preview { animation: none !important; }
}
@media print { .fm-hero, .fm-hero *, .fm-history-chart *, .fm-forecast-card, .fm-report-preview { animation: none !important; clip-path: none !important; } }
