* {
    margin: 0;
    padding: 0;
    border: none;
    box-sizing: border-box;
}

body{
    width: 100vw;
    height: 100vh;
    background-color: #f24438;
    display: grid;
    place-items: center;
    font-family: poppins, sans-serif;
    font-weight: 300;
    line-height: 1.5;
}

button{
    padding: 1rem 3rem;
    font-size: 1rem;
    transition: all 300ms ease;
}

button:hover{
    cursor: pointer;
    opacity: 0.9;
}

/*MODAL*/

.modal{
    width: 100%;
    height: 100%;
    position: fixed;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,0.3);
    display: none;
    animation: openModal 1s linear forwards;
}

.modal .card{
    background: white;
    width: 50rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    position: relative;
}

.close{
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 1.3rem;
}

.brand{
    width: 30rem;
}

.brand img{
    display: block;
    width: 100%;
}

.modal .card h2{
    margin-bottom: 2rem;
}

.modal .card form{
    margin-top: 2rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.modal .card input[type="email"]{
    background: #eee;
    width: 100%;
    padding: 1rem;
    outline: none;
}

.modal .card input[type="submit"]{
    background: #f24438;
    color: white;
    padding: 0 1.6rem;
}

@keyframes openModal{
    from{
        opacity: 0;
    }
    to{
        opacity: 1;
    }
}

@keyframes closeModal{
    from{
        opacity: 1;
    }
    to{
        opacity: 0;
    }
}

.close-modal-animation{
    animation: closeModal 1s linear forwards;
}

/*===============MEDIA QUERIES=================================================*/

@media screen and (max-width:800px){
    .modal .card{
        flex-direction: column;
        width: 80vw;
        text-align: center;
    }

    .brand{
        width: 15rem;
        border-radius: 50%;
        overflow: hidden;
        margin-top: 4rem;
    }

    .modal .card form{
        display: block;
    }

    .modal .card input[type="email"],
    .modal .card input[type="email"]::placeholder
    {
        text-align: center;
    }

    .modal .card input[type="submit"]{
        display: block;
        width: 100%;
        padding: 1rem 0;
        margin-top: 0.6rem;
    }
}