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

:root {
  /* # PRIMARY # */
  /* intro and email sign up background */
  --navy-850: hsl(217, 28%, 15%);
  /* main background */
  --navy-900: hsl(218, 28%, 13%);
  /* footer background */
  --navy-950: hsl(216, 53%, 9%);
  /* testimonials background */
  --navy-800: hsl(219, 30%, 18%);

  /* # ACCENT # */
  /* inside cta gradinet */
  --teal-200: hsl(176, 68%, 64%);
  --cyan-500: hsl(198, 60%, 50%);
  /* error */
  --red-500: hsl(0, 100%, 63%);

  /* # NEUTRAL # */
  --white: hsl(0, 0%, 100%);

  /* headings, ctas, header navigation */
  /* font-family Raleway */
  --ff-raleway: "Raleway", sans-serif;

  /* body */
  /* font-family Open Sans */
  --ff-open-sans: "Open Sans", sans-serif;

  /* font-weights */
  --fw-400: 400;
  --fw-700: 700;
}

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

*,
*::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;
}

a {
  color: inherit;
}

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

.btn {
  background: linear-gradient(to right, var(--teal-200), var(--cyan-500));
  padding: 0.8em 1em;
  color: var(--white);
  font-weight: var(--fw-700);
  border-radius: 200px;
  text-decoration: none;
  font-family: var(--ff-raleway);
}

.error-message {
  color: var(--red-500);
  font-weight: var(--fw-700);
  font-size: 0.75rem;
  padding-inline-start: 1.5rem;
  margin-top: 0.4rem;
  text-align: start;
}

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

body {
  font-family: var(--ff-open-sans);
  font-weight: var(--fw-400);
  color: var(--white);
}

h1,
h2 {
  font-weight: var(--fw-700);
  font-family: var(--ff-raleway);
}

main {
  background-color: var(--navy-900);
  position: relative;
  padding-bottom: 340px;
}

/* ### HEADER ### */

header {
  background-color: var(--navy-850);
  font-family: var(--ff-raleway);
  padding: 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  width: 100px;
}

nav ul {
  list-style: none;
  padding-inline-start: 0;
  display: flex;
  gap: 1.325rem;
  font-size: 0.9rem;
}

nav a {
  text-decoration: none;
}

/* ### INTRO SECTION ### */

.intro-section {
  background-color: var(--navy-850);
  text-align: center;
  padding: 2rem 2.6rem;
  display: grid;
  gap: 2rem;
  background-image: url(./images/bg-curvy-mobile.svg);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: bottom left;
}

.illustration-intro-img {
  margin-inline: auto;
}

.intro-section h1 {
  font-size: 1.385rem;
}

.intro-section p {
  font-size: 0.925rem;
}

.intro-section a {
  justify-self: center;
  width: 90%;
  font-size: 1rem;
}

/* ### FEATURES SECTION ### */

.features-section {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 2rem 2.6rem;
}

.feature {
  text-align: center;
}

.feature .feature__img {
  margin-inline: auto;
  width: 60px;
}

.feature h2 {
  font-size: 1rem;
  margin-top: 2rem;
}

.feature p {
  font-size: 0.9rem;
  margin-top: 0.6rem;
  max-width: 50ch;
  margin-inline: auto;
}

/* ### STAY PRODUCTIVE SECTION  ### */

.stay-productive-section {
  padding: 2rem 2.6rem;
}

.stay-productive__img img {
  margin-inline: auto;
}

.stay-productive-section h2 {
  margin-top: 2.5rem;
  font-size: 1rem;
}

