@import url("https://fonts.googleapis.com/css?family=Josefin+Sans:300,400,600&display=swap");

:root {
  --desaturated-red: hsl(0, 36%, 70%);
  --soft-red: hsl(0, 93%, 68%);
  --darkgray-red: hsl(0, 6%, 24%);
  --fadeColor: linear-gradient(
    135deg,
    hsl(0, 80%, 86%) 0%,
    hsl(0, 74%, 74%) 100%
  );
}

html,
body {
  font-size: 16px;
  font-family: "Josefin Sans", sans-serif;
  height: 100vh;
  min-height: 100vh;
  width: 100vw;
}

* {
  box-sizing: border-box;
}

/* mobile */
@media only screen and (min-width: 375px) {
  header {
    background-color: red;
  }

  .flex-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
  }

  .banner.mobile {
    padding: 1.5rem;
  }

  .banner.mobile img {
    height: 1.5rem;
  }
  .banner.desktop {
    display: none;
  }

  /* TEXT SIDE */
  .pane-1 {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
    padding-top: 3rem;
    height: 60%;
  }

  .inner-pane {
    width: 80%;
    line-height: 1.3;
  }

  .inner-pane h1 {
    font-size: 2.5rem;
    text-align: center;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 0.5rem;
  }

  br.desktop-breakspace {
    display: block;
  }

  .inner-pane > * {
    margin-bottom: 1rem;
  }

  .inner-pane p {
    color: var(--desaturated-red);
    text-align: center;
    max-width: 500px;
    margin: auto;
    margin-bottom: 1rem;
  }

  .inner-pane h1 span {
    color: var(--desaturated-red);
    font-weight: 300;
  }

  form.email-box {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
  }
  .inner-pane input {
    border-radius: 20px;
    outline: none;
    border: 2px solid #eee;
    padding: 1rem 2rem;
    width: 100%;
    font-family: inherit;
    font-weight: 600;
    font-size: 1fem;
  }

  form.email-box button {
    padding: 0.9rem 1.8rem;
    border-radius: 40px;
    outline: none;
    border: none;
    background: var(--fadeColor);
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    right: 0;
    top: 0;
    /* offset-x | offset-y | blur-radius | spread-radius | color */
    box-shadow: 2px 2px 1rem 1px hsla(0, 36%, 70%, 0.8);
  }
  /* PICTURE SIDE */
  .pane-2 {
    background-image: url(../images/hero-mobile.jpg);
    background-size: cover;
    height: 40%;
    width: 100%;
    order: 1;
  }

  input.form-error {
    border: 2px solid red;
    background-image: url(../images/icon-error.svg);
    background-size: 2rem;
    background-repeat: no-repeat;
    background-position: 75% center;
  }

  #form.form-error::after {
    content: attr(form-error-message);
    position: absolute;
    left: 2rem;
    bottom: -1rem;
    color: var(--soft-red);
  }
}
/* desktop */
@media only screen and (min-width: 992px) {
  .flex-container {
    flex-direction: row;
  }

  .pane-1 {
    width: 60%;
    height: 100%;
    background-image: url(../images/bg-pattern-desktop.svg);
    background-size: cover;
    flex-direction: column;
    position: relative;
    order: 1;
  }

  .banner.mobile {
    display: none;
  }
  .banner.desktop {
    width: 50%;
    position: absolute;
    top: 3rem;
    display: block;
  }
  .inner-pane {
    width: 50%;
    line-height: 1.3;
  }
  .inner-pane h1 {
    font-size: 4rem;
    text-transform: uppercase;
    letter-spacing: 0.4rem;
    text-align: left;
  }

  .inner-pane p {
    color: var(--desaturated-red);
    text-align: left;
  }

  .inner-pane input {
    font-size: 1rem;
    padding: 1rem 2rem;
  }

  form.email-box {
    padding: 1rem;
    position: relative;
  }

  form.email-box button {
    border-radius: 20px;
    padding: 1rem 1.5rem;
    top: 1rem;
  }

  .pane-2 {
    background-image: url(../images/hero-desktop.jpg);
    height: 100%;
    width: 40%;
    order: 2;
  }
}
