/*
 * MAKKOOK Decision Intelligence Platform
 * Design System v2.0 - Enterprise Grade
 * Competing with C3.ai / Palantir Foundry
 */

/* ============================================
   COLOR SYSTEM - MAKKOOK BRAND
   ============================================ */
:root {
  /* Primary Brand */
  --color-primary: #E1541D;
  --color-primary-light: #f06830;
  --color-primary-dark: #b8410f;
  --color-primary-glow: rgba(225, 84, 29, 0.15);

  /* Dark Foundation — Deepspace */
  --color-bg-primary: #212121;
  --color-bg-secondary: #2a2a2a;
  --color-bg-tertiary: #333333;
  --color-bg-elevated: #2e2e2e;
  --color-surface: #262626;
  --color-surface-hover: #303030;

  /* Text */
  --color-text-primary: #F4F4F5;
  --color-text-secondary: #A1A1AA;
  --color-text-tertiary: #71717A;
  --color-text-muted: #52525B;

  /* Semantic */
  --color-success: #22C55E;
  --color-success-dim: rgba(34, 197, 94, 0.12);
  --color-warning: #F59E0B;
  --color-warning-dim: rgba(245, 158, 11, 0.12);
  --color-error: #EF4444;
  --color-error-dim: rgba(239, 68, 68, 0.12);
  --color-info: #3B82F6;
  --color-info-dim: rgba(59, 130, 246, 0.12);

  /* Borders */
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);
  --color-border-accent: rgba(225, 84, 29, 0.4);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #E1541D 0%, #FF6B35 100%);
  --gradient-dark: linear-gradient(180deg, #141416 0%, #0D0D0F 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(225, 84, 29, 0.08) 0%, transparent 70%);
  --gradient-hero: radial-gradient(ellipse at 50% 0%, rgba(225, 84, 29, 0.12) 0%, transparent 60%);
  --gradient-vip: linear-gradient(135deg, #B45309 0%, #F59E0B 100%);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace;

  --text-2xs: 0.625rem;
  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  /* INCREASED: 15px for better readability */
  --text-lg: 1.125rem;
  /* INCREASED: 18px */
  --text-xl: 1.25rem;
  /* INCREASED: 20px */
  --text-2xl: 1.5rem;
  /* INCREASED: 24px */
  --text-3xl: 2rem;
  /* INCREASED: 32px for bold headers */
  --text-4xl: 2.5rem;
  /* INCREASED: 40px for KPIs */
  --text-5xl: 3.5rem;
  /* INCREASED: 56px for hero numbers */
  --text-6xl: 4.5rem;
  /* INCREASED: 72px for display */
  --text-display: 6rem;
  /* INCREASED: 96px for major headlines */

  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
}

/* ============================================
   SPACING
   ============================================ */
:root {
  --space-px: 1px;
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
}

/* ============================================
   RADIUS & SHADOWS
   ============================================ */
:root {
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.5);
  /* STRONGER depth */
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  /* STRONGER depth */
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.7);
  /* DRAMATIC for modals */
  --shadow-glow: 0 0 24px rgba(225, 84, 29, 0.2);
  --shadow-glow-strong: 0 0 48px rgba(225, 84, 29, 0.35);
  /* INTENSE glow */
  --shadow-card-hover: 0 8px 32px rgba(225, 84, 29, 0.15);
  /* Card hover effect */
}

/* ============================================
   TRANSITIONS
   ============================================ */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background: rgba(225, 84, 29, 0.3);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-hover);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  line-height: var(--leading-relaxed);
}


a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-primary-light);
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-1 {
  gap: var(--space-1);
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-xs {
  font-size: var(--text-xs);
}

.text-sm {
  font-size: var(--text-sm);
}

.text-base {
  font-size: var(--text-base);
}

.text-lg {
  font-size: var(--text-lg);
}

.text-primary {
  color: var(--color-text-primary);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-tertiary {
  color: var(--color-text-tertiary);
}

.text-accent {
  color: var(--color-primary);
}

.font-mono {
  font-family: var(--font-mono);
}

.font-medium {
  font-weight: var(--font-medium);
}

.font-semibold {
  font-weight: var(--font-semibold);
}


.font-bold {
  font-weight: var(--font-bold);
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.w-full {
  width: 100%;
}

.relative {
  position: relative;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}


@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(225, 84, 29, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(225, 84, 29, 0.4);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progressFill {
  from {
    width: 0;
  }
}

@keyframes breathe {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.4s var(--ease-out) both;
}

.animate-fadeInUp {
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.4s var(--ease-out) both;
}

.animate-pulse {
  animation: pulse 2s var(--ease-in-out) infinite;
}

.animate-glow {
  animation: glow 2s var(--ease-in-out) infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

.delay-400 {
  animation-delay: 400ms;
}

.delay-500 {
  animation-delay: 500ms;
}

.delay-600 {
  animation-delay: 600ms;
}

.delay-700 {
  animation-delay: 700ms;
}

.delay-800 {
  animation-delay: 800ms;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1280px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: var(--text-3xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }
}

/* ============================================
   SPACING GUIDELINES - PRODUCTION STANDARD
   ============================================

   MAIN CONTENT PADDING:
   - Standard: padding: var(--space-6) var(--space-8); (24px vertical, 32px horizontal)

   CARD/PANEL PADDING:
   - Default: padding: var(--space-5); (20px all sides)
   - Compact: padding: var(--space-4); (16px all sides)
   - Large: padding: var(--space-6); (24px all sides)

   SECTION MARGINS:
   - Between sections: margin-bottom: var(--space-8); (32px)
   - Between subsections: margin-bottom: var(--space-6); (24px)

   GRID GAPS:
   - Standard grid: gap: var(--space-6); (24px)
   - Compact grid: gap: var(--space-4); (16px)

   TEXT SPACING:
   - Between label/value: gap: var(--space-3); (12px)
   - Line height: line-height: var(--leading-relaxed); (1.65)

   BORDER RADIUS CONSISTENCY:
   - Cards: border-radius: var(--radius-xl); (12px)
   - Buttons: border-radius: var(--radius-md); (6px)
   - Inputs: border-radius: var(--radius-md); (6px)
   ============================================ */