/**
 * Professional Typography System
 * FTWODEV - Global Font Styles
 */

/* Import Professional Font Stack */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Base Typography */
:root {
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Body Font */
body {
  font-family: var(--font-body);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { 
  font-weight: 700; 
  letter-spacing: -0.02em; 
  font-size: clamp(1.5rem, 4vw, 3rem);
}

h2 { 
  font-weight: 700; 
  letter-spacing: -0.015em; 
  font-size: clamp(1.25rem, 3vw, 2.5rem);
}

h3 { 
  font-weight: 600; 
  letter-spacing: -0.01em; 
  font-size: clamp(1.125rem, 2.5vw, 2rem);
}

h4 { 
  font-weight: 600; 
  letter-spacing: -0.01em; 
  font-size: clamp(1rem, 2vw, 1.5rem);
}

h5 { 
  font-weight: 600; 
  letter-spacing: -0.01em; 
  font-size: clamp(0.875rem, 1.5vw, 1.25rem);
}

h6 { 
  font-weight: 600; 
  letter-spacing: -0.01em; 
  font-size: clamp(0.75rem, 1.25vw, 1.125rem);
}

/* Utility Classes */
.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.font-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.font-body {
  font-family: var(--font-body);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Text Gradient Utility */
.text-gradient {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-primary {
  background: linear-gradient(135deg, var(--primary, #10b981) 0%, var(--primary-dark, #059669) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-secondary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Professional Text Sizes */
.text-xs-prose { font-size: 0.75rem; line-height: 1.4; }
.text-sm-prose { font-size: 0.875rem; line-height: 1.5; }
.text-base-prose { font-size: 1rem; line-height: 1.6; }
.text-lg-prose { font-size: 1.125rem; line-height: 1.6; }
.text-xl-prose { font-size: 1.25rem; line-height: 1.6; }
.text-2xl-prose { font-size: 1.5rem; line-height: 1.5; }
.text-3xl-prose { font-size: 1.875rem; line-height: 1.4; }
.text-4xl-prose { font-size: 2.25rem; line-height: 1.3; }

/* Font Weights */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

/* Letter Spacing */
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.tracing-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* Responsive Typography */
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }
  h4 { font-size: 1rem; }
  h5 { font-size: 0.875rem; }
  h6 { font-size: 0.75rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }
  h4 { font-size: 1.5rem; }
  h5 { font-size: 1.25rem; }
  h6 { font-size: 1.125rem; }
}

/* Print Styles */
@media print {
  body {
    font-family: 'Inter', serif;
    color: #000;
    background: #fff;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: #000;
    page-break-after: avoid;
  }
  
  .text-gradient {
    -webkit-text-fill-color: #000;
    color: #000;
  }
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .text-gradient {
    -webkit-text-fill-color: currentColor;
    color: currentColor;
  }
}
