:root {
  --text-2xs: 0.625rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;

  --color-primary: #00252e;
  --color-secondary: #ff52bf;
  --color-grayish-blue: #808d99;
  --color-pale-cyan: #ebfbff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: poppins, sans-serif;
  color: var(--color-primary);
}

body {
  font-family: "open sans", sans-serif;
  position: relative;
}

/*************************** header ***************************/

header {
  background-color: var(--color-pale-cyan);
  background-image: url("./images/bg-hero-desktop.svg");

  color: var(--color-primary);
}

nav {
  max-width: 90rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  padding: 2rem 2rem;
}

nav > div:first-child {
  max-width: 10rem;
}

nav > div:first-child > img {
  width: 100%;
}

nav button {
  padding: 0.625rem 3rem;
  border: 0;
  background-color: #fff;
  font-weight: bolder;
  border-radius: 90rem;
  box-shadow: 0 0 0.625rem 0 rgba(0, 0, 0, 0.1);
}

nav button:hover {
  color: #00252ecc;
  cursor: pointer;
  transition: all 0.1s;
}

header > div {
  max-width: 90rem;
  margin: 0 auto;
  padding: 1rem 2rem 2rem;

  display: flex;
}

header > div > div:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  flex-basis: 45%;
}

header > div > div:first-child > h1 {
  font-size: var(--text-4xl);
  margin-bottom: 2rem;
  max-width: 28rem;
  line-height: 1.3;
}

header > div > div:first-child > p {
  font-size: 1rem;
  margin-bottom: 1.8rem;
  margin-right: 4rem;
}

header > div > div:first-child > button {
  padding: 0.625rem 2rem;
  border: 0;
  background-color: var(--color-secondary);
  border-radius: 90rem;
  color: #fff;
}

header > div > div:first-child > button:hover {
  background-color: #ff52bfcc;
  cursor: pointer;
  transition: all 0.1s;
}

header > div > div:last-child {
  flex-basis: 55%;
  display: flex;
  align-items: center;
}

header > div > div:last-child > img {
  width: 100%;
}

/*************************** main ***************************/

main {
  max-width: 90rem;
  margin: 4rem auto 0;
  padding: 0 4rem;

  display: flex;
  flex-direction: column;
  gap: 2rem;
}

main > div:not(:last-child) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  padding-left: 8rem;
  box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.1);
  border-radius: 0.625rem;
}

main h2 {
  font-size: var(--text-2xl);
  margin-bottom: 0.625rem;
}

main p {
  color: var(--color-grayish-blue);
}

main > div:nth-child(odd) > div:first-child,
main > div:nth-child(even) > div:last-child {
  flex-basis: 50%;
}

main > div:nth-child(odd) > div:last-child,
main > div:nth-child(even) > div:first-child {
  flex-basis: 40%;
}

main > div:nth-child(odd) > div:last-child > img,
main > div:nth-child(even) > div:first-child > img {
  width: 100%;
}

main > div:last-child {
  margin: 0 auto;
  padding: 3rem;
  text-align: center;
  max-width: 48rem;
  box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.1);
  margin-top: 4rem;
  margin-bottom: -5rem;
  background-color: #fff;
  border-radius: 0.625rem;
}

main > div:last-child > button {
  padding: 0.625rem 2rem;
  border: 0;
  background-color: var(--color-secondary);
  border-radius: 90rem;
  color: #fff;
  margin-top: 1rem;
}

main > div:last-child > button:hover {
  background-color: #ff52bfcc;
  cursor: pointer;
  transition: all 0.1s;
}

/*************************** footer ***************************/
footer {
  background-color: #00252e;
  color: #fff;
}

footer > div {
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 4rem 2rem;
}

footer > div:first-child {
  padding-top: 8rem;
}

footer > div:first-child > div:nth-child(2) {
  margin: 2rem 0;
  display: flex;
  justify-content: space-between;
}

