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

:root{
    --Tomato: hsl(4, 100%, 67%);
    --DarkSlateGray: hsl(234, 29%, 20%);
    --CharcoalGray:hsl(235, 18%, 26%);
    --Gray:hsl(231, 7%, 60%);
    --White:hsl(0, 0%, 100%);
    --FontSize: 16px;
    --FontFamily:'Roboto';
    --weight4:400;
    --weight7:700;
}

body{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    max-width: 100vw;
    max-height: 100%;
    font-family: var(--FontFamily);
}

.sub{
    padding: 2rem 1.5rem;
    color: var(--DarkSlateGray);
}

h1{
    font-size: 2.2rem;
    font-weight: var(--weight7);
}

p{
    font-size: 1.02rem;
    padding: 1.3rem 0.95rem 1.3rem 0rem;
    font-weight: var(--weight4);
}

ul{
    list-style: none;
    margin-inline-start: -1rem;
}

.itemL {
    display: flex;
    align-items: start;
    padding: 0.3rem 1rem;
    line-height: 1.5rem;
    font-weight: var(--weight4);
}

.itemL img {
    margin-inline-end: 1rem;
}

form{
    padding-block-start: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#labels{
    display: grid;
    grid-template-columns: 2 / 1fr;
    grid-template-rows: 1 / 1fr;
    justify-content: space-between;
    width: 20.7rem;
}

label{
    grid-area: 1 / 1 / 1 / 1;
    font-size: 0.75rem;
    font-weight: var(--weight7);
}

#errorMsg{
    grid-area: 1 / 2 / 1 / 2;
    font-size: 0.75rem;
    font-weight: var(--weight7);
    color: var(--Tomato);
}

input[type="email"]{
    width: 21rem;
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--Gray);
    margin-block-start: -0.6rem;
    margin-block-end: 0.4rem;
    cursor: pointer;
    color: var(--DarkSlateGray);
    font-family: var(--FontFamily);
    font-size: 1rem;
}

input::placeholder{
    color: var(--Gray);
    font-family: var(--FontFamily);
    font-size: 1rem;
}

.tomato::placeholder{
    color: var(--Tomato);
    font-family: var(--FontFamily);
    font-size: 1rem;
}

button{
    cursor: pointer;
    width: 21rem;
    padding: 1.2rem;
    border-radius: 8px;
    border: 0px;
    background-color: var(--DarkSlateGray);
    color: white;
    font-size: 1rem;
    font-family: var(--FontFamily);
    font-weight: 500;
}

button:hover, button:focus{
    background-image: linear-gradient(to right, #FF527B,#FF6155);
    border: 0px;
    box-shadow: 0px 7px 18px rgba(255, 102, 71, 0.8);
}

.success{
    padding-block-start: 8rem;
}

.thanks{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#sTitle, #sDesc{
    padding-left: 1.5rem;
    padding-inline-end: 1.2rem;
}

#sDesc{
    padding-bottom: 12rem;
}

.check{
    margin-left: 1.5rem;
    margin-block-end: 1.7rem;
}

#userEmail{
    font-weight: var(--weight7);
}

#subscribe{
    display: block;
}

#success{
    display: none;
}

footer{
    color: var(--CharcoalGray);
    margin: 1rem;
}


@media (min-width: 760px){

    body{
        background-color: var(--CharcoalGray);
    }

    .main{
        display: flex;
        background-color: white;
        padding: 0.5rem 1.5rem;
        border-radius: 2.5rem;
        justify-content: center;
        align-items: center;
        max-width: 45rem;
        margin-block-start: 10rem;
        margin-block-end: 5rem;
    }

    .sub{
       order: -1;
       padding: 2rem 0.5rem 2rem 1.2rem;
    }

    .itemL {
        display: flex;
        align-items: start;
        padding: 0.3rem 2rem 0.3rem 1rem;
        line-height: 1.3rem;
        margin-block-end: -0.2rem;
    }

    h1{
        font-size: 2.5rem;
    }

    p{
        margin-block-start: -0.5rem;
        margin-block-end: -0.5rem;
    }
    
    form{
        align-items: self-start;
        margin-top: -0.5rem;
    }
    
    #labels{
        width: 19.8rem;
        margin-block-start: -0.5rem;
    }
    
    input[type="email"]{
        width: 20rem;
    }

    button{
        margin-block-start: -0.5rem;
        width: 20.1rem;
    }
    
    .success{
        display: flex;
        background-color: white;
        padding: 3rem 2rem;
        border-radius: 2.5rem;
        justify-content: center;
        align-items: center;
        width: 30rem;
        margin-block-start: 10rem;
        margin-block-end: 5rem;
    }

    #sTitle{
        line-height: 3.5rem;
        font-size: 3.5rem;
    }
    
    #sDesc{
        line-height: 1.5rem;
        margin-block-end: -9.4rem;
    }
    
    .check{
        margin-block-end: 2.2rem;
    }

    #goBack{
        width: 24.4rem;
    }

    #subscribe{
        display: block;
    }
    
    #success{
        display: none;
    }
    
    footer{
        color: var(--Gray);
        position: absolute;
        bottom: 1rem;
    }

}

@media (min-width: 1200px){

    body{
        background-color: var(--CharcoalGray);
    }

    .main{
        display: flex;
        background-color: white;
        padding: 1.5rem;
        border-radius: 2.5rem;
        justify-content: center;
        align-items: center;
        max-width: 56rem;
        margin-block-start: 10rem;
        margin-block-end: 5rem;
    }

    .sub{
       order: -1;
       padding: 2rem 2rem;
    }
    
    h1{
        font-size: 3.3rem;
        font-weight: var(--weight7);
    }

    p{
        margin-block-end: -0.3rem;
    }
    
    form{
        align-items: self-start;
        margin-top: -0.5rem;
    }
    
    #labels{
        width: 24.25rem;
    }
    
    input[type="email"]{
       width: 24.3rem;
    }

    button{
        margin-block-start: -0.3rem;
        width: 24.4rem;
    }
    
    .success{
        display: flex;
        background-color: white;
        padding: 3rem 2rem;
        border-radius: 2.5rem;
        justify-content: center;
        align-items: center;
        max-width: 30rem;
        margin-block-start: 10rem;
        margin-block-end: 5rem;
    }

    #sTitle{
        line-height: 3.5rem;
        font-size: 3.5rem;
    }
    
    #sDesc{
        line-height: 1.5rem;
        margin-block-end: -9.4rem;
    }
    
    .check{
        margin-block-end: 2.2rem;
    }

    #subscribe{
        display: block;
    }
    
    #success{
        display: none;
    }
    
    footer{
        color: var(--Gray);
        position: absolute;
        bottom: 1rem;
    }

}
