@font-face {
    font-family: "Fredoka";
    src: url("../fonts/Fredoka-VariableFont_wdth,wght.woff2") format("woff2")
}

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg: oklch(0.99 0.003 325);
    --primary: oklch(0.25 0.01 325);
    font-family: Fredoka, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    background: var(--bg);
    color: var(--primary);
}

body {
    margin: 0;
}

.container {
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

header {
    background: oklch(0.2324 0.0814 260.47);
    color: var(--bg);

}

nav{
    ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-wrap: wrap;

        a {
            padding-block: 1rem;
            padding-inline: 2rem;
            display: inline-block;
            color: inherit;
            text-decoration: none;
        }

    }
}
nav ul{
    margin-left: -2rem;
}

.row {
    display: flex;
    gap: 2rem;
    > * {
        border-style: dashed;
        border-width: 1px;
        border-color: oklch(0.4955 0.0896 126.19);
        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 {
        --text: oklch(0.99 0.003 325);
        --bg: oklch(0.45 0.32 40);
    }
    nav a {
        color: var(--text);
        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: var(--bg);
        }
    }

    nav li:first-child {
        margin-inline-end: auto;
    }

    nav li:first-child a {
        background-color: var(--text);
        color: oklch(0 0 0);
        font-weight: bold;
    }
}


main ul.cards {
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;

    > li{
        display: flex;
        flex-direction: column;
        position: relative;
        border-radius: 1rem;
        width: 25rem;
        picture {
            order: -1;

            img {
                width: 100%;
                border-top-left-radius: 1rem;
                border-top-right-radius: 1rem;
            }

        }
        div.content {
            display: flex;
            flex-direction: column;
            flex-basis: 18rem;
            box-shadow: 0 0 .2rem oklch(0 0 0 / .2), 0 0 2rem oklch(0 0 0 / .1);
            padding: 1rem;
            border-bottom-left-radius: 1rem;
            border-bottom-right-radius: 1rem;
            margin-top: -1rem;
            a {
                z-index: 2;
            }
            a.overlay-link {
                position: absolute;
                inset: 0;

                text-indent: 100%;
                white-space: nowrap;
                overflow: hidden;
                z-index: 1;
            }
        }
    }
}

section{
    span {
        display: flex;
        flex-direction: row;
        align-content: center;
        margin-bottom: 1rem;
        &.mylink{
            display: inline-block;
            a {
                color: oklch(0.6533 0.3003 27.53);
                text-decoration-color: oklch(0.6533 0.3003 27.53);
            }
            a :before {
                align-self: center;
            }
        }
        &.mybutton {
            display: inline-block;
            a {
                border-radius: 0.5rem;
                padding: 0.5rem;
                background-color: oklch(0.4864 0.1643 142.28);
                color: var(--bg);
                text-decoration: none;
            }
        }
    }
}



@media (max-width: 40em) {
    .cards {
        flex-direction: column;
    }
}