@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)
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--primary);
}

.container {
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

nav ul{
    padding: 0;
    margin: 0 0 0 -2rem;
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    a {
        display: block;
        padding-block: 1rem;
        padding-inline: 2rem;
        color: inherit;
        text-decoration: none;
    }
}

.visually-hidden {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: 0;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

header nav ul {
    display: flex;
    flex-wrap: wrap;

    > :first-child {
        font-weight: bolder;
        margin-inline-end: auto;
    }
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    li {
        display: flex;
        flex-direction: column;
        flex: 0 0 22rem;
        position: relative;
        border-radius: .5em;
        overflow: hidden;
        box-shadow: 0 0 .2rem oklch(0 0 0 / .2), 0 0 2rem oklch(0 0 0 / .1);
        transition: box-shadow .3s ease-in-out;
        &:hover,
        &:has(a:focus-visible) {
            box-shadow: 0 0 .2rem oklch(0 0 0 / 1), 0 0 2rem oklch(0 0 0 / 1);
        }
        .content {
            padding: 0 0 1rem 1rem;
            flex-grow: 1;
        }
        a:not(.overlay-link) {
            position: relative;
            z-index: 1;
        }
    }
    img {
        order: -1;
        width: 100%;
        height: 150px;
        object-fit: cover;
        flex-shrink: 0;
    }
    a::after {
        content: "";
        position: absolute;
        inset: 0;
    }
}

.italic {
    font-style: italic;
}