/* ============================================================
   SHIFAA — custom animations
   Everything expressible as a plain Tailwind utility class lives
   in index.html directly; this file is only for the handful of
   effects that need real @keyframes.
   ============================================================ */

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ---- Decorative ring rotation (hero background) ---- */
@keyframes ring-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes ring-spin-reverse {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to   { transform: translate(-50%, -50%) rotate(0deg); }
}
#ring-1 { animation: ring-spin 30s linear infinite; }
#ring-2 { animation: ring-spin-reverse 22s linear infinite; }
#ring-3 { animation: ring-spin 16s linear infinite; }

/* ---- Badge pulse (hero pill dot) ---- */
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.6; }
}
.badge-pulse {
  animation: badge-pulse 2s ease-in-out infinite;
}

/* ---- Loading spinner ---- */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin {
  animation: spin 0.8s linear infinite;
}

/* ---- Scroll-reveal (fade + slide up once, on scroll into view) ---- */
.reveal,
.reveal-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.is-visible,
.reveal-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-card {
  transition-duration: 0.5s;
}

/* ---- Card hover lift (used on feature/step cards) ---- */
.card-hover {
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.card-hover:hover {
  transform: translateY(-4px);
}

/* ---- Button press feedback ---- */
.btn-press {
  transition: transform 0.15s ease-out, box-shadow 0.2s ease-out, background-color 0.2s ease-out;
}
.btn-press:active {
  transform: scale(0.97);
}

/* ---- Services / Blog card top accent line (grows on hover) ---- */
.accent-line {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease-out;
}
.group:hover .accent-line,
.group:active .accent-line {
  transform: scaleX(1);
}

/* ---- Mobile menu ---- */
#mobile-menu.open {
  display: flex;
  opacity: 1;
}

/* ---- Auth modal ---- */
#auth-modal.open {
  display: flex;
  opacity: 1;
}
#auth-modal.open #auth-modal-panel {
  transform: scale(1);
  opacity: 1;
}

/* ---- Toast ---- */
#toast.show {
  display: flex;
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast {
  transform: translate(-50%, -12px);
}

/* ---- Reduced motion: respect user preference ---- */
@media (prefers-reduced-motion: reduce) {
  #ring-1, #ring-2, #ring-3, .badge-pulse, .spin {
    animation: none;
  }
  .reveal, .reveal-card, .card-hover, .btn-press {
    transition: none;
  }
}