/* ============================================================
   Bioworx — Base Styles
   Design System: Data-Dense Dashboard (UI/UX Pro Max)
   Palette: Primary #1E40AF | Secondary #3B82F6 | CTA #F59E0B
   Typography: Fira Sans (UI) + Fira Code (Data)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors */
  --color-primary: #1E40AF;
  --color-primary-light: #3B82F6;
  --color-primary-dark: #1E3A8A;
  --color-cta: #F59E0B;
  --color-cta-hover: #D97706;
  --color-bg: #F8FAFC;
  --color-bg-alt: #F1F5F9;
  --color-card: #FFFFFF;
  --color-text: #1E3A8A;
  --color-text-secondary: #64748B;
  --color-text-muted: #94A3B8;
  --color-border: #E2E8F0;
  --color-border-light: #F1F5F9;
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-info: #3B82F6;

  /* Typography */
  --font-sans: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', monospace;

  /* Spacing */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 1040px;
  --max-width-wide: 1200px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(30, 64, 175, 0.05);
  --shadow: 0 1px 3px rgba(30, 64, 175, 0.08), 0 1px 2px rgba(30, 64, 175, 0.06);
  --shadow-md: 0 4px 6px rgba(30, 64, 175, 0.07), 0 2px 4px rgba(30, 64, 175, 0.06);
  --shadow-lg: 0 10px 15px rgba(30, 64, 175, 0.08), 0 4px 6px rgba(30, 64, 175, 0.05);
  --shadow-xl: 0 20px 25px rgba(30, 64, 175, 0.1), 0 10px 10px rgba(30, 64, 175, 0.04);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary-dark);
}

h1 { font-size: 2.25rem; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.65rem; margin: 2rem 0 0.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; margin: 1.25rem 0 0.5rem; }
h4 { font-size: 1.1rem; margin: 1rem 0 0.5rem; }

p { margin-bottom: 1rem; color: var(--color-text); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary); text-decoration: underline; }

/* Lists */
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; line-height: 1.6; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
th, td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
th {
  font-weight: 600;
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(59, 130, 246, 0.03); }

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Selection */
::selection {
  background: rgba(59, 130, 246, 0.2);
  color: var(--color-primary-dark);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
