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

body{
    display: flex;
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    line-height: 1.3;
}

fieldset{
    border: whitesmoke 2px solid;
    border-radius: 8px;
    width: 70vw;
    box-shadow:0px 3px 9px rgb(146, 143, 143);
}

legend{
    margin-left: 3rem;
    font-size: 1.3rem;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
 }

#background{
    width: max(450px, 30vw);
    height: max(99vh, 700px);
}

.box{
    position: absolute;
    top:11rem;
    width: max(450px, 30vw);
    height: 200px;
    background-color: rgba(22, 21, 21, 0.527);
}
#logo{
    position: absolute;
    top: 12rem;
    left: 10rem;
    z-index: 1;
}

input{
    height: 1.5rem;
    width: 11rem;
    border: 2px solid rgb(236, 233, 233);
    border-radius: 6px;
}

input:focus{
    outline: 1px solid rgb(52, 52, 219);
}

button{
    padding: 1rem 2rem 1rem 2rem;
    font-size: 1.2rem;
    font-family: Arial, Helvetica, sans-serif;
    color: white;
    font-weight: 800;
    background-color: rgb(76, 94, 45);
    border: none;
    border-radius: 7px;
}

a{
    text-decoration: none;
    color: rgb(76, 94, 4);
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    cursor:pointer;
}

button:hover{
    background-color: rgb(101, 124, 58);
}

input:invalid:focus{
    outline: 2px solid red;
}

.col1 input[type='text']:focus:invalid + br + span::before{
    content: '*Please enter a name';
}

.col1 input[type='email']:focus:invalid + br + span::before{
    content: '*Please enter a valid email';
}

.col2 input[type='text']:focus:invalid + br + span::before{
    content: '*Please enter the last name';
}

.col2 input[type='tel']:focus:invalid + br + span::before{
    content: '*Please enter a valid telephone number';
}

.field span{
    margin-left: 3rem;
    font-size: 0.8rem;
    color: red;
}

.text{
    font-size: 1.1rem;
    font-weight: 550;
    margin-top: 13vh;
    padding-left: 3rem;
}

.field label, .field input{
    font-size: 0.8rem;
    font-weight: 500;
    font-family:  "Gill Sans", sans-serif;
    margin-left: 3rem; 
}

.col1 label, .col2 label{
    display: block;
    margin-top: 1.1rem;
}

.col2{
    margin-left: 12rem;
}

.field{
    margin-top: 2rem;
    display: flex;
    flex-direction: row;
}

.btn{
    margin-left: 2.5rem;
    margin-top: 2.8rem;
}

.subText{
    font-size: 1rem;    
    margin-top: 1.5rem;
    margin-left: 2.8rem;
}

@media only screen and (max-width: 540px){
    body{
        display: flex;
        flex-direction: column;
    }
    img{
        width: 25vw;
    }
    .field{
        display: flex;
        flex-direction: column;
    }
    .field, .field ~ *{
        margin-left: 10vw;
    }
    
    #background, .box{
        width: 480px;
    }

    #logo{
        left: 11rem;
    }
    .col2{
        margin: 0;
    }
}

