/* =========================================
   ZERO ONE - HERO SECTION STYLES
   Senior Front-End Animations & UI Enhancements
   ========================================= */

/* 1. BACKGROUND ANIMATIONS - Enhanced */
.hero-grid {
  background-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  /* Grid'i yavaşça kaydırarak "ilerleme" hissi veriyoruz */
  animation: moveGrid 20s linear infinite;
  will-change: transform;
}

@keyframes moveGrid {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(40px);
  }
}

.animate-pulse-slow {
  animation: pulseGlow 8s ease-in-out infinite;
  will-change: opacity, transform;
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.08;
    transform: scale(1);
  }
  50% {
    opacity: 0.15;
    transform: scale(1.1);
  }
}

/* Glassmorphism Effect for Hero Overlay */
.hero-glass-overlay {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* Animated Gradient Background */
.hero-gradient-bg {
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 2. TEXT REVEAL ANIMATIONS (Masking Effect) - Enhanced */
/* Yazılar alttan yukarı doğru maskelenerek çıkar */
.reveal-text {
  transform: translateY(110%);
  opacity: 0;
  animation: textReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.hero-label {
  animation: textReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.1s;
}

@keyframes textReveal {
  0% {
    transform: translateY(110%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Stagger Delays (Sırayla gelmeleri için) */
.delay-100 {
  animation-delay: 0.2s;
}
.delay-200 {
  animation-delay: 0.35s;
}
.delay-300 {
  animation-delay: 0.5s;
}
.delay-400 {
  animation-delay: 0.7s;
}

/* Text Glow Effect */
.text-glow {
  text-shadow: 0 0 20px rgba(230, 0, 0, 0.3), 0 0 40px rgba(230, 0, 0, 0.2),
    0 0 60px rgba(230, 0, 0, 0.1);
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    text-shadow: 0 0 20px rgba(230, 0, 0, 0.3), 0 0 40px rgba(230, 0, 0, 0.2),
      0 0 60px rgba(230, 0, 0, 0.1);
  }
  50% {
    text-shadow: 0 0 30px rgba(230, 0, 0, 0.5), 0 0 60px rgba(230, 0, 0, 0.3),
      0 0 90px rgba(230, 0, 0, 0.2);
  }
}

/* Letter Spacing Animation */
.letter-spacing-animate {
  letter-spacing: 0.05em;
  transition: letter-spacing 0.5s ease;
}

.letter-spacing-animate:hover {
  letter-spacing: 0.1em;
}

/* 3. STYLING UPGRADES - Enhanced */

/* Gradient Flow Text */
.text-gradient-flow {
  background: linear-gradient(90deg, #e60000, #ff4d4d, #0f0f0f, #e60000);
  background-size: 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientFlow 8s ease infinite;
  will-change: background-position;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Outline Text Effect (Son satır için) */
.text-outline-dark {
  color: #0f0f0f;
  transition: all 0.3s ease;
}

.text-outline-dark:hover {
  -webkit-text-stroke: 1px #e60000;
  color: transparent;
}

/* Shimmer Effect */
.shimmer-text {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

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

/* 4. BUTTON ENTRY ANIMATION - Enhanced */
.hero-btns {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.9s;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button Hover Effects */
.hero-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.hero-btn:hover::before {
  width: 300px;
  height: 300px;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(230, 0, 0, 0.3);
}

.hero-btn:active {
  transform: translateY(0);
}

/* Button Ripple Effect */
.hero-btn-ripple {
  position: relative;
  overflow: hidden;
}

.hero-btn-ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.hero-btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* 5. ABSTRACT SHAPES ANIMATION - Enhanced */
.animate-spin-slow {
  animation: spin 30s linear infinite;
  will-change: transform;
}
.animate-spin-reverse {
  animation: spin 40s linear infinite reverse;
  will-change: transform;
}

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

.fade-in-delayed {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 1s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Floating Animation */
.float-animate {
  animation: float 6s ease-in-out infinite;
}

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

/* Scale Pulse Animation */
.scale-pulse {
  animation: scalePulse 2s ease-in-out infinite;
}

@keyframes scalePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Blur In Animation */
.blur-in {
  filter: blur(10px);
  opacity: 0;
  animation: blurIn 1s ease forwards;
}

@keyframes blurIn {
  to {
    filter: blur(0);
    opacity: 1;
  }
}

/* 6. SCROLL LINE ANIMATION - Enhanced */
.hero-scroll {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  animation-delay: 1.5s;
}

@keyframes scroll-line {
  0% {
    transform: translateY(-100%);
  }
  50% {
    transform: translateY(100%);
  }
  51% {
    transform: translateY(-100%);
  } /* Reset to top instantly */
  100% {
    transform: translateY(-100%);
  } /* Wait */
}

.animate-scroll-line {
  animation: scroll-line 2.5s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

/* 7. PARALLAX EFFECTS */
.parallax-slow {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.parallax-fast {
  transition: transform 0.05s ease-out;
  will-change: transform;
}

/* 8. CURSOR INTERACTION */
.cursor-interactive {
  cursor: none;
}

.cursor-interactive:hover {
  transform: scale(1.05);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 9. LOADING STATES */
.hero-loading {
  position: relative;
  overflow: hidden;
}

.hero-loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: loadingShimmer 2s infinite;
}

@keyframes loadingShimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* 10. MICRO-INTERACTIONS */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-scale {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-rotate {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* 11. BORDER ANIMATIONS */
.border-animate {
  position: relative;
  overflow: hidden;
}

.border-animate::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e60000, transparent);
  animation: borderFlow 3s infinite;
}

@keyframes borderFlow {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* 12. RESPONSIVE ENHANCEMENTS */
@media (max-width: 768px) {
  .text-glow {
    text-shadow: 0 0 10px rgba(230, 0, 0, 0.2);
  }

  .hero-btn:hover {
    transform: none;
  }

  .float-animate {
    animation-duration: 4s;
  }
  
  /* Mobile: Disable heavy animations for better performance */
  .hero-grid {
    animation: none;
  }
  
  .animate-pulse-slow {
    animation: none;
    opacity: 0.05;
  }
  
  .text-gradient-flow {
    animation: none;
    background: #e60000;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* 13. MOBILE-OPTIMIZED HERO BACKGROUND */
.hero-bg-image {
  background-image: url('/img/bg-test.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Mobile: Use smaller/optimized background or disable on very small screens */
@media (max-width: 640px) {
  .hero-bg-image {
    background-image: none;
    background-color: #ffffff;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .hero-bg-image {
    background-size: cover;
    opacity: 0.2;
  }
}
