/**
 * Typography System
 *
 * Modern web fonts and type scale for Imagile application.
 * Uses Inter for body text and Space Grotesk for headings.
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* Font Families */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;

    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Type Scale - Responsive with clamp() */
    --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: clamp(1.5rem, 2vw + 1rem, 1.875rem);    /* 24-30px */
    --font-size-3xl: clamp(1.875rem, 3vw + 1rem, 2.25rem);   /* 30-36px */
    --font-size-4xl: clamp(2.25rem, 4vw + 1rem, 3rem);       /* 36-48px */
    --font-size-5xl: clamp(3rem, 5vw + 1rem, 3.75rem);       /* 48-60px */

    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;

    /* Letter Spacing */
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;

    /* Override Kendo Typography Variables */
    --kendo-font-family: var(--font-sans);
    --kendo-font-size: var(--font-size-base);
    --kendo-font-size-xs: var(--font-size-xs);
    --kendo-font-size-sm: var(--font-size-sm);
    --kendo-font-size-md: var(--font-size-base);
    --kendo-font-size-lg: var(--font-size-lg);
    --kendo-font-size-xl: var(--font-size-xl);
    --kendo-line-height: var(--line-height-normal);
    --kendo-line-height-sm: var(--line-height-snug);
    --kendo-line-height-md: var(--line-height-normal);
    --kendo-line-height-lg: var(--line-height-relaxed);
}

/* Base Typography */
body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-top: 0;
}

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

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

h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
}

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

h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

/* Paragraphs */
p {
    margin-bottom: 1em;
    line-height: var(--line-height-relaxed);
}

/* Small Text */
small {
    font-size: var(--font-size-sm);
}

/* Strong & Bold */
strong, b {
    font-weight: var(--font-weight-semibold);
}

/* Code */
code, pre {
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
}

/* Links */
a {
    text-decoration: none;
    color: var(--brand-primary-main);
    transition: color 200ms ease;
}

a:hover {
    color: var(--brand-primary-dark);
    text-decoration: underline;
}

/* Utility Classes */
.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); }
.text-5xl { font-size: var(--font-size-5xl); }

.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); }

.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); }

.tracking-tight { letter-spacing: var(--letter-spacing-tight); }
.tracking-normal { letter-spacing: var(--letter-spacing-normal); }
.tracking-wide { letter-spacing: var(--letter-spacing-wide); }
.tracking-wider { letter-spacing: var(--letter-spacing-wider); }
