/* Shared sci-fi / premium landing effects */

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

@keyframes fx-glow-breathe {
  0%, 100% { filter: drop-shadow(0 0 20px var(--fx-glow, rgba(34, 211, 238, 0.3))); }
  50% { filter: drop-shadow(0 0 48px var(--fx-glow-strong, rgba(34, 211, 238, 0.6))); }
}

@keyframes fx-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fx-scan-sweep {
  0% { background-position: 0 -100%; }
  100% { background-position: 0 200%; }
}

@keyframes fx-btn-shine {
  0%, 65%, 100% { transform: translateX(-130%); }
  80% { transform: translateX(130%); }
}

@keyframes fx-btn-glow {
  0%, 100% { box-shadow: 0 8px 32px var(--fx-btn-shadow, rgba(34, 211, 238, 0.25)); }
  50% { box-shadow: 0 8px 48px var(--fx-btn-shadow-strong, rgba(34, 211, 238, 0.45)), 0 0 32px var(--fx-btn-shadow, rgba(34, 211, 238, 0.15)); }
}

@keyframes fx-ring-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.04); }
}

@keyframes fx-grid-drift {
  0% { transform: perspective(800px) rotateX(62deg) translateY(0); }
  100% { transform: perspective(800px) rotateX(62deg) translateY(64px); }
}

@keyframes fx-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -20px) scale(1.06); }
  66% { transform: translate(-16px, 12px) scale(0.96); }
}

@keyframes fx-title-underline {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fx-holo-border {
  0%, 100% { border-color: var(--fx-accent, #22d3ee); box-shadow: 0 0 20px var(--fx-accent-dim, rgba(34, 211, 238, 0.2)); }
  50% { border-color: var(--fx-primary, #a78bfa); box-shadow: 0 0 36px var(--fx-primary-dim, rgba(167, 139, 250, 0.35)); }
}

/* Particle canvas */
.fx-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
  pointer-events: none;
}

/* Perspective grid overlay */
.fx-grid {
  position: absolute;
  inset: -50%;
  background-image:
    linear-gradient(var(--fx-grid-color, rgba(255, 255, 255, 0.035)) 1px, transparent 1px),
    linear-gradient(90deg, var(--fx-grid-color, rgba(255, 255, 255, 0.035)) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 25%, black, transparent);
  animation: fx-grid-drift 42s linear infinite;
  transform-origin: center top;
  pointer-events: none;
}

/* Scan line sweep */
.fx-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--fx-scan-color, rgba(34, 211, 238, 0.025)) 48%,
    var(--fx-scan-highlight, rgba(255, 255, 255, 0.04)) 50%,
    var(--fx-scan-color, rgba(34, 211, 238, 0.025)) 52%,
    transparent 100%
  );
  background-size: 100% 200%;
  animation: fx-scan-sweep 7s ease-in-out infinite;
  opacity: 0.55;
  pointer-events: none;
}

/* Cursor glow follower */
.fx-cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--fx-cursor-color, rgba(34, 211, 238, 0.08)), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

body.fx-cursor-active .fx-cursor-glow { opacity: 1; }

/* Scroll reveal */
.fx-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Shimmer text utility */
.fx-shimmer-text {
  background: linear-gradient(
    90deg,
    var(--fx-shimmer-base, #eaecef) 0%,
    var(--fx-shimmer-base, #eaecef) 35%,
    var(--fx-shimmer-highlight, #fcd535) 50%,
    var(--fx-shimmer-base, #eaecef) 65%,
    var(--fx-shimmer-base, #eaecef) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fx-shimmer 4s linear infinite;
}

/* Premium button glow — apply to primary CTAs */
.fx-btn-premium {
  position: relative;
  overflow: hidden;
  animation: fx-btn-glow 3.5s ease-in-out infinite;
}

.fx-btn-premium::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.32) 50%, transparent 62%);
  transform: translateX(-130%);
  animation: fx-btn-shine 4.5s ease-in-out infinite;
  pointer-events: none;
}

/* Card hover sci-fi glow */
.fx-card-premium {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.35s;
}

.fx-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px var(--fx-card-shadow, rgba(34, 211, 238, 0.15)), 0 0 0 1px var(--fx-accent-dim, rgba(34, 211, 238, 0.2));
}

/* Section title underline glow */
.fx-section-title {
  position: relative;
  display: inline-block;
}

.fx-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fx-accent, #22d3ee), var(--fx-primary, #a78bfa), transparent);
  background-size: 200% 100%;
  animation: fx-title-underline 3s linear infinite;
}

/* Amount number glow */
.fx-amount-glow {
  animation: fx-glow-breathe 4s ease-in-out infinite;
}

/* Holographic card border pulse */
.fx-holo-card {
  animation: fx-holo-border 4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .fx-particles,
  .fx-grid,
  .fx-scan,
  .fx-cursor-glow,
  .fx-shimmer-text,
  .fx-btn-premium,
  .fx-btn-premium::after,
  .fx-amount-glow,
  .fx-holo-card,
  .fx-section-title::after {
    animation: none !important;
    transition: none !important;
  }

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