/*
Type system tokens for every web page (docs/web-typography-forms-plan.md).
Loaded through templates/components/font_links.html, before any other stylesheet.

Rules:
- Two families: Inter for body/UI, Inter Tight for headings and big numbers.
- Four weights only: 400, 500, 600, 700 (the only ones the font request loads).
- Sizes, line heights and tracking come from the tokens below. Never write a
  one-off font-size, font-weight or font-family in a component rule.
*/

:root {
    /* Families */
    --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Inter Tight", Inter, ui-sans-serif, system-ui, sans-serif;

    /* Weights */
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    /* App scale: trainer, client, auth, settings */
    --type-h1-size: 28px;
    --type-h1-weight: var(--weight-bold);
    --type-h1-lh: 1.2;
    --type-h1-ls: -0.01em;

    --type-h2-size: 20px;
    --type-h2-weight: var(--weight-bold);
    --type-h2-lh: 1.3;
    --type-h2-ls: -0.01em;

    --type-h3-size: 16px;
    --type-h3-weight: var(--weight-semibold);
    --type-h3-lh: 1.35;
    --type-h3-ls: 0;

    --type-h4-size: 14px;
    --type-h4-weight: var(--weight-semibold);
    --type-h4-lh: 1.4;
    --type-h4-ls: 0;

    --type-stat-size: 28px;
    --type-stat-weight: var(--weight-bold);
    --type-stat-lh: 1.1;
    --type-stat-ls: -0.01em;

    --type-body-size: 14px;
    --type-body-weight: var(--weight-regular);
    --type-body-lh: 1.5;

    --type-small-size: 13px;
    --type-small-weight: var(--weight-regular);
    --type-small-lh: 1.45;

    --type-caption-size: 12px;
    --type-caption-weight: var(--weight-medium);
    --type-caption-lh: 1.35;

    /* Public scale: landing and marketing pages only */
    --pub-display-size: clamp(40px, 6.6vw, 88px);
    --pub-title-size: clamp(38px, 6vw, 72px);
    --pub-doc-title-size: clamp(32px, 4.4vw, 48px);
    --pub-h2-size: clamp(30px, 3.4vw, 44px);
    --pub-h3-size: 22px;
    --pub-h4-size: 18px;
}

@media (max-width: 767px) {
    :root {
        --type-h1-size: 24px;
        --type-h2-size: 18px;
        --type-stat-size: 24px;
    }
}
