@import url(./reset.css);
@import url(./fonts.css);

:root {
  --red: hsl(0, 100%, 74%);
  --green: hsl(154, 59%, 51%);
  --blue: hsl(248, 32%, 49%);
  --dark-blue: hsl(249, 10%, 26%);
  --grayish-blue: hsl(246, 25%, 77%);

  --fs-sm: clamp(0.8125rem, 0.7566105769230769rem + 0.2884615384615385vw, 1rem);
  --fs-mid: clamp(0.875rem, 0.8004807692307693rem + 0.38461538461538464vw, 1.125rem);
  --fs-lg: clamp(2rem, 1.4411057692307692rem + 2.8846153846153846vw, 3.875rem);
}

body {
  font-family: 'Poppins', sans-serif;
  background: url('../images/bg-intro-mobile.png');
  background-position: center;
  background-color: var(--red);
}

main {
  min-height: inherit;
}

.wrapper {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
}

.flex {
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  min-height: inherit;
}

.hero {
  color: white;
  text-align: center;
}

.hero-title {
  margin-top: 2rem;
  margin-bottom: .8em;
  font-size: var(--fs-lg);
  line-height: 1.1;
}

/* free trial banner */

.free-trial {
  cursor: pointer;
  margin-block: 2rem;
  color: white;
  background-color: var(--blue);
  padding: 1.2em 2em;
  border-radius: .5rem;
  box-shadow: 0px 10px 0px -2px rgba(0, 0, 0, 0.233);
  text-align: center;

  & p {
    margin: 0 auto;
    width: 20ch;
    font-size: var(--fs-sm);
  }
}

.text-accent {
  font-weight: 700;
}

/* Subscribe form */
.form {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5em;
  max-width: 660px;
}

.input-wrapper {
  position: relative;
  margin-bottom: min(1em);
}

.input-field {
  max-width: 100%;
  width: 100%;
  font-weight: 700;
  padding: 1em 1.5em;
  border-radius: .5rem;
  border: 1px solid hsla(0, 0%, 50%, 0.411);
  font-size: var(--fs-sm);
}

.input-field.error {
  border: 2px solid var(--red);
}

.btn-submit {
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  width: 100%;
  border: none;
  padding: 1.2em;
  border-radius: .5rem;
  background-color: var(--green);
  box-shadow: 5px -28px 0px -23px hsl(154, 57%, 38%) inset;
  font-size: var(--fs-sm);

  &:hover {
    cursor: pointer;
    opacity: .7;
  }
}

.terms-services {
  display: block;
  font-size: .75rem;
  color: var(--grayish-blue);
  margin-top: 2em;
  text-align: center;

  & .text-accent {
    color: var(--red);
  }
}

.error-message {
  color: var(--red);
  font-size: 0.75rem;
  font-style: italic;
  position: absolute;
  right: 0;
  bottom: -1.5rem;
}

.error-icon {
  content: url('../images/icon-error.svg');
  position: absolute;
  right: 2rem;
  top: 1rem;
}

/* Desktop styles */

@media (width >=1024px) {
  .flex {
    flex-flow: row;
  }

  .hero {
    text-align: left;
    max-width: 50%;
  }

  .hero-title {
    letter-spacing: 3px;
    margin-bottom: .5rem;
  }

  .hero-paragraph {
    font-size: 1.125rem;
  }

  .form {
    padding: 2em;
    min-width: 660px;
  }

  .input-wrapper {
    margin-bottom: 2.5em;
  }

  .free-trial {
    padding: 2em;

    & p {
      width: initial;
    }
  }

}

@media (width >=1400px) {
  .wrapper {
    max-width: 1350px;
    gap: 1em;
  }
}