* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

:root {
  --tomato: hsl(4, 100%, 67%);
  --dark-slate-grey: hsl(234, 29%, 20%);
  --charcoal-grey: hsl(235, 18%, 26%);
  --grey: hsl(231, 7%, 60%);
  --white: hsl(0, 0%, 100%);
  --pale-navy: hsl(235, 18%, 26%);
  --dark-navy: hsl(234, 29%, 20%);
  --tomato: hsl(4, 100%, 67%);
  --btn-bottom: hsl(347, 100%, 66%);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--pale-navy);
}

#container {
  display: flex;
  max-width: 58rem;
  height: 40.063rem;
  background-color: var(--white);
  border-radius: 2.125rem;
  overflow: hidden;
  padding: 1.5rem 1.75rem 1.5rem 0rem;
}

h1 {
  color: var(--dark-navy);
  font-size: 3.438rem;
  letter-spacing: 0.5px;
  margin-top: 4.188rem;
  margin-bottom: 1.25rem;
}

.tag-line {
  line-height: 1.5;
  margin-bottom: 1.563rem;
}

p {
  font-size: 1rem;
  color: var(--dark-slate-grey);
}

main {
  max-width: 23.5rem;
  margin-left: 4.063rem;
  margin-right: 3.938rem;
}
.hide {
  display: none;
}
#form .error {
  display: none;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tomato);
  margin-top: 1.875rem;
  margin-bottom: 0.625rem;
}

#form:has(:not(:focus):invalid) .error {
  display: block;
}

.label-error {
  display: flex;
  justify-content: space-between;
}

.check-box {
  display: flex;
  align-items: center;
  margin-bottom: 0.813rem;
}

.check-box img {
  margin-right: 0.938rem;
}

form {
  display: flex;
  flex-direction: column;
}

form label {
  color: var(--dark-navy);
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 1.875rem;
  margin-bottom: 0.625rem;
}

input {
  width: 23.5rem;
  height: 3.5rem;
  border-radius: 0.625rem;
  border: 1px solid var(--grey);
  margin-bottom: 1.438rem;
  padding: 1.438rem;
  font-size: 1rem;
}
input:focus {
  outline: 1px solid var(--dark-navy);
}
input:hover {
  cursor: pointer;
}

input:not(:focus):invalid {
  background-color: hsla(4, 100%, 67%, 0.2);
  color: var(--tomato);
  border: 1px solid var(--tomato);
}

button {
  width: 376px;
  height: 56px;
  background: var(--dark-navy);
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  border-radius: 0.625rem;
  border: none;
  transition-property: background-image;
  transition-duration: 2s;
}

button:hover {
  cursor: pointer;
  background: linear-gradient(to bottom, var(--tomato), var(--btn-bottom));
  box-shadow: -1px 12px 28px 2px rgba(255, 82, 82, 0.42);
}

span {
  font-weight: 700;
}

.success-message {
  background-color: var(--white);
  width: 31.5rem;
  height: 32.5rem;
  border-radius: 2.25rem;
  padding: 3rem 3.938rem 0rem 3.938rem;
}

.success-message H1 {
  margin-top: 2.125rem;
  line-height: 58px;
  margin-bottom: 1.375rem;
}
.success-message p {
  line-height: 24px;
}

.success-message button {
  margin-top: 2.5rem;
}

@media screen and (max-width: 1000px) {
  #container {
    width: 23.438rem;
    height: 52.625rem;
    border-radius: 0px;
    flex-direction: column-reverse;
    padding: 0rem 0rem 2.438rem 0rem;
  }

  h1 {
    font-size: 2.5rem;
    letter-spacing: 0px;
    font-weight: 700;
    margin-top: 2.125rem;
    margin-bottom: 0rem;
  }

  button {
    width: 20.438rem;
    height: 3.5rem;
  }

  input {
    width: 20.438rem;
    margin-bottom: 1.5rem;
  }

  main {
    max-width: 20.438rem;
    margin-left: 1.5rem;
    margin-right: 0rem;
  }

  .tag-line {
    margin-top: 1.25rem;
  }

  .check-box {
    margin-top: 1.25rem;
    align-items: flex-start;
  }

  .success-message {
    width: 23.438rem;
    height: 50.75rem;
    border-radius: 0rem;
    padding: 9.375rem 0rem 0rem 1.375rem;
  }

  .success-message H1 {
    margin-top: 2.25rem;
    line-height: 1;
  }

  .success-message button {
    margin-top: 16.563rem;
  }
}
