@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans&display=swap");
* {
  box-sizing: border-box;
}

body {
    background:linear-gradient(135deg,  hsl(0, 0%, 100%),  hsl(0, 100%, 98%));
  font-family: "Josefin Sans", sans-serif;
  margin: 0;
}

.container {
  display: flex;
  min-height: 100vh;
}

.left {
  background-image: url("./images/bg-pattern-desktop.svg");
  background-size: cover;
  padding: 0 40px;
  width: 80%;
}
.inner-container {
  max-width: 450px;
  margin: auto;
}
.right {
  width: 40%;
}

.bg-image {
  background-image: url("./images/hero-desktop.jpg");
  background-size: cover;
  background-position: center center;
}
.bg-mobile {
  display: none;
}
.logo {
  margin: 20px 0;
  width: 200px;
}
h1 {
  color: hsl(0, 6%, 24%);
  font-size: 60px;
  line-height: 1.1;
  margin-bottom: 0;
  letter-spacing: 10px;
  text-transform: uppercase;
  transform: translateX(-100%);
  animation: comingleft 0.5s ease-in forwards;
}

h1 span {
  color: hsl(0, 30%, 70%);
  font-weight: 200;
}

p {
  color: hsl(0, 30%, 70%);
  line-height: 26px;
  margin: 30px 0;
  transform: translateX(100%);
  opacity: 0;
  animation: comingRight 0.7s ease-in forwards;
}

form {
  position: relative;
  transform: translateX(-100%);
  animation: comingleft 1s ease-in forwards;
}

form.error input {
  border: 2px solid hsl(0, 93%, 60%);
}
form.success input {
  border: 2px solid hsl(129, 83%, 89%);
}
input {
  background-color: transparent;
  border: 1px solid hsl(0, 36%, 70%);
  border-radius: 50px;
  font-size: 16px;
  padding: 15px 30px;
  height: 55px;
  width: 100%;
}

input:focus {
  box-shadow: 0px 0px 10px hsla(0, 36%, 70%, 0.5);
  outline: none;
}

input::placeholder {
  color: hsl(0, 36%, 70%);
}

button {
  background: linear-gradient(135deg, hsl(0, 80%, 86%), hsl(0, 74%, 74%));
  box-shadow: 2px 5px 10px hsla(0, 36%, 70%, 0.5);
  border: none;
  border-radius: 50px;
  padding: 15px;
  position: absolute;
  cursor: pointer;
  top: 0;
  right: 0;
  width: 100px;
  height: 55px;
  outline: none;
}

button:hover {
  opacity: 0.6;
}

.error-icon {
  display: none;
  position: absolute;
  top: 15px;
  right: 110px;
}

form.error .error-icon {
  display: block;
}
small {
  display: none;
  color: hsl(0, 93%, 68%);
  margin-top: 15px;
  margin-left: 30px;
}

form.error small {
  display: block;
}

/*  Animations */
@keyframes comingleft {
  to {
    transform: translateX(0);
  }
}

@keyframes comingRight {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
/* credits */

.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

@media screen and (max-width: 600px) {
  .bg-mobile {
    display: block;
    margin-left: -40px;
    margin-right: -40px;
    width: calc(100% + 80px);
  }
  .logo {
    margin: 20px 0;
    width: 100px;
  }
  * h1 {
    font-size: 40px;
    text-align: center;
  }
  p {
    text-align: center;
  }
  .left {
    width: 100%;
  }
  .right {
    display: none;
  }
}
