/**
 * ============================================================================
 * GEC Frontend Framework
 * ============================================================================
 *
 * File        : typography.css
 * Layer       : 01-base
 * Status      : Production
 *
 * Description:
 * Document typography defaults and the GEC typography API.
 *
 * Dependencies:
 * - 00-settings/variables.css
 * - 00-settings/typography.css
 * - 00-settings/animations.css
 *
 * ============================================================================
 */


/* ==========================================================================
   01. Document Typography
   ========================================================================== */

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ==========================================================================
   02. Headings
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    color: inherit;
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

h1 {
    font-size: var(--font-size-5xl);
}

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

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

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

em {
    color: var(--color-primary-500);
    font-family: inherit;
    font-style: normal;
    font-weight: inherit;
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}


/* ==========================================================================
   03. Paragraphs
   ========================================================================== */

p {
    margin: 0;
    color: inherit;
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}


/* ==========================================================================
   04. Links
   ========================================================================== */

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

/* Links only: a button made from a link (a.gec-btn) keeps its own label colour on hover. Without
   :not(.gec-btn) this rule (0,1,1) outranks .gec-btn-primary (0,1,0), and every link button turned
   red text on dark red when hovered. */
a:not(.gec-btn):hover {
    color: var(--color-primary-500);
}

a:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}


/* ==========================================================================
   05. Typography API
   ========================================================================== */

.gec-h1,
.gec-h2,
.gec-h3,
.gec-h4,
.gec-h5,
.gec-h6 {
    font-family: var(--font-family-heading);
    line-height: var(--line-height-tight);
}

.gec-h1 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-bold);
}

.gec-h2 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
}

.gec-h3 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
}

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

.gec-h5 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
}

.gec-h6 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
}

.gec-body-lg {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
}

.gec-body {
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
}

.gec-body-sm {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

.gec-caption {
    font-size: var(--font-size-xs);
    line-height: var(--line-height-normal);
}


/* ==========================================================================
   06. Responsive Typography
   ========================================================================== */

@media (max-width: 768px) {
    h1,
    .gec-h1 {
        font-size: var(--font-size-h1-mobile);
    }

    h2,
    .gec-h2 {
        font-size: var(--font-size-h2-mobile);
    }

    h3,
    .gec-h3 {
        font-size: var(--font-size-h3-mobile);
    }
}


/* ==========================================================================
   End of File
   ========================================================================== */