/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

body {
  /* 3. Add accessible line-height */
  line-height: 1.5;
  /* 4. Improve text rendering */
  -webkit-font-smoothing: antialiased;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
}

/* 5. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 6. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 7. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 8. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/**Colors**/

:root {
  --Tomato: hsl(4, 100%, 67%);
  --Dark-Slate-Grey: hsl(234, 29%, 20%);
  --Charcoal-Grey: hsl(235, 18%, 26%);
  --Grey: hsl(231, 7%, 60%);
  --White: hsl(0, 0%, 100%);
}
.container{
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--Charcoal-Grey);

}

.newsletter-container{
    display: flex;
    max-width: 900px;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid green;
    background-color: var(--White);

}

.sign-up-section{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding: 30px 0 30px 30px;
    flex-grow: 0;

}

.sign-up-section h1{
    font-size: 3.5rem;
    color:var(--Charcoal-Grey);
    
} 

.sign-up-section ul{
  margin: 0;
  padding: 0;
  list-style-position: inside;

}

.sign-up-section li{
list-style-image: url(assets/images/icon-list.svg);
}

.sign-up-form{
  display: flex;
  flex-direction: column;
  width: 85%;

}



.email-validation{
  display: flex;
  justify-content: space-between;
  margin-bottom: .4rem;
}

.sign-up-form label{
font-size: .8rem;
font-weight: 500;
color: var(--Dark-Slate-Grey);
}

.email-validation .invalid-email{
  color: var(--Tomato);
  display: none;
}

.email-input{
  padding: 10px 0 10px 10px;
  border-radius: 5px;
  outline: none;
  border: 1px solid var(--Grey);
  margin-bottom: .9rem;

}

.email-input::placeholder{
  color: var(--Grey);
}

.btn-input{
  padding: 15px 0;
  border-radius: 5px;
  outline: none;
  border: none;
  background-color: var(--Dark-Slate-Grey);
  color: var(--White);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;

}

.btn-input:hover{
  background: linear-gradient(107deg, rgba(219,96,111,1) 34%, rgba(209,150,66,1) 56%, rgba(253,127,49,1) 100%);}


/*
success form card
*/

.newsletter-success{
  display: none;
  background-color: var(--White);
  width: 100%;
  max-height: 400px;
  max-width: 400px;
  border-radius: 1rem;
  place-content: center;
  gap: 1.5rem;
  padding:  3rem;
}

.newsletter-success img{
width: 45px;
}

.newsletter-success h2{
font-size: 3rem;
line-height: 1;
margin: 1.5rem 0;
color: var(--Dark-Slate-Grey);

}

.newsletter-success p{
  font-size: .8rem;
}

.user-email{
  font-weight: 600;
  color: var(--Dark-Slate-Grey);

}

.dismiss-messsage{
border: none;
background-color: var(--Dark-Slate-Grey);
padding: .7rem 0;
border-radius: .6rem;
color: var(--White);
font-size: .9rem;
font-weight: 600;
cursor: pointer;

}

.newsletter-success button:hover{
  background: linear-gradient(107deg, rgba(219,96,111,1) 34%, rgba(209,150,66,1) 56%, rgba(253,127,49,1) 100%);

}

/*
Media query
*/

@media (width < 800px ) {
  .newsletter-container{
    flex-direction: column;
    padding: 0;
    width: 375px;
    border-radius: 0;

  }

  .sign-up-section{
    order: 2;
    padding: 2rem;
    gap: 1.1rem;

  }

  .sign-up-form{
    width: 100%;
  }

  .sign-up-section h1{
    font-size: 2.6rem;
  }

  /*
  Mobile success
  */

  .newsletter-success{
    min-height: 100vh;
    border-radius: 0;
    align-content: space-between; 
    padding: 9rem 2rem 2rem 2rem;

  }

 

  .mobile-success-text{
    display: grid;
    gap: 2rem;
  }

  .mobile-success-text img{
    width: 80px;
  }

  .mobile-success-text p{
font-size: 1.2rem;
text-align: left;
  }

  .dismiss-messsage{
    padding: 1rem 0;
  }

 
}