/**
 * assets/css/motion.css
 * ---------------------------------------------------------------
 * সাইটজুড়ে ছোট ছোট hover/press পলিশ — বিদ্যমান কোনো স্টাইল ওভাররাইড করে
 * না, শুধু transition/transform-এর সূক্ষ্ম যোগ করে। "Design & Motion"
 * সেটিং থেকে বন্ধ করলে body-তে .motion-off ক্লাস বসে, তখন এই পুরো
 * ফাইলটাই নিষ্ক্রিয় হয়ে যায় (Reduced Motion accessibility প্যাটার্নও
 * একইভাবে respect করা হয়)।
 */

body:not(.motion-off) .btn,
body:not(.motion-off) .a-btn,
body:not(.motion-off) button[type="submit"] {
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
body:not(.motion-off) .btn:hover:not(:disabled),
body:not(.motion-off) .a-btn:hover:not(:disabled),
body:not(.motion-off) button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
}
body:not(.motion-off) .btn:active:not(:disabled),
body:not(.motion-off) .a-btn:active:not(:disabled),
body:not(.motion-off) button[type="submit"]:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

body:not(.motion-off) .catalog-card,
body:not(.motion-off) .home-card,
body:not(.motion-off) .a-panel {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body:not(.motion-off) .catalog-card:hover,
body:not(.motion-off) .home-card:hover {
  box-shadow: 0 14px 32px rgba(15, 36, 25, 0.14);
}

/* স্ক্রল-এ হালকা fade-up — .reveal-on-scroll ক্লাস বসিয়ে ব্যবহারযোগ্য।
   ⚠️ নিরাপত্তার জন্য: ডিফল্টে এই এলিমেন্ট সবসময় দৃশ্যমান থাকে। শুধু
   scroll-reveal.js চালু থাকলেই .pre-reveal ক্লাস যোগ হয়ে সাময়িকভাবে
   লুকায় — অর্থাৎ JS লোড না হলে/ব্লক হলে কনটেন্ট কখনো অদৃশ্য থাকে না। */
body:not(.motion-off) .reveal-on-scroll {
  transition: opacity 0.5s ease, transform 0.5s ease;
}
body:not(.motion-off) .reveal-on-scroll.pre-reveal {
  opacity: 0;
  transform: translateY(16px);
}
body:not(.motion-off) .reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .btn, .a-btn, button[type="submit"], .catalog-card, .home-card, .a-panel, .reveal-on-scroll {
    transition: none !important;
    transform: none !important;
  }
  .reveal-on-scroll { opacity: 1 !important; }
}

/* সাবমিট বাটনের লোডিং স্পিনার (form-feedback.js থেকে যোগ হয়) */
.btn-loading { cursor: default; opacity: 0.85; }
.btn-spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 2px;
  animation: btn-spin 0.6s linear infinite;
}
.btn-outline .btn-spinner, .a-btn-outline .btn-spinner {
  border-color: rgba(15, 92, 53, 0.3);
  border-top-color: var(--green-deep, #0F5C35);
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation: none !important; }
}
