@font-face {
    font-family: "Fredoka";
    src: url("../fonts/fredoka.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;
}

header  {
    color: var(--bg);
    background-color: var(--primary);
}

nav ul  {
    padding: 0;
    margin: 0;
    margin-inline-start: -2rem;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav ul li a {
    padding-inline: 2rem;
    padding-block: 1rem;
    display: block;
    color: inherit;
    text-decoration: none;
}

.row {
    display: flex;
    gap: 2rem;

    > div  {
        border: 1px dashed oklch(0.452 0.313 264.052);
        padding: 1rem;
        flex-grow: 1;

        &:first-child {
            flex-grow: 2;
        }
    }
}

.visually-hidden:not(:focus):not(:active) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    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);
		color: var(--text);
    }

    nav a {
        background-color: var(--bg);
        transition: color .2s ease-in-out, background-color .2s ease-in-out;

        &:hover {
            background-color: var(--text);
            color: var(--bg);

        }

        &:focus-visible {
            outline: 4px;
            outline-style: dashed;
        }
    }

    nav li:first-child {
        margin-inline-end: auto;
    }

    nav li:first-child a {
        background-color: var(--text);
        font-weight: bold;
    }
    }

.cards {
    display: flex;
    flex-wrap: wrap;
}

.cards li {
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 .2rem oklch(0 0 0 / .2), 0 0 2rem oklch(0 0 0 / .1);
    flex-basis: 18rem;
    border-radius: 1.25rem;
    list-style: none;
    text-align: center;
    position: relative;
    margin-inline: 2rem;
    transition: filter .2s ease-in-out;
}

.overlay-link {
    position: absolute;
    inset: 0;
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.cards li :not(.overlay-link) {
    z-index: 1;
}

.cards li img {
    order: -1;
    border-radius: 1rem 1rem 0 0 ;
}

.cards li:hover {
    filter: contrast(50%);
}