footer > div:first-child > div:nth-child(2) > div:first-child {
  flex-basis: 40%;
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

footer > div:first-child > div:nth-child(2) > div:first-child > div {
  display: flex;
  gap: 1rem;
}

footer > div:first-child > div:nth-child(2) > div:nth-child(2),
footer > div:first-child > div:nth-child(2) > div:nth-child(3) {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: var(--text-md);
}

footer > div:first-child > div:nth-child(2) > div:nth-child(2) a,
footer > div:first-child > div:nth-child(2) > div:nth-child(3) a {
  text-decoration: none;
  color: #ebfbff;
}

footer > div:first-child > div:nth-child(2) > div:nth-child(2) a:hover,
footer > div:first-child > div:nth-child(2) > div:nth-child(3) a:hover {
  text-decoration: underline;
}

footer > div:first-child > div:nth-child(2) > div:last-child {
  display: flex;
  align-items: start;
  gap: 0.625rem;
}

footer > div:first-child > div:nth-child(2) > div:last-child > div > a {
  border: 0.0625rem solid #ebfbff;
  color: #ebfbff;
  width: 2rem;
  height: 2rem;
  border-radius: 20rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s;
}

footer > div:first-child > div:nth-child(2) > div:last-child > div > a:hover {
  border-color: #ff52bf;
  color: #ff52bf;
}

footer > div > div:last-child {
  text-align: right;
}

footer > div:first-child > div:first-child > img {
  filter: brightness(0) invert(1);
}

footer > p {
  position: absolute;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  bottom: 0;
  font-size: 0.875rem;
  text-align: center;
}

footer > p > a {
  color: #fff;
}

/*************************** responsive ***************************/

@media screen and (max-width: 60rem) {
  main > div:not(:last-child) {
    padding-left: 4rem;
  }
  header > div {
    max-width: 40rem;

    flex-direction: column;
    gap: 4rem;
  }
  header > div > div:first-child {
    align-items: center;
    text-align: center;
  }
  header > div > div:first-child > p {
    margin-right: 0;
  }
  main {
    padding: 0 2rem;
  }
  main h2 {
    font-size: var(--text-xl);
  }
  main > div:not(:last-child) {
    padding-left: 2rem;
  }

  footer > div:first-child > div:nth-child(2) {
    flex-direction: column;
    gap: 2rem;
  }

  footer > div:first-child > div:last-child {
    text-align: center;
  }

  footer > div:first-child > div:nth-child(2) > div:first-child {
    max-width: 100%;
  }

  footer > div:first-child > div:nth-child(2) > div:last-child {
    margin: 2rem auto 0;
  }

  footer > div:first-child > div:first-child {
    max-width: 10rem;
  }
  footer > div:first-child > div:first-child > img {
    width: 100%;
  }
}

@media screen and (max-width: 48rem) {
  nav > div:first-child {
    max-width: 8rem;
  }
  nav {
    padding: 2rem 1rem;
  }
  nav button {
    padding: 0.5rem 2.5rem;
  }
  header > div > div:first-child > h1 {
    font-size: var(--text-3xl);
  }
  main {
    max-width: 32rem;
    padding: 0 1rem;
    text-align: center;
  }
  main > div:not(:last-child) {
    flex-direction: column;
    padding: 6rem 4rem;
    gap: 4rem;
  }
  main > div:nth-child(odd) {
    flex-direction: column-reverse;
  }
  main h2 {
    font-size: var(--text-xl);
  }
  main > div:last-child {
    padding: 2rem 1rem;
  }
}

@media screen and (max-width: 32rem) {
  header {
    background-image: url("./images/bg-hero-mobile.svg");
  }
  nav button {
    padding: 0.4rem 2rem;
  }
  nav > div:first-child {
    max-width: 6rem;
  }
  header > div > div:first-child > h1 {
    font-size: var(--text-xl);
    margin-top: 2rem;
    max-width: 28rem;
    line-height: 1.3;
  }
  main > div:not(:last-child) {
    padding: 4rem 2rem;
  }
  main h2 {
    font-size: var(--text-lg);
  }
  footer > div {
    padding: 0 1rem;
  }
  footer > div:first-child > div:last-child {
    padding-bottom: 4rem;
  }
}
