@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  @apply bg-white text-gray-900;
  font-family: var(--font-inter);
  background: 
    radial-gradient(ellipse 120% 80% at 20% 20%, rgba(249, 115, 22, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 80% 80%, rgba(234, 88, 12, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 80% 120% at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 90% 100% at 10% 70%, rgba(251, 146, 60, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 100% 90% at 90% 30%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    linear-gradient(135deg, #ffffff 0%, #fff7ed 25%, #ffffff 50%, #eff6ff 75%, #ffffff 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 400% 400%;
  background-attachment: fixed;
  position: relative;
  animation: backgroundFlow 30s ease infinite;
  overflow-x: hidden;
}

@keyframes backgroundFlow {
  0%, 100% {
    background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 50%;
  }
  25% {
    background-position: 10% 10%, -5% -5%, 5% 5%, -8% 8%, 8% -8%, 25% 50%;
  }
  50% {
    background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 100% 50%;
  }
  75% {
    background-position: -10% -10%, 5% 5%, -5% -5%, 8% -8%, -8% 8%, 75% 50%;
  }
}

/* Animated mesh gradient with multiple layers */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle 800px at 15% 25%, rgba(249, 115, 22, 0.15) 0%, transparent 50%),
    radial-gradient(circle 700px at 85% 75%, rgba(234, 88, 12, 0.12) 0%, transparent 50%),
    radial-gradient(circle 600px at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 60%),
    radial-gradient(circle 500px at 30% 70%, rgba(251, 146, 60, 0.08) 0%, transparent 50%),
    radial-gradient(circle 550px at 70% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle 400px at 5% 50%, rgba(251, 146, 60, 0.06) 0%, transparent 50%),
    radial-gradient(circle 450px at 95% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  animation: meshMove 20s ease-in-out infinite;
  filter: blur(60px);
}

@keyframes meshMove {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 0.7;
  }
  25% {
    transform: translate(5%, 5%) scale(1.12) rotate(3deg);
    opacity: 0.9;
  }
  50% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 0.8;
  }
  75% {
    transform: translate(-5%, -5%) scale(0.92) rotate(-3deg);
    opacity: 0.85;
  }
}

/* Dynamic animated grid pattern */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(249, 115, 22, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 115, 22, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 3px 3px, rgba(249, 115, 22, 0.1) 1.5px, transparent 0),
    radial-gradient(circle at 25px 25px, rgba(59, 130, 246, 0.06) 1px, transparent 0),
    radial-gradient(circle at 15px 15px, rgba(251, 146, 60, 0.05) 1px, transparent 0);
  background-size: 
    80px 80px,
    80px 80px,
    120px 120px,
    120px 120px,
    50px 50px,
    100px 100px,
    75px 75px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  animation: gridPulse 10s ease-in-out infinite, gridShift 15s linear infinite;
  mix-blend-mode: overlay;
}

@keyframes gridPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.03);
  }
}

@keyframes gridShift {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 80px 80px, 80px 80px, 120px 120px, 120px 120px, 50px 50px, 100px 100px, 75px 75px;
  }
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
}

/* Enhanced typography for white background */
h1, h2, h3, h4, h5, h6 {
  @apply text-gray-900;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  @apply text-gray-700;
  line-height: 1.7;
}

strong, b {
  @apply text-gray-900;
  font-weight: 600;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  @apply bg-gray-100;
}

::-webkit-scrollbar-thumb {
  @apply bg-primary-500 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-primary-400;
}

/* Gradient animation */
@keyframes gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

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

/* Smooth fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Glow effect */
.glow {
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

.glow-hover:hover {
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.5);
  transition: box-shadow 0.3s ease;
}

/* Text gradient */
.text-gradient {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shimmer effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(249, 115, 22, 0.1),
    transparent
  );
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

/* Floating orbs effect */
@keyframes floatOrb {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  33% {
    transform: translate(50px, -50px) scale(1.3);
    opacity: 0.7;
  }
  66% {
    transform: translate(-40px, 40px) scale(0.85);
    opacity: 0.5;
  }
}

.floating-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: floatOrb 20s ease-in-out infinite;
  box-shadow: 0 0 100px rgba(249, 115, 22, 0.25);
}

/* Light rays effect */
@keyframes lightRay {
  0% {
    transform: translateX(-100%) rotate(45deg);
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: translateX(200vw) rotate(45deg);
    opacity: 0;
  }
}

.light-ray {
  position: fixed;
  width: 3px;
  height: 100vh;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(249, 115, 22, 0.25),
    rgba(59, 130, 246, 0.15),
    transparent
  );
  pointer-events: none;
  z-index: 0;
  animation: lightRay 8s linear infinite;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

/* Calendly widget styling */
.calendly-inline-widget {
  background: transparent !important;
}

.calendly-inline-widget iframe {
  background: transparent !important;
}

/* Professional page background */
.page-background {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 50%, #ffffff 100%);
}

