/* 
TACHYON CORE STYLING SYSTEM
Professional-grade CSS framework for TachyonBuilt platform
Mobile-first, responsive, quantum-inspired design system
*/

/* CSS Variables - Tachyon Color Palette */
:root {
  /* Primary Tachyon Colors */
  --tachyon-primary: #1e3a8a;
  --tachyon-primary-light: #3b82f6;
  --tachyon-primary-dark: #1e40af;
  
  /* Quantum Gradient System */
  --tachyon-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --tachyon-gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --tachyon-gradient-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --tachyon-gradient-quantum: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
  
  /* Neutral Colors */
  --tachyon-white: #ffffff;
  --tachyon-gray-50: #f9fafb;
  --tachyon-gray-100: #f3f4f6;
  --tachyon-gray-200: #e5e7eb;
  --tachyon-gray-300: #d1d5db;
  --tachyon-gray-400: #9ca3af;
  --tachyon-gray-500: #6b7280;
  --tachyon-gray-600: #4b5563;
  --tachyon-gray-700: #374151;
  --tachyon-gray-800: #1f2937;
  --tachyon-gray-900: #111827;
  
  /* Status Colors */
  --tachyon-success: #10b981;
  --tachyon-warning: #f59e0b;
  --tachyon-error: #ef4444;
  --tachyon-info: #3b82f6;
  
  /* Typography */
  --tachyon-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --tachyon-font-heading: 'Poppins', var(--tachyon-font-primary);
  
  /* Spacing Scale */
  --tachyon-space-xs: 0.25rem;
  --tachyon-space-sm: 0.5rem;
  --tachyon-space-md: 1rem;
  --tachyon-space-lg: 1.5rem;
  --tachyon-space-xl: 2rem;
  --tachyon-space-2xl: 3rem;
  --tachyon-space-3xl: 4rem;
  
  /* Border Radius */
  --tachyon-radius-sm: 0.25rem;
  --tachyon-radius-md: 0.5rem;
  --tachyon-radius-lg: 0.75rem;
  --tachyon-radius-xl: 1rem;
  --tachyon-radius-full: 9999px;
  
  /* Shadows */
  --tachyon-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --tachyon-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --tachyon-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --tachyon-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --tachyon-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Z-Index Scale */
  --tachyon-z-dropdown: 1000;
  --tachyon-z-sticky: 1020;
  --tachyon-z-fixed: 1030;
  --tachyon-z-modal-backdrop: 1040;
  --tachyon-z-modal: 1050;
  --tachyon-z-popover: 1060;
  --tachyon-z-tooltip: 1070;
  --tachyon-z-toast: 1080;
}

/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--tachyon-font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tachyon-gray-800);
  background-color: var(--tachyon-gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography System */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--tachyon-font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--tachyon-space-md);
  color: var(--tachyon-gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: var(--tachyon-space-md);
  color: var(--tachyon-gray-700);
}

/* Layout System */
.tachyon-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--tachyon-space-md);
}

.tachyon-container-fluid {
  width: 100%;
  padding: 0 var(--tachyon-space-md);
}

/* Grid System */
.tachyon-grid {
  display: grid;
  gap: var(--tachyon-space-md);
}

.tachyon-grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.tachyon-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tachyon-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tachyon-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.tachyon-grid-cols-12 { grid-template-columns: repeat(12, 1fr); }

/* Flexbox Utilities */
.tachyon-flex {
  display: flex;
}

.tachyon-flex-col {
  flex-direction: column;
}

.tachyon-flex-wrap {
  flex-wrap: wrap;
}

.tachyon-items-center {
  align-items: center;
}

.tachyon-items-start {
  align-items: flex-start;
}

.tachyon-items-end {
  align-items: flex-end;
}

.tachyon-justify-center {
  justify-content: center;
}

.tachyon-justify-between {
  justify-content: space-between;
}

.tachyon-justify-start {
  justify-content: flex-start;
}

.tachyon-justify-end {
  justify-content: flex-end;
}

/* Spacing Utilities */
.tachyon-m-auto { margin: auto; }
.tachyon-mx-auto { margin-left: auto; margin-right: auto; }
.tachyon-my-auto { margin-top: auto; margin-bottom: auto; }

.tachyon-p-xs { padding: var(--tachyon-space-xs); }
.tachyon-p-sm { padding: var(--tachyon-space-sm); }
.tachyon-p-md { padding: var(--tachyon-space-md); }
.tachyon-p-lg { padding: var(--tachyon-space-lg); }
.tachyon-p-xl { padding: var(--tachyon-space-xl); }

.tachyon-px-xs { padding-left: var(--tachyon-space-xs); padding-right: var(--tachyon-space-xs); }
.tachyon-px-sm { padding-left: var(--tachyon-space-sm); padding-right: var(--tachyon-space-sm); }
.tachyon-px-md { padding-left: var(--tachyon-space-md); padding-right: var(--tachyon-space-md); }
.tachyon-px-lg { padding-left: var(--tachyon-space-lg); padding-right: var(--tachyon-space-lg); }
.tachyon-px-xl { padding-left: var(--tachyon-space-xl); padding-right: var(--tachyon-space-xl); }

