/* Hero Enhancement - Tech Theme */

/* Variables for easy adjustments */
:root {
  --hero-bg-color: #0f172a;
  /* Slate 900 */
  --hero-grid-color: rgba(56, 189, 248, 0.1);
  /* Sky 400 with opacity */
  --hero-particle-color: rgba(56, 189, 248, 0.4);
}

/* 1. Background Layer */
.tech-hero-container {
  position: relative;
  overflow: hidden;
  background-color: var(--hero-bg-color);
  transform: translateZ(0);
  /* Force hardware acceleration */
}

.tech-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  transform: translateZ(0);
  /* Force hardware acceleration */
}

/* Video Background */
.hero-video {
  opacity: 0;
  /* Hidden for now since we are using image */
  pointer-events: none;
}

/* Image Background with Ken Burns Effect */
.hero-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  transform: translateZ(0);
  /* Force hardware acceleration */
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% center;
  /* Focus strictly on the right edge (brain) */
  transform-origin: right center;
  /* Zoom from the brain side */
  backface-visibility: hidden;
  will-change: transform;
  /* Hint to browser */
}

/* Ken Burns Animation Class */
.icon-ken-burns {
  animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  0% {
    transform: scale(1.6) translateZ(0);
  }

  100% {
    transform: scale(1.75) translateZ(0);
  }
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  z-index: 1;
  transform: translateZ(0);
  /* Force hardware acceleration */
}

/* Floating Particles (Enhanced Organic Motion - Optimized) */
.tech-particles {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  /* Increased size for movement buffer */
  height: 120%;
  background-image:
    radial-gradient(circle at 20% 30%, var(--hero-particle-color) 0%, transparent 2px),
    radial-gradient(circle at 80% 40%, var(--hero-particle-color) 0%, transparent 2px),
    radial-gradient(circle at 40% 80%, var(--hero-particle-color) 0%, transparent 2px),
    radial-gradient(circle at 90% 90%, var(--hero-particle-color) 0%, transparent 2px);
  background-size: 100% 100%;
  animation: particlesFloat 45s ease-in-out infinite alternate;
  opacity: 0.5;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
  /* Hint to browser */
}

@keyframes particlesFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    transform: translate3d(-2%, -2%, 0) scale(1.02);
    /* Use translate/scale only */
  }
}

/* Glassmorphism Card Style */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  /* Reduced blur for performance (Request #3) */
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  /* Faster duration */
  color: #f3f4f6;
  transform: translateZ(0);
  /* Force hardware acceleration */
  will-change: transform;
}

/* Ensure all text inside glass card is light */
.glass-card h3,
.glass-card p,
.glass-card svg {
  color: #ffffff !important;
}

.glass-card:hover {
  transform: scale(1.02) translateZ(0);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 20px rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Button Shine Effect - Optimized */
.btn-shine {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

.btn-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  /* Fixed position, animate transform instead */
  width: 50%;
  height: 100%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.3) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg) translateX(-250%);
  /* Start off-screen left */
  animation: shineSweep 5s infinite;
  will-change: transform;
}

@keyframes shineSweep {
  0% {
    transform: skewX(-25deg) translateX(-250%);
  }

  20% {
    transform: skewX(-25deg) translateX(450%);
  }

  /* Fast sweep to right */
  100% {
    transform: skewX(-25deg) translateX(450%);
  }
}

.tech-glow-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0%, var(--hero-bg-color) 80%);
  z-index: 1;
  /* Vignette effect */
}


/* 2. Content Layer */
.hero-content-wrapper {
  position: relative;
  z-index: 10;
  /* Ensure content is above background */
}

/* 3. Entrance Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

/* Slide In Left Animation (Request #4) */
.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  animation: slideInLeft 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-600 {
  animation-delay: 0.6s;
}

.delay-700 {
  animation-delay: 0.7s;
}


@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating Card Animation (Request - Wind/Floating Effect) */
@keyframes windFloat {
  0% {
    transform: translate3d(0, 0, 0) rotate3d(0, 0, 1, 0deg);
  }

  33% {
    transform: translate3d(0, -6px, 0) rotate3d(0, 0, 1, 0.5deg);
  }

  66% {
    transform: translate3d(0, 4px, 0) rotate3d(0, 0, 1, -0.5deg);
  }

  100% {
    transform: translate3d(0, 0, 0) rotate3d(0, 0, 1, 0deg);
  }
}

.wind-float-wrapper {
  animation: windFloat 6s ease-in-out infinite;
  transform-style: preserve-3d;
  will-change: transform;
  height: 100%;
  /* Ensure it fills grid cell */
  transform: translateZ(0);
  /* Hardware acceleration */
}

/* Pause on hover to allow the card's scale-up to take prominence smoothly */
.wind-float-wrapper:hover {
  animation-play-state: paused;
}

/* Delays for Staggered Effect */
.float-delay-0 {
  animation-delay: 0s;
}

.float-delay-500 {
  animation-delay: 0.5s;
}

.float-delay-1000 {
  animation-delay: 1s;
}

.float-delay-1500 {
  animation-delay: 1.5s;
}

.float-delay-2000 {
  animation-delay: 2s;
}

.float-delay-2500 {
  animation-delay: 2.5s;
}

/* Setup different durations for organic feel */
.float-duration-6s {
  animation-duration: 6s;
}

.float-duration-7s {
  animation-duration: 7s;
}

.float-duration-8s {
  animation-duration: 8s;
}

.float-duration-9s {
  animation-duration: 9s;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}