/* ============================================
   thynkLab - Global Styles
   Foundation: Variables, Reset, Base, Utilities
   ============================================ */

/* CSS Custom Properties (Variables) */
:root {
  /* Colors - Cosmic Professional Theme */
  --color-bg-primary: #0a0a0f;
  --color-bg-secondary: #14141f;
  --color-bg-tertiary: #1a1a28;
  --color-bg-card: rgba(20, 20, 31, 0.6);
  --color-bg-card-hover: rgba(25, 25, 38, 0.8);
  
  /* Accent Colors */
  --color-accent-cyan: #00D9FF;
  --color-accent-purple: #7B61FF;
  --color-accent-pink: #FF006B;
  --color-accent-mint: #00FFA3;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #00D9FF 0%, #7B61FF 100%);
  --gradient-secondary: linear-gradient(135deg, #7B61FF 0%, #FF006B 100%);
  --gradient-accent: linear-gradient(135deg, #00FFA3 0%, #00D9FF 100%);
  --gradient-cosmic: linear-gradient(135deg, #7B61FF 0%, #00D9FF 50%, #FF006B 100%);
  
  /* Text Colors */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #A0A0B0;
  --color-text-tertiary: #707080;
  --color-text-muted: #505060;
  
  /* Border Colors */
  --color-border-primary: rgba(123, 97, 255, 0.2);
  --color-border-secondary: rgba(0, 217, 255, 0.15);
  --color-border-subtle: rgba(255, 255, 255, 0.05);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow-cyan: 0 0 30px rgba(0, 217, 255, 0.4);
  --shadow-glow-purple: 0 0 30px rgba(123, 97, 255, 0.4);
  --shadow-glow-pink: 0 0 30px rgba(255, 0, 107, 0.4);
  
  /* Spacing Scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */
  --space-5xl: 8rem;     /* 128px */
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace;
  
  /* Font 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 */
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-black: 900;
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Z-index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* Max Widths */
  --max-w-screen-sm: 640px;
  --max-w-screen-md: 768px;
  --max-w-screen-lg: 1024px;
  --max-w-screen-xl: 1280px;
  --max-w-screen-2xl: 1536px;
}

/* ============================================
   CSS Reset & Normalize
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  font-size: 16px;
}

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-color: var(--color-bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Remove default styles */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-base);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: all var(--transition-base);
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  list-style: none;
}

/* ============================================
   Base Typography
   ============================================ */

.h1 {
  font-size: clamp(var(--text-4xl), 5vw, var(--text-7xl));
  font-weight: var(--font-black);
  letter-spacing: var(--tracking-tighter);
}

.h2 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight);
}

.h3 {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
  font-weight: var(--font-bold);
}

.h4 {
  font-size: clamp(var(--text-xl), 2vw, var(--text-2xl));
  font-weight: var(--font-semibold);
}

.body-lg {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.body-sm {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.caption {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* ============================================
   Utility Classes
   ============================================ */

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Colors */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-muted { color: var(--color-text-muted); }
.text-cyan { color: var(--color-accent-cyan); }
.text-purple { color: var(--color-accent-purple); }
.text-pink { color: var(--color-accent-pink); }
.text-mint { color: var(--color-accent-mint); }

/* Gradient Text */
.text-gradient {
  background: var(--gradient-cosmic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-cyan {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Background Colors */
.bg-primary { background-color: var(--color-bg-primary); }
.bg-secondary { background-color: var(--color-bg-secondary); }
.bg-card { background-color: var(--color-bg-card); }

/* Spacing - Margin */
.m-0 { margin: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Spacing - Padding */
.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

/* Border Radius */
.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-full { border-radius: var(--radius-full); }

/* Shadows */
.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-glow-cyan { box-shadow: var(--shadow-glow-cyan); }
.shadow-glow-purple { box-shadow: var(--shadow-glow-purple); }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Width & Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-screen { width: 100vw; }
.h-screen { height: 100vh; }

/* Max Width Container */
.container {
  width: 100%;
  max-width: var(--max-w-screen-2xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container-sm { max-width: var(--max-w-screen-sm); }
.container-md { max-width: var(--max-w-screen-md); }
.container-lg { max-width: var(--max-w-screen-lg); }
.container-xl { max-width: var(--max-w-screen-xl); }

/* ============================================
   Glassmorphism Effect
   ============================================ */

.glass {
  background: rgba(20, 20, 31, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-subtle);
}

.glass-strong {
  background: rgba(20, 20, 31, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--color-border-primary);
}

/* ============================================
   Selection & Focus States
   ============================================ */

::selection {
  background-color: var(--color-accent-cyan);
  color: var(--color-bg-primary);
}

::-moz-selection {
  background-color: var(--color-accent-cyan);
  color: var(--color-bg-primary);
}

/* ============================================
   Scrollbar Styling
   ============================================ */

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-accent-purple), var(--color-accent-cyan));
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--color-accent-cyan), var(--color-accent-purple));
}

/* ============================================
   Responsive Design Utilities
   ============================================ */

/* Mobile First - Default styles above are for mobile */

/* Tablet and up (768px) */
@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:hidden { display: none; }
  .md\:flex { display: flex; }
  .md\:flex-row { flex-direction: row; }
  .md\:text-left { text-align: left; }
}

/* Desktop and up (1024px) */
@media (min-width: 1024px) {
  .lg\:block { display: block; }
  .lg\:hidden { display: none; }
  .lg\:flex { display: flex; }
}

/* Large Desktop (1280px) */
@media (min-width: 1280px) {
  .xl\:block { display: block; }
  .xl\:hidden { display: none; }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  body {
    background: white;
    color: black;
  }
  
  .no-print {
    display: none !important;
  }
}