@import url("https://fonts.googleapis.com/css2?family=Climate+Crisis&family=Instrument+Serif:ital@0;1&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");
*,
*::before,
*::after {
  box-sizing: border-box;
  border: none;
  padding: 0;
  margin: 0;
  text-decoration: none;
  list-style: none;
}

html,
body {
  scrollbar-color: white transparent;
  scrollbar-width: thin;
}

body {
  font-family: "Rubik", sans-serif;
  background-color: hsl(0, 0%, 8%);
  color: white;
  overflow: hidden;
  overflow-y: auto;
}

.container {
  max-width: 1400px;
  width: 100%;
  margin: auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 5em;
  > h1 {
    font-family: "Climate Crisis", sans-serif;
    font-size: 2.5em;
    text-transform: uppercase;
  }
}

.maingrid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 40% 40%;
  grid-template-areas:
    "text logo"
    "payments logo";
  gap: 4em;
  padding-block: 2em;
  min-height: 100vh;
}

.about {
  grid-area: text;
}

.payment {
  grid-area: payments;
}

.about,
.payment {
  background-color: hsl(0, 0%, 10%);
  box-shadow: inset 0 1px 2px hsla(0, 0%, 100%, 0.31),
    0 2px 4px hsla(0, 0%, 0%, 0.31), 0 6px 10px hsla(0, 0%, 0%, 0.08);
  border-radius: 16px;
  padding: 2.5em 2em;
  > h1 {
    font-family: "Instrument Serif", serif;
    font-size: 3em;
  }
  > p {
    color: hsl(0, 0%, 70%);
    font-size: 1.25em;
    line-height: 1.313;
    margin-top: 0.5em;
  }
}

.logos {
  grid-area: logo;
  align-content: center;
  justify-content: center;
  img {
    width: 43.5em;
    aspect-ratio: 1/1;
  }
}

.contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5em;
}

.form-container {
  background-color: hsl(0, 0%, 10%);
  box-shadow: inset 0 1px 2px hsla(0, 0%, 100%, 0.31),
    0 2px 4px hsla(0, 0%, 0%, 0.31), 0 6px 10px hsla(0, 0%, 0%, 0.08);
  border-radius: 16px;
  padding: 2.5em 2em;
  max-width: 750px;
  max-height: 100%;
  > h2 {
    margin-bottom: 0.25em;
  }
  > p {
    margin-bottom: 1.5em;
    color: hsl(0, 0%, 70%);
  }
}

.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 4em 4em 16em 4em;
  grid-template-areas:
    "namebox companybox"
    "emailbox emailbox"
    "messagebox messagebox"
    "submitbox submitbox";
  gap: 1.5em;
}

input[type="text"],
input[type="email"],
button[type="submit"] {
  font-size: 1em;
  padding-inline: 1.75em;
  background-color: hsl(0, 0%, 15%);
  color: white;
  border-radius: 50vh;
}

textarea.messagebox {
  border: none;
  resize: none;
  outline: none;
  font-family: "Rubik", sans-serif;
  font-size: 1em;
  padding: 1.25em 1.75em;
  background-color: hsl(0, 0%, 15%);
  color: white;
  border-radius: 16px;
  margin-bottom: 1.5em;
}

button[type="submit"] {
  color: inherit;
  border: none;
  font: inherit;
  font-size: 1.25em;
  font-weight: bold;
  cursor: pointer;
  outline: inherit;
  background: #833ab4;
  background: linear-gradient(
    90deg,
    hsl(276, 31%, 47%) 0%,
    hsl(0, 68%, 55%) 50%,
    hsl(35, 67%, 63%) 100%
  );
}

button[type="submit"]:hover {
  background: #833ab4;
  background: linear-gradient(
    90deg,
    rgba(131, 58, 180, 1) 0%,
    rgba(253, 29, 29, 1) 50%,
    rgba(252, 176, 69, 1) 100%
  );
}

.namebox {
  grid-area: namebox;
}

.companybox {
  grid-area: companybox;
}

.emailbox {
  grid-area: emailbox;
}

.messagebox {
  grid-area: messagebox;
}

.submitbox {
  grid-area: submitbox;
}

.result-message {
  padding: 1.5em;
}

.footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 8em 2em;
  small {
    margin-block-start: 2em;
    color: hsla(0, 0%, 100%, 0.25);
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
    font-size: 0.95em;
  }

  .header h1 {
    font-size: 1.75em;
    text-align: center;
  }

  .maingrid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "logo"
      "text"
      "payments";
    gap: 2em;
    padding: 1.5em;
  }

  .logos img {
    width: 100%;
    max-width: 20em;
    margin: auto;
    display: block;
  }

  .about,
  .payment {
    padding: 1.5em;
  }

  .about > h1,
  .payment > h1 {
    font-size: 2em;
  }

  .about > p,
  .payment > p {
    font-size: 1em;
  }

  .grid-layout {
    grid-template-columns: 1fr 1fr;
    gap: 1em;
  }

  input[type="text"],
  input[type="email"],
  textarea.messagebox,
  button[type="submit"] {
    width: 100%;
  }

  .footer {
    padding-block: 4em 1.5em;
    padding-inline: 1.5em;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.5em;
  }

  .logos img {
    max-width: 16em;
  }

  .about > h1,
  .payment > h1 {
    font-size: 1.5em;
  }

  button[type="submit"] {
    font-size: 1em;
  }
}
