@font-face {
    font-family: "fredoka";
    src: url("fredoka.woff2") format("woff2");
    font-weight: 100 900;
}

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg: oklch(96% 0.015 240);
    --text: oklch(35% 0.09 235);
    --heading: oklch(35% 0.13 250);
    --link-hover: oklch(55% 0.09 235);

    font-family: "fredoka", sans-serif;
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text);
}

body {
    margin: 0;
}

.container {
    max-width: 90rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading);
}

a {
    color: var(--heading);
    transition: color 0.2s ease-in-out;
}

a:hover,
a:focus-visible {
    color: var(--link-hover);
}

img {
    max-inline-size: 100%;
    block-size: auto;
}

header nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav a {
    display: block;
    padding-block: 0.75rem;
    padding-inline: 1rem;
    text-decoration: none;
}

.visually-hidden {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: 0;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}


.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;

    > li {
        position: relative;
        display: flex;
        flex-direction: column;
        flex-basis: 18rem;
        overflow: hidden;
        border-radius: 0.5em;
        box-shadow: 0 0 0.2rem oklch(0 0 0 / 0.2),
        0 0 2rem oklch(0 0 0 / 0.1);
        transition: box-shadow 0.2s ease-in-out;

        &:hover {
            box-shadow: 0 0 0.3rem oklch(0 0 0 / 0.35),
            0 0 2rem oklch(0 0 0 / 0.25);
        }

        &:has(a:focus-visible) {
            outline: 3px solid var(--primary);
            outline-offset: 2px;
        }

        a:focus-visible {
            outline: none;
        }

        .content {
            padding: 1rem;
        }

        img {
            order: -1;
            inline-size: 100%;
            block-size: auto;
        }

        a::after {
            content: "";
            position: absolute;
            inset: 0;
        }
    }
}