@import url(/styles/normalize.css);
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Raleway:wght@400;700&display=swap");

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

html {
  font-size: 62.5%;
  min-width: 375px;
}

:root {
  --clr-error: hsl(0, 100%, 63%);
  --clr-font: hsl(0, 0%, 100%);

  --bg: hsl(218, 28%, 13%);
  --bg-testimonial: hsl(219, 30%, 18%);
  --bg-secondary: hsl(217, 28%, 15%);
  --bg-footer: hsl(216, 53%, 9%);

  --lg-button: linear-gradient(
    to right,
    hsl(176, 68%, 64%),
    hsl(198, 60%, 50%)
  );
}

body {
  font: 1.4rem "Open Sans", sans-serif;
  color: var(--clr-font);
  background: var(--bg);
}

h1 {
  font-size: 2.4rem;
  line-height: 2.4ch;
  margin: 2rem auto;
}

h2 {
  font-size: 1.8rem;
}

p,
.accupation {
  opacity: 0.75;
  max-width: 30rem;
  margin: 1.4rem auto;
}

.fs-2 {
  font-family: "Raleway", sans-serif;
}

.a-c {
  text-align: center;
}

header,
.hero {
  background: var(--bg-secondary);
}

.img-flex {
  width: 100%;
}

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

.container {
  max-width: 1440px;
  margin: 0 auto;
}

@media (min-width: 650px) {
  h1 {
    font-size: 3rem;
    max-width: 550px;
  }

  p {
    max-width: 420px;
  }
}

@media (min-width: 800px) {
  h2 {
    font-size: 3rem;
    max-width: 350px;
  }
}

/* >buttons */
button {
  height: fit-content;
  padding: 1.4rem 5rem;
  margin: 2rem 0;
  border: none;
  border-radius: 100px;
  color: var(--clr-font);
  background: var(--lg-button);
}

.hero button {
  padding: 1.4rem 8rem;
}

/* >header */
header > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
}

header .logo {
  width: 85px;
  height: 25px;
}

header ul {
  display: flex;
  gap: 2.5rem;
}

header li {
  opacity: 0.65;
}

@media (min-width: 650px) {
  header > div {
    padding: 5rem;
  }

  header .logo {
    width: 160px;
    height: 45px;
  }

  header ul {
    gap: 4rem;
  }
}

/* >hero */
.hero {
  --pos-y: calc(4.5rem + 50vw);
  --pos-y-2: calc(7.4rem + 80vw);

  padding: 2.5rem;
  background: url(../images/bg-curvy-mobile.svg) no-repeat,
    linear-gradient(var(--bg-secondary), var(--bg-secondary)) no-repeat;
  background-size: contain, 100% var(--pos-y-2);
  background-position: center var(--pos-y), 0 0;
}

.hero img {
  width: clamp(325px, 100%, 500px);
}

@media (min-width: 650px) {
  .hero {
    --pos-y: calc(100% + 4.2vw);

    padding-top: 0;
    background: url(../images/bg-curvy-desktop.svg) no-repeat,
      linear-gradient(var(--bg-secondary), var(--bg-secondary)) no-repeat;
    background-size: contain, 100%;
    background-position: center var(--pos-y), 0 0;
  }
}

/* >features */
.features {
  display: grid;
  gap: 8rem;
  margin: 6rem 0;
}

.feature img {
  width: 68px;
  margin-bottom: 3rem;
}

.feature .title {
  font-size: 1.8rem;
  font-weight: bold;
}

@media (min-width: 800px) {
  .features {
    grid-template-columns: 1fr 1fr;
    place-items: center;
    gap: 5rem;
    column-gap: 9rem;
    max-width: 900px;
    padding: 3rem;
    margin: 5rem auto;
  }

  .feature p {
    max-width: 390px;
  }
}

/* >how it works */
.how-it-works {
  display: grid;
  gap: 3.5rem;
  justify-content: center;
  padding: 2.8rem;
  width: fit-content;
  margin: 5rem auto;
}

.how-it-works img {
  max-width: 450px;
  justify-self: right;
}

.how-it-works p {
  max-width: 32rem;
  margin: 1.4rem 0;
}

.link {
  --clr: hsl(176, 68%, 64%);
  display: flex;
  align-items: center;
  gap: 1rem;
  width: fit-content;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--clr);
}

.link a {
  position: relative;
  text-decoration: none;
  color: var(--clr);
}