.page-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 20%, rgba(249, 115, 22, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Tech Circuit Pattern */
.tech-circuit {
  position: relative;
}

.tech-circuit::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    /* Horizontal lines */
    linear-gradient(to right, transparent 0%, rgba(249, 115, 22, 0.08) 20%, rgba(249, 115, 22, 0.08) 21%, transparent 22%),
    linear-gradient(to right, transparent 78%, rgba(249, 115, 22, 0.08) 79%, rgba(249, 115, 22, 0.08) 80%, transparent 100%),
    /* Vertical lines */
    linear-gradient(to bottom, transparent 0%, rgba(249, 115, 22, 0.08) 20%, rgba(249, 115, 22, 0.08) 21%, transparent 22%),
    linear-gradient(to bottom, transparent 78%, rgba(249, 115, 22, 0.08) 79%, rgba(249, 115, 22, 0.08) 80%, transparent 100%);
  background-size: 100% 2px, 100% 2px, 2px 100%, 2px 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  pointer-events: none;
  opacity: 0.3;
}

/* Hexagon Pattern */
.tech-hexagon {
  position: relative;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(249, 115, 22, 0.025) 2px, rgba(249, 115, 22, 0.025) 4px),
    repeating-linear-gradient(60deg, transparent, transparent 2px, rgba(59, 130, 246, 0.025) 2px, rgba(59, 130, 246, 0.025) 4px),
    repeating-linear-gradient(120deg, transparent, transparent 2px, rgba(249, 115, 22, 0.025) 2px, rgba(249, 115, 22, 0.025) 4px);
  background-size: 100px 100px;
  opacity: 0.2;
}

/* Digital Glow Effect */
.digital-glow {
  box-shadow: 
    0 0 20px rgba(249, 115, 22, 0.2),
    inset 0 0 20px rgba(249, 115, 22, 0.1);
}



/* Holographic Glow Effect */
@keyframes holographic {
  0%, 100% {
    filter: hue-rotate(0deg);
  }
  25% {
    filter: hue-rotate(90deg);
  }
  50% {
    filter: hue-rotate(180deg);
  }
  75% {
    filter: hue-rotate(270deg);
  }
}

.holographic-glow {
  animation: holographic 8s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(249, 115, 22, 0.5));
}

/* Neon Pulse Effect */
@keyframes neonPulse {
  0%, 100% {
    box-shadow: 
      0 0 5px rgba(249, 115, 22, 0.4),
      0 0 10px rgba(249, 115, 22, 0.4),
      0 0 15px rgba(249, 115, 22, 0.4),
      0 0 20px rgba(249, 115, 22, 0.4);
  }
  50% {
    box-shadow: 
      0 0 10px rgba(249, 115, 22, 0.7),
      0 0 20px rgba(249, 115, 22, 0.7),
      0 0 30px rgba(249, 115, 22, 0.7),
      0 0 40px rgba(249, 115, 22, 0.7);
  }
}

.neon-pulse {
  animation: neonPulse 2s ease-in-out infinite;
}

/* Glitch Effect */
@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

.glitch-effect {
  animation: glitch 0.3s infinite;
}

/* Floating Particles */
@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.3;
  }
  33% {
    transform: translateY(-30px) translateX(20px) rotate(120deg);
    opacity: 0.6;
  }
  66% {
    transform: translateY(30px) translateX(-20px) rotate(240deg);
    opacity: 0.4;
  }
}

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

/* Energy Wave */
@keyframes energyWave {
  0% {
    transform: translateX(-100%) scaleY(1);
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100vw) scaleY(1.5);
    opacity: 0;
  }
}

.energy-wave {
  position: absolute;
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.7), transparent);
  animation: energyWave 4s linear infinite;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
}

/* Matrix Rain Effect (subtle) */
@keyframes matrixRain {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

.matrix-char {
  animation: matrixRain linear infinite;
  color: rgba(249, 115, 22, 0.25);
  font-family: 'Courier New', monospace;
}

/* 3D Transform */
@keyframes rotate3D {
  0% {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
  }
  50% {
    transform: perspective(1000px) rotateY(180deg) rotateX(10deg);
  }
  100% {
    transform: perspective(1000px) rotateY(360deg) rotateX(0deg);
  }
}

.rotate-3d {
  animation: rotate3D 20s linear infinite;
  transform-style: preserve-3d;
}

/* Enhanced glassmorphism effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(249, 115, 22, 0.08);
}

/* Cool gradient border animation */
@keyframes gradientBorder {
  0%, 100% {
    border-image-source: linear-gradient(45deg, rgba(249, 115, 22, 0.5), rgba(59, 130, 246, 0.5));
  }
  50% {
    border-image-source: linear-gradient(225deg, rgba(59, 130, 246, 0.5), rgba(249, 115, 22, 0.5));
  }
}

.gradient-border {
  border: 2px solid;
  border-image: linear-gradient(45deg, rgba(249, 115, 22, 0.5), rgba(59, 130, 246, 0.5)) 1;
  animation: gradientBorder 3s ease infinite;
}
