/* ============================================================================
   ROVYOX — SVG İKON ANİMASYONLARI
   İkonların her öğesi pathLength="1" taşır; çizim efekti bu sayede her ikonda
   aynı çalışır. Hareket azaltma tercihi açıksa hiçbiri çalışmaz.
   ========================================================================= */
@keyframes ic-draw   { from { stroke-dasharray: 1 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1 1; stroke-dashoffset: 0; } }
@keyframes ic-redraw { from { stroke-dasharray: 1 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1 1; stroke-dashoffset: 0; } }
@keyframes rx-nudge  { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes rx-nudge-back { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-5px); } }
@keyframes rx-swing  { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(14deg); } 60% { transform: rotate(-10deg); } }
@keyframes rx-spin-once { to { transform: rotate(180deg); } }
@keyframes rx-hop    { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-2px); } }
@keyframes rx-ring   { to { transform: rotate(360deg); } }
@keyframes rx-pulse  { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

@media (prefers-reduced-motion: no-preference) {
  /* Görünür olunca çizilir (sayfa değişiminde yeniden) */
  .view.active .ic, .view.active .bi:not(.bi--brand), .site-header .ic, #toastHost .bi { animation: ic-draw .9s var(--ease) both; }
  .view.active .tool-ic .ic { animation-duration: 1.2s; }

  /* Üzerine gelince yeniden çizilir */
  :is(a, button, label, summary):hover > .ic,
  :is(a, button, label, summary):focus-visible > .ic,
  .tool-card:hover .tool-ic .ic, .mega__item:hover .tool-ic .ic, .tb__meta:hover .ic,
  .trust-row li:hover .ic, :is(a, button, label):hover > .bi:not(.bi--brand) { animation: ic-redraw .7s var(--ease) both; }

  /* İkona özgü küçük hareketler */
  :is(a, button):hover > .ic:has(use[href="#i-arrow"]) { animation: rx-nudge .9s var(--ease) infinite; }
  :is(a, button):hover > .ic:has(use[href="#i-arrow-l"]) { animation: rx-nudge-back .9s var(--ease) infinite; }
  :is(a, button):hover > .ic:has(use[href="#i-calendar"]) { animation: rx-hop .6s var(--ease); }
  .bell-btn:hover .ic { animation: rx-swing .8s var(--ease); transform-origin: 50% 12%; }
  #themeToggle:hover .ic { animation: rx-spin-once .6s var(--ease); }
  .wa-fab:hover .bi { animation: rx-swing .7s var(--ease); }

  /* Tool çizimleri: çizilerek belirir, halka yavaşça döner, noktalar nabız atar */
  .view.active .tb__art svg .motif-body [pathLength] { animation: ic-draw 1.6s var(--ease) both; }
  .tb__art svg .motif-ring { transform-origin: 120px 120px; animation: rx-ring 40s linear infinite; }
  .tb__art svg .motif-body circle[stroke="none"] { animation: rx-pulse 2.4s ease-in-out infinite; }
  .tool-card:hover .tool-card__art svg .motif-body [pathLength] { animation: ic-redraw 1.2s var(--ease) both; }
}
