*, *:before, *:after {
    box-sizing: border-box;
}

:root {
    font-family: Fredoka, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    --bg: oklch(0.4724 0.1968 291);
    --bs: oklch(0.9135 0.0266 291);
}

header {
    background-color: var(--bg);
    color: var(--bs);

    nav ul {
        padding: 0;
        margin: 0;
        list-style: none;
        display: flex;
        flex-wrap: wrap;
    }

    nav a {
        padding-block: 1rem;
        padding-inline: 2rem;
        display: block;
        color: inherit;
        text-decoration: none;
    }

    nav a:hover {
        background-color: var(--bs);
        color: var(--bg);
    }
}

body {
    margin: 0;
}

.container {
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

.visually-hidden {
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cards {
    display: flex;
    gap: 2rem;
    flex-direction: row;
    flex-basis: 18rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;

}

.content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 0.2rem oklch(0 0 0 / 0.2),
    0 0 1rem oklch(0 0 0 / 1);
    border-radius: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform 0.5s ease,
    background-color 0.5s ease,
    box-shadow 0.5s ease;

    > *:not(picture):not(.overlay-link) {
        padding-left: 1rem;
        padding-right: 1rem;
        text-align: left;
    }

    a {
        padding-bottom: 1rem;
    }

    picture {
        order: -1;
        width: 100%;
        height: auto;
        display: block;
        object-fit: contain;
        margin: 0;
    }

    picture img {
        width: 100%;
        display: block;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
    }
}

.overlay-link {
    position: absolute;
    inset: 0;
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.content li a:not(.overlay-link) {
    z-index: 1;
}

.content:hover {
    transform: scale(1.1);
    background: radial-gradient(oklch(0.5191 0.2269 278), oklch(0.6933 0.2269 36.53));
    box-shadow: 0 0 0.4rem oklch(0 0 0 / 0.3),
    0 0 1.5rem oklch(0 0 0 / 1);
}

@media (min-width: 600px) {
    img {
        width: clamp(10rem, 50vw, 18rem);
    }

    .cards li {
        display: flex;
        flex-direction: row;
        flex-basis: 30%;
    }
}