/**
 * TYPOGRAPHY.CSS
 * Global Typography System - Frontend
 * Tüm tipografi ayarları bu dosyada merkezi olarak yönetilir
 */

/* ============================================
   GOOGLE FONTS IMPORT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   TYPOGRAPHY CSS VARIABLES
   ============================================ */
:root {
    /* Font Families */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    
    /* Font Sizes - Desktop */
    --font-size-xs: 0.75rem;      /* 12px */
    --font-size-sm: 0.875rem;     /* 14px */
    --font-size-base: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;     /* 18px */
    --font-size-xl: 1.25rem;      /* 20px */
    --font-size-2xl: 1.5rem;      /* 24px */
    --font-size-3xl: 1.875rem;    /* 30px */
    --font-size-4xl: 2.25rem;     /* 36px */
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;
    
    /* Line Heights */
    --line-height-none: 1;
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;
    
    /* Letter Spacing */
    --letter-spacing-tighter: -0.05em;
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    --letter-spacing-widest: 0.1em;
}

/* ============================================
   RESPONSIVE FONT SIZES
   ============================================ */

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --font-size-xs: 0.6875rem;    /* 11px */
        --font-size-sm: 0.8125rem;    /* 13px */
        --font-size-base: 0.9375rem;  /* 15px */
        --font-size-lg: 1rem;         /* 16px */
        --font-size-xl: 1.125rem;     /* 18px */
        --font-size-2xl: 1.25rem;     /* 20px */
        --font-size-3xl: 1.5rem;      /* 24px */
        --font-size-4xl: 1.875rem;    /* 30px */
    }
}

/* Tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    :root {
        --font-size-xs: 0.75rem;      /* 12px */
        --font-size-sm: 0.875rem;     /* 14px */
        --font-size-base: 1rem;       /* 16px */
        --font-size-lg: 1.125rem;     /* 18px */
        --font-size-xl: 1.25rem;      /* 20px */
        --font-size-2xl: 1.5rem;      /* 24px */
        --font-size-3xl: 1.875rem;    /* 30px */
        --font-size-4xl: 2.25rem;     /* 36px */
    }
}

/* Desktop (min-width: 769px) - Default values already set above */

/* ============================================
   BASE TYPOGRAPHY
   ============================================ */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Mobile base font size adjustment */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text, #1f2937);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   HEADINGS
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text, #1f2937);
    margin-bottom: var(--space-4, 1rem);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
}

h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
}

h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
}

/* ============================================
   PARAGRAPHS & TEXT
   ============================================ */
p {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary, #6b7280);
    margin-bottom: var(--space-4, 1rem);
}

p:last-child {
    margin-bottom: 0;
}

/* ============================================
   TEXT UTILITIES
   ============================================ */
.text-xs {
    font-size: var(--font-size-xs);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-base {
    font-size: var(--font-size-base);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.text-xl {
    font-size: var(--font-size-xl);
}

.text-2xl {
    font-size: var(--font-size-2xl);
}

.text-3xl {
    font-size: var(--font-size-3xl);
}

.text-4xl {
    font-size: var(--font-size-4xl);
}

/* Font Weight Utilities */
.font-light {
    font-weight: var(--font-weight-light);
}

.font-normal {
    font-weight: var(--font-weight-normal);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

.font-extrabold {
    font-weight: var(--font-weight-extrabold);
}

.font-black {
    font-weight: var(--font-weight-black);
}

/* Line Height Utilities */
.leading-none {
    line-height: var(--line-height-none);
}

.leading-tight {
    line-height: var(--line-height-tight);
}

.leading-snug {
    line-height: var(--line-height-snug);
}

.leading-normal {
    line-height: var(--line-height-normal);
}

.leading-relaxed {
    line-height: var(--line-height-relaxed);
}

.leading-loose {
    line-height: var(--line-height-loose);
}

/* ============================================
   LEGACY COMPATIBILITY
   ============================================ */
/* Eski değişken isimleri için alias'lar */
:root {
    --font-sans: var(--font-family-base);
    --text-xs: var(--font-size-xs);
    --text-sm: var(--font-size-sm);
    --text-base: var(--font-size-base);
    --text-lg: var(--font-size-lg);
    --text-xl: var(--font-size-xl);
    --text-2xl: var(--font-size-2xl);
    --text-3xl: var(--font-size-3xl);
    --text-4xl: var(--font-size-4xl);
    --font-normal: var(--font-weight-normal);
    --font-medium: var(--font-weight-medium);
    --font-semibold: var(--font-weight-semibold);
    --font-bold: var(--font-weight-bold);
}

