@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Karla:wght@400;700&display=swap");

/* font-family: 'DM Serif Display', serif; */
/* font-family: 'Karla', sans-serif; */

:root {
  --darkViolet: hsl(256, 26%, 20%);
  --grayishBlue: hsl(216, 30%, 68%);
  --veryDarkViolet: hsl(270, 9%, 17%);
  --darkGrayishViolet: hsl(273, 4%, 51%);
  --veryLightGray: hsl(0, 0%, 98%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Karla", sans-serif;
  font-size: 16px;
}
h1,
h2,
h3 {
  font-family: "DM Serif Display", serif;
}
h1 {
  font-size: 4.4em;
  font-weight: 500;
  letter-spacing: 2px;
  line-height: 1;
  padding: 50px 0;
  position: relative;
}
h1::before {
  content: "";
  background-color: white;
  height: 1px;
  opacity: 0.8;
  position: absolute;
  top: 0;
  left: 0;
  width: 140px;
}
h2 {
  font-size: 4.2em;
  font-weight: 500;
  margin-bottom: 10px;
  padding: 50px 0;
  position: relative;
}
.sec1 h2::before {
  content: "";
  background-color: black;
  height: 1px;
  opacity: 0.8;
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
}

h3 {
  font-size: 1.5em;
  margin: 30px 0 20px 0;
}

h4 {
  color: var(--darkGrayishViolet);
  margin-bottom: 30px;
  opacity: 0.8;
}

p {
  opacity: 0.9;
}

.con {
  /* border: 1px solid red; */
  margin: 0 auto;
  max-width: 100%;
  padding: 20px;
  width: 1200px;
}

.fcon {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
.fcon > div {
  flex: 1;
}

.hamburger {
  border: none;
}
nav .open {
  display: none;
}
nav .close {
  display: none;
}
nav ul {
  display: flex;
  list-style-type: none;
}
nav li {
  margin: 30px;
}
nav li a {
  color: var(--darkGrayishViolet);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}
.btn {
  background-color: transparent;
  border: 2px solid var(--veryDarkViolet);
  color: var(--veryDarkViolet);
  padding: 15px 30px;
  text-transform: uppercase;
}
nav .btn:hover {
  background-color: var(--darkViolet);
  color: white;
}
.intro-mobile {
  display: none;
}

header {
  background-color: var(--darkViolet);
  color: white;
  margin-bottom: 250px;
  padding: 50px 0;
  position: relative;
}
header * {
  z-index: 1;
}
header::after {
  content: "";
  background-image: url("images/bg-pattern-intro-right-desktop.svg");
  background-repeat: no-repeat;
  background-position: top right;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 75%;
  z-index: 2;
}
header::before {
  content: "";
  background-image: url("images/bg-pattern-intro-left-desktop.svg");
  background-repeat: no-repeat;
  background-position: bottom left;
  position: absolute;
  bottom: -60%;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 0;
}
.hd {
  padding: 0 40px 0 0;
}
header p {
  margin-bottom: 40px;
}
header .btn {
  border: 2px solid white;
  color: white;
  font-weight: 700;
  z-index: 1;
}
header .btn:hover {
  background-color: white;
  color: var(--darkViolet);
  cursor: pointer;
}
header .intro-desktop {
  margin-bottom: -250px;
  width: 100%;
}

.sec1 {
  margin-bottom: 110px;
}
.sec1 .fcon div {
  margin-right: 50px;
  padding: 0 0px 0 0;
}

.sec2 {
  background-color: var(--darkViolet);
  color: white;
  margin-bottom: 130px;
  padding: 18px 80px;
  position: relative;
}
.sec2::after {
  content: "";
  background-image: url("images/bg-pattern-how-we-work-desktop.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: top right;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  z-index: 0;
}
.sec2 h2 {
  font-size: 3.5em;
  font-weight: 300;
  line-height: 70px;
  width: 55%;
}
.sec2 .btn {
  border: 2px solid white;
  color: white;
  font-weight: 700;
  z-index: 1;
}
.sec2 .btn:hover {
  background-color: white;
  color: var(--darkViolet);
  cursor: pointer;
}
footer {
  background-color: var(--veryLightGray);
  position: relative;
  z-index: 0;
}
footer > a {
  z-index: 1;
}
footer::before {
  content: "";
  background-image: url("images/bg-pattern-footer-desktop.svg");
  background-repeat: no-repeat;
  background-position: bottom top;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
}
footer ul {
  list-style-type: none;
}
footer .fcon1 {
  border-bottom: 1px solid var(--darkGrayishViolet);
  display: flex;
  justify-content: space-between;
  margin-bottom: 50px;
  padding: 50px 0;
  width: 100%;
}
footer .fcon1 ul {
  padding: 0 0 0 20px;
}
footer .icon {
  align-items: flex-end;
  display: flex;
  margin-top: 50px;
}
.icon li .fab {
  color: var(--darkGrayishViolet);
  font-size: 30px;
  margin-right: 30px;
  z-index: 1;
}
.icon li .fab:hover {
  color: var(--darkViolet);
  cursor: pointer;
}
footer .fcon2 {
  display: flex;
}
.fcon2 > div {
  flex: 1;
}
footer .fcon2 ul li {
  margin-bottom: 10px;
}
footer .fcon2 ul li a {
  color: var(--veryDarkViolet);
  font-weight: 600;
  opacity: 0.9;
  text-decoration: none;
}
footer .fcon2 ul li a:hover {
  text-decoration: underline;
}
.attribution {
  background-color: rgb(28, 215, 248);
  color: black;
}
.attribution a {
  color: rgb(255, 255, 255);
}
/* =========================================================*/
@media screen and (max-width: 806px) {
  nav .hamburger {
    background-color: transparent;
    border: none;
    cursor: pointer;
  }
  nav .fcon {
    flex-direction: row;
    position: relative;
  }
  nav ul {
    display: none;
    padding: 30px 0 0 0;
    position: relative;
  }
  nav .open {
    display: block;
  }
  nav .hamburger.show .open {
    display: none;
  }
  nav .hamburger .close {
    display: none;
  }
  nav .hamburger.show .close {
    display: block;
  }
  nav ul.show {
    animation: down 0.3s linear;
    background-color: var(--veryDarkViolet);
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 51px;
    height: 131vh;
    width: 100vw;
    z-index: 0;
  }
  @keyframes down {
    from {
      height: 0;
    }
    to {
      height: 131vh;
    }
  }
  nav ul.show::before {
    content: "";
    background-image: url("images/bg-pattern-mobile-nav.svg");
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    position: absolute;
    bottom: 0;
    height: 60%;
    width: 100%;
    z-index: -1;
  }
  nav ul {
    text-align: center;
  }
  nav ul li {
    margin: 25px 0;
  }
  nav ul li a {
    color: white;
  }
  nav .btn {
    border: 2px solid white;
    color: white;
    padding: 15px 8em;
    /* width: 100%; */
    z-index: 1;
  }
  nav .btn:hover {
    background-color: white;
    color: var(--darkViolet);
  }

  .intro-mobile {
    display: flex;
    justify-content: center;
    width: 100%;
    z-index: -1;
  }
  header {
    margin-bottom: 120px;
    max-width: 100%;
    text-align: center;
  }

  header::after {
    background-image: url("images/bg-pattern-intro-right-mobile.svg");
    background-position: top right;
    position: absolute;
    top: 70%;
    right: 0;
    height: 100%;
    width: 30%;
  }
  header::before {
    background-image: url("images/bg-pattern-intro-left-mobile.svg");
    background-position: top left;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
  }
  .hd {
    padding: 0 10px;
  }
  .intro-desktop {
    display: none;
  }
  header h1 {
    font-size: 2.5em;
    padding: 50px 0 20px 0;
    width: 100%;
  }
  header h1::before {
    display: none;
  }
  header p {
    line-height: 25px;
  }
  header .btn {
    z-index: 1;
  }

  .sec1 {
    margin-bottom: 50px;
    text-align: center;
  }
  .sec1 h2 {
    font-size: 3em;
  }
  .sec1 h2::before {
    align-self: center;
    content: "";
    background-color: var(--darkViolet);
    height: 1px;
    opacity: 0.3;
    width: 100%;
  }
  .sec1 .fcon > div {
    padding: 0 60px;
    margin: 0 0 50px 0;
    width: 100%;
  }

  .sec2 {
    align-self: center;
    padding: 50px 110px;
    text-align: center;
    width: 80%;
  }
  .sec2::after {
    content: "";
    background-image: url("images/bg-pattern-how-we-work-mobile.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top right;
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    z-index: 0;
  }
  .sec2 h2 {
    font-size: 2.5em;
    line-height: 45px;
    margin-bottom: 30px;
    padding: 0;
    width: 100%;
  }

  footer::before {
    content: "";
    background-image: url("images/bg-pattern-footer-mobile.svg");
    background-repeat: no-repeat;
    background-position: bottom top;
    background-size: 100% 20%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
  }
  .fcon {
    flex-direction: column;
    justify-content: center;
  }
  .icon li .i {
    margin: 40px 15px 0 0;
  }
  .fcon2 > div {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
  }
}
/* ========================================================================== */
@media screen and (max-width: 376px) {
  nav ul.show {
    position: absolute;
    bottom: -50px;
    height: 72vh;
  }
  nav ul.show::before {
    background-size: 100% 90%;
    height: 38%;
    width: 100%;
    z-index: 0;
  }
  header {
    z-index: 0;
  }
  header::after {
    background-size: 100% 70%;
  }
  .sec1 h2::before {
    position: absolute;
    top: 0;
    left: 85px;
    width: 165px;
  }
  .sec1 .fcon > div {
    padding: 0 5px;
  }

  .sec2 {
    padding: 50px 20px;
    width: 90%;
  }

  footer::before {
    background-position: bottom top;
  }
}