.tachyon-py-xs { padding-top: var(--tachyon-space-xs); padding-bottom: var(--tachyon-space-xs); }
.tachyon-py-sm { padding-top: var(--tachyon-space-sm); padding-bottom: var(--tachyon-space-sm); }
.tachyon-py-md { padding-top: var(--tachyon-space-md); padding-bottom: var(--tachyon-space-md); }
.tachyon-py-lg { padding-top: var(--tachyon-space-lg); padding-bottom: var(--tachyon-space-lg); }
.tachyon-py-xl { padding-top: var(--tachyon-space-xl); padding-bottom: var(--tachyon-space-xl); }

.tachyon-m-xs { margin: var(--tachyon-space-xs); }
.tachyon-m-sm { margin: var(--tachyon-space-sm); }
.tachyon-m-md { margin: var(--tachyon-space-md); }
.tachyon-m-lg { margin: var(--tachyon-space-lg); }
.tachyon-m-xl { margin: var(--tachyon-space-xl); }

/* Text Utilities */
.tachyon-text-center { text-align: center; }
.tachyon-text-left { text-align: left; }
.tachyon-text-right { text-align: right; }

.tachyon-text-xs { font-size: 0.75rem; }
.tachyon-text-sm { font-size: 0.875rem; }
.tachyon-text-base { font-size: 1rem; }
.tachyon-text-lg { font-size: 1.125rem; }
.tachyon-text-xl { font-size: 1.25rem; }
.tachyon-text-2xl { font-size: 1.5rem; }

.tachyon-font-light { font-weight: 300; }
.tachyon-font-normal { font-weight: 400; }
.tachyon-font-medium { font-weight: 500; }
.tachyon-font-semibold { font-weight: 600; }
.tachyon-font-bold { font-weight: 700; }

/* Color Utilities */
.tachyon-text-primary { color: var(--tachyon-primary); }
.tachyon-text-white { color: var(--tachyon-white); }
.tachyon-text-gray-500 { color: var(--tachyon-gray-500); }
.tachyon-text-gray-700 { color: var(--tachyon-gray-700); }
.tachyon-text-gray-900 { color: var(--tachyon-gray-900); }

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

/* Border Utilities */
.tachyon-border { border: 1px solid var(--tachyon-gray-200); }
.tachyon-border-gray-200 { border-color: var(--tachyon-gray-200); }
.tachyon-border-gray-300 { border-color: var(--tachyon-gray-300); }

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

/* Shadow Utilities */
.tachyon-shadow-sm { box-shadow: var(--tachyon-shadow-sm); }
.tachyon-shadow-md { box-shadow: var(--tachyon-shadow-md); }
.tachyon-shadow-lg { box-shadow: var(--tachyon-shadow-lg); }
.tachyon-shadow-xl { box-shadow: var(--tachyon-shadow-xl); }
.tachyon-shadow-2xl { box-shadow: var(--tachyon-shadow-2xl); }

/* Width and Height Utilities */
.tachyon-w-full { width: 100%; }
.tachyon-w-auto { width: auto; }
.tachyon-h-full { height: 100%; }
.tachyon-h-screen { height: 100vh; }
.tachyon-min-h-screen { min-height: 100vh; }

/* Display Utilities */
.tachyon-block { display: block; }
.tachyon-inline-block { display: inline-block; }
.tachyon-hidden { display: none; }

/* Position Utilities */
.tachyon-relative { position: relative; }
.tachyon-absolute { position: absolute; }
.tachyon-fixed { position: fixed; }
.tachyon-sticky { position: sticky; }

/* Overflow Utilities */
.tachyon-overflow-hidden { overflow: hidden; }
.tachyon-overflow-auto { overflow: auto; }
.tachyon-overflow-x-auto { overflow-x: auto; }
.tachyon-overflow-y-auto { overflow-y: auto; }

/* Responsive Design - Mobile First */
@media (min-width: 640px) {
  .sm\:tachyon-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\:tachyon-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .sm\:tachyon-hidden { display: none; }
  .sm\:tachyon-block { display: block; }
}

@media (min-width: 768px) {
  .md\:tachyon-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:tachyon-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:tachyon-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .md\:tachyon-flex-row { flex-direction: row; }
  .md\:tachyon-hidden { display: none; }
  .md\:tachyon-block { display: block; }
}

@media (min-width: 1024px) {
  .lg\:tachyon-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:tachyon-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:tachyon-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
  .lg\:tachyon-hidden { display: none; }
  .lg\:tachyon-block { display: block; }
}

@media (min-width: 1280px) {
  .xl\:tachyon-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .xl\:tachyon-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
  .xl\:tachyon-grid-cols-12 { grid-template-columns: repeat(12, 1fr); }
}

/* Focus States for Accessibility */
.tachyon-focus-ring:focus {
  outline: 2px solid var(--tachyon-primary);
  outline-offset: 2px;
}

/* Smooth Transitions */
.tachyon-transition {
  transition: all 0.2s ease-in-out;
}

.tachyon-transition-colors {
  transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* Accessibility Features */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  .tachyon-print-hidden {
    display: none !important;
  }
}