*, *::before, *::after {
    box-sizing: border-box;
}

@font-face {
    font-family: "Fredoka";
    src: url("fonts/Fredoka-VariableFont_wdth,wght.woff2") format("woff2");
}

: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 {
    nav a:hover,
    nav a:focus-visible {background-color: oklch(0.7881 0.0291 219.69); }
    nav {
        ul {
            list-style: none;
            display:flex;
            flex-wrap:wrap;
        }

        a {
            text-decoration: none;
            color: inherit;
            padding-block: 2rem;
            padding-inline: 2rem;
        }
    }
}


.row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;

    > * {
        padding: 1rem;
        border:1px dashed oklch(0.7881 0.0636 305.58);
        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;
    }


body{
    --bglink:oklch(0.24 0.2363 268.52);
    --tekst:oklch(0.7587 0.2363 142.52);
    main nav {
        ul {
            list-style: none;
            display: flex;
            flex-wrap: wrap;

            li:first-child{
                margin-right:auto;
                font-weight:bold;
                color:inherit;
        }

        a {
            text-decoration: none;
            padding-block: 2rem;
            padding-inline: 2rem;
        }
            li:not(:first-child) a {
                background-color: var(--bglink);
                color: var(--tekst);

                transition: background-color 0.2s ease-in-out 0.1s, color 0.2s ease-in-out 0.1s;

                &:hover,
                &:focus-visible {
                    color: var(--bglink);
                    background-color: var(--tekst);
                }
            }

        }

    }
}

.cards {
    --shadow-hover: 0 0 .2rem oklch(0 0 0 / .2);
    --shadow: 0 0 .2rem oklch(0 0 0 / .1);
    --overlay: oklch(0.6 0.1249 270.91 / 0.85);


    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;

    li {
        display: flex;
        flex-direction: column;
        position: relative;

        flex-basis: 18rem;
        border-radius: .5em;
        overflow: hidden;

        box-shadow: var(--shadow);
        transition: box-shadow 0.2s ease-in-out 0.1s;

        &:hover,
        &:has(:focus-visible) {
            box-shadow: var(--shadow-hover);

            a::before {
                transform: scale(3);
                border-radius: 0%;
            }

        }

        a::before {
            transform: scale(0);
            border-radius: 50%;

            background-color: var(--overlay);
            mix-blend-mode: multiply;

            inset: 0;
            content: "";
            position: absolute;
            z-index: 2;

            transition: border-radius 0.3s ease-in-out, transform 0.3s ease-in-out;
        }


        .content {
            display: block;
            padding: 1rem;
            position: relative;
            z-index: 4;
        }

        a::after {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 3;
        }

        img {
            order: -1;
            flex-grow: 1;
        }

    }
}

