/* ═══════════════════════════════════════════
   VSPIL – Animations & Effects Stylesheet
   ═══════════════════════════════════════════ */

/* Keyframe library */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Page loader */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  transition: opacity 0.4s, transform 0.4s;
}
#page-loader.hidden {
  opacity: 0; pointer-events: none; transform: scale(1.03);
}
.loader-logo {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, #8B1A1A, #B22222);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 28px; color: white;
  animation: spin 2s linear infinite;
  box-shadow: 0 0 0 4px rgba(139,26,26,0.15), 0 0 0 8px rgba(139,26,26,0.06);
}
.loader-text {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700;
  color: #1A1A2E; letter-spacing: 0.5px;
}
.loader-bar {
  width: 200px; height: 3px;
  background: #EEE; border-radius: 4px; overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B1A1A, #C9920A, #8B1A1A);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease infinite, loaderGrow 1.8s ease forwards;
}
@keyframes loaderGrow {
  from { width: 0; }
  to   { width: 100%; }
}

/* Scroll reveal helper classes */
.fade-up,
.fade-left,
.fade-right,
.scale-in {
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up { transform: translateY(20px); }
.fade-left { transform: translateX(-20px); }
.fade-right { transform: translateX(20px); }
.scale-in { transform: scale(0.95); }

/* In view reveal triggers */
.fade-up.in-view,
.fade-left.in-view,
.fade-right.in-view,
.scale-in.in-view,
.fade-up.is-visible,
.fade-left.is-visible,
.fade-right.is-visible,
.scale-in.is-visible {
  opacity: 1 !important;
  transform: translate(0) scale(1) !important;
}

/* Stagger delays */
.d-1 { transition-delay: 0.08s; }
.d-2 { transition-delay: 0.16s; }
.d-3 { transition-delay: 0.24s; }

/* Mobile animation safety fallback */
@media (max-width: 768px) {
  .fade-up,
  .fade-left,
  .fade-right,
  .scale-in {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    transition: none !important;
  }
}

.d-4 { transition-delay: 0.32s; }
