@font-face {
    font-family: "Fredoka";
    src: url("./fonts/Fredoka-Light.woff2") format("woff2")
}

*, *::before, *::after {
    box-sizing: border-box;
}

: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);

    color: var(--primary);
    background-color: var(--bg);
}

body {
    margin: 0;
}

.container {
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

header {
    color: var(--bg);
    background-color: var(--primary);


    nav {
        ul {

            list-style: none;
            padding: 0;
            display: flex;
            flex-wrap: wrap;
            margin: 0;
            margin-inline-start: -2rem;
        }

        a {
            padding-block: 1rem;
            padding-inline: 2rem;
            display: inline-block;
            text-decoration: none;
            color: inherit;
            transition: transform .2s ease-in-out, color .2s ease-in-out;

            &:hover,
            &:focus-visible {
                transform: scale(1.2);
                color: oklch(from var(--bg) calc(l + .2) .3 calc(h + 180));
            }
        }
    }
}

.row {
    display: flex;
    gap: 2rem;

    .column {
        border: 1px dashed oklch(0.813 0.142 185.084);
        padding: 1rem;

        &:first-child {
            flex: 2;
        }

        &:last-child {
            flex: 1;
        }
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.cards li {
    position: relative;
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.cards img {
    width: 100%;
    height: auto;
    display: block;
}

.cards .content {
    padding: 1rem;
    flex-grow: 1;
}

.cards h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.cards p {
    margin: 0.5rem 0 1rem;
}

.cards a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: bold;
    z-index: 1;
    position: relative;
}

.cards .overlay-link {
    position: absolute;
    inset: 0;
    z-index: 0;
    text-indent: -9999px;
}

.cards li:hover {
    transform: translateY(-4px);
    transition: transform 0.2s ease-in-out;
    color: oklch(0.345 0.141 29.234);
    background-color: oklch(0.624 0.225 26.797 / 0.56);
}

