@font-face {
    font-family: "Parisienne";
    src: url("./fonts/Parisienne-Regular.woff2") format("woff2");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    font-family: "Parisienne", 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;
    text-align: center;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-inline: auto;
}

nav ul li{
    display: inline-block;
    a {
        padding: 2rem;
        text-decoration: none;
        color: inherit;
    }
}

.row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    
    * {
        border: 1px dashed oklch(0.0635 0 4.87);
        padding: 1rem;
        flex: 1;
    }

    >:first-child {
        flex: 2;
    }
}

.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.6724 0.2018 40);

    }

    nav ul {
        display: flex;
        flex-wrap: wrap;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    nav a {
        display: inline-block;
        padding: 1rem 2rem;
        color: var(--text);
        background-color: var(--bg);
        transition: color 2s ease-in-out, background-color .2s ease-in-out;
        text-decoration: none;

        &:hover,
        &:focus-visible {
            color: var(--bg);
            background-color: var(--text);
        }
    }

    nav li:first-child {
        margin-inline-end: auto;
    }

    nav li:first-child a {
        font-weight: bold;
        color: inherit;
        background-color: transparent;
    }
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cards li {
    display: flex;
    flex-direction: column;
    flex: 1 1 18rem;
    position: relative;
    isolation: isolate;  
    background-color:oklch(0.99 0.003 325);
    border: 1px solid oklch(0.9067 0 0);
    box-shadow: 0 0 .2rem oklch(0 0 0 / .2), 0 0 2rem oklch(0 0 0 / .1);
    transition: box-shadow 0.3s ease;
    border-radius: .5rem;  
    overflow: hidden;  
    z-index: 1;
}
.cards li:hover,
.cards li:has(a:focus-visible) {
    box-shadow: 0 0 .2rem #0006, 0 0 2rem #0003; 
}

.cards li:hover::before,
.cards li:has(a:focus-visible)::before {
    scale: 1;
    border-radius: 0;
    transition: scale .2s ease-in-out, border-radius .2s ease-in-out .05s;
}

.cards img {
    order: -1;
    width: 100%;
    height: 160px;         
    object-fit: cover; 
    z-index: 1;
}

.cards a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
}

.cards .content{
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
    background-color: oklch(0.99 0.003 325);
    z-index: 3;
}

.cards h3, .cards p {
    margin: 0;
}

.cards h3 {
    font-weight: 700;       
}

.cards li::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    mix-blend-mode: overlay;
    background-color: oklch(.2 .2 264 / .6); 
    scale: 0;                                 
    border-radius: 50%;                      
    transition: scale .8s ease-in-out .5s, border-radius 1s ease-out .5s;
}
