* {
  box-sizing: border-box;
}

:root {
  --desaturated-red: hsl(0, 36%, 70%);
  --soft-red: hsl(0, 93%, 68%);
  --dark-grayish-red: hsl(0, 6%, 24%);
  --gradient-1: linear-gradient(135deg, hsl(0, 0%, 100%), hsl(0, 100%, 98%));
  --gradient-2: linear-gradient(135deg, hsl(0, 80%, 86%), hsl(0, 74%, 74%));
  font-size: 16px;
  font-family: 'Josefin Sans', sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--gradient-1);
}

main {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr auto 1fr auto;
}

.logo, .hero-message {
  grid-column: 2/3;
  max-width: 500px;
  padding: 0 25px;
}

.logo {
  margin: 75px 0;
}

.hero-image {
  grid-column: 4/-1;
  grid-row: 1/-1;
  width: fit-content;
  display: inline-block;
}

.hero-image img {
  display: block;
}

.hero-message h1 {
  font-size: 4rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--dark-grayish-red);
  margin-bottom: 0;
}

h1 span {
  color: var(--desaturated-red);
  font-weight: 300;
}

.hero-message > p {
  color: var(--desaturated-red);
  line-height: 1.8rem;
}

form > div {
  display: flex;
  margin: 2rem 0 1rem;
}

.btn {
  margin-left: calc(-6rem - 12px);
}

form.error input {
  border: 2px solid var(--soft-red);
  outline: none;
}

form.error button::before {
  position: absolute;
  left: -2.3rem;
  content: url(../images/icon-error.svg);
}

.email-error {
  visibility: hidden;
}

form.error .email-error {
  visibility: visible;
  color: var(--soft-red);
  margin: 0;
  padding-left: 2rem;
  text-align: left;
}

input, button {
  height: 4rem;
  border-radius: 2rem;
  display: block;
  border: 1px solid hsla(0, 6%, 24%, 0.25);
  color: var(--dark-grayish-red);
}

input:focus, input:active, button:focus, button:active {
  outline: 1px solid hsla(0, 6%, 24%);
}

input, button, input::placeholder {
  font: inherit;
}

input::placeholder {
  color: var(--desaturated-red);
}

form input {
  width: calc(100%);
  padding: 0 9rem 0 2rem;
  background: transparent;
}

form button {
  position: relative;
  display: block;
  border: 0;
  padding: 0 3rem;
  background: var(--gradient-2);
  box-shadow: 0 1.5rem 1.5rem 0 rgba(65, 58, 58, 0.3);
  cursor: pointer;
}

form button:hover {
  background: hsl(0, 56%, 80%);
}

.bg {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: url(../images/bg-pattern-desktop.svg);
  background-size: 58% 100%;
  background-repeat: repeat;
  z-index: -999;
}

@media screen and (max-width: 780px) {
  .bg {
    display: none;
  }

  main {
    display: block;
  }

  .logo, .hero-message {
    max-width: unset;
  }

  .hero-message h1 {
    margin-top: 4rem;
    font-size: 3rem;
  }

  .logo {
    margin: 30px 0;
    text-align: left;
  }

  .hero-image img {
    display: block;
    max-width: 100%;
  }

  :root {
    font-size: 14px;
    text-align: center;
  }

  input, button {
    height: 3rem;
  }

  form button {
    padding: 0 1.5rem;
  }

  form input {
    padding: 0 6rem 0 2rem;
  }

  .btn {
    margin-left: calc(-3rem - 12px);
  }
}
