@tailwind base;
@tailwind components;
@tailwind utilities;
 
@layer base {
  :root {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 240 4.9% 83.9%;
    --radius: 1rem;
    --neon: 280 100% 70%;
  }
 
  .light {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 10% 3.9%;
    --neon: 280 100% 70%;
  }
}
 
@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
    font-feature-settings: "rlig" 1, "calt" 1;
    position: relative;
  }
  
  /* Grain texture overlay */
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: -1;
    background-image: 
      radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
      radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
      radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 100px 100px, 80px 80px, 120px 120px;
    pointer-events: none;
  }
  
  /* Section spacing utility to create consistent vertical rhythm */
  .section {
    padding-top: 6rem; /* 24 */
    padding-bottom: 6rem; /* 24 */
  }
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
  
  .glass {
    @apply backdrop-blur-xl bg-white/5 border border-white/10;
  }
  
  .glass-card {
    @apply glass rounded-2xl shadow-xl shadow-black/10;
  }
  
  .neon-text {
    color: hsl(var(--neon));
    text-shadow: 0 0 10px hsl(var(--neon) / 0.5);
  }
  
  .hover-lift {
    @apply transition-all duration-300 hover:scale-105 hover:shadow-2xl hover:shadow-black/20;
  }
  
  .hover-tilt {
    @apply transition-transform duration-300 hover:rotate-1 hover:scale-105;
  }
  
  .transform-gpu {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
  }
  
  .card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
  }
  
  .perspective-1000 {
    perspective: 1000px;
  }
  
  .button-3d {
    transform-style: preserve-3d;
    perspective: 600px;
    box-shadow: 
      0 4px 6px -1px rgba(0, 0, 0, 0.1),
      0 2px 4px -1px rgba(0, 0, 0, 0.06),
      0 0 0 1px rgba(168, 85, 247, 0.1);
    transition: all 0.2s ease-out;
  }
  
  .button-3d:hover {
    box-shadow: 
      0 10px 15px -3px rgba(0, 0, 0, 0.2),
      0 4px 6px -2px rgba(0, 0, 0, 0.1),
      0 0 0 2px rgba(168, 85, 247, 0.2),
      0 0 20px rgba(168, 85, 247, 0.3);
  }
}

/* Globe animations */
@keyframes pulse {
  0%, 100% { 
    transform: scale(1); 
    opacity: 0.3; 
  }
  50% { 
    transform: scale(1.5); 
    opacity: 0.9; 
  }
}

@keyframes fadeInOut {
  0%, 100% { 
    opacity: 0; 
  }
  50% { 
    opacity: 0.8; 
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-10px) translateX(5px);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-5px) translateX(-3px);
    opacity: 0.4;
  }
  75% {
    transform: translateY(-15px) translateX(8px);
    opacity: 0.6;
  }
}

/* Performance optimizations */
.parallax-section {
  will-change: transform;
  transform: translateZ(0);
}

.shooting-star {
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Motion reduce support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

