/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */

/* ============================================
   1. 3D TEXT EFFECT ON HERO NAME
   ============================================ */

.hero-name-3d {
  display: inline-block;
  transform-style: preserve-3d;
  perspective: 1000px;
  position: relative;
}

.hero-name-3d .name-char {
  display: inline-block;
  transform-style: preserve-3d;
  animation: float3D 3s ease-in-out infinite;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4),
    0 2px 0 rgba(239, 55, 36, 0.1),
    0 3px 0 rgba(239, 55, 36, 0.1),
    0 4px 0 rgba(239, 55, 36, 0.1),
    0 5px 10px rgba(0, 0, 0, 0.3),
    0 10px 20px rgba(239, 55, 36, 0.2);
}

.hero-name-3d .name-char:nth-child(1) { animation-delay: 0s; }
.hero-name-3d .name-char:nth-child(2) { animation-delay: 0.1s; }
.hero-name-3d .name-char:nth-child(3) { animation-delay: 0.2s; }
.hero-name-3d .name-char:nth-child(4) { animation-delay: 0.3s; }
.hero-name-3d .name-char:nth-child(5) { animation-delay: 0.4s; }
.hero-name-3d .name-char:nth-child(6) { animation-delay: 0.5s; }
.hero-name-3d .name-char:nth-child(7) { animation-delay: 0.6s; }
.hero-name-3d .name-char:nth-child(8) { animation-delay: 0.7s; }

@keyframes float3D {
  0%, 100% {
    transform: translateZ(0) rotateX(0deg) rotateY(0deg);
  }
  25% {
    transform: translateZ(10px) rotateX(5deg) rotateY(-3deg);
  }
  50% {
    transform: translateZ(20px) rotateX(-3deg) rotateY(5deg);
  }
  75% {
    transform: translateZ(10px) rotateX(3deg) rotateY(-5deg);
  }
}

.hero-name-3d .name-char:hover {
  transform: translateZ(30px) rotateY(15deg) scale(1.2);
  color: #ffd700;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.8),
    0 0 20px rgba(255, 215, 0, 0.6),
    0 0 30px rgba(255, 215, 0, 0.4),
    0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 3D depth layers for name */
.hero-name-3d::before {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  top: 2px;
  color: rgba(239, 55, 36, 0.3);
  z-index: -1;
  transform: translateZ(-10px);
}

.hero-name-3d::after {
  content: attr(data-text);
  position: absolute;
  left: 4px;
  top: 4px;
  color: rgba(239, 55, 36, 0.15);
  z-index: -2;
  transform: translateZ(-20px);
}

/* ============================================
   2. MORPHING BLOBS SVG ANIMATION
   ============================================ */

.morphing-blobs-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.morph-blob {
  position: absolute;
  filter: blur(60px);
  opacity: 0.4;
  mix-blend-mode: screen;
}

.morph-blob-1 {
  width: 500px;
  height: 500px;
  top: -15%;
  left: -10%;
  background: linear-gradient(135deg, #ef3724, #ff6b5b);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: morphBlob1 15s ease-in-out infinite;
}

.morph-blob-2 {
  width: 400px;
  height: 400px;
  bottom: -10%;
  right: -5%;
  background: linear-gradient(135deg, #ff6b5b, #ffd700);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  animation: morphBlob2 18s ease-in-out infinite;
}

.morph-blob-3 {
  width: 300px;
  height: 300px;
  top: 40%;
  right: 20%;
  background: linear-gradient(135deg, #ffd700, #ef3724);
  border-radius: 50% 50% 30% 70% / 50% 70% 30% 50%;
  animation: morphBlob3 12s ease-in-out infinite;
}

@keyframes morphBlob1 {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: translate(30px, -50px) rotate(90deg) scale(1.1);
  }
  50% {
    border-radius: 50% 60% 30% 60% / 30% 40% 70% 60%;
    transform: translate(-20px, 20px) rotate(180deg) scale(0.95);
  }
  75% {
    border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%;
    transform: translate(50px, 30px) rotate(270deg) scale(1.05);
  }
}

@keyframes morphBlob2 {
  0%, 100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%;
    transform: translate(-40px, 30px) rotate(120deg) scale(1.15);
  }
  66% {
    border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
    transform: translate(20px, -40px) rotate(240deg) scale(0.9);
  }
}

@keyframes morphBlob3 {
  0%, 100% {
    border-radius: 50% 50% 30% 70% / 50% 70% 30% 50%;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  50% {
    border-radius: 30% 70% 70% 30% / 70% 30% 70% 30%;
    transform: translate(-30px, 40px) rotate(180deg) scale(1.2);
  }
}

/* SVG Morphing Blob alternative */
.svg-morph-blob {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
}

.svg-morph-blob path {
  fill: url(#blobGradient);
}

/* ============================================
   3. MOUSE TRAIL EFFECT WITH CANVAS
   ============================================ */

#mouse-trail-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9997;
}

.trail-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #ef3724, transparent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9996;
  animation: trailFade 0.8s ease-out forwards;
}

@keyframes trailFade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0);
  }
}

