@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Karla&display=swap");
:root {
  --dark-voilet: hsl(256, 26%, 20%);
  --grayish-blue: hsl(216, 30%, 68%);
  --very-dark-violet: hsl(270, 9%, 17%);
  --dark-grayish-violet: hsl(273, 4%, 51%);
  --very-light-gray: hsl(0, 0%, 98%);
}
html {
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Karla", sans-serif;
}
h1,
h2,
h3,
h3 {
  font-family: "DM Serif Display", serif;
}

h1,
h2 {
  position: relative;
  margin: 0;
  padding-top: 50px;
  font-size: 4rem;
  letter-spacing: 2px;
}
h3 {
  font-size: 2rem;
}
p {
  opacity: 0.8;
  font-size: 16px;
}
h1::before {
  content: "";
  background-color: white;
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 150px;
}

.line-top::before {
  content: "";
  background-color: var(--dark-grayish-violet);
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 150px;
}

.btn {
  border: 2px solid #fff;
  padding: 15px 25px;
  background-color: transparent;
  color: white;
  letter-spacing: 2px;
  cursor: pointer;
  display: inline-block;
}

.btn-reversed {
  border: 2px solid var(--dark-voilet);
  color: var(--dark-voilet);
}
.container {
  margin: 0 auto;
  max-width: 100%;
  width: 1090px;
  padding: 0 20px;
}

.flex {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex > div {
  flex: 1;
}
.align-start {
  align-items: flex-start;
}
nav {
  position: fixed;
  z-index: 100;
  background-color: #fff;
  width: 100vw;
  top: 0;
  padding-top: 1rem;

}
nav .hambugger {
  display: none;

}
nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
}
nav li {
  margin-left: 30px;
}
nav ul a {
  text-decoration: none;
  color: var(--dark-grayish-violet);
  text-transform: uppercase;
  font-weight: bold;
  word-spacing: 3px;
}
header * {
  z-index: 1;
}
header {
  position: relative;
  background-color: var(--dark-voilet);
  color: #fff;
  padding: 50px 0;
  margin-bottom: 250px;
  margin-top: 80px;
}

header::before {
  content: "";
  background-image: url(./images/bg-pattern-intro-right-desktop.svg);
  background-repeat: no-repeat;
  background-position: top right;
  top: 0;
  right: 0;
  position: absolute;
  height: 100%;
  width: 50%;
  z-index: 2;
}
header::after {
  content: "";
  position: absolute;
  background-image: url(./images/bg-pattern-intro-left-desktop.svg);
  background-repeat: no-repeat;
  background-position: bottom left;
  bottom: -60%;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 0;
}
.header-image {
  margin-bottom: -250px;
  max-width: 100%;
}

.bg-violet {
  background-color: var(--dark-voilet);
  padding: 50px;
  background-image: url(./images/bg-pattern-how-we-work-desktop.svg);
  background-repeat: no-repeat;
  background-position: top right;
  background-size: 50% 100%;
  margin: 100px auto;
}

.bg-violet h2 {
  padding: 0;
  font-size: 3rem;
  width: 60%;
  color: white;
}
.tiles {
  margin-top: 50px;
  padding: 0 20px;
}
.tiles:first-child {
  padding-left: 0;
}
footer {
  background-color: var(--very-light-gray);
  padding: 60px 0 30px;
  background-image: url(./images/bg-pattern-footer-desktop.svg);
  background-repeat: no-repeat;
  background-position: top left;
}

footer h4 {
  text-transform: uppercase;
  color: var(--grayish-blue);
}
footer ul {
  padding: 0;
  list-style: none;
}
footer ul.flex li:not(:first-child) {
  margin-left: 18px;
}

footer li {
  margin-bottom: 10px;
}

footer li a {
  color: var(--dark-voilet);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}
.border-bottom {
  border-bottom: 1px solid var(--grayish-blue);
  margin-bottom: 30px;
}

@media screen and (max-width: 768px) {
  body {
    text-align: center;
  }
  .header-image {
    display: inline-block;
    margin-left: -20px;
    margin-bottom: -10px;
    max-width: calc(100% + 40px);
  }
  .flex {
    flex-direction: column;
  }
  nav .flex {
    flex-direction: row;
  }
nav{
  padding: 20px;
}
  nav ul {
    display: none;
  }

  nav ul.show {
    display: flex;
    flex-direction: column;
    background-color: var(--very-dark-violet);
    background-image: url(./images/bg-pattern-mobile-nav.svg);
    background-repeat: no-repeat;
    background-position: bottom ;
    background-size: 100%;
    padding-top: 30px;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 70px);
    z-index: 100;
    margin: 0;
  }
  nav ul li {
    margin: 20px 0;
  }
  nav ul a {
    color: white;
  }
  .btn-reversed {
    border-color: white;
    color: white;
  }
  nav .image-wrapper {
    text-align: left;
  }
  nav .hambugger {
    display: inline-block;
    border: 0;
    background-color: transparent;
    cursor: pointer;
  }
  nav .hambugger .close {
    display: none;
  }
  nav .hambugger.show .open {
    display: none;
  }
  nav .hambugger.show .close {
    display: block;
  }
  header {
    padding-top: 0px;
    margin-bottom: 50px;
  }
  header::before {
    background-image: url(./images/bg-pattern-intro-left-mobile.svg);
    background-position: center left;
    top: 60px;
    left: 0;
  }
  header::after {
    background-image: url(./images/bg-pattern-intro-right-mobile.svg);
    background-position: bottom right;
    top: 250px;
    right: 0;
  }
  .bg-violet {
    background-image: url(./images/bg-pattern-how-we-work-mobile.svg);
  }
  .bg-violet h2 {
    margin-bottom: 20px;
    width: 100%;
  }
  .reverse-mobile {
    flex-direction: column-reverse;
  }
  .line-top::before {
    left: 50%;
    transform: translateX(-50%);
  }
  .big-violet {
    background-image: url(./images/bg-pattern-how-we-work-mobile.svg);
  }
  .bg-violet h2 {
    width: 100%;
    line-height: 1;
    margin-bottom: 20px;
  }
  footer {
    background-image: url(./images/bg-pattern-footer-mobile.svg);
    background-size: 100% auto;
    background-position: top center;
    opacity: 0.8;
  }
  footer ul.flex {
    flex-direction: row;
  }

  footer div {
    width: 100%;
  }
}
