/**
 * Typography System
 * Font definitions and text styling for MichelTools.com
 */

/* Font Import - Using system fonts for performance */
@font-face {
    font-family: 'Inter';
    src: local('Inter'), local('INTER'),
         local('Segoe UI'), local('Roboto'),
         local('-apple-system'), local('BlinkMacSystemFont'),
         sans-serif;
    font-weight: normal;
    font-style: normal;
}

/* Font Stacks */
:root {
    --font-heading: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Typography Scale */
h1, .h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;      /* 40px */
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

h2, .h2 {
    font-family: var(--font-heading);
    font-size: 2rem;        /* 32px */
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

h3, .h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;      /* 24px */
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h4, .h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;     /* 20px */
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p {
    font-family: var(--font-body);
    font-size: 1rem;        /* 16px */
    font-weight: 400;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

small, .small, .text-small {
    font-family: var(--font-body);
    font-size: 0.875rem;    /* 14px */
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Text Utilities */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-mono { font-family: var(--font-mono); }
.font-serif { font-family: 'Georgia', 'Times New Roman', serif; }

/* Text 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; }

/* Letter Spacing */
.tracking-tight { letter-spacing: -0.02em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.02em; }

/* Line Heights */
.leading-tight { line-height: 1.2; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.7; }
.leading-loose { line-height: 2; }

/* Links */
a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

a:visited {
    color: var(--color-primary);
}

/* Hero Text */
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Section Headings */
.section-title {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.section-subtitle {
    text-align: center;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Code Text */
code, .code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background-color: var(--bg-light);
    border-radius: 3px;
    color: var(--color-primary-dark);
}

pre {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    padding: 0;
    background: none;
    color: inherit;
}

/* Blockquote */
blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--color-primary);
    background-color: var(--bg-light);
    font-style: italic;
    color: var(--text-secondary);
}

/* Lists */
ul, ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

ul ul, ol ol, ul ol, ol ul {
    margin: 0.5rem 0;
}

/* Custom Markers */
.list-check li::marker {
    color: var(--color-primary);
    content: "✓ ";
}

.list-arrow li::marker {
    color: var(--color-primary);
    content: "→ ";
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1, .h1 {
        font-size: 2rem;    /* 32px */
    }
    
    h2, .h2 {
        font-size: 1.75rem; /* 28px */
    }
    
    h3, .h3 {
        font-size: 1.375rem; /* 22px */
    }
    
    p {
        font-size: 1rem;    /* 16px - no change for readability */
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    h1, .h1 {
        font-size: 1.75rem; /* 28px */
    }
    
    h2, .h2 {
        font-size: 1.5rem;  /* 24px */
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, .h1 {
        font-size: 24pt;
    }
    
    h2, .h2 {
        font-size: 18pt;
    }
    
    h3, .h3 {
        font-size: 14pt;
    }
}