@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);
    background-color: var(--bg);
    color: var(--primary);
}

body {
    margin: 0;
}

.container {
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

header {
    background-color: oklch(0.1454 0.062 264);
    color: var(--bg)
}

nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin-left: -2rem;
}

nav a {
    display: inline-block;
    padding-block: 1rem;
    padding-inline: 2rem;
    color: inherit;
    text-decoration: none;
}

.row {
    display: flex;
    gap: 2rem;
    > * {
        border: dashed 1px oklch(0.5688 0.1 270.48);
        padding: 1rem;
        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 {
        --textcolor: oklch(0.99 0.003 325);
        --bg: oklch(0.6214 0.1815 29.08);
    }

    nav a {
        color: var(--textcolor);
        background-color: var(--bg);
        transition: color .2s ease-in-out, background-color .1s ease-in-out;

        &:hover,
        &:focus-visible {
            background-color: oklch(0.7212 0.2211 23.79);
            color: oklch(0.5474 0.2211 23.79);
        }
    }

    nav li:first-child {
        margin-inline-end: auto;
    }

    nav li:first-child a {
        background-color: oklch(0.99 0.003 325);
        color: oklch(0 0 0);
        font-weight: bold;
    }

}

.cards {
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    flex-grow: 1;

    li {
        flex-basis: 18rem;
        list-style: none;
        display: flex;
        flex-direction: column;
        border: 1px solid lightgrey;
        border-radius: 0.5rem;
        overflow: hidden;
        position: relative;
    }
    .content {
        padding: 1rem;

        & > h3 {
            font-weight: bold;
            color: oklch(0 0 0);
        }
    }
    img {
        order: -1;
        width: 100%;
        height: 120px;
    }
}

.overlay-link {
    position: absolute;
    inset: 0;

    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.cards li a:not(.overlay-link) {
    z-index: 1;
    color: oklch(0.307 0.2097 270.4);
}

.cards li:hover {
    box-shadow: 0 0 .2rem oklch(0 0 0 / .2);
}