/* Enhanced cursor glow trail */
.cursor-trail-glow {
  position: fixed;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(239, 55, 36, 0.8), rgba(255, 107, 91, 0.4), transparent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9995;
  filter: blur(2px);
  transition: transform 0.05s ease-out;
}

/* ============================================
   4. SCROLL INDICATOR PULSE ANIMATION
   ============================================ */

.floating-button {
  animation: scrollIndicatorBounce 2s infinite, scrollIndicatorPulse 2s infinite;
  position: relative;
}

.floating-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(239, 55, 36, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: scrollPulseRing 2s ease-out infinite;
}

.floating-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(239, 55, 36, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: scrollPulseRing 2s ease-out infinite 0.5s;
}

@keyframes scrollIndicatorBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

@keyframes scrollIndicatorPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 55, 36, 0.7);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(239, 55, 36, 0.3);
  }
}

@keyframes scrollPulseRing {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* Enhanced scroll indicator styling */
.floating-button .ti-mouse {
  animation: mouseIconBounce 1.5s ease-in-out infinite;
}

@keyframes mouseIconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

/* Scroll text label */
.scroll-indicator-text {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.7);
  opacity: 0;
  animation: scrollTextFade 2s ease-in-out infinite;
}

@keyframes scrollTextFade {
  0%, 100% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ============================================
   5. TEXT SCRAMBLE EFFECT
   ============================================ */

.text-scramble {
  display: inline-block;
  position: relative;
}

.text-scramble .scramble-char {
  display: inline-block;
  animation: scrambleReveal 0.5s ease forwards;
  opacity: 0;
}

.text-scramble .scramble-char.revealed {
  opacity: 1;
}

@keyframes scrambleReveal {
  0% {
    opacity: 0;
    transform: translateY(20px) rotateX(90deg);
    filter: blur(10px);
  }
  50% {
    opacity: 0.5;
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
    filter: blur(0);
  }
}

/* Scramble text glitch effect */
.text-scramble.scrambling .scramble-char {
  animation: scrambleGlitch 0.1s ease infinite;
}

@keyframes scrambleGlitch {
  0%, 100% {
    transform: translateX(0);
    color: inherit;
  }
  25% {
    transform: translateX(-2px);
    color: #ff6b5b;
  }
  50% {
    transform: translateX(2px);
    color: #ffd700;
  }
  75% {
    transform: translateX(-1px);
    color: #ef3724;
  }
}

/* ============================================
   6. VIDEO BACKGROUND OPTION
   ============================================ */

.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.hero-video-container video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Video overlay for better text readability */
.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.85) 0%,
    rgba(15, 52, 96, 0.75) 50%,
    rgba(26, 26, 46, 0.85) 100%
  );
  z-index: 1;
}

