/**
 * Global Typography Overrides
 * Modern, fancy font styling for the entire website
 */

/* Import Google Fonts - Inter (Modern & Clean) and Poppins (Fancy headings) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

/* Global Font Settings */
:root {
    /* Font Families */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-headings: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'Monaco', 'Courier New', 'Consolas', monospace;

    /* Font Sizes */
    --font-size-xs: 0.75rem;      /* 12px */
    --font-size-sm: 0.875rem;     /* 14px */
    --font-size-base: 1rem;       /* 16px */
    --font-size-md: 1.125rem;     /* 18px */
    --font-size-lg: 1.25rem;      /* 20px */
    --font-size-xl: 1.5rem;       /* 24px */
    --font-size-2xl: 1.875rem;    /* 30px */
    --font-size-3xl: 2.25rem;     /* 36px */
    --font-size-4xl: 3rem;        /* 48px */
    --font-size-5xl: 3.75rem;     /* 60px */

    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --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;
}

/* Body Text */
body {
    font-family: var(--font-primary) !important;
    font-size: var(--font-size-base) !important;
    line-height: var(--line-height-normal) !important;
    font-weight: 400 !important;
    letter-spacing: var(--letter-spacing-normal) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-headings) !important;
    font-weight: 700 !important;
    line-height: var(--line-height-tight) !important;
    letter-spacing: var(--letter-spacing-tight) !important;
    margin-bottom: 0.5em;
}

h1, .h1 {
    font-size: var(--font-size-4xl) !important;
    font-weight: 800 !important;
}

h2, .h2 {
    font-size: var(--font-size-3xl) !important;
    font-weight: 700 !important;
}

h3, .h3 {
    font-size: var(--font-size-2xl) !important;
    font-weight: 700 !important;
}

h4, .h4 {
    font-size: var(--font-size-xl) !important;
    font-weight: 600 !important;
}

h5, .h5 {
    font-size: var(--font-size-lg) !important;
    font-weight: 600 !important;
}

h6, .h6 {
    font-size: var(--font-size-base) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider) !important;
}

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

p.lead {
    font-size: var(--font-size-md) !important;
    font-weight: 400;
    line-height: var(--line-height-relaxed);
}

/* Links */
a {
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Buttons */
button, .btn, input[type="submit"], input[type="button"] {
    font-family: var(--font-primary) !important;
    font-weight: 600 !important;
    letter-spacing: var(--letter-spacing-wide) !important;
}

/* Form Elements */
input, textarea, select {
    font-family: var(--font-primary) !important;
    font-size: var(--font-size-base) !important;
}

/* Tables */
table {
    font-family: var(--font-primary) !important;
}

table th {
    font-weight: 600 !important;
    letter-spacing: var(--letter-spacing-wide) !important;
}

/* Code & Monospace */
code, kbd, pre, samp {
    font-family: var(--font-mono) !important;
    font-size: 0.9em;
}

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

/* Blockquotes */
blockquote {
    font-family: var(--font-primary);
    font-size: var(--font-size-md);
    font-style: italic;
    line-height: var(--line-height-relaxed);
}

/* Labels & Badges */
.badge, .label {
    font-family: var(--font-primary) !important;
    font-size: var(--font-size-xs) !important;
    font-weight: 600 !important;
    letter-spacing: var(--letter-spacing-wide) !important;
    text-transform: uppercase;
}

/* Navigation */
nav, .nav, .navbar {
    font-family: var(--font-primary) !important;
}

nav a, .nav a, .navbar a {
    font-weight: 500 !important;
    letter-spacing: var(--letter-spacing-normal) !important;
}

/* Cards */
.card-title {
    font-family: var(--font-headings) !important;
    font-weight: 600 !important;
}

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

/* Display Text (Large Headers) */
.display-1 {
    font-size: var(--font-size-5xl) !important;
    font-weight: 800 !important;
}

.display-2 {
    font-size: var(--font-size-4xl) !important;
    font-weight: 800 !important;
}

.display-3 {
    font-size: var(--font-size-3xl) !important;
    font-weight: 700 !important;
}

.display-4 {
    font-size: var(--font-size-2xl) !important;
    font-weight: 700 !important;
}

/* Text Utilities */
.text-xs { font-size: var(--font-size-xs) !important; }
.text-sm { font-size: var(--font-size-sm) !important; }
.text-base { font-size: var(--font-size-base) !important; }
.text-md { font-size: var(--font-size-md) !important; }
.text-lg { font-size: var(--font-size-lg) !important; }
.text-xl { font-size: var(--font-size-xl) !important; }
.text-2xl { font-size: var(--font-size-2xl) !important; }
.text-3xl { font-size: var(--font-size-3xl) !important; }
.text-4xl { font-size: var(--font-size-4xl) !important; }

/* Font Weight Utilities */
.font-light { font-weight: 300 !important; }
.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }

/* Responsive Typography */
@media (max-width: 1200px) {
    :root {
        --font-size-4xl: 2.5rem;
        --font-size-3xl: 2rem;
        --font-size-2xl: 1.75rem;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-base: 0.9375rem;  /* 15px */
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.75rem;
        --font-size-2xl: 1.5rem;
    }

    body {
        font-size: var(--font-size-base) !important;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
    }
}

/* Override Bootstrap/Theme defaults */
* {
    font-family: inherit;
}

/* Smooth Font Rendering */
* {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
