@font-face {
    font-family: "Fredoka";
    src: url("../../labo04/fonts/Fredoka-VariableFont_wdth\,wght.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);

    background-color: var(--bg);
    color: var(--primary);
}

body 
{
    margin: 0;
}

.container
{
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ------------ header ------------ */

header 
{

    & nav 
    {
        & ul 
        {
            list-style: none;
            display: flex;
            gap: 1rem;
            
            & li 
            {
                & a 
                {
                    padding: 2rem;
                    color: inherit;
                    text-decoration: none;
                }
            }

        }
    }
}

/* ------------ columns ------------ */
.row 
{
    display: flex;
    gap: 2rem;

    & div 
    {
        padding: 1rem;
        border: dashed 1px oklch(48.773% 0.07363 236.32);

        &:nth-child(1)
        {
            flex: 2;
        }

        &:nth-child(2)
        {
            flex: 1;
        }
    }
}

/* ------------ nav ------------ */
.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);

        & ul {
        display: flex;
        flex-wrap: wrap;
        list-style: none;
        align-items: center; 

        & li:first-child {
            margin-right: auto; 
        }

        & li:first-child a {
            font-weight: bold;
            text-decoration: none;
            color: initial;
        }

        & li:nth-child(n+2) a {
            background-color: var(--bg);
            color: var(--text);           
            padding: 8px 16px;        
            text-decoration: none;    

            &:hover {
                background-color: var(--text);
                color: var(--bg);    
                border: solid 1px var(--bg);
            }

            &:focus-visible {
                background-color: var(--text);
                color: var(--bg);    
                border: solid 1px var(--bg);
            }
        }
    }
}

/* ------------ cards ------------ */
.cards {
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;

    & li 
    {
        position: relative;
        background-color: oklch(0.99 0 0);
        box-shadow: 0 0 0.2rem oklch(0 0 0 / 0.2), 0 0 2rem oklch(0 0 0 / 0.1);
        list-style: none;
        display: flex;
        flex-direction: column;
        border-radius: 0.5em;
        flex-basis: 18rem;
        box-shadow: 0 0 .2rem oklch(0 0 0 / .2), 0 0 2rem oklch(0 0 0 / .1);
        transition: box-shadow 0.2s ease;
        overflow: hidden;

        &::before {
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 2;
            mix-blend-mode: overlay;
            background-color: oklch(.5 .2 264 / .6);
            scale: 0;
            border-radius: 50%;
            transition: scale .3s ease-in-out,border-radius 1s ease-out;
        }

        &:hover::before
        {
            scale: 1;
            border-radius: 0;
            transition: scale .3s ease-in-out,border-radius .2s ease-in-out .05s;
        }

        &:hover 
        {
            box-shadow: 0 0 .5rem oklch(0 0 0 / .2), 0 0 2rem oklch(0 0 0 / .1);
        }

        & .content 
        {
            padding: 1rem;
            z-index: 3;

            & a::after {            
                content: "";
                position: absolute;
                inset: 0;
            }

            & h3 {
                margin-block-start: 0;
                font-size: 1.25rem;
            }
        }

        & img {
            overflow: hidden;
            order: -1;
            display: block;
            width: 100%;
            height: auto;
        }
    }
}


