@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);
}

body {
    margin: 0;
}

.container {
    max-width: 80rem;
    margin-inline: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

nav {
    ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-wrap: wrap;
    }

    a {
        display: block;
        color: inherit;
        text-decoration: none;
        padding: 1rem 2rem 1rem 2rem;
    }
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;

    > * {
        padding: 1rem;
        border: 1px dashed blue;
        flex: 1;
    }

    > *:first-child {
        flex: 2 1 12rem;
    }
}

.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);
        --bgnav: oklch(0.45 0.20 33.88);
    }

    nav a {
        color: var(--text);
        background-color: var(--bgnav);
        transition: color .2s ease-in-out, background-color .3s ease-in-out;

        &:hover,
        &:focus-visible {
            background-color: var(--primary);
            color: var(--text);
        }
    }

    nav li:first-child {
        margin-inline-end: auto;
    }

    nav li:first-child a{
        color: var(--primary);
        background-color: var(--bg);
        padding-left: 0;
        font-weight: bold;
    }
}

.cards {
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;

    .content {
        position: relative;
        z-index: 2;
    }

    li {
        padding: 1rem;
        background-color: oklch(0.99 0 0);
        box-shadow: 0 0 0.2rem oklch(0 0 0 / 0.2), 0 0 2rem oklch(0 0 0 / 0.1);
        display: flex;
        flex-direction: column;
        position: relative;
        flex-basis: 18rem;
        border-radius: .5em;
        overflow: hidden;
        transition: box-shadow .3s ease;

        &::before {
            content: "";
            position: absolute;
            width: 100%;
            height: 100%;
            background-color: royalblue;
            border-radius: 50%;
            transform: scale(0);
            z-index: 1;
            pointer-events: none;
            transition: transform .5s ease, border-radius .5s ease .2s;
            mix-blend-mode: multiply;
        }

        &:hover::before,
        &:has(a:focus-visible)::before {
            transform: scale(2);
            border-radius: 0;
        }
    }

    li:hover {
        box-shadow: 0 0 .5rem oklch(0 0 0 / .3), 0 0 3rem oklch(0 0 0 / .2);
    }

    img {
        width: 100%;
        height: auto;
        order: -1;
    }

    h3{
        margin-block-start: 0;
        font-size: 1.25rem;
    }

    a::after {
        content: "";
        position: absolute;
        inset: 0;
    }
}