:root {
  /* FONT SIZE : Scale= 16 x1.25 */
  --text-sm: 1rem; /* 1.28rem*/
  --text-link: 1.5rem; /* 1.4rem */
  --text-paragraph: 1.6rem; /* 1.6rem */
  --text-h6: 2.3rem;
  --text-h5: 2.5rem;
  --text-h4: 3.125rem;
  --text-h3: 3.906rem;
  --text-h2: 4.883rem;
  --text-h1: 6.104rem;

  /* SPACING */
  --space-xs: 0.4rem; /* 4px */
  --space-sm: 0.8rem; /* 8px */
  --space-md: 1.6rem; /* 16px */
  --space-lg: 3.2rem; /* 32px */
  --space-xl: 6.4rem; /* 64px */
  --space-2xl: 12.8rem; /* 128px */
  /* Guidance:
  Use:
    --space-lg or xl for section spacing
    --space-md for card/grid gap
    --space-sm for text or button spacing */

  /* FONT WEIGHT */
  --fw-normal: 400;
  --fw-500: 500;
  --fw-medium: 600;
  --fw-bold: 700;

  /* LINE HEIGHT */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;

  /* LETTER SPACING : for big letter gap of heading tags*/
  /* --letter-spacing-tight: -2px; */

  /* FONT FAMILY */
  --ff-body: "Poppins", sans-serif;

  /* COLOR : Tint / Base / Shade */
  /* Use website: maketintsandshades.com */
  --primary-red: hsl(0, 100%, 74%);
  --primary-green: hsl(154, 59%, 51%);
  --primary-dark-green: hsl(155, 63%, 41%);

  --blue: hsl(248, 32%, 49%);
  --dark-blue: hsl(249, 10%, 26%);
  --Grayish-blue: hsl(246, 25%, 77%);
  --white: #fff;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* 62.5% of 16px = 10px */
  /* 62.5% of 24px = 15px */
  /* When browser change font-size it will scale base on browser font-size */
  font-size: 62.5%;
}

body {
  font-family: var(--ff-body);
  font-weight: var(--fw-normal);
  line-height: var(--line-height-normal);
  color: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--fw-bold);
  line-height: var(--line-height-tight);
  /* letter-spacing: -2px; NOTE: depend on font */
  /* color: black; depend on style*/
}

/* use website Typescale.com */
h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-h4);
}

h5 {
  font-size: var(--text-h5);
}

h6 {
  font-size: var(--text-h6);
}

p {
  /* font size 16px or 20px base on text readability */
  font-size: var(--text-paragraph);
}

a {
  text-decoration: none;
  display: inline-block;
}

ul {
  list-style: none;
}

span {
  display: inline-block;
}

small {
  font-size: var(--text-sm);
}

.container {
  max-width: 1200px;
  /* width 90% so when browser shrink below 1200px the width of the container will be 90% of the web page and make space each side */
  width: 90%;
  margin: 0 auto;

  display: flex;
  align-items: center;
  height: 100%;
}
/* ===== Styling layout ====== */
.signup {
  height: 100vh;
  background-color: var(--primary-red);
  background-image: url("../images/bg-intro-desktop.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  align-items: center;
  gap: var(--space-xl);
}
.heading {
  margin-bottom: var(--space-md);
}
.signup-message {
  background-color: var(--blue);
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: var(--space-md);
  border-radius: var(--space-sm);
  margin-bottom: var(--space-md);
}
.message span {
  font-weight: var(--fw-medium);
}
.signup-form {
  background-color: var(--white);
  padding: var(--space-lg);
  border-radius: var(--space-sm);

  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.form-control {
  width: 100%;
  position: relative;
}
.form-control .input-field {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--space-sm);

  border: 1px solid rgba(0, 0, 0, 0.15);
}
.input-field::placeholder {
  font-family: var(--ff-body);
  font-weight: var(--fw-500);
}
.input-field:focus {
  border: 1px solid var(--blue);
  outline: none;
}
.error-icon {
  position: absolute;
  right: var(--space-md);
  top: 40%;
  transform: translateY(-70%);
}
.error-message {
  color: var(--primary-red);
  display: block;
  font-style: italic;
  text-align: end;
  margin-top: var(--space-xs);
  font-weight: var(--fw-500);
}
.btn-freeTrial {
  text-transform: uppercase;
  padding: var(--space-md);

  display: flex;
  justify-content: center;
  align-items: center;

  font-family: var(--ff-body);
  color: var(--white);
  background-color: var(--primary-green);
  font-weight: var(--fw-500);
  letter-spacing: 1px;
  border-radius: var(--space-xs);

  border: none;
  box-shadow: 1px 2px 1px 2px var(--primary-dark-green);
  cursor: pointer;
  transition: 0.15s;
}
.btn-freeTrial:hover {
  opacity: 0.8;
}
.service-terms {
  color: var(--Grayish-blue);
  font-size: 10px;
  text-align: center;
}
.service-terms a {
  color: var(--primary-red);
  font-weight: var(--fw-medium);
}
footer {
  padding: var(--space-md);
  text-align: center;
  color: var(--dark-blue);
}

/* === State class === */
.hidden {
  display: none;
}
.invisible {
  visibility: hidden;
}
.input-field.error::placeholder {
  color: var(--primary-red);
}

/* ==== Responesive ==== */
@media (max-width: 875px) {
  .heading {
    font-size: var(--text-h3);
  }
  .message {
    font-size: 12px;
  }
  .form-control .input-field {
    padding: var(--space-md) var(--space-md);
  }
}
@media (max-width: 760px) {
  .grid-container {
    gap: var(--space-md);
  }
}
@media (max-width: 620px) {
  html {
    font-size: 56.25%;
  }
  .signup {
    height: auto;
  }
  .grid-item1 {
    text-align: center;
  }
  .grid-container {
    margin: var(--space-xl) 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-lg);
  }
}
