/* Import only critical Inter font weights */
@import '@fontsource/inter/400.css';
@import '@fontsource/inter/600.css';
@import '@fontsource/inter/700.css';

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

/* Definition of the design system. All colors, gradients, fonts, etc should be defined here. 
All colors MUST be HSL.
*/

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 225 15% 25%;

    --card: 0 0% 100%;
    --card-foreground: 225 15% 25%;

    --popover: 0 0% 100%;
    --popover-foreground: 225 15% 25%;

    /* Kyros Brand Colors */
    --primary: 356 95% 51%; /* #EB1A20 - Rouge Kyros */
    --primary-foreground: 0 0% 100%;
    
    --secondary: 206 100% 36%; /* #006DB8 - Bleu Toshiba */
    --secondary-foreground: 0 0% 100%;

    --muted: 220 14% 96%;
    --muted-foreground: 225 15% 45%;

    --accent: 220 14% 96%;
    --accent-foreground: 225 15% 25%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 100%;

    --border: 220 13% 91%;
    --input: 220 13% 91%;
    --ring: 356 95% 51%;

    --radius: 0.75rem;

    /* Custom Design Tokens */
    --gradient-primary: linear-gradient(135deg, hsl(356 95% 51%), hsl(356 95% 58%));
    --gradient-secondary: linear-gradient(135deg, hsl(206 100% 36%), hsl(206 100% 42%));
    --gradient-hero: linear-gradient(135deg, hsl(356 95% 51%), hsl(206 100% 36%));
    --gradient-subtle: linear-gradient(180deg, hsl(220 14% 99%), hsl(220 14% 96%));
    
    --shadow-elegant: 0 10px 30px -10px hsl(356 95% 51% / 0.2);
    --shadow-card: 0 4px 12px -2px hsl(225 15% 25% / 0.1);
    --shadow-button: 0 4px 8px -2px hsl(356 95% 51% / 0.3);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --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: 225 15% 8%;
    --foreground: 0 0% 98%;

    --card: 225 15% 10%;
    --card-foreground: 0 0% 98%;

    --popover: 225 15% 10%;
    --popover-foreground: 0 0% 98%;

    --primary: 356 95% 51%;
    --primary-foreground: 0 0% 100%;

    --secondary: 206 100% 36%;
    --secondary-foreground: 0 0% 100%;

    --muted: 225 15% 15%;
    --muted-foreground: 225 10% 65%;

    --accent: 225 15% 15%;
    --accent-foreground: 0 0% 98%;

    --destructive: 0 62.8% 50%;
    --destructive-foreground: 0 0% 98%;

    --border: 225 15% 18%;
    --input: 225 15% 18%;
    --ring: 356 95% 51%;

    --gradient-primary: linear-gradient(135deg, hsl(356 95% 51%), hsl(356 95% 58%));
    --gradient-secondary: linear-gradient(135deg, hsl(206 100% 36%), hsl(206 100% 42%));
    --gradient-hero: linear-gradient(135deg, hsl(356 95% 51%), hsl(206 100% 36%));
    --gradient-subtle: linear-gradient(180deg, hsl(225 15% 10%), hsl(225 15% 8%));
    
    --shadow-elegant: 0 10px 30px -10px hsl(356 95% 51% / 0.3);
    --shadow-card: 0 4px 12px -2px hsl(0 0% 0% / 0.3);
    --shadow-button: 0 4px 8px -2px hsl(356 95% 51% / 0.4);

    --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;
  }
}

@layer utilities {
  /* Text balance utility for better title readability */
  .text-balance {
    text-wrap: balance;
  }

  /* Animated underline for titles */
  .title-underline {
    position: relative;
  }

  .title-underline::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: underline-grow 1.2s ease-out 0.8s forwards;
  }

  @media (prefers-reduced-motion: reduce) {
    .title-underline::after {
      animation: none;
      width: 80px;
    }
  }

  @keyframes underline-grow {
    from {
      width: 0;
    }
    to {
      width: 80px;
    }
  }
}