.stay-productive-section p {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.stay-productive-section a {
  margin-top: 1rem;
  width: fit-content;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--teal-200);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--teal-200);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stay-productive-section a span.arrow {
  width: 20px;
  height: 20px;
  background-image: url(/images/icon-arrow.svg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

/* ### TESTIMONIALS ### */

.testimonials-section {
  padding: 2rem 2.6rem;
}

.testimonials-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.testimonials-container::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -24px;
  left: 10px;
  width: 38px;
  height: 28px;
  background-image: url(./images/bg-quotes.png);
  background-repeat: no-repeat;
  background-position: top left;
  background-size: contain;
}

.testimonial {
  max-width: 385px;
  background-color: var(--navy-800);
  padding: 2rem 1.5rem 1.5rem;
  font-size: 0.8rem;
  line-height: 1.8;
  border-radius: 0.4rem;
  z-index: 3;
}

.testimonial:nth-child(2) {
  align-self: center;
}

.testimonial:nth-child(3) {
  align-self: flex-end;
}

.testimonial-info {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.testimonial__img {
  flex-basis: 30px;
  border-radius: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.testimonial__name {
  font-size: 0.825rem;
}

.testimonial__role {
  font-size: 0.785rem;
}

/* ### CALL TO ACTION SECTION ### */

.cta {
  background-color: var(--navy-850);
  padding: 2.5rem 2rem;
  border-radius: 0.8rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-inline: 1.5rem;
  position: absolute;
  bottom: -175px;
  right: 0;
  left: 0;
  font-family: var(--ff-raleway);
  box-shadow: 6px 6px 20px hsl(216, 71%, 8%);
}

.cta h2 {
  font-size: 1.245rem;
}

.cta form {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.cta form input {
  border-radius: 200px;
  padding: 0.8em 2em;
  width: 100%;
  border: none;
}

.cta form input::placeholder {
  font-size: 0.8rem;
  color: rgb(167, 167, 167);
}

.cta form button {
  border: none;
  cursor: pointer;
}

/* ### FOOTER ### */

footer {
  background-color: var(--navy-950);
  padding-top: 260px;
}

footer ul a {
  text-decoration: none;
}

footer ul {
  list-style: none;
  padding: 0;
}

.footer__logo {
  width: 180px;
  margin-inline-start: 2.5rem;
}

.ft-main {
  margin-top: 2.5rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

footer address {
  font: inherit;
  display: grid;
  gap: 1.8rem;
}

.address-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.ft-item ul {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ft-item__icon {
  flex-shrink: 0;
  width: 20px;
  padding-top: 0.3rem;
}

.ft-socials {
  align-self: center;
}

.ft-socials ul {
  flex-direction: row;
  gap: 0.8rem;
}

.social-icon {
  display: inline-block;
  line-height: 0;
  width: 18px;
  border: 1px solid var(--white);
  padding: 0.4rem;
  box-sizing: content-box;
  border-radius: 200px;
}

.social-icon svg {
  fill: var(--white);
}

/* ### ACTIVE STATES ### */

nav a:hover {
  text-decoration: underline;
  color: var(--white);
  font-weight: var(--fw-700);
}

.btn:hover {
  background: rgb(124, 202, 202);
}

.stay-productive-section a:hover span.arrow {
  background-image: url(./images/icon-arrow-white.svg);
}

.stay-productive-section a:hover {
  color: var(--white);
  border-color: var(--white);
}

footer a:hover {
  font-weight: var(--fw-700);
}

.social-icon:hover {
  border-color: var(--teal-200);
}

.social-icon:hover svg {
  fill: var(--teal-200);
}

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

@media (min-width: 46.875em) {
  /* ## HEADER ## */
  header {
    padding: 3.5rem 3rem;
  }

  header .logo {
    width: 120px;
  }

  header nav ul {
    gap: 3rem;
  }

  /* ## INTRO SECTION ## */

  .intro-section {
    background-image: url(./images/bg-curvy-desktop.svg);
    padding-top: 0;
    padding-bottom: 13rem;
  }

  .illustration-intro-img {
    width: 800px;
  }

  .intro-section h1 {
    font-size: 1.8rem;
    max-width: 35ch;
    margin-inline: auto;
  }

  .intro-section p {
    font-size: 1rem;
    max-width: 52ch;
    margin-inline: auto;
  }

  .intro-section a {
    width: 20%;
    font-size: 1rem;
  }

  /* ## FEATURES SECTION ## */

  .features-section {
    max-width: 72%;
    margin-inline: auto;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-bottom: 8rem;
  }

  .feature {
    flex-basis: 40%;
  }

  /* ## STAY PRODUCTIVE ## */

  .stay-productive-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
    padding-inline: 3rem;
    padding-bottom: 8rem;
    width: 95%;
    margin-inline: auto;
  }

  .stay-productive__content h2 {
    font-size: 2rem;
    max-width: 15ch;
    line-height: 1.1;
  }

  .stay-productive__content p {
    font-size: 1.125rem;
  }

  .stay-productive__content a {
    font-size: 1.125rem;
  }

  /* ## CTA ## */
  .cta {
    max-width: 60%;
    margin-inline: auto;
  }

  .cta > p {
    max-width: 70ch;
    margin-inline: auto;
  }

  .cta form {
    width: 90%;
    margin-inline: auto;
  }

  /* ## FOOTER ## */

  footer {
    padding-bottom: 5rem;
  }

  .footer__logo {
    margin-inline-start: 5rem;
    width: 80%;
    margin-inline: auto;
  }

  footer address {
    grid-template-columns: minmax(25ch, 42ch) auto;
    grid-auto-rows: auto;
    align-items: start;
    column-gap: 4rem;
    row-gap: 2.5rem;
  }

  footer address .address-row:nth-child(1) {
    grid-column: 1/2;
    grid-row: 1/5;
  }

  footer address .address-row:nth-child(2) {
    grid-column: 2/3;
    grid-row: 1/3;
  }

  footer address .address-row:nth-child(3) {
    grid-column: 2/3;
    grid-row: 2/3;
  }

  .ft-main {
    flex-direction: row;
    width: 90%;
    margin-inline: auto;
    flex-wrap: wrap;
    gap: 4rem;
    padding-inline: 5rem 3rem;
  }

  .ft-socials {
    align-self: flex-start;
  }

  .ft-main .ft-item:nth-child(1) {
    /* width: 55%; */
    margin-right: 3.5rem;
  }

  .error-message {
    padding-inline-start: 2.5rem;
  }
}

@media (min-width: 60.75em) {
}

@media (min-width: 66.875em) {
  /* ## CTA ## */

  .cta form {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    justify-content: space-between;
  }

  .cta .input-container {
    width: 70%;
  }

  .cta input[type="email"]::placeholder {
    font-size: 1rem;
  }

  .cta button {
    width: 25%;
    min-width: fit-content;
  }

  /* ## TESTIMONIALS ## */

  .testimonials-container {
    flex-direction: row;
    justify-content: center;
    max-width: 90%;
    margin-inline: auto;
  }

  .testimonials-container::before {
    width: 45px;
    height: 35px;
    left: -6px;
    top: -28px;
  }

  .testimonial {
    font-size: 0.985rem;
  }
}
