/* Each face comes in two files. The range tells the browser which letters a file holds, so the second one
   (letters such as š, ř, ł) is fetched only by a page that shows one of them. */
@font-face {
    font-family: "Barlow";
    src: url("../fonts/barlow-latin-300-normal.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                   U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Barlow";
    src: url("../fonts/barlow-latin-ext-300-normal.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                   U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                   U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Barlow";
    src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                   U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Barlow";
    src: url("../fonts/barlow-latin-ext-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                   U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                   U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Barlow";
    src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                   U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Barlow";
    src: url("../fonts/barlow-latin-ext-500-normal.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                   U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                   U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Barlow";
    src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                   U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Barlow";
    src: url("../fonts/barlow-latin-ext-600-normal.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                   U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                   U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Barlow";
    src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                   U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Barlow";
    src: url("../fonts/barlow-latin-ext-700-normal.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                   U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                   U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "EB Garamond";
    src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                   U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "EB Garamond";
    src: url("../fonts/eb-garamond-latin-ext-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                   U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                   U+2C60-2C7F, U+A720-A7FF;
}

/* The one place for literal colours, sizes and families; every other rule, in every stylesheet, uses a token.
   Prefixes tell what a colour is for, and a test reads them: --color-text-* must reach 4.5:1 on both light surfaces,
   --color-ondark-* on the dark one, --color-decor-* never carries text. */
:root {
    color-scheme: light;

    /* Surfaces: white is the Figma style "White". */
    --color-surface-white: #ffffff;
    --color-surface-light: #f5f5f5;
    --color-surface-dark: #303d4e;

    /* Text on the light surfaces. */
    --color-text-body: #1c293c;
    --color-text-strong: #303d4e;
    --color-text-heading: #043950;
    --color-text-muted: #696f7d;
    --color-text-link: #0675a1;
    --color-text-gold: #7a6330;

    /* Text on the dark surface. */
    --color-ondark-text: #ffffff;
    --color-ondark-link: #ffffff;

    /* The gold of the design is never text. As lines, icons or areas, each reaches 3:1 only where said:
       gold on dark, gold-mid on white and dark, gold-dark on white and light grey. */
    --color-decor-gold: #b2a481;
    --color-decor-gold-mid: #9f9170;
    --color-decor-gold-dark: #8b7235;

    /* A ring with a halo: on a light surface the ring stands out, on the dark one the halo does. */
    --color-focus-ring: #1c293c;
    --color-focus-halo: #ffffff;
    --focus-width: 3px;
    --focus-offset: 2px;

    --underline-thin: 1px;
    --underline-thick: 3px;
    --underline-offset: 0.18em;

    --font-barlow: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-garamond: "EB Garamond", Garamond, Georgia, serif;

    /* Figma text styles H1 to H12 (and the Bold of those that have one) and P1 to P4: weight, size from the
       narrowest to the widest screen as clamp(), line height, family. The size grows linearly from 320 to 1440 px. */
    --type-h1: 400 clamp(2.5rem, 1.9643rem + 2.6786vw, 4.375rem) / 1.3 var(--font-garamond);
    --type-h2: 400 clamp(2.25rem, 1.8929rem + 1.7857vw, 3.5rem) / 1.2 var(--font-garamond);
    --type-h3: 400 clamp(2rem, 1.75rem + 1.25vw, 2.875rem) / 1.5 var(--font-barlow);
    --type-h3-bold: 500 clamp(2rem, 1.75rem + 1.25vw, 2.875rem) / 1.5 var(--font-barlow);
    --type-h4: 400 clamp(1.875rem, 1.6964rem + 0.8929vw, 2.5rem) / 1.5 var(--font-barlow);
    --type-h4-bold: 500 clamp(1.875rem, 1.6964rem + 0.8929vw, 2.5rem) / 1.5 var(--font-barlow);
    --type-h5: 400 clamp(1.875rem, 1.6964rem + 0.8929vw, 2.5rem) / 1.5 var(--font-garamond);
    --type-h6: 400 clamp(1.5rem, 1.3929rem + 0.5357vw, 1.875rem) / 1.5 var(--font-barlow);
    --type-h6-bold: 600 clamp(1.5rem, 1.3929rem + 0.5357vw, 1.875rem) / 1.5 var(--font-barlow);
    --type-h7: 400 1.875rem / 1.2 var(--font-garamond);
    --type-h8: 400 1.625rem / 1.5 var(--font-barlow);
    --type-h8-bold: 600 1.625rem / 1.5 var(--font-barlow);
    --type-h9: 400 1.5rem / 1.5 var(--font-barlow);
    --type-h9-bold: 600 1.5rem / 1.5 var(--font-barlow);
    --type-h10: 400 1.25rem / 1.5 var(--font-barlow);
    --type-h10-bold: 600 1.25rem / 1.5 var(--font-barlow);
    --type-h11: 400 1.125rem / 1.5 var(--font-barlow);
    --type-h11-bold: 600 1.125rem / 1.5 var(--font-barlow);
    --type-h12: 400 1rem / 1.5 var(--font-barlow);
    --type-h12-bold: 600 1rem / 1.5 var(--font-barlow);
    --type-p1: 400 clamp(1.25rem, 1.0714rem + 0.8929vw, 1.875rem) / 1.5 var(--font-barlow);
    --type-p2: 400 clamp(1.375rem, 1.3036rem + 0.3571vw, 1.625rem) / 1.5 var(--font-barlow);
    --type-p3: 400 1.25rem / 1.5 var(--font-barlow);
    --type-p4: 400 1.125rem / 1.5 var(--font-barlow);
    --type-small: 400 0.875rem / 1.5 var(--font-barlow);

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;

    --width-content: 75rem;
    --width-measure: 75ch;
    --gutter: clamp(var(--space-4), 4vw, var(--space-8));

    /* Set to the height of a sticky header, so that a skip link or an anchor does not land behind it. */
    --scroll-margin-top: 0;

    /* Media queries cannot read these. They are written as (min-width: Nem), 1em = 16px, with the values of
       Breakpoints.cs, and a test keeps both lists and every query in line. */
    --breakpoint-narrow: 320px;
    --breakpoint-mobile: 430px;
    --breakpoint-tablet: 768px;
    --breakpoint-laptop: 1024px;
    --breakpoint-desktop: 1440px;
}

/* The element rules down to .container are the defaults of the document, which unclassed content of the CMS editor
   needs; everything else is addressed by class, in the stylesheet of its component. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow-wrap: break-word;
    background: var(--color-surface-white);
    color: var(--color-text-body);
    font: var(--type-p4);
}

/* Headings break at a soft hyphen of the text and otherwise only when a word does not fit the screen. */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 var(--space-4);
    hyphens: manual;
    overflow-wrap: break-word;
}

h1 {
    color: var(--color-text-heading);
    font: var(--type-h1);
}

h2 {
    color: var(--color-text-heading);
    font: var(--type-h4);
}

h3 {
    color: var(--color-text-strong);
    font: var(--type-h6);
}

h4 {
    color: var(--color-text-strong);
    font: var(--type-h8);
}

h5 {
    color: var(--color-text-strong);
    font: var(--type-h10);
}

h6 {
    color: var(--color-text-strong);
    font: var(--type-h12);
}

/* Running text: a readable line length, and hyphenation by the language of the document. */
p {
    max-width: var(--width-measure);
    margin: 0 0 var(--space-4);
    hyphens: auto;
}

a {
    color: var(--color-text-link);
    text-decoration: underline;
    text-decoration-thickness: var(--underline-thin);
    text-underline-offset: var(--underline-offset);
}

a:hover {
    text-decoration-thickness: var(--underline-thick);
}

img {
    max-width: 100%;
    height: auto;
}

:focus-visible {
    outline: var(--focus-width) solid var(--color-focus-ring);
    outline-offset: var(--focus-offset);
    box-shadow: 0 0 0 var(--focus-offset) var(--color-focus-halo);
}

.container {
    width: 100%;
    max-width: var(--width-content);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
