@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

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

@layer base {
  :root {
    --background: 240 33% 3%;
    --foreground: 0 0% 100%;
    --card: 240 20% 8%;
    --card-foreground: 0 0% 100%;
    --popover: 240 20% 8%;
    --popover-foreground: 0 0% 100%;
    --primary: 252 67% 66%;
    --primary-foreground: 0 0% 100%;
    --secondary: 240 20% 12%;
    --secondary-foreground: 0 0% 100%;
    --muted: 240 20% 15%;
    --muted-foreground: 0 0% 73%;
    --accent: 252 67% 66%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 100% / 0.05;
    --input: 240 20% 15%;
    --ring: 252 67% 66%;
    --radius: 0.625rem;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    @apply bg-background text-foreground font-sans antialiased;
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
  }
}

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

::-webkit-scrollbar-track {
  background: hsl(var(--background));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--primary) / 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--primary) / 0.5);
}

/* Noise Texture Overlay */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

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

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

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

@keyframes draw-line {
  from {
    stroke-dashoffset: 100%;
  }
  to {
    stroke-dashoffset: 0%;
  }
}

@keyframes data-flow {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

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

.animate-pulse-glow {
  animation: pulse-glow 4s ease-in-out infinite;
}

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

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-strong {
  background: rgba(17, 17, 26, 0.8);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Magnetic Button Effect */
.magnetic-btn {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 3D Card Tilt */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

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

/* Glow Effects */
.glow-purple {
  box-shadow: 0 0 40px rgba(126, 110, 227, 0.3);
}

.glow-text {
  text-shadow: 0 0 40px rgba(126, 110, 227, 0.5);
}

/* Moving Border Gradient */
.moving-border {
  position: relative;
  background: hsl(var(--card));
  border-radius: var(--radius);
  overflow: hidden;
}

.moving-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg, transparent, #7e6ee3, transparent, #7e6ee3, transparent);
  animation: rotate 4s linear infinite;
  border-radius: inherit;
  z-index: -1;
}

.moving-border::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: hsl(var(--card));
  border-radius: inherit;
  z-index: -1;
}

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

/* Section Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger Children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.active > *:nth-child(1) { animation: fade-up 0.6s 0.1s forwards; }
.stagger-children.active > *:nth-child(2) { animation: fade-up 0.6s 0.2s forwards; }
.stagger-children.active > *:nth-child(3) { animation: fade-up 0.6s 0.3s forwards; }
.stagger-children.active > *:nth-child(4) { animation: fade-up 0.6s 0.4s forwards; }
.stagger-children.active > *:nth-child(5) { animation: fade-up 0.6s 0.5s forwards; }

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Counter Animation */
.counter {
  font-variant-numeric: tabular-nums;
}

/* Input Focus Effects */
.input-focus-effect {
  position: relative;
}

.input-focus-effect::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: hsl(var(--primary));
  transition: all 0.3s ease;
}

.input-focus-effect:focus-within::after {
  left: 0;
  width: 100%;
}

/* Liquid Fill Button */
.liquid-fill {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.liquid-fill::before {
  content: '';
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  width: 0;
  height: 0;
  background: hsl(var(--primary));
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.liquid-fill:hover::before {
  width: 300%;
  height: 300%;
}

/* Image Lens Effect */
.lens-zoom {
  position: relative;
  overflow: hidden;
}

.lens-zoom::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle, rgba(126, 110, 227, 0.2) 0%, transparent 70%);
}

.lens-zoom:hover::after {
  opacity: 1;
}

/* Responsive Typography */
.text-responsive-hero {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
}

.text-responsive-section {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

/* Hide scrollbar for horizontal scroll sections */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
