:root{
/* ### Primary */

--Linear-gradient_active_input_border: hsl(249, 99%, 64%) to hsl(278, 94%, 30%);
--Red_input_errors: hsl(0, 100%, 66%);

/* ### Neutral */

--White: hsl(0, 0%, 100%);
--Light-grayish-violet: hsl(270, 3%, 87%);
--Dark-grayish-violet: hsl(279, 6%, 55%);
--Very-dark-violet: hsl(278, 68%, 11%);

}

@font-face {
    font-family: SpaceGrotesk;
    src: url('./fonts/SpaceGrotesk-VariableFont_wght.ttf');
    font-weight: 500;
}

*,*::before,*::after{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    min-height: 100vh;
    font-family: SpaceGrotesk;
    background-color: var(--White);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
body::after{
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    max-height: 240px;
    background-image: url('./images/bg-main-mobile.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top;
    background-attachment: fixed;
}

main{
    max-width: 500px;

}

section{
    padding: 0 1rem;
}

section._cards_section{
    display: flex;
    justify-content: center;
    z-index: 15;
}

div._cards_container{
    width: 100%;
    padding-top: 2.5rem;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
}

div._front_card_box{ /* front side of the card */
    width: 280px;
    height: 150px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    top: -4rem;
    right: 2rem;
    border-radius: .5rem;
    background-image: url('./images/bg-card-front.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: 0px 10px 30px hsla(279, 6%, 55%, .5);
    z-index: 10;
}

div._circle_box{
    display: flex;
    gap: .5rem;
    align-items: center;
}

div._main_circle{
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--White);
}

div._last_circle{
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 1px solid var(--White);
}

div._content_box{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

div._card_info_box{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

p.card_number{
    letter-spacing: .2rem;
    word-spacing: .1rem;
    color: var(--White);
}
p.card_holder{
    color: var(--White);
    text-transform: uppercase;
    
}
p.date{
    font-size: .8rem;
    color: var(--White);
}


div._back_card_box{ /* back side of card */
    width: 280px;
    height: 150px;
    position: relative;
    left: 2rem;
    border-radius: .5rem;
    background-image: url('./images/bg-card-back.png');
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;    
}

p.cvc_number{
    font-size: .7rem;
    color: var(--White);
    position: absolute;
    top: 4.2rem;
    right: 2.5rem;
}




form{
    max-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
label{
    color: var(--Very-dark-violet);
    display: block;
    font-size: 18px;
}
input{
    width: 100%;
    padding: .8rem 1rem;
    position: relative;
    display: block;
    outline: none;
    border: 1.5px solid var(--Light-grayish-violet);
    border-radius: .5rem;
    -moz-appearance: textfield;
    caret-color: hsl(249, 99%, 64%);
    text-transform: capitalize;
}
input:focus{
    outline: none;
    border-width: 2px;
    border-radius: .5rem;
    border-color: hsl(249, 99%, 64%);
    
}
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}



input::placeholder{
    font-size: 1rem;
    color: var(--Light-grayish-violet);
    font-weight: 700;
}


div._input_box{
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    border-radius: .5rem;
}
div.two_column_input{
    display: flex;
    gap: .5rem;
}
div.two_column_input input{
    width: 50%;
}

div._input_date_cvc_box{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}

.error_message{
    position: absolute;
    bottom: -1.2rem;
    left: 0;
    color: var(--Red_input_errors);
    font-size: .9rem;
}

button{
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background-color: var(--Very-dark-violet);
    border: none;
    border-radius: .5rem;
    color: var(--White);
    cursor: pointer;
    transition: background-color .3s ease;
}
button:active{
    background-color: var(--Dark-grayish-violet);
}

button.confirm_btn{
    max-width: 350px;
}

footer{
    margin-top: 2rem;
}


div._complete_mess_box{
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem
}

h2.complete_mess_title_heading{
    margin-top: .5rem;
    text-transform: uppercase;
    font-weight: 500;
}
p.complete_mess_paragraph{
    color: var(--Dark-grayish-violet);
}



@media(min-width: 1024px){
    body{
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    body::after{
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 35%;
        max-width: 100%;
        height: 100vh;
        max-height: none;
        background-image: url('./images/bg-main-desktop.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: left;
        background-attachment: fixed;
    }
    
    main{
        width: 100%;
        max-width: none;
        min-height: 90vh;
        display: grid;
        justify-content: center;
        align-items: center;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        z-index: 5;
    }
    section._cards_section{
        padding: 0;
    }
    div._cards_container{
        padding-top: 0;
        display: flex;
        gap: 1.5rem;
        flex-direction: column;

    }
    div._front_card_box{
        width: 350px;
        height: 210px;
        padding: 2rem;
        position: relative;
        top: 0;
        right: 0;
        left: 1.5rem;
        box-shadow: 30px 10px 100px hsla(279, 6%, 55%, .5);
    }
    div._back_card_box{
        width: 350px;
        height: 210px;
        padding: 2rem;
        position: relative;
        right: 0rem;
        left: 6rem;
        box-shadow: 0px 10px 100px hsla(279, 6%, 55%, .5);
    }
    p.cvc_number{
        font-size: .7rem;
        color: var(--White);
        position: absolute;
        top: 6rem;
        right: 2.5rem;
    }


    section._form_section{
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    form{
        max-width: 400px;
        gap: 1rem;
    }
}