/* Flxbl.io Design System - CSS Variables and Core Styles */

:root {
  /* Primary Gray Scale (12 steps) */
  --primary-1: #fcfcfc;
  --primary-2: #f9f9f9;
  --primary-3: #f6f6f6;
  --primary-4: #f0f0f0;
  --primary-5: #e8e8e8;
  --primary-6: #d9d9d9;
  --primary-7: #bababa;
  --primary-8: #8d8d8d;
  --primary-9: #7e7e7e;
  --primary-10: #646464;
  --primary-11: #4a4a4a;
  --primary-12: #202020;

  /* Accent Pink Scale (12 steps) */
  --accent-1: #fffcfd;
  --accent-2: #fff7f9;
  --accent-3: #feeef2;
  --accent-4: #fde5eb;
  --accent-5: #fbd8e0;
  --accent-6: #f9cdd7;
  --accent-7: #f3a9bb;
  --accent-8: #ec7694;
  --accent-9: #e54666;
  --accent-10: #dc3958;
  --accent-11: #ca2344;
  --accent-12: #a51d35;

  /* Secondary Brown Scale (12 steps) */
  --secondary-1: #fdfcfb;
  --secondary-2: #faf8f7;
  --secondary-3: #f5f3f1;
  --secondary-4: #f0edea;
  --secondary-5: #e9e5e1;
  --secondary-6: #e0dbd5;
  --secondary-7: #cac1b8;
  --secondary-8: #aa9d91;
  --secondary-9: #8f8074;
  --secondary-10: #7d6e5e;
  --secondary-11: #5f5249;
  --secondary-12: #3e362e;

  /* Jade Green Scale (12 steps) */
  --jade-1: #fbfefc;
  --jade-2: #f4fbf6;
  --jade-3: #e9f6ec;
  --jade-4: #ddf1e1;
  --jade-5: #cde9d3;
  --jade-6: #b5dfc0;
  --jade-7: #90cd9f;
  --jade-8: #5bb271;
  --jade-9: #2f9f4f;
  --jade-10: #278e43;
  --jade-11: #1a7432;
  --jade-12: #14532d;

  /* Typography */
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Spacing */
  --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;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* Font Face */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter.var.woff2') format('woff2');
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Styles */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--primary-12);
  background-color: var(--primary-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary-12);
}

h1 { font-size: 3.75rem; }
h2 { font-size: 3rem; }
h3 { font-size: 2.25rem; }
h4 { font-size: 1.875rem; }
h5 { font-size: 1.5rem; }
h6 { font-size: 1.25rem; }

@media (max-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.875rem; }
  h4 { font-size: 1.5rem; }
  h5 { font-size: 1.25rem; }
  h6 { font-size: 1.125rem; }
}

.text-sm { font-size: 0.875rem; line-height: 1.5; }
.text-base { font-size: 1rem; line-height: 1.6; }
.text-lg { font-size: 1.125rem; line-height: 1.75; }
.text-xl { font-size: 1.25rem; line-height: 1.75; }
.text-2xl { font-size: 1.5rem; line-height: 2; }

.text-primary { color: var(--primary-12); }
.text-secondary { color: var(--primary-11); }
.text-muted { color: var(--primary-10); }
.text-accent { color: var(--accent-9); }

/* Layout Components */
.container {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-16) 0;
}

@media (min-width: 640px) {
  .section {
    padding: var(--space-24) 0;
  }
}

/* Card Component */
.card {
  background: var(--primary-2);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid rgba(217, 217, 217, 0.5);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--primary-6);
  box-shadow: var(--shadow-lg);
}

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--accent-9);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-10);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--primary-3);
  color: var(--primary-12);
  border: 1px solid var(--primary-6);
}

.btn-secondary:hover {
  background: var(--primary-4);
  border-color: var(--primary-7);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-11);
}

.btn-ghost:hover {
  background: var(--primary-2);
  color: var(--primary-12);
}

/* Disabled button states */
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--gray-5);
  color: var(--gray-9);
  border-color: var(--gray-5);
}

.btn:disabled:hover,
.btn[disabled]:hover {
  transform: none;
  box-shadow: none;
}

.btn-primary:disabled,
.btn-primary[disabled] {
  background: var(--gray-5);
  color: var(--gray-9);
}

.btn-secondary:disabled,
.btn-secondary[disabled] {
  background: var(--gray-3);
  color: var(--gray-9);
  border-color: var(--gray-5);
}

.btn-ghost:disabled,
.btn-ghost[disabled] {
  background: transparent;
  color: var(--gray-7);
}

/* Form Elements */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: white;
  border: 2px solid var(--primary-6);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast);
  color: var(--primary-12);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-9);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  color: var(--primary-12);
}

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

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

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

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

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

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

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease-out;
}

.animate-slideUp {
  animation: slideUp 0.5s ease-out;
}

/* SFP Icon Gradient */
.sfp-gradient {
  fill: url(#sfp-gradient);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  letter-spacing: 0.025em;
}

.badge-success {
  background: rgba(46, 160, 67, 0.1);
  color: rgb(21, 128, 61);
}

.badge-warning {
  background: rgba(250, 204, 21, 0.1);
  color: rgb(161, 98, 7);
}

.badge-error {
  background: rgba(239, 68, 68, 0.1);
  color: rgb(185, 28, 28);
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: rgb(29, 78, 216);
}