/* Smooth Scroll and Reveal Animations */

/* Theme Variables */
.theme-dark {
  --bg-primary: #000000;
  --bg-secondary: #111111;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent: #3b82f6;
}

.theme-light {
  --bg-primary: #ffffff;
  --bg-secondary: #f3f4f6;
  --text-primary: #000000;
  --text-secondary: #6b7280;
  --accent: #3b82f6;
}

/* Apply theme colors */
.theme-dark body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.theme-light body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.theme-dark .nav-blur {
  background-color: rgba(0, 0, 0, 0.3);
}

.theme-light .nav-blur {
  background-color: rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.theme-light .text-white {
  color: var(--text-primary) !important;
}

.theme-light .text-white\/70 {
  color: var(--text-secondary) !important;
}

.theme-light .bg-black {
  background-color: var(--bg-primary) !important;
}

.theme-light .bg-white\/10 {
  background-color: rgba(0, 0, 0, 0.05) !important;
}

.theme-light .bg-white\/20 {
  background-color: rgba(0, 0, 0, 0.1) !important;
}

.theme-light .border-white\/10 {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

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

/* Different reveal directions */
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease-out;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease-out;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease-out;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Staggered animations for multiple elements */
.reveal-stagger-1 { transition-delay: 0.1s; }
.reveal-stagger-2 { transition-delay: 0.2s; }
.reveal-stagger-3 { transition-delay: 0.3s; }
.reveal-stagger-4 { transition-delay: 0.4s; }
.reveal-stagger-5 { transition-delay: 0.5s; }
.reveal-stagger-6 { transition-delay: 0.6s; }

/* Floating animation for hero elements */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

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

/* Pulse animation for interactive elements */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pulse-on-hover:hover {
  animation: pulse 0.6s ease-in-out;
}

/* Prevent conflicts with GSAP animations */
#hero-button1 {
  animation: none !important;
  transition: opacity 0.3s ease !important;
  opacity: 1 !important;
}

#hero-button1:hover {
  animation: none !important;
  transform: none !important;
  opacity: 0.9 !important;
}

/* Glow effect */
@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
  50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.8); }
}

.glow-effect {
  animation: glow 2s ease-in-out infinite;
}

/* Typing animation for hero text */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.typing-effect {
  overflow: hidden;
  border-right: 3px solid white;
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* Parallax effect */
.parallax {
  transition: transform 0.5s ease-out;
}

/* Progress bar for scroll indication */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899);
  z-index: 9999;
  transition: width 0.3s ease;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Hover effects for cards */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Text gradient animations */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

/* Responsive animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
