/* ============================================================
   SK INVISIBLE GRILLS — Animations & Scroll Effects
   ============================================================ */

/* --- Keyframes --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes drawLine {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes revealLeft {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes revealRight {
  from { clip-path: inset(0 0 0 100%); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes revealUp {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes netGrid {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 168, 78, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(200, 168, 78, 0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(200, 168, 78, 0.2); }
  50% { border-color: rgba(200, 168, 78, 0.5); }
}

/* --- Scroll Triggered Animations --- */
/* Elements start hidden and animate when .animate class is added */
.scroll-fade {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
}

.scroll-fade.animate {
  opacity: 1;
}

.scroll-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.scroll-fade-up.animate {
  opacity: 1;
  transform: translateY(0);
}

.scroll-fade-down {
  opacity: 0;
  transform: translateY(-40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.scroll-fade-down.animate {
  opacity: 1;
  transform: translateY(0);
}

.scroll-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.scroll-fade-left.animate {
  opacity: 1;
  transform: translateX(0);
}

.scroll-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.scroll-fade-right.animate {
  opacity: 1;
  transform: translateX(0);
}

.scroll-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.scroll-scale.animate {
  opacity: 1;
  transform: scale(1);
}

.scroll-reveal-up {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.8s var(--ease-out);
}

.scroll-reveal-up.animate {
  clip-path: inset(0 0 0 0);
}

/* --- Stagger Delays (for grid children) --- */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }
.stagger-7 { transition-delay: 0.35s; }
.stagger-8 { transition-delay: 0.4s; }
.stagger-9 { transition-delay: 0.45s; }
.stagger-10 { transition-delay: 0.5s; }

/* Auto stagger for grid children */
.stagger-children > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children > *:nth-child(8) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(9) { transition-delay: 0.45s; }
.stagger-children > *:nth-child(10) { transition-delay: 0.5s; }
.stagger-children > *:nth-child(11) { transition-delay: 0.55s; }
.stagger-children > *:nth-child(12) { transition-delay: 0.6s; }

/* --- Applied Animations --- */
.shimmer-gold {
  background: linear-gradient(90deg,
    var(--gold-600) 0%,
    var(--gold-400) 40%,
    var(--gold-200) 50%,
    var(--gold-400) 60%,
    var(--gold-600) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s infinite linear;
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

.float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

.gold-pulse {
  animation: goldPulse 2s infinite;
}

.border-glow {
  animation: borderGlow 3s infinite;
}

.net-grid-animate::before {
  animation: netGrid 20s linear infinite;
}

/* --- Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-fade,
  .scroll-fade-up,
  .scroll-fade-down,
  .scroll-fade-left,
  .scroll-fade-right,
  .scroll-scale,
  .scroll-reveal-up {
    opacity: 1;
    transform: none;
    clip-path: none;
  }
}
