:root {
    --nav-height: 70px;
    --hero-height: 500px;
    --color-light70: #e3ebf3;
    --color-light60: #c8d7e7;
    --color-light50: #acc3db;
    --color-light40: #90b0cf;
    --color-light30: #749cc3;
    --color-light20: #5988b7;
    --color-light10: #3d74ab;
    --color-primary: #21609f;
    --color-dark10: #1d548b;
    --color-dark20: #194877;
    --color-dark30: #153c63;
    --color-dark40: #113050;
    --color-dark50: #0c243c;
    --color-dark60: #081828;
    --color-dark70: #040c14;
    --color-accent: #cd984c;
    --line-height: 1.618;
    /*font-size: clamp(1rem, 15px + 0.390625vw, 2rem);*/
    font-size: clamp(16px, 15px + 0.390625vw, 50px);
}

@font-face {
    font-family: CustomBodyFont;
    src: url("../fonts/Quicksand-Regular.ttf");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: CustomBodyFont;
    src: url("../fonts/Quicksand-Bold.ttf"), url("../fonts/Quicksand-SemiBold.ttf");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

body {
    height: 100%;
    width: 100%;
    background: #fff;
    font-family: CustomBodyFont, sans-serif;
    scroll-behavior: smooth;
    line-height: var(--line-height);
}

* {
    border-collapse: collapse;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .3) transparent;
    vertical-align: baseline;
}

hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid var(--color-light70);
}

p {
    font-size: 1rem;
    margin-block-start: 0;
    margin-block-end: 0;
}

a {
    text-decoration: none;
    cursor: pointer;
    color: inherit;
}

a:hover {
    text-decoration: none;
    color: inherit;
}

.prevent-select {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.page-content {
    padding-top: 50px;
    padding-right: 50px;
    padding-left: 50px;
    margin-right: auto;
    margin-left: auto;
    margin-top: 70px;
    min-height: calc(100vh - var(--nav-height) - var(--nav-height));

    .breadcrumbs {
        display: flex;
        flex-direction: row;
        list-style: none;
        margin-bottom: 20px;

        li {
            a {
                color: var(--color-light20);
                text-decoration: underline;
                font-size: smaller;
            }

            a:hover {
                color: var(--color-primary);
                text-decoration: underline;
                font-size: smaller;
            }
        }

        li:not(:first-of-type)::before {
            content: '\203A';
            margin-left: 5px;
        }
    }
}

.center-text {
    text-align: center;
}

.hero-image {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-image: url("../images/lt.webp");
    height: var(--hero-height);
    background-attachment: local;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

section {
    scroll-margin-top: calc(var(--nav-height) + 20px);
    margin: 70px 0;
}

footer {
    box-sizing: border-box;
    margin: 0;
    color: #fff;

    .contacts {
        background-color: var(--color-dark50);
        padding: 2em;
        display: flex;
        flex-direction: row;
        justify-content: space-between;

        a {
            color: var(--color-accent);
        }

        div > div {
            padding: 20px 0;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
    }

    .copyright {
        background-color: var(--color-dark70);
        padding: 2em;

        p {
            text-align: center;
        }
    }

    @media screen and (max-width: 400px) {
        .contacts {
            flex-direction: column;
            gap: 20px;
        }
    }
}

.nav-a {
    color: var(--color-light20);
    text-decoration: underline;
    font-size: smaller;
}

.nav-a:hover {
    color: var(--color-primary);
    text-decoration: underline;
    font-size: smaller;
}

.anchor {
    display: block;
    height: var(--nav-height);
    margin-top: calc(-1 * var(--nav-height));
    visibility: hidden;
}

.error-message {
    height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.two-spacer {
    display: flex;
    justify-content: space-between;
    align-content: stretch;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
}

.imaged {
    width: calc(100%);
    height: 100vh;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    h1 {
        text-align: center;
        vertical-align: middle;
        line-height: 100vh;
        color: #fff;
    }
}

.list {
    /* from https://css-tricks.com/an-auto-filling-css-grid-with-max-columns/ */
    --grid-layout-gap: 2rem;
    --grid-column-count: 1;
    --grid-item--min-width: 100px;

    --gap-count: calc(var(--grid-column-count) - 1);
    --total-gap-width: calc(var(--gap-count) * var(--grid-layout-gap));
    --grid-item--max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count));

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(var(--grid-item--min-width), var(--grid-item--max-width)), 1fr));
    grid-gap: var(--grid-layout-gap);
}

.grid-four-column {
    --grid-column-count: 4;
}

.grid-three-column {
    --grid-column-count: 3;
}

.grid-two-column {
    --grid-column-count: 2;
}

@media screen and (min-width: 1201px) {
    .grid-four-column {
        --grid-column-count: 4;
    }

    .grid-three-column {
        --grid-column-count: 3;
    }

    .grid-two-column {
        --grid-column-count: 2;
    }
}

@media screen and (max-width: 1200px) {
    .grid-four-column {
        --grid-column-count: 3;
    }

    .grid-three-column {
        --grid-column-count: 3;
    }

    .grid-two-column {
        --grid-column-count: 2;
    }
}

@media screen and (max-width: 992px) {
    .grid-four-column {
        --grid-column-count: 2;
    }

    .grid-three-column {
        --grid-column-count: 2;
    }

    .grid-two-column {
        --grid-column-count: 2;
    }
}

@media screen and (max-width: 768px) {
    .grid-four-column {
        --grid-column-count: 1;
    }

    .grid-three-column {
        --grid-column-count: 1;
    }

    .grid-two-column {
        --grid-column-count: 1;
    }

    .page-content {
        padding-left: 30px;
        padding-right: 30px;
    }
}