/* ===== GLOBAL ANIMATED BACKGROUND ===== */
.global-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

/* Gradient orbs drifting slowly */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
}

.bg-orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  animation: orb-drift-1 25s ease-in-out infinite;
}

.bg-orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--caramel) 0%, transparent 70%);
  bottom: -100px;
  left: -80px;
  animation: orb-drift-2 30s ease-in-out infinite;
}

.bg-orb--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--caramel-light) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  animation: orb-drift-3 20s ease-in-out infinite;
}

/* Grid overlay */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 162, 76, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 162, 76, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: grid-shift 40s linear infinite;
}

@keyframes orb-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-80px, 60px) scale(1.1); }
  66% { transform: translate(40px, -40px) scale(0.9); }
}

@keyframes orb-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -50px) scale(0.9); }
  66% { transform: translate(-40px, 30px) scale(1.15); }
}

@keyframes orb-drift-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.08; }
  50% { transform: translate(-40%, -60%) scale(1.2); opacity: 0.15; }
}

@keyframes grid-shift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* ===== SPARKLE PARTICLES ===== */
@keyframes sparkle-float {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  15% {
    opacity: 0.7;
  }
  70% {
    opacity: 0.2;
  }
  100% {
    opacity: 0;
    transform: translateY(-400px) scale(1);
  }
}

/* ===== FLOATING GEOMETRIC SHAPES ===== */
.floating-shape {
  position: absolute;
  border: 1px solid rgba(212, 162, 76, 0.15);
  pointer-events: none;
  opacity: 0;
  animation: shape-float var(--dur, 18s) var(--delay, 0s) infinite linear;
}

.floating-shape--diamond {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
}

.floating-shape--line {
  width: 20px;
  height: 1px;
  background: rgba(212, 162, 76, 0.1);
  border: none;
}

.floating-shape--cross {
  width: 10px;
  height: 10px;
}

.floating-shape--cross::before,
.floating-shape--cross::after {
  content: '';
  position: absolute;
  background: rgba(212, 162, 76, 0.15);
}

.floating-shape--cross::before {
  width: 100%;
  height: 1px;
  top: 50%;
  left: 0;
}

.floating-shape--cross::after {
  width: 1px;
  height: 100%;
  top: 0;
  left: 50%;
}

@keyframes shape-float {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  10% {
    opacity: 0.5;
  }
  80% {
    opacity: 0.15;
  }
  100% {
    opacity: 0;
    transform: translateY(-600px) rotate(180deg);
  }
}

/* ===== SHIMMER TEXT ===== */
@keyframes shimmer-text {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SPINNER ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== RING DRAW ===== */
@keyframes ring-draw {
  from {
    stroke-dashoffset: 138;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* ===== PULSE GLOW ===== */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(212, 162, 76, 0.1);
  }
  50% {
    box-shadow: 0 0 20px rgba(212, 162, 76, 0.25);
  }
}

/* ===== SCAN LINE ===== */
@keyframes scan-line {
  0% {
    top: -2px;
  }
  100% {
    top: 100%;
  }
}

.scan-effect {
  position: relative;
  overflow: hidden;
}

.scan-effect::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
  animation: scan-line 4s linear infinite;
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }

  .global-bg {
    display: none;
  }
}
