/* wg-motion.css — [ZyRox] حركات مطابقة لـ HalaGPT (chat.halagpt.ps) */
@media (prefers-reduced-motion: no-preference) {

  @keyframes rise        { 0% { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes stage-in    { 0% { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes shimmer-text{ 0% { background-position: -200% 0; } to { background-position: 200% 0; } }
  @keyframes neonMove    { 0% { background-position: 0%; } 50% { background-position: 100%; } to { background-position: 0%; } }
  @keyframes pulse-dot   { 0%, to { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(.75); } }
  @keyframes caret-blink { 0%, 70%, to { opacity: 1; } 20%, 50% { opacity: 0; } }
  @keyframes spin-slow   { to { transform: rotate(360deg); } }
  @keyframes blink       { 50% { opacity: .2; } }
  @keyframes item-out    { to { opacity: 0; max-height: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; transform: translate(-8px) scale(.97); } }

  /* دخول الصفحة (rise / stage-in) */
  main > section,
  main > .block { animation: rise .35s ease-out both; }
  main > .hero  { animation: stage-in .35s ease-out both; }

  main > *:nth-child(1) { animation-delay: 0s; }
  main > *:nth-child(2) { animation-delay: .05s; }
  main > *:nth-child(3) { animation-delay: .10s; }
  main > *:nth-child(4) { animation-delay: .15s; }
  main > *:nth-child(5) { animation-delay: .20s; }
  main > *:nth-child(6) { animation-delay: .25s; }
  main > *:nth-child(7) { animation-delay: .30s; }
  main > *:nth-child(8) { animation-delay: .35s; }

  .pm, .pu-item, .plans-grid > *, .rate-card, .source, .ticker-card {
    animation: stage-in .35s ease-out both;
  }
  .pm:nth-child(1), .pu-item:nth-child(1), .plans-grid > *:nth-child(1) { animation-delay: .04s; }
  .pm:nth-child(2), .pu-item:nth-child(2), .plans-grid > *:nth-child(2) { animation-delay: .09s; }
  .pm:nth-child(3), .pu-item:nth-child(3), .plans-grid > *:nth-child(3) { animation-delay: .14s; }
  .pm:nth-child(4), .pu-item:nth-child(4), .plans-grid > *:nth-child(4) { animation-delay: .19s; }
  .pm:nth-child(5), .pu-item:nth-child(5), .plans-grid > *:nth-child(5) { animation-delay: .24s; }
  .pm:nth-child(6), .pu-item:nth-child(6), .plans-grid > *:nth-child(6) { animation-delay: .29s; }
  .pm:nth-child(n+7), .pu-item:nth-child(n+7), .plans-grid > *:nth-child(n+7) { animation-delay: .33s; }

  /* ميكرو-تفاعلات على الأزرار */
  a, button, .btn, .nav-cta, .pm-copy {
    transition: transform .18s cubic-bezier(.22, 1, .36, 1),
                box-shadow .18s ease, background-color .18s ease,
                border-color .18s ease, color .18s ease;
  }
  a:active, button:active, .btn:active, .nav-cta:active, .pm-copy:active { transform: scale(.97); }

  @media (hover: hover) and (pointer: fine) {
    .pm, .pu-item, .plans-grid > * {
      transition: transform .18s cubic-bezier(.22, 1, .36, 1),
                  box-shadow .2s ease, border-color .2s ease;
    }
    .pm:hover, .pu-item:hover, .plans-grid > *:hover {
      transform: translateY(-3px);
      box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
    }
  }

  /* لمسات HalaGPT (صفحات الموقع) */
  /* نص متلألئ على التدرّج (shimmer-text) */
  html.wg-static .grad,
  html.wg-static [class*="gradient-text"],
  html.wg-static .hero h1 .grad {
    background-size: 200% 100%;
    animation: shimmer-text 2.2s linear infinite;
  }

  /* تدرّج نيون متحرك على الأزرار الرئيسية (neonMove) */
  html.wg-static .btn.primary,
  html.wg-static .nav-cta {
    background-size: 300% 300%;
    animation: neonMove 8s infinite;
  }

  /* نقطة الحالة النابضة (pulse-dot) */
  html.wg-static .dot,
  html.wg-static .s-ok,
  html.wg-static .s-bad { animation: pulse-dot 1.2s ease-in-out infinite; }

  /* مؤشّر كتابة وامض بعد عنوان الصفحة (caret-blink) */
  html.wg-static .hero h1::after {
    content: "▎";
    margin-inline-start: .12em;
    color: var(--brand, #22d3ee);
    animation: caret-blink 1.05s step-end infinite;
  }

  /* أي عنصر يحمل class="wg-spin" يدور ببطء */
  .wg-spin { animation: spin-slow 1.1s linear infinite; }
}
