@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

:root {
    /* Font Families */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-headings: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */

    /* Fluid Typography (UX Guidelines R2) */
    --text-hero: clamp(2rem, 1.5rem + 2vw, 3.5rem);
    /* 32px → 56px */
    --text-section: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
    /* 28px → 36px */
    --text-card-title: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
    /* 18px → 24px */

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
}

/* Base Typography Styles */
body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--neutral-700);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headings);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--neutral-800);
    margin-bottom: 0.5em;
}

h1 {
    font-size: var(--text-3xl);
}

h2 {
    font-size: var(--text-2xl);
}

h3 {
    font-size: var(--text-xl);
}

h4 {
    font-size: var(--text-lg);
}

h5 {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
}

h6 {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

p {
    margin-bottom: 1rem;
}

.text-sm {
    font-size: var(--text-sm);
}

.text-lg {
    font-size: var(--text-lg);
}

.text-muted {
    color: var(--neutral-500);
}

.font-medium {
    font-weight: var(--font-medium);
}

.font-semibold {
    font-weight: var(--font-semibold);
}

.font-bold {
    font-weight: var(--font-bold);
}

/* Mobile Typography Improvements (UX Guidelines R2 - Revised)
   Increase base font size and line-height for better readability on small screens.
   Only affects mobile (<768px), desktop remains unchanged. */
@media (max-width: 767.98px) {
    html {
        font-size: 18px;
        /* Increased from 16px for better mobile readability */
    }

    body {
        line-height: 1.6;
        /* Slightly increased from 1.5 for more breathing room */
    }

    /* Ensure paragraphs in lesson content have adequate spacing */
    p {
        margin-bottom: 1.25rem;
    }
}