/* ### CUSTOM PROPERTIES ### */

:root {
  /* # PRIMARY # */
  --pink-400: hsl(0, 36%, 70%);
  --red-500: hsl(0, 93%, 68%);

  /* # NAUTRAL # */
  --gray-900: hsl(0, 6%, 24%);

  /* # GRADIENTS: linear, 135deg # */
  /* # GRADIENT 1 # */
  --grad-1-clr-1: hsl(0, 0%, 100%);
  --grad-1-clr-2: hsl(0, 100%, 98%);

  /* # GRADIENT 2 # */
  --grad-2-clr-1: hsl(0, 80%, 86%);
  --grad-2-clr-2: hsl(0, 74%, 74%);

  /* # TYPOGRAPHY # */

  --ff-josefin-sans: "Josefin Sans", sans-serif;
  --fw-300: 300;
  --fw-400: 400;
  --fw-600: 600;
}

/* ### CSS RESET ### */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

body {
  line-height: 1.5;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

/* ### UTILITY CLASSES ### */

.hide {
  display: none;
}

.text-accent {
  color: var(--gray-900);
  font-weight: var(--fw-600);
}

.error {
  color: red;
  font-weight: var(--fw-300);
  padding-inline-start: 1.5rem;
  margin-top: 0.4rem;
  font-size: 0.925rem;
  text-align: start;
  max-width: 45ch;
  margin-inline: auto;
}

/* ### GENERAL STYLING ### */

body {
  min-height: 100vh;
  font-family: var(--ff-josefin-sans);
  background: linear-gradient(
    to bottom,
    var(--grad-1-clr-1),
    var(--grad-1-clr-2)
  );
  color: var(--pink-400);
}

h1 {
  font-weight: var(--fw-300);
  text-transform: uppercase;
  font-size: clamp(3rem, 2.7183rem + 1.2019vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: 0.6rem;
  margin-top: 5rem;
}

p {
  font-weight: var(--fw-400);
  font-size: clamp(0.925rem, 0.8898rem + 0.1502vw, 1.025rem);
  margin-top: 1rem;
  max-width: 45ch;
  margin-inline: auto;
}

/* ### BASE APPAREL ### */

.grid {
  display: grid;
  grid-template-areas:
    "header"
    "banner"
    "main-content";
  min-height: 800px;
  grid-auto-rows: auto auto 1fr;
}

.header {
  grid-area: header;
  padding: 2rem;
}

.header img {
  width: 120px;
}

.banner {
  grid-area: banner;
}

.banner img {
  margin-inline: auto;
}

.main-content {
  grid-area: main-content;
  text-align: center;
  padding-inline: 2rem;
}

form {
  margin-top: 2rem;
  display: grid;
  position: relative;
  max-width: 45ch;
  margin-inline: auto;
}

input[type="email"] {
  border-radius: 200px;
  border: 1px solid hsl(0, 60%, 83%);
  color: #000;
  padding: 0.8rem 1.5rem;
  width: 100%;
  grid-row: 1 / 2;
  grid-column: 1 / 2;
  background: inherit;
  padding-inline-end: 135px;
}

input[type="email"]::placeholder {
  color: hsl(0, 34%, 73%);
}

input[type="email"]:invalid {
  border: 2px solid red;
}

.error-icon-container {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 110px;
}

form button {
  border: none;
  padding: 1rem 1.8rem;
  border-radius: 200px;
  background: linear-gradient(
    to right,
    var(--grad-2-clr-1),
    var(--grad-2-clr-2)
  );
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  justify-self: end;
  box-shadow: 0px 8px 35px hsl(0, 78%, 84%);
  cursor: pointer;
}

form button:hover {
  background: hsl(0, 80%, 86%);
  box-shadow: 0px 8px 25px hsl(0, 30%, 62%);
}

/* ### MEDIA QUERIES ### */

@media (min-width: 70.5em) {
  body {
    background: linear-gradient(
      -45deg,
      var(--grad-1-clr-1),
      var(--grad-1-clr-2)
    );
  }

  .grid {
    grid-template-areas:
      "header banner"
      "main-content banner";
    grid-template-columns: 1fr 610px;
    grid-auto-rows: auto 1fr;
    background-image: url(./images/bg-pattern-desktop.svg);
    background-position: top right 610px;
    background-repeat: no-repeat;
    max-width: 1440px;
    margin-inline: auto;
  }

  .header,
  .main-content {
    width: 75%;
    margin-inline: auto;
  }

  .header img {
    padding-top: 2rem;
    width: 150px;
  }

  .main-content {
    text-align: start;
  }

  h1 {
    margin-top: 7rem;
    max-width: 10ch;
  }
  /* 
  p {
    max-width: 45ch;
  } */

  /* form {
    max-width: 45ch;
  } */

  form button {
    padding-inline: 2.5rem;
  }
}
