/* Typographic scale: one fluid set of sizes for the whole site.
   Audit, measurements against SME/Dennik N/Pravda/Aktuality and the sources (Butterick, web.dev,
   WCAG 2.2, Material 3, NN/g, Smashing) are in dev/audit-typografia-2026-10-29.md.

   Rules of the scale:
   - every size is clamp(min, rem + vw, max): the rem part keeps browser zoom and the user's font
     size working (WCAG 1.4.4), the vw part grows the text with the screen, max >= 1.5 x min;
   - values at 390 px (phone) -> 1366 px (laptop): body 16 -> 19, lead 18 -> 20, card text 15 -> 17,
     card title 17 -> 22 (large card 21 -> 28), h1 27 -> 40, h2 23 -> 32, h3 20 -> 27, h4 18 -> 23;
     (29. 10.: body 16 -> 19 and lead 18 -> 20 on Simon's request)
     (2. 11.: h1 24 -> 36 and the page intro scale, see --fs-intro-*, on the client's request)
   - line heights are unitless: 1.6 for reading text, 1.45 in cards, 1.15-1.25 for headings;
   - headings h1-h4 are semibold (600, the heaviest face the site uses; 700 is declared in
     fonts.css but reserved for opt-in use); sub-headings inside article text are lighter than the text
     (#f2f2f2 on #cccccc) so the hierarchy is visible on the dark background;
   - line length is not capped (client wants the full column width); --measure stays available.
   Change a size here, not in size*.css / article-v1.css: those only reference the tokens. */
:root {
    --fs-small: 0.875rem;
    /* Body text and lead (perex) share one size since the designer's review of 30. 10. 2026
       (18 -> 20 px); the lead is told apart by weight 600, see .article__teaser. */
    --fs-body: clamp(1.125rem, 1.05rem + 0.25vw, 1.25rem);   /* 18 -> 20 px */
    --fs-lead: clamp(1.125rem, 1.05rem + 0.25vw, 1.25rem);   /* 18 -> 20 px */
    --fs-card-text: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
    --fs-card-text-lg: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    /* Card titles: fluid on phones, fixed from 768 px (designer, 30. 10. 2026: 1.2rem / 1.6rem),
       see the media query below. */
    --fs-card-title: clamp(1.0625rem, 0.95rem + 0.5vw, 1.2rem);     /* 17 -> 19.2 px; below 992 px overridden by the production sizes in size*.css */
    --fs-card-title-lg: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);     /* 20 -> 25.6 px */
    /* Page intro (SEO heading + description on the homepage, reviews and players pages):
       deliberately smaller than the cards; 18 / 20 / 24 px by breakpoint, text 16 px
       (client, 2. 11. 2026: "text hlavne pre Google"). */
    --fs-intro-title: 1.125rem;   /* 18 px, see the media queries below */
    --fs-intro-text: 1rem;        /* 16 px */
    --fs-h1: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);   /* 24 -> 36 px (was 26 -> 40, client 2. 11. 2026) */
    --fs-article-title: clamp(1.375rem, 1.05rem + 1.25vw, 2rem);   /* article, player and review detail title: 22 -> 32 px (client, 6. 11. 2026) */
    --fs-h2: clamp(1.375rem, 1.2rem + 1vw, 2rem);
    --fs-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.6875rem);
    --fs-h4: clamp(1.125rem, 1.05rem + 0.45vw, 1.5rem);

    --lh-body: 1.6;
    --lh-lead: 1.5;
    --lh-card-text: 1.45;
    --lh-card-title: 1.2;
    --lh-title: 1.25;
    --lh-h1: 1.15;

    --sp-heading-color: #f2f2f2;   /* sub-headings inside article text */
    --measure: 60ch;               /* ~75-80 characters per line; not applied anywhere by client decision (full-width text), kept for opt-in use */
}

@media screen and (min-width: 576px) {
    :root {
        --fs-intro-title: 1.25rem;    /* 20 px */
    }
}

@media screen and (min-width: 768px) {
    :root {
        --fs-card-title: 1.25rem;     /* 20 px from 992 px (client, 9. 11. 2026; was 19.2); 768-991 px is overridden in size-md.css */
        --fs-card-title-lg: 1.6rem;   /* 25.6 px */
        --fs-intro-title: 1.5rem;     /* 24 px */
    }
}

/* Headings without their own class got Bootstrap's defaults (weight 500, calc() sizes).
   Elements with explicit sizes (.card-title, .article__title, ...) keep theirs via class rules. */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: var(--lh-title);
}

h1 {
    font-size: var(--fs-h1);
    line-height: var(--lh-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
}

h4 {
    font-size: var(--fs-h4);
}

/* Sub-headings inside editor content (articles, player profiles, live reports, reviews). */
.article__content h2,
.article__content h3,
.article__content h4 {
    color: var(--sp-heading-color);
    font-weight: 600;
    margin-top: 1em;        /* designer, 30. 10. 2026 (was 1.5em) */
    margin-bottom: 0.5rem;  /* designer, 30. 10. 2026 (was 0.5em) */
}

.article__content h2:first-child,
.article__content h3:first-child,
.article__content h4:first-child {
    margin-top: 0;
}

.article__content ul,
.article__content ol {
    line-height: var(--lh-body);
}
