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

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

/* Moving Company Design System - Optimized for Performance */

@layer base {
  :root {
    /* Brand Colors */
    --primary: 212 100% 40%;  /* Moving Blue #0052cc */
    --primary-foreground: 0 0% 100%;
    
    /* CTA Colors */
    --cta: 27 100% 50%;  /* Moving Orange #ff7a00 */
    --cta-hover: 27 100% 44%;  /* #e06d00 */
    --cta-foreground: 0 0% 100%;
    
    /* Backgrounds */
    --background: 210 17% 97%;  /* #f8f9fa */
    --foreground: 0 0% 20%;  /* #333333 */
    
    /* Glassmorphism Surface */
    --surface: 0 0% 100% / 0.8;  /* rgba(255, 255, 255, 0.8) */
    --surface-border: 0 0% 100% / 0.2;  /* rgba(255, 255, 255, 0.2) */
    
    /* Supporting Colors */
    --card: 0 0% 100%;
    --card-foreground: 0 0% 20%;
    
    --secondary: 210 40% 96%;
    --secondary-foreground: 0 0% 20%;
    
    --muted: 210 40% 96%;
    --muted-foreground: 215 16% 47%;
    
    --accent: 212 100% 95%;
    --accent-foreground: 212 100% 40%;
    
    --border: 214 32% 91%;
    --input: 214 32% 91%;
    --ring: 212 100% 40%;
    
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;

    --radius: 0.75rem;

    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 210 40% 98%;
    --primary-foreground: 222.2 47.4% 11.2%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 212.7 26.8% 83.9%;
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  html {
    font-family: 'Open Sans', system-ui, sans-serif;
    scroll-behavior: smooth;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', system-ui, sans-serif;
  }

  body {
    @apply bg-background text-foreground;
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="%230052cc" fill-opacity="0.05" fill-rule="evenodd"/%3E%3C/svg%3E');
  }
}

@layer components {
  /* Glassmorphism Components - Optimized */
  .glass-surface {
    background: hsl(var(--surface));
    backdrop-filter: blur(12px);
    border: 1px solid hsl(var(--surface-border));
    will-change: transform;
  }
  
  .glass-card {
    @apply glass-surface rounded-2xl p-6 shadow-lg;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  }
  
  .glass-header {
    @apply glass-surface shadow-lg border-b-0;
    backdrop-filter: blur(20px);
  }

  /* Optimized CTA Button Variants */
  .cta-primary {
    @apply bg-cta hover:bg-cta-hover text-cta-foreground font-semibold px-8 py-4 rounded-xl;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 122, 0, 0.3);
  }
  
  .cta-glow {
    @apply bg-cta hover:bg-cta-hover text-cta-foreground font-semibold px-8 py-4 rounded-xl transition-all duration-300 transform hover:scale-105;
    background: linear-gradient(135deg, hsl(var(--cta)), hsl(var(--cta-hover)));
    box-shadow: 
      0 8px 32px rgba(255, 122, 0, 0.4),
      0 4px 16px rgba(255, 122, 0, 0.3),
      0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: glow-pulse 3s ease-in-out infinite;
  }
  
  .cta-glow:hover {
    background: linear-gradient(135deg, hsl(var(--cta-hover)), hsl(var(--cta)));
    box-shadow: 
      0 12px 48px rgba(255, 122, 0, 0.6),
      0 6px 24px rgba(255, 122, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.2);
  }

  /* Trust Badge Styles */
  .trust-badge {
    @apply glass-surface rounded-lg p-4 text-center;
    transition: transform 0.3s ease;
  }
  
  .trust-badge:hover {
    transform: scale(1.05);
  }

  /* Navigation Styles */
  .nav-link {
    @apply text-foreground hover:text-primary font-medium relative;
    transition: color 0.3s ease;
  }
  
  .nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: hsl(var(--primary));
    transition: width 0.3s ease;
  }
  
  .nav-link:hover:after {
    width: 100%;
  }
}

@layer utilities {
  /* Optimized Animation Utilities */
  .animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out;
  }
  
  .animate-slide-in-left {
    animation: slide-in-left 0.8s ease-out;
  }
  
  .animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out;
  }
  
  .animate-bounce-in {
    animation: bounce-in 0.8s ease-out;
  }

  /* Optimized Keyframes - Reduced complexity */
  @keyframes glow-pulse {
    0%, 100% {
      box-shadow: 
        0 8px 32px rgba(255, 122, 0, 0.4),
        0 4px 16px rgba(255, 122, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    50% {
      box-shadow: 
        0 12px 40px rgba(255, 122, 0, 0.6),
        0 6px 20px rgba(255, 122, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15);
    }
  }
  
  @keyframes fade-in-up {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slide-in-left {
    from {
      opacity: 0;
      transform: translateX(-30px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes slide-in-right {
    from {
      opacity: 0;
      transform: translateX(30px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes bounce-in {
    0% {
      opacity: 0;
      transform: scale(0.8) translateY(-20px);
    }
    60% {
      opacity: 1;
      transform: scale(1.05);
    }
    100% {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }
}
