/**
 * FlexIQ Design System - CSS Custom Properties
 * Version: 1.0
 * 
 * This file contains all design tokens from the FlexIQ design system.
 * Source: /docs/design-system.md
 */

:root {
  /* ===================================================================
     COLORS - PRIMARY
     =================================================================== */
  
  /* Brand Dark Green - Primary brand color */
  --color-primary: #0c2212;
  --color-primary-rgb: 12, 34, 18;
  
  /* Accent Green - Interactive elements, highlights */
  --color-accent: #5fdf81;
  --color-accent-rgb: 95, 223, 129;
  
  /* Light Green - Secondary accent, hover states */
  --color-accent-light: #b0eaa9;
  --color-accent-light-rgb: 176, 234, 169;

  /* ===================================================================
     COLORS - NEUTRALS
     =================================================================== */
  
  /* Black & Dark Grays */
  --color-black: #000000;
  --color-gray-900: #0a0a0a;
  --color-gray-850: #0f0f0f;
  --color-gray-800: #171717;
  --color-gray-750: #1e1e1e;
  --color-gray-700: #1f1f1f;
  
  /* Medium Grays */
  --color-gray-600: #283832;
  --color-gray-500: #444444;
  --color-gray-400: #525252;
  --color-gray-300: #737373;
  
  /* Light Grays */
  --color-gray-200: #d9d9d9;
  --color-gray-150: #ebebeb;
  --color-gray-100: #f0f0f0;
  --color-gray-75: #f1f1f1;
  --color-gray-50: #f5f5f5;
  --color-gray-25: #fafafa;
  
  /* White */
  --color-white: #ffffff;

  /* ===================================================================
     COLORS - ACCENT & SEMANTIC
     =================================================================== */
  
  /* Cream/Beige - Secondary backgrounds */
  --color-cream: #f1e4c4;
  --color-cream-dark: #d4b698;
  
  /* Semantic Colors */
  --color-success: #1ab682;
  --color-success-light: #5ce038;
  --color-error: #ef3c33;
  --color-error-dark: #b63d36;
  --color-warning: #f1ad2b;
  --color-info: #007aeb;
  --color-info-dark: #193ec6;
  
  /* Additional Accent Colors */
  --color-mint: #f0fff4;
  --color-pink: #efb3d9;
  --color-navy: #001e4d;
  --color-brown: #381d11;

  /* ===================================================================
     TYPOGRAPHY - FONT FAMILIES
     =================================================================== */
  
  --font-primary: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ===================================================================
     TYPOGRAPHY - FONT SIZES (Web-optimized with clamp for responsiveness)
     =================================================================== */
  
  /* Base sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  --text-7xl: 4.5rem;      /* 72px */
  --text-8xl: 6rem;        /* 96px */
  --text-9xl: 8rem;        /* 128px */
  
  /* Responsive fluid typography using clamp() */
  --text-hero: clamp(2.5rem, 5vw + 1rem, 8rem);           /* Hero/H1: 40-128px */
  --text-display: clamp(2rem, 4vw + 1rem, 6rem);          /* Display/H2: 32-96px */
  --text-h3: clamp(1.875rem, 3vw + 1rem, 4.5rem);         /* H3: 30-72px */
  --text-h4: clamp(1.5rem, 2.5vw + 0.5rem, 3rem);         /* H4: 24-48px */
  --text-h5: clamp(1.25rem, 2vw + 0.5rem, 2.25rem);       /* H5: 20-36px */
  --text-h6: clamp(1.125rem, 1.5vw + 0.5rem, 1.875rem);   /* H6: 18-30px */
  --text-body-lg: clamp(1.125rem, 1vw + 0.5rem, 1.5rem);  /* Body Large: 18-24px */
  --text-body: clamp(1rem, 0.5vw + 0.75rem, 1.25rem);     /* Body: 16-20px */
  --text-body-sm: clamp(0.875rem, 0.5vw + 0.625rem, 1rem);/* Body Small: 14-16px */

  /* ===================================================================
     TYPOGRAPHY - FONT WEIGHTS
     =================================================================== */
  
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-black: 900;

  /* ===================================================================
     TYPOGRAPHY - LINE HEIGHTS
     =================================================================== */
  
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;
  --leading-loose: 1.8;

  /* ===================================================================
     TYPOGRAPHY - LETTER SPACING
     =================================================================== */
  
  --tracking-tighter: -0.03em;  /* -3% for tight, modern look */
  --tracking-tight: -0.02em;    /* -2% */
  --tracking-normal: 0;
  --tracking-wide: 0.025em;

  /* ===================================================================
     SPACING - BASE-8 SYSTEM
     =================================================================== */
  
  --spacing-1: 0.5rem;    /* 8px */
  --spacing-2: 1rem;      /* 16px */
  --spacing-3: 1.5rem;    /* 24px */
  --spacing-4: 2rem;      /* 32px */
  --spacing-5: 2.5rem;    /* 40px */
  --spacing-6: 3rem;      /* 48px */
  --spacing-8: 4rem;      /* 64px */
  --spacing-10: 5rem;     /* 80px */
  --spacing-12: 6rem;     /* 96px */
  --spacing-16: 8rem;     /* 128px */
  --spacing-20: 10rem;    /* 160px */
  --spacing-24: 12rem;    /* 192px */
  --spacing-32: 16rem;    /* 256px */

  /* ===================================================================
     LAYOUT SPACING
     =================================================================== */
  
  /* Section spacing */
  --section-padding-y: 6rem;      /* 96px - Vertical padding for sections */
  --section-padding-x: 3rem;      /* 48px - Horizontal padding for sections */
  --section-gap: 8rem;            /* 128px - Gap between major sections */
  
  /* Component spacing */
  --component-gap: 3rem;          /* 48px - Gap between components */
  --card-padding: 2rem;           /* 32px - Internal card padding */
  --card-gap: 1.5rem;             /* 24px - Gap between cards */
  
  /* Inline spacing */
  --inline-gap-sm: 1rem;          /* 16px - Small inline gaps */
  --inline-gap-md: 1.5rem;        /* 24px - Medium inline gaps */
  --inline-gap-lg: 2rem;          /* 32px - Large inline gaps */

  /* ===================================================================
     LAYOUT - CONTAINER WIDTHS
     =================================================================== */
  
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  --container-max: 1920px;

  /* ===================================================================
     DESIGN TOKENS - BORDER RADIUS
     =================================================================== */
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 20px;
  --radius-xl: 48px;
  --radius-2xl: 80px;
  --radius-full: 9999px;       /* Fully rounded (buttons) */

  /* ===================================================================
     DESIGN TOKENS - SHADOWS
     =================================================================== */
  
  /* Elevation system */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.12);
  
  /* Specific use cases */
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-button: 0 2px 8px rgba(0, 0, 0, 0.1);

  /* ===================================================================
     DESIGN TOKENS - TRANSITIONS
     =================================================================== */
  
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Easing functions */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ===================================================================
     DESIGN TOKENS - Z-INDEX SCALE
     =================================================================== */
  
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
}

