:root {
  --primary-color-des-red: hsl(0, 36%, 70%);
  --primary-color-soft-red: hsl(0, 93%, 68%);
  --neutral-color: hsl(0, 6%, 24%);
  --gradient-soft: linear-gradient(135deg, hsl(0, 0%, 100%), hsl(0, 100%, 98%));
  --gradient-button: linear-gradient(
    135deg,
    hsl(0, 80%, 86%),
    hsl(0, 74%, 74%)
  );
}

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

body {
  font-family: 'Josefin Sans', sans-serif;
  line-height: 1.6;
  font-size: 1rem;
}

a {
  cursor: pointer;
}

h1 {
  line-height: 1.1;
  font-size: 4rem;
  font-weight: 600;
  letter-spacing: 0.8rem;
  text-transform: uppercase;
}

img {
  max-width: 100%;
  height: auto;
}

/* main */

main {
  display: grid;
  grid-template-columns: 1fr 610px;
  max-width: 1440px;
  margin: auto;
}

/* Section left */
.section-l {
  background: url(../img/bg-pattern-desktop.svg) no-repeat bottom center/cover;
  max-height: 800px;
}

.section-l .container {
  position: relative;
  max-width: 54%;
  min-width: 340px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.container .navbar {
  position: absolute;
  top: 8%;
}

.container h1 span {
  color: var(--primary-color-des-red);
  font-weight: 300;
}

.container p {
  color: var(--primary-color-des-red);
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* Email Form in section left */
.email-form {
  max-width: 100%;
  position: relative;
}

.email-form input {
  font-family: inherit;
  color: var(--neutral-color);
  max-width: 100%;
  font-size: 1rem;
  display: inline-block;
  padding: 20px;
  border-radius: 30px;
  outline: 0;
  border: 1px solid #dbcbce;
}

.email-form .submit {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0%;
  width: 100px;
  height: 60px;
  background-image: var(--gradient-button);
  /* background-color: transparent; */
  font-size: 1rem;
  text-align: center;
  margin: 0;
  padding: 0;
  outline: 0;
  border: none;
  cursor: pointer;
  border-radius: 30px;
  box-shadow: 1px 10px 12px #f3dbda;
  /* transition: background 250ms ease; */
}

.email-form .submit:hover {
  background-image: none;
  background: #f8cccd;
}

::placeholder {
  /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: var(--primary-color-des-red);
  opacity: 0.5;
}

:-ms-input-placeholder {
  /* Internet Explorer 10-11 */
  color: var(--primary-color-des-red);
  opacity: 0.7;
}

::-ms-input-placeholder {
  /* Microsoft Edge */
  color: var(--primary-color-des-red);
  opacity: 0.7;
}

input[type='email']:invalid {
  border: 1.5px solid var(--primary-color-soft-red);
}

:invalid + .icon-validation::before {
  position: absolute;
  right: 110px;
  top: 13px;
  background-color: var(--primary-color-soft-red);
  color: #fff;
  display: inline-block;
  width: 2em;
  height: 2em;
  border: none;
  text-align: center;
  border-radius: 50%;
  line-height: 2em;
  content: attr(data-icon);
}

:invalid ~ .error-msg::after {
  display: block;
  opacity: 0.7;
  margin-top: 0.5rem;
  content: attr(title);
  color: var(--primary-color-soft-red);
  margin-left: 1.5rem;
}

/* Utilities */

/* Media Queries */
@media only screen and (max-width: 375px) {
  main {
    grid-template-columns: 1fr;
    overflow: hidden;
    background-color: #fff8f8;
  }

  h1 {
    font-size: 2.5rem;
  }

  p {
    font-size: 0.9rem;
  }

  /* section left */

  .section-l {
    margin-top: 150px;
    background-image: none;
    text-align: center;
  }

  .section-l .container {
    max-width: 85%;
    min-width: 0;
  }

  .container .navbar {
    top: -365px;
    left: -30px;
  }

  .navbar img {
    width: 70%;
  }

  .section-r {
    order: -1;
    padding-top: 85px;
    height: 250px;
    background-color: #fff;
  }

  .email-form {
    margin-bottom: 50px;
  }

  .email-form input {
    max-width: 98%;
    font-size: 0.8rem;
    padding: 15px;
    background-color: #fff8f8;
  }

  .email-form .submit {
    right: 0;
    width: 70px;
    height: 46px;
    font-size: 0.8rem;
  }

  :invalid + .icon-validation::before {
    position: relative;
    right: -50px;
    top: -35px;
    width: 1.5em;
    height: 1.5em;
    line-height: 1.8em;
  }

  :invalid ~ .error-msg::after {
    margin-top: -1.5rem;
    content: attr(title);
    margin-left: -50px;
  }
}
