@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.6;
    scroll-behavior: smooth;
    --bg: oklch(0.99 0.003 325);
    --primary: oklch(0.25 0.01 325);
    color: var(--primary);
    background-color: var(--bg);
}

body{
    margin: 0;
}

.container{
    max-width: 80rem;
    padding-inline: 1rem;
    margin: auto;
}

nav{
    ul {
        display: flex;
        list-style: none;
    }
    a{
        color: inherit;
        text-decoration: none;
        padding-block: 1rem;
        padding-inline: 2rem;
    }
}

.row{
    display: flex;
    gap: 2rem;

    > *{
        padding: 1rem;
        border: 1px dashed oklch(0.7 0.1 321);
        flex-grow: 1;
    }

    > *:first-child{
        flex-grow: 2;
    }
}

.visually-hidden {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: 0;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

main{

    nav{
        --text: oklch(0.99 0.003 325);
        --bg: oklch(0.45 0.32 40);

        a{
            color: var(--text);
            background-color: var(--bg);
            transition: color .2s ease-in-out, background-color;

            &:hover,
            &:focus-visible{
                color: var(--bg);
                background: var(--text);
            }
        }

        li:first-child{
            flex-grow: 1;

            a{
                color: inherit;
                background-color: inherit;
                font-weight: bold;
        }
        }
    }
}

.cards{
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
    li{
        position: relative;
        display: flex;
        flex-direction: column;
        flex-basis: 18rem;
        border-radius: 0.5rem;
        box-shadow: 0 1px 4px oklch(0.66 0 0);
        overflow: hidden;
        padding-bottom: 1rem;
    }
    img{
        order: -1;
        width: 100%;
    }
    a::after{
        content: "";
        position: absolute;
        inset: 0;
    }
    h3{
        margin: 1rem;
    }
    a{
        margin: 1rem;

    }
    p {
        margin: 1rem;

    }
}