/* ===================================================================
   RESPONSIVE ADJUSTMENTS
   =================================================================== */

/* Tablet and below - adjust section spacing */
@media (max-width: 768px) {
  :root {
    --section-padding-y: 4rem;    /* 64px */
    --section-padding-x: 1.5rem;  /* 24px */
    --section-gap: 4rem;          /* 64px */
    --component-gap: 2rem;        /* 32px */
  }
}

/* Mobile - further reduce spacing */
@media (max-width: 480px) {
  :root {
    --section-padding-y: 3rem;    /* 48px */
    --section-padding-x: 1rem;    /* 16px */
    --section-gap: 3rem;          /* 48px */
    --component-gap: 1.5rem;      /* 24px */
    --card-padding: 1.5rem;       /* 24px */
  }
}

/* ===================================================================
   ACCESSIBILITY - FOCUS STATES
   =================================================================== */

/* Custom focus ring for better accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Remove default focus for mouse users while keeping it for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

/* ===================================================================
   UTILITY CLASSES FOR DESIGN TOKENS
   =================================================================== */

/* These can be used directly in HTML or extended in component styles */

.bg-primary { background-color: var(--color-primary); }
.bg-accent { background-color: var(--color-accent); }
.bg-cream { background-color: var(--color-cream); }
.bg-white { background-color: var(--color-white); }
.bg-gray-50 { background-color: var(--color-gray-50); }

.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-black { color: var(--color-black); }
.text-white { color: var(--color-white); }
.text-gray-300 { color: var(--color-gray-300); }

.font-regular { font-weight: var(--font-regular); }
.font-medium { font-weight: var(--font-medium); }
.font-bold { font-weight: var(--font-bold); }
.font-black { font-weight: var(--font-black); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-card { box-shadow: var(--shadow-card); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.transition { transition: var(--transition-base); }
