@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

/* Design Philosophy: Modern Industrial Minimalism
   - Cool industrial tones (charcoal grey, teal blue, concrete grey)
   - Asymmetric grid system with diagonal section transitions
   - Rajdhani + Inter + Bebas Neue typography
   - Mechanical and precise animations
*/

:root {
  /* Primary Colors - Teal (trust and water theme) */
  --primary: oklch(0.55 0.12 180); /* #16A085 - Teal */
  --primary-foreground: oklch(0.98 0 0); /* White */
  
  /* Accent Colors - Orange-Red (emergency CTA) */
  --accent: oklch(0.58 0.20 25); /* #E74C3C - Orange-Red */
  --accent-foreground: oklch(0.98 0 0); /* White */
  
  /* Secondary Colors - Charcoal Grey */
  --secondary: oklch(0.30 0.02 240); /* #2C3E50 - Dark Charcoal */
  --secondary-foreground: oklch(0.95 0 0); /* Light Grey */
  
  /* Background Colors - Concrete Grey */
  --background: oklch(0.96 0.005 240); /* #ECF0F1 - Light Concrete */
  --foreground: oklch(0.25 0.02 240); /* #2C3E50 - Dark Text */
  
  /* Card Colors */
  --card: oklch(1 0 0); /* Pure White */
  --card-foreground: oklch(0.25 0.02 240);
  
  /* Muted Colors */
  --muted: oklch(0.92 0.005 240); /* Light Grey */
  --muted-foreground: oklch(0.45 0.02 240); /* Medium Grey */
  
  /* Border and Input */
  --border: oklch(0.85 0.005 240); /* #BDC3C7 */
  --input: oklch(0.85 0.005 240);
  --ring: oklch(0.55 0.12 180); /* Teal focus ring */
  
  /* Popover */
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.25 0.02 240);
  
  /* Destructive */
  --destructive: oklch(0.58 0.20 25);
  --destructive-foreground: oklch(0.98 0 0);
  
  /* Charts */
  --chart-1: oklch(0.55 0.12 180); /* Teal */
  --chart-2: oklch(0.45 0.12 180); /* Dark Teal */
  --chart-3: oklch(0.30 0.02 240); /* Charcoal */
  --chart-4: oklch(0.58 0.20 25); /* Orange */
  --chart-5: oklch(0.92 0.005 240); /* Light Grey */
  
  /* Sidebar */
  --sidebar: oklch(0.30 0.02 240);
  --sidebar-foreground: oklch(0.95 0 0);
  --sidebar-primary: oklch(0.55 0.12 180);
  --sidebar-primary-foreground: oklch(0.98 0 0);
  --sidebar-accent: oklch(0.35 0.02 240);
  --sidebar-accent-foreground: oklch(0.95 0 0);
  --sidebar-border: oklch(0.40 0.02 240);
  --sidebar-ring: oklch(0.55 0.12 180);
  
  /* Border Radius - Minimal rounded corners */
  --radius: 0.25rem;
}

.dark {
  --primary: oklch(0.55 0.12 180);
  --primary-foreground: oklch(0.98 0 0);
  --background: oklch(0.15 0.02 240);
  --foreground: oklch(0.95 0 0);
  --card: oklch(0.20 0.02 240);
  --card-foreground: oklch(0.95 0 0);
  --popover: oklch(0.20 0.02 240);
  --popover-foreground: oklch(0.95 0 0);
  --secondary: oklch(0.25 0.02 240);
  --secondary-foreground: oklch(0.95 0 0);
  --muted: oklch(0.25 0.02 240);
  --muted-foreground: oklch(0.65 0.02 240);
  --accent: oklch(0.58 0.20 25);
  --accent-foreground: oklch(0.98 0 0);
  --destructive: oklch(0.58 0.20 25);
  --destructive-foreground: oklch(0.98 0 0);
  --border: oklch(0.30 0.02 240);
  --input: oklch(0.30 0.02 240);
  --ring: oklch(0.55 0.12 180);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
  }
  button:not(:disabled),
  [role="button"]:not([aria-disabled="true"]),
  [type="button"]:not(:disabled),
  [type="submit"]:not(:disabled),
  [type="reset"]:not(:disabled),
  a[href],
  select:not(:disabled),
  input[type="checkbox"]:not(:disabled),
  input[type="radio"]:not(:disabled) {
    @apply cursor-pointer;
  }
  
  /* Typography System */
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    line-height: 1.2;
  }
  
  .text-accent-caps {
    font-family: 'Bebas Neue', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
}

@layer components {
  .container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .flex {
    min-height: 0;
    min-width: 0;
  }

  @media (min-width: 640px) {
    .container {
      padding-left: 1.5rem;
      padding-right: 1.5rem;
    }
  }

  @media (min-width: 1024px) {
    .container {
      padding-left: 2rem;
      padding-right: 2rem;
      max-width: 1280px;
    }
  }
  
  /* Diagonal Section Transitions */
  .diagonal-top {
    clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 100%);
    margin-top: -3rem;
    padding-top: 5rem;
  }
  
  .diagonal-bottom {
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    padding-bottom: 5rem;
    margin-bottom: -3rem;
  }
  
  .diagonal-both {
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    margin-top: -3rem;
    padding-top: 5rem;
    padding-bottom: 5rem;
    margin-bottom: -3rem;
  }
  
  /* Overlay Effects */
  .overlay-dark {
    position: relative;
  }
  
  .overlay-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.85) 0%, rgba(22, 160, 133, 0.75) 100%);
    z-index: 1;
  }
  
  .overlay-dark > * {
    position: relative;
    z-index: 2;
  }
  
  /* Technical Pattern Background */
  .technical-pattern {
    background-image: url('/images/hero-background-pattern.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  /* Mechanical Animations */
  @keyframes slideInLeft {
    from {
      opacity: 0;
      transform: translateX(-30px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes slideInRight {
    from {
      opacity: 0;
      transform: translateX(30px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes countUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .animate-slide-in-left {
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  .animate-slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  .animate-count-up {
    animation: countUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  /* Stagger Delays */
  .stagger-1 { animation-delay: 0.1s; }
  .stagger-2 { animation-delay: 0.2s; }
  .stagger-3 { animation-delay: 0.3s; }
  .stagger-4 { animation-delay: 0.4s; }
  .stagger-5 { animation-delay: 0.5s; }
  .stagger-6 { animation-delay: 0.6s; }
}