@media (min-width: 800px) {
  .how-it-works {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 5rem;
  }
  .how-it-works p {
    max-width: 500px;
  }
}

/* >testimonials */
.testimonials {
  display: grid;
  gap: 3rem;
  max-width: fit-content;
  padding: 2.5rem;
  margin: 10rem auto 0;
}

.testimonial {
  position: relative;
  display: grid;
  gap: 2rem;
  max-width: 350px;
  padding: 2.5rem;
  margin: 0 2rem;
  border-radius: 5px;
  box-shadow: 0 0 20px -16px rgba(133, 133, 133, 0.5);
  background: var(--bg-testimonial);
}

.testimonial:first-child::before {
  position: absolute;
  content: url(../images/bg-quotes.png);
  top: -3rem;
  left: -0.5rem;
  transform: scale(0.5);
  z-index: -1;
}

.testimonial p,
.accupation {
  font-size: 1rem;
  line-height: 3.3ch;
  margin: 0;
}

.testimonial__details {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial img {
  width: 30px;
  border-radius: 100px;
}

.name {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.2ch;
}

@media (min-width: 800px) {
  .testimonials {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonial {
    margin: 0;
  }

  .testimonial:first-child::before {
    transform: scale(1);
  }

  .testimonial p,
  .accupation {
    font-size: 1.4rem;
    line-height: initial;
  }
}

/* >early access */
.early-access {
  max-width: 850px;
  padding: 2rem;
  margin: 0 2rem;
  border-radius: 5px;
  box-shadow: 4px 7px 8px -3px rgb(0 0 0 / 50%);
  background: var(--bg-secondary);
  transform: translateY(50%);
}

.early-access h2 {
  margin: 2rem auto 0;
}

.early-access :is(button, input) {
  width: 100%;
  border: none;
  box-shadow: 0 8px 8px -5px rgb(0 0 0 / 50%);
}

.early-access input {
  padding: 1.5rem 3rem;
  border-radius: 100px;
}

.error {
  position: relative;
}

.error::after {
  position: relative;
  content: "Please enter a valid email address";
  color: var(--clr-error);

  left: -6rem;
  bottom: -1rem;
}

.early-access input:focus {
  outline-color: hsl(176, 68%, 64%);
}

@media (min-width: 650px) {
  .early-access {
    padding: 2rem 7rem;
  }

  .early-access p {
    max-width: 600px;
  }

  .early-access button {
    margin: 0;
  }

  form {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    padding: 2rem 0;
  }
}

@media (min-width: 1000px) {
  .early-access {
    margin: 0 auto;
  }
}

/* >footer */
footer {
  padding: 4rem;
  padding-top: 23rem;
  background: var(--bg-footer);
}

footer ul {
  display: grid;
  gap: 1.5rem;
  margin: 3rem 0 6rem;
}

footer li {
  opacity: 0.65;
  max-width: 350px;
}

.details li {
  position: relative;
  padding-left: 4rem;
}

.details li::before {
  position: absolute;
  top: 0.5rem;
  left: 0;
}

.details li:nth-child(1)::before {
  content: url(../images/icon-location.svg);
}

.details li:nth-child(2)::before {
  content: url(../images/icon-phone.svg);
}

.details li:nth-child(3)::before {
  content: url(../images/icon-email.svg);
}

.social-plugins {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-plugins span {
  display: grid;
  place-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--clr-font);
  border-radius: 100px;
}

@media (min-width: 1000px) {
  footer {
    padding-bottom: 8rem;
  }

  footer > div {
    padding: 0 5rem;
  }

  footer > div > div {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    gap: 5rem;
  }

  .details {
    display: grid;
    grid-template-columns: 1.5fr 0.5fr;
    column-gap: 5rem;
    height: min-content;
  }

  .details li:nth-child(1) {
    grid-row: span 2;
  }

  footer nav {
    display: flex;
    gap: 6rem;
  }

  ul {
    margin: 0;
  }
}

/* >hover state */
nav li,
button,
.social-plugins span {
  cursor: pointer;
}

.link:hover {
  --clr: var(--clr-font);
}

.link:hover use:nth-child(2) {
  fill: var(--clr-font);
}

button:hover {
  filter: brightness(1.2);
}

header li:hover {
  text-decoration: underline;
}

nav li:hover {
  opacity: 1;
  font-weight: bold;
}

.social-plugins span:hover {
  border-color: hsl(176, 68%, 64%);
}
.social-plugins span:hover i {
  color: hsl(176, 68%, 64%);
}
