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

/* SPCzap Design System - Professional financial services with trust and security */

@layer base {
  :root {
    /* Core Brand Colors - Financial Trust & Security */
    --primary: 217 89% 25%;        /* Deep financial blue */
    --primary-foreground: 0 0% 100%;
    --primary-light: 217 89% 35%;   /* Lighter blue for hover states */
    --primary-glow: 217 89% 45%;    /* For glowing effects */
    
    /* Secondary Colors - Growth & Success */
    --secondary: 152 76% 28%;       /* Professional green */
    --secondary-foreground: 0 0% 100%;
    --secondary-light: 152 76% 38%;
    
    /* Accent Colors - Trust & Reliability */
    --accent: 217 32% 17%;          /* Dark slate for depth */
    --accent-foreground: 0 0% 100%;
    --accent-light: 217 32% 25%;
    
    /* Background & Surface */
    --background: 0 0% 100%;           /* Pure white background */
    --foreground: 217 33% 15%;         /* Dark blue-gray text */
    --surface: 0 0% 98%;              /* Light gray for sections */
    --surface-foreground: 217 33% 15%;
    
    /* Utility Colors */
    --muted: 217 33% 94%;
    --muted-foreground: 217 15% 55%;
    --border: 217 20% 88%;
    --input: 217 20% 88%;
    --ring: 217 89% 25%;
    
    /* Success & Warning */
    --success: 152 76% 28%;
    --success-foreground: 0 0% 100%;
    --warning: 45 93% 58%;
    --warning-foreground: 0 0% 15%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;
    
    /* WhatsApp Theme Colors */
    --whatsapp: 142 70% 49%;        /* WhatsApp green */
    --whatsapp-dark: 142 70% 42%;
    --whatsapp-light: 142 70% 55%;
    
    /* Special Effects */
    --gradient-primary: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-light)));
    --gradient-success: linear-gradient(135deg, hsl(var(--secondary)), hsl(var(--secondary-light)));
    --gradient-hero: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
    --gradient-card: linear-gradient(145deg, hsl(var(--surface)) 0%, hsl(var(--muted)) 100%);
    
    /* Shadows & Glows */
    --shadow-soft: 0 4px 6px -1px hsl(var(--primary) / 0.1);
    --shadow-medium: 0 10px 15px -3px hsl(var(--primary) / 0.1);
    --shadow-large: 0 25px 50px -12px hsl(var(--primary) / 0.15);
    --shadow-glow: 0 0 40px hsl(var(--primary-glow) / 0.3);
    --shadow-success: 0 8px 32px hsl(var(--secondary) / 0.2);
    
    /* Animation Variables */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    --radius: 12px;

    --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: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    --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: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --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;
  }

  body {
    @apply bg-background text-foreground font-sans antialiased;
  }
}

@layer components {
  /* Button Variants */
  .btn-hero {
    @apply bg-gradient-to-r from-primary to-secondary text-white px-8 py-4 rounded-xl font-semibold text-lg shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 active:scale-95;
  }
  
  .btn-whatsapp {
    @apply bg-whatsapp hover:bg-whatsapp-dark text-white px-6 py-3 rounded-lg font-medium transition-all duration-300 flex items-center gap-2 shadow-md hover:shadow-lg;
  }
  
  .btn-outline {
    @apply border-2 border-primary text-primary bg-transparent px-6 py-3 rounded-lg font-medium hover:bg-primary hover:text-white transition-all duration-300;
  }
  
  /* Card Variants */
  .card-feature {
    @apply bg-surface p-6 rounded-xl transition-all duration-300 border border-border/50;
    box-shadow: var(--shadow-soft);
  }
  
  .card-feature:hover {
    box-shadow: var(--shadow-medium);
  }
  
  .card-testimonial {
    @apply bg-gradient-to-br from-surface to-muted p-6 rounded-xl border border-border/30;
    box-shadow: var(--shadow-medium);
  }
  
  .card-pricing {
    @apply bg-surface p-8 rounded-2xl border-2 border-primary/20 relative overflow-hidden;
    box-shadow: var(--shadow-large);
  }
  
  /* Text Styles */
  .heading-hero {
    @apply text-4xl md:text-5xl lg:text-6xl font-bold leading-tight bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent;
  }
  
  .heading-section {
    @apply text-2xl md:text-3xl font-bold text-foreground mb-4;
  }
  
  .text-lead {
    @apply text-lg md:text-xl text-muted-foreground leading-relaxed;
  }
  
  /* Layout Components */
  .container-hero {
    @apply min-h-screen bg-gradient-to-br from-background via-muted/30 to-background flex items-center;
  }
  
  .section-padding {
    @apply py-16 md:py-24 px-4;
  }
  
  /* Animations */
  .animate-float {
    animation: float 6s ease-in-out infinite;
  }
  
  .animate-pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
  }
  
  .animate-slide-up {
    animation: slide-up 0.6s ease-out;
  }
}

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

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* WhatsApp Chat Simulation */
.whatsapp-chat {
  @apply bg-gradient-to-b from-whatsapp-light to-whatsapp max-w-sm mx-auto rounded-2xl overflow-hidden shadow-xl;
}

.chat-header {
  @apply bg-whatsapp-dark text-white p-4 flex items-center gap-3;
}

.chat-messages {
  @apply bg-gray-100 p-4 space-y-3 min-h-[300px];
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4), 0 0 40px rgba(34, 197, 94, 0.2), inset 0 0 10px rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
}

.message-sent {
  @apply bg-whatsapp text-white px-4 py-2 rounded-lg ml-auto max-w-[80%] text-sm;
}

.message-received {
  @apply bg-white text-gray-800 px-4 py-2 rounded-lg mr-auto max-w-[80%] text-sm shadow-sm;
}

.typing-indicator {
  @apply bg-white px-4 py-2 rounded-lg mr-auto flex items-center gap-1 shadow-sm;
}

.typing-dot {
  @apply w-2 h-2 bg-gray-400 rounded-full animate-bounce;
  animation-delay: 0s;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.1s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.2s;
}
