@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
:root{
    --tomato: hsl(4, 100%, 67%);
    --orange: orange;
    --dark-slate-gray: hsl(234, 29%, 20%);
    --charcoal-gray: hsl(235, 18%, 26%);
    --gray: hsl(231, 7%, 60%);
    --white: white;

    --error-dark: #ff6756;
    --error-light: #fce7e6;
    --green-good: #4caf50;
    --green-good-light: #25ff0024;
}

body{
    font-family: "Roboto";
    font-weight: 400;

    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;

    background-color: var(--charcoal-gray);
    color: rgba(0, 0, 0, 0.75);
    overflow: hidden;
}
main{
    background-color: white;
    padding: 1.5rem;
    border-radius: 2.25rem;
}

/* ///////////////////////////////////////////////////////////////////////////////////////////// */
.btn-main{
    border: unset;
    outline: unset;
    background-color: unset;

    margin: 1.2rem 0;
    padding: 1.8rem 0;
    border-radius: .5rem;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    color: white;
    background-image: linear-gradient(to right , var(--tomato) , var(--tomato) , var(--orange));
    background-color: var(--dark-slate-gray);
    overflow: hidden;
    position: relative;
    transition: .5s;
}
.btn-main:hover{
    box-shadow: 0 .8rem 2rem 0 rgba(255, 164, 61, 0.489);
}
.btn-main .btn-text{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
.btn-main:hover .overlay{
    background-color: transparent;
}
.overlay{
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-slate-gray);
    pointer-events: none;
    transition: .5s;
}

.error{
    border: 2px solid var(--error-dark) !important;
    background-color: var(--error-light) !important;
    color: var(--error-dark);
}
.good{
    border: 2px solid var(--green-good) !important;
    background-color: var(--green-good-light) !important;
}
.email-error{
    visibility: visible !important;
    opacity: 1 !important;
}
/* //////////////////////////////////////////////////////////////////////////////////////////////// */
.newsletter-main{
    display: flex;
    width: 49rem;
    transition: .5s;
    position: relative;
}
.newsletter-main .newsletter{
    flex-grow: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    justify-content: center;
}
.newsletter-main .news-img-desktop{
    width: 22rem;
}
.newsletter-main .newsletter h1 , .success-message section h1{
    font-size: 3rem;
    font-weight: 700;
    color: var(--charcoal-gray);
}
.newsletter-main .newsletter ul{
    list-style-position: inside;
    list-style-type: none;
}
.newsletter-main .newsletter ul li{
    display: flex;
    align-items: center;
    margin: 0 0 1.1rem;
}

.newsletter-main .newsletter  ul li img{
    margin-right: 1rem;
}
.newsletter-main .newsletter form label{
    display: block;
    margin-bottom: .5rem;
    color: black;
    float: left;
    font-weight: 700;
}
.newsletter-main .newsletter form .email-validation-message{
    display: block;
    float: right;
    margin-left: auto;
    font-weight: 700;
    color: var(--error-dark);
    visibility: hidden;
    opacity: 0;
    transition: .5s;
}
.newsletter-main .newsletter form input[type="email"]{
    border: 2px solid gray;
    border-radius: .5rem;
    outline: unset;
    width: 100%;
    height: 3.5rem;
    padding: 0 1.5rem;
    transition: .5s;
}
.newsletter-main .newsletter form input[type="email"]:focus{
    border: 2px solid rgba(0, 0, 0, 0.65);
    background-color: transparent;
}




.success-message{
    width: 27rem;
    padding: 3rem;
    display: none;
    flex-direction: column;
    gap: 1rem;
    transition: .5s;
}
.success-message section{
    display: inherit;
    flex-direction: inherit;
    gap: 1rem;
}
.success-message section img{
    width: 3.2rem;
}
.success-message button{
    margin: 1rem 0 0;
}

@keyframes appear{
    0%{
        display: none;
        opacity: 0;
    }
    1%{
        display: flex;
        opacity: 0;
    }
    100%{
        display: flex;
        opacity: 1;
    }
}

@keyframes fade{
    0%{
        display: flex;
        opacity: 1;
    }
    99%{
        display: flex;
        opacity: 0;
    }
    100%{
        display: none;
        opacity: 0;
    }
}


.attribution { 
    font-size: 11px;   
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    position: absolute;
    bottom: .6rem;
    right: -16.2rem;
    padding: .6rem;
    border-top-left-radius: 1.2rem;
    border-bottom-left-radius: 1.2rem;
    background-image: linear-gradient(to right , var(--tomato) , var(--tomato) , var(--orange));
    transition: .6s;
}
.attribution:hover{
    right: -.2rem;
}
.attribution img{
    width: 1.3rem;
    margin-right: 1rem;
}
.attribution a { 
    color: hsl(228, 45%, 44%);
}


@media screen and ( max-width: 768px ){
    .newsletter-main{
        width: 100%;
        height: 100vh;
        border-radius: unset;
        flex-direction: column-reverse;
        padding: 0;
    }
    .newsletter-main .newsletter{
        padding: 1.2rem;
    }
    .newsletter-main .news-img-desktop{
        display: none;
    }
    .newsletter-main .news-img-mobile{
        display: block;
    }

    .success-message{
        width: 100%;
        height: 100vh;
        padding: 2rem;
        justify-content: space-between;
        border-radius: 0;
    }
    .success-message section{
        margin-top: 20%;
    }


}


@media screen and ( min-width: 769px ){
    .newsletter-main{
        width: 38rem;
    }
    .newsletter-main .newsletter{
        min-width: 19rem;
    }
    .newsletter-main .news-img-desktop{
        display: block;
        width: 20rem;
    }
    .newsletter-main .news-img-mobile{
        display: none;
    }
}


@media screen and ( min-width: 1024px ){
    .newsletter-main{
        width: 50rem;
    }
    .newsletter-main .news-img-desktop{
        width: 21rem;
    }
}


@media screen and ( min-width: 1600px ){
    .newsletter-main{
        width: 66rem;
    }
    .newsletter-main .news-img-desktop{
        /* width: 23rem; */
        height: 110%;
    }
}