/* Video blur effect option */
.hero-video-container.blur video {
  filter: blur(5px);
  transform: translate(-50%, -50%) scale(1.1);
}

/* Video loading placeholder */
.hero-video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.hero-video-placeholder.loaded {
  opacity: 0;
  pointer-events: none;
}

/* Video controls toggle */
.video-toggle-btn {
  position: absolute;
  bottom: 100px;
  right: 20px;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.video-toggle-btn:hover {
  background: rgba(239, 55, 36, 0.3);
  border-color: rgba(239, 55, 36, 0.5);
  transform: scale(1.1);
}

.video-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

/* Particles.js container */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Hero section positioning */
.page-home {
  position: relative;
  overflow: hidden;
}

/* Animated gradient overlay */
.hero-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(239, 55, 36, 0.85) 0%,
    rgba(30, 30, 30, 0.9) 50%,
    rgba(239, 55, 36, 0.85) 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: 2;
}

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

/* Ensure content is above particles and overlay */
.page-home .navbar,
.page-home .caption-header,
.page-home .floating-button {
  position: relative;
  z-index: 10;
}

/* Typed.js cursor styling */
.typed-cursor {
  font-size: inherit;
  color: #ef3724;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Badge styling for typed text */
.badge.typed-badge {
  min-width: 280px;
  display: inline-block;
  font-size: 1.1rem;
  padding: 0.6rem 1.2rem;
}

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

.shape {
  position: absolute;
  opacity: 0.15;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ef3724, #ff6b5b);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  top: 15%;
  left: 10%;
  animation-delay: 0s;
  transform: perspective(500px) rotateX(15deg) rotateY(15deg);
}

.shape-2 {
  width: 120px;
  height: 120px;
  border: 3px solid rgba(239, 55, 36, 0.5);
  border-radius: 50%;
  top: 60%;
  left: 5%;
  animation-delay: 1s;
  animation-duration: 8s;
}

.shape-3 {
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, transparent 50%, rgba(239, 55, 36, 0.3) 50%);
  top: 20%;
  right: 15%;
  animation-delay: 2s;
  transform: perspective(500px) rotateX(-10deg) rotateY(20deg);
}

.shape-4 {
  width: 100px;
  height: 100px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  top: 70%;
  right: 10%;
  animation-delay: 3s;
  animation-duration: 7s;
  transform: rotate(45deg);
}

.shape-5 {
  width: 40px;
  height: 40px;
  background: rgba(239, 55, 36, 0.4);
  border-radius: 50%;
  top: 40%;
  left: 20%;
  animation-delay: 1.5s;
  animation-duration: 5s;
}

.shape-6 {
  width: 70px;
  height: 70px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 20%;
  top: 80%;
  left: 40%;
  animation-delay: 2.5s;
  transform: perspective(500px) rotateX(20deg) rotateY(-15deg);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
  }
  50% {
    transform: translateY(-10px) rotate(-3deg);
  }
  75% {
    transform: translateY(-25px) rotate(3deg);
  }
}

/* Mouse follow cursor */
.cursor-follower {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(239, 55, 36, 0.6);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, width 0.2s, height 0.2s, border-color 0.2s;
  z-index: 9999;
  mix-blend-mode: difference;
}

.cursor-follower.hover {
  width: 50px;
  height: 50px;
  border-color: rgba(239, 55, 36, 1);
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: #ef3724;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10000;
}

/* Wave divider */
.hero-wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 5;
  line-height: 0;
}

.hero-wave-divider svg {
  display: block;
  width: 100%;
  height: 80px;
}

/* Parallax text effect */
.parallax-text {
  transform-style: preserve-3d;
}

/* Enhanced caption header */
.caption-header {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.caption-header h1 {
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.caption-header h5 {
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Glowing effect for name */
.fg-theme {
  text-shadow: 0 0 20px rgba(239, 55, 36, 0.5);
}

/* Enhanced floating button */
.floating-button {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-15px);
  }
  60% {
    transform: translateY(-7px);
  }
}

