@font-face {
    font-family: "Fredoka";
    src: url("../fonts/Fredoka-VariableFont_wdth,wght.woff2") format("woff2")
}

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    font-family: Fredoka, sans-serif;
    line-height: 1.6rem;
    scroll-behavior: smooth;
    --bg: oklch(0.99 0.003 325);
    --primary: oklch(0.25 0.01 325);
    background-color: var(--bg);
    color: var(--primary);
}

body {
    margin: 0;
}

.container {
    max-width: 80rem;
    margin: auto;
    padding: 1rem;
}

header {
    background-color: oklch(0.1986 0.099 263.85);
    color: var(--bg);
}

nav ul {
    padding: 0;
    margin: 0;
    margin-left: -2rem;
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 2rem;
}

nav a {
    padding: 1rem 2rem;
    text-decoration: none;
    color: inherit;
}



.row {
    display: flex;
    gap: 2rem;

    * {
        border: 1px dashed #4a90e2;
        padding: 1rem;
        flex: 1;
    }

    *:first-child {
        flex: 2;
    }
}

.visually-hidden {
    position: relative;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;

    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

main {

    nav {
        --text: oklch(0.99 0.003 325);
        --bg_nav: oklch(0.45 0.32 40);

        display: flex;
    }

    nav ul {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    nav a {
        color: var(--text);
        background-color: var(--bg_nav);
        transition: color .2s ease-in-out, background-color .2s ease-in-out;

        &:hover,
        &:focus-visible {
            color: var(--bg_nav);
            background-color: var(--text);
        }
    }

    nav li:first-child {
        margin-right: auto;
    }
    nav li:first-child a {
        color: inherit;
        background-color: inherit;
        font-weight: bold;
    }

}

.cards {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    flex-basis: 18rem;
    justify-content: flex-start;
    gap: 2rem;
    padding-left: 0;

    li {
        position: relative;
        display: flex;
        flex-direction: column;
        width: 18rem;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 0 .2rem oklch(0 0 0 / .2), 0 0 2rem oklch(0 0 0 / .1);
        background-color: var(--bg);
        transition: box-shadow .2s ease-in-out, scale .2s ease-in-out;

        &:hover,
        &:focus-visible {
            box-shadow: 0 0 .8rem oklch(0 0 0 / .2), 0 0 2rem oklch(0 0 0 / .1);
            scale: 130%;
            z-index: 2;
        }

        img {
            order: -1
        }

        div {
            margin: 1rem;
            margin-top: 0;
        }
    }
}

.overlay-link {
    position: absolute;
    overflow: hidden;
    inset: 0;
    text-indent: 100%;
    white-space: nowrap;
}

