*, *::after, *::before{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --ff-title-1: 'Francois One', sans-serif;
    --ff-title-2: 'Luckiest Guy', cursive;
    --ff-body: 'Roboto', sans-serif;
    --c-background: #4F1275;
    --c-yellow: #FFFF00;
    --c-blue: #15E1FF;
    scroll-padding-top: 6rem;
}

body{
    background: #4F1275;
    font-family: var(--ff-body);
    padding: 2rem;
    padding-bottom: 0;
    scroll-behavior: smooth;
    
}

h2{
    font-family: var(--ff-title-1);
    color: var(--c-yellow);
    font-size: 2rem;
    margin-bottom: 0.5em;
}

header{
    display: grid;
    grid-template-columns: 3rem 10rem;
    grid-gap: 1rem;
    row-gap: 1.5rem;
    grid-row-gap: 1.5rem;
    margin-bottom: 3rem;
}

header img{
    width: 100%;
    border-radius: 0.5rem;
}

header h1{
    color: #FFF;
    font-size: 1.25rem;
}

header a{
    color: white;
    display: grid;
    grid-column: 1/-1;
    grid-template-columns: 3rem 5fr;
    align-items: center;
    justify-items: center;
    background-color: white;
    border-radius: 0.5rem;
    color: #BF262C;
    font-weight: bold;
    transition: all 0.15s ease;
    text-decoration: none;
}

header a p{
    padding: 0 1rem;
    justify-self: start;
}

header a:hover{
    background-color: #BF262C;
    color: white;
    filter: drop-shadow(0.3em 0.3em 0.4em rgba(0, 0, 0, 0.4));
    transform: scale(1.03);
}

header a img{
    filter: drop-shadow(0.1em 0.1em 0.1em rgba(0, 0, 0, 0.4));
    transition: all 0.6s ease-in-out;
}

header a:hover img{
    transform: rotate(360deg);
}

header a:focus{
    outline: 3px solid #BF262C;
}

main{

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 3rem;
    grid-auto-rows: 210px;
    grid-auto-columns: minmax(250px, 1fr);
    grid-auto-flow: dense;

}

main > a{
    /* filter: drop-shadow(0.5em 0.5em 1.5em rgba(0, 0, 0, 0.5)); */
    text-decoration: none;
    transition: all 0.15s ease;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 3% 97%);
    /* border: 2px solid red; */
    display: block;
    position: relative;
    height: max-content;
    animation: removeClipPath 1s ease-in-out 1s 1 forwards;
}

@keyframes removeClipPath {
    0%{
        filter: drop-shadow(0.5em 0.5em 0em rgba(0, 0, 0, 0.5));
    }
    100%{
        clip-path: none;
        filter: drop-shadow(0.5em 0.5em 1.5em rgba(0, 0, 0, 0.5));
    }
}

main > a:hover{
    filter: drop-shadow(0em 0em 0em rgba(0, 0, 0, 0.5)) !important;
    transform: scale(0.98);
}

main > a:focus{
    outline-offset: 0;
    outline: none;
    transform: scale(1.05);
}


.card{
    background: #FFF;
    font-size: 1.25rem;
    display: grid;
    grid-template-rows: 1fr 0.5fr;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 3% 97%);
    min-height: 12rem;
    /*width: 25rem; */
    position: relative;
    animation: cardLoad 0.9s ease-in-out 0.1s 1 forwards;
}

@keyframes cardLoad {
    0%{
         transform: translateY(103%);
         
    }
    100%{
         transform: translateY(0%);
    }
}



.card .icon{
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    /* animation: iconJiggle 0.9s ease-in-out 0.1s infinite alternate-reverse; */
}

.card .icon span{
    background-color: var(--c-background);
    padding: 0.4em 1em 0.4em 0.75em;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 3% 97%);
    color: white;
    font-size: 0.8rem;
    visibility: hidden;
    pointer-events: none;
    width: max-content;
    margin-left: 0.5rem;
    position: absolute;
    display: inline-block;
    transform: translateY(0.2rem);
}

.card:hover .icon span{
    visibility: visible;
}


.card > img{
    width: 100%;
    object-fit: cover;
    grid-row: 1/3;
    grid-column: 1/-1;
    
}

@keyframes iconJiggle {
    0%{
         transform: rotate(-10deg)
    }
    100%{
         transform: rotate(10deg)
    }
    
}

.card .title{
    background: #FFF;
    color: hsl(0, 0%, 15%);
    width: 100%;
    text-align: center;
    grid-row: 2/3;
    grid-column: 1/-1;
    font-family: var(--ff-title-1);
    /* letter-spacing: 0.1em; */
    display: grid;
    place-content: center;
    /* border-top: 0.25em solid var(--c-yellow); */
    position: relative;
}



.card .title::before{
    content: '';
    width: 100%;
    height: 0.5em;
    background: var(--c-yellow);
    position: absolute;
    bottom: 100%;
    clip-path: polygon(0 20%, 50% 0, 20% 55%, 100% 20%, 100% 100%, 0% 100%);
    animation: yellowBar 0.3s ease-in-out 1s 1 forwards;
    transform: translateX(-100%);
}

@keyframes yellowBar {
    0%{
         transform: translateX(-100%);
    }
    100%{
         transform: translateX(0%);
    }
    
}

.card h3{
    margin-top: -0.25em
}

.card > a{
    /* margin: 0.5em; */
    justify-self: right;
}

.card > a img{
    height: 1.5rem;
}

.large{
    /* grid-row: span 2;
    grid-column: span 2; */
}

footer{
    margin-top: 2rem;
    color: #FFF;
    font-size: 1.125rem;
}

footer a{
    text-decoration: none;
    color: #FFF;
}

footer ul{
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 0.5em;
}

footer > div{
    padding: 1em;
    font-size: 0.75rem;
    text-align: center;
    color: var(--c-yellow);
}

@media (min-width: 480px){

    main{
        grid-auto-rows: max-content;
    }
}

@media (min-width: 600px){

    header{
        grid-template-columns: 3rem 10rem 1fr 3rem 10rem;
    }

    header a{
        grid-column: 4/6;
    }
}

@media (min-width: 1500px){
    
    main{

        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
        grid-gap: 3rem;
        grid-auto-rows: 410px;
        grid-auto-columns: minmax(450px, 1fr);
        grid-auto-flow: dense;
    
    }

    footer{

        font-size: 1.5rem;
    }

    footer div{

        font-size: 1.5rem;
    }

}