/* ============================================
   Agentive Integrations — Animation Styles
   ============================================ */

/* Scroll Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 10001;
  background: transparent;
}

.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary, #4f7df9), var(--color-accent-cyan, #00d4ff));
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

/* Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  will-change: left, top;
}

/* Floating Shapes */
.floating-shapes-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-shape {
  position: absolute;
  border: 1px solid rgba(0, 212, 255, 0.15);
  animation: floatShape linear infinite;
}

.floating-shape--circle {
  border-radius: 50%;
}

.floating-shape--square {
  border-radius: 2px;
}

.floating-shape--triangle {
  border: none;
  width: 0 !important;
  height: 0 !important;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid rgba(0, 212, 255, 0.08);
}

.floating-shape--diamond {
  transform: rotate(45deg);
  border-radius: 2px;
}

@keyframes floatShape {
  0% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-30vh) rotate(90deg); }
  50% { transform: translateY(-10vh) rotate(180deg); }
  75% { transform: translateY(-40vh) rotate(270deg); }
  100% { transform: translateY(0) rotate(360deg); }
}

/* Page Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg-primary, #0a0a0f);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.loader-content {
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-line {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loader-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--color-accent-cyan, #00d4ff), transparent);
  animation: loaderSlide 1s ease-in-out infinite;
}

@keyframes loaderSlide {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: opacity 0.4s ease;
  z-index: 10;
}

.scroll-indicator-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-indicator-wheel {
  width: 3px;
  height: 8px;
  background: var(--color-accent-cyan, #00d4ff);
  border-radius: 2px;
  animation: scrollWheel 1.8s ease-in-out infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.3; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.scroll-indicator-text {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
}

/* Button Ripple */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0);
  animation: rippleExpand 0.7s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleExpand {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* Animated Border (Gradient) */
.animated-border {
  position: relative;
}

.animated-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    var(--gradient-angle, 0deg),
    var(--color-primary, #4f7df9),
    var(--color-accent-cyan, #00d4ff),
    var(--color-accent-purple, #7c5dfa),
    var(--color-primary, #4f7df9)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderRotate 3s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes borderRotate {
  to { --gradient-angle: 360deg; }
}

@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* Nav scrolled state */
nav.nav-scrolled {
  background: rgba(10, 10, 15, 0.95) !important;
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 212, 255, 0.1);
}

nav {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.35s ease, box-shadow 0.35s ease !important;
}

/* Disable heavy animations on mobile */
@media (max-width: 768px) {
  .cursor-glow,
  .floating-shapes-container {
    display: none !important;
  }

  .scroll-indicator {
    display: none;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .cursor-glow,
  .floating-shapes-container,
  .scroll-indicator,
  .page-loader {
    display: none !important;
  }
}
