@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;
    }
}

.row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;

    > * {
        padding: 1rem;
        border-style: dashed;
        border-color: oklch(0.44 0.16 512);
        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 ul {
    --primary: oklch(0.8 0.1598 44.05);
    --secundairy: oklch(0.4018 0.1327 360);
    display: flex;
    flex-wrap: wrap;

    :not(:first-child) {
        background-color: var(--secundairy);
        color: var(--primary);

        :hover, :focus-visible {
            transition: color 0.3s ease-in-out, background-color;
            color: var(--secundairy);
            background-color: var(--primary);

        }
    }

    > :first-child {
        font-weight: bolder;
        margin-inline-end: auto;
    }
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-basis: 18rem;
    li {
        display: flex;
        flex-direction: column;
        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;
        }
        a:not(.overlay-link) {
            position: relative;
            z-index: 1;
        }
    }
    img {
        order: -1;
    }
    a::after {
        content: "";
        position: absolute;
        inset: 0;
    }
}