@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Karla:wght@400;700&display=swap");

/* Variables */

:root {
  --dark-violet: 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%);
}

/* General Styles */

* {
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}

body {
  font-family: "Karla", sans-serif;
  color: var(--dark-violet);
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "DM Serif Display", serif;
}

h1,
h2 {
  font-size: 4rem;
  letter-spacing: 2px;
  line-height: 1;
  position: relative;
  margin: 0;
  padding-top: 50px;
}

h3 {
  font-size: 2rem;
}

p {
  opacity: 0.8;
  line-height: 1.6;
}

.line-top::before {
  content: "";
  background-color: #fff;
  width: 150px;
  height: 1px;
  position: absolute;
  top: 0;
  left: 0;
}

.line-violet::before {
  background-color: var(--dark-violet);
}

.btn {
  padding: 15px 25px;
  border: 2px solid #fff;
  display: inline-block;
  background-color: transparent;
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.btn-reverse {
  border-color: var(--dark-violet);
  color: var(--dark-violet);
}

.container {
  padding: 0 20px;
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
}

.flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.align-start {
  align-items: flex-start;
}

.flex > div {
  flex: 1;
}

/* Nav styling */

nav ul {
  display: flex;
  padding:0;
  align-items: center;
}

nav .hamburger {
    display: none;
}


nav ul li {
  margin-left: 30px;

}

nav ul li a {
  text-transform: uppercase;
  color: var(--dark-grayish-violet);
}

/* Header Styling  */

header {
  background-color: var(--dark-violet);
  color: #fff;
  padding: 50px 0;
  position: relative;
  margin-bottom: 250px;
}

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;
  width: 50%;
  height: 100%;
  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: -50%;
  left: 0;
  width: 50%;
  height: 100%;
  z-index: 0;
}

.header-img {
  margin-bottom: -250px;
}

/* Section Styling  */

.row {
  gap: 2em;
}

.bg-violet {
  background-color: var(--dark-violet);
  color: #fff;
  padding: 70px;
  position: relative;
  margin: 100px auto;
  background-image: url(./images/bg-pattern-how-we-work-desktop.svg);
  background-repeat: no-repeat;
  background-size: 40% 100%;
  background-position: top right;
}

.bg-violet h2 {
  padding: 0;
  width: 75%;
  font-size: 3rem;
  width: 60%;
}

.tile {
  margin-top: 90px;
}

/* Footer Styling  */

footer {
  background-color: var(--very-light-gray);
  position: relative;
  padding: 30px 0;
  background-image: url(./images/bg-pattern-footer-desktop.svg);
  background-repeat: no-repeat;
  background-position: top left;
}

footer h4 {
  text-transform: uppercase;
  color: var(--dark-grayish-violet);
  margin-bottom: 40px;
}

footer ul.flex li:not(:first-child) {
  margin-left: 15px;
}

footer ul {
  padding: 0;
}

footer ul li {
  margin-bottom: 10px;
}

footer ul li a {
  text-transform: uppercase;
  color: var(--dark-violet);
}

.border-bottom {
  border-bottom: 1px solid var(--dark-grayish-violet);
  opacity: 0.6;
  margin-bottom: 30px;
}

@media screen and (max-width: 768px) {
  img {
    max-width: 100%;
  }
  body {
    text-align: center;
  }
  .flex {
    flex-direction: column;
  }

  .line-top::before {
    left: 50%;
    transform: translateX(-50%);
  }
 
  /* Header */

  .reverse-mobile {
    flex-direction: column-reverse;
  }
  

  header {
      padding-top: 0;
      margin-bottom: 50px;
  }

  h1, h2, h3, h4 {
      font-weight: normal;
  }

  header h1 {
      font-size: 2.8rem;
      font-weight: normal;
  }

  header::after,
  header::before {
      display: none;
  }

  .header-img {
      margin-bottom: -40px;
      max-width: calc(100% + 40px);
      margin-left: -20px;
      margin-right: -20px;
      display: inline-block;
  }

 .header2 {
     font-size: 2.5rem;
 }

 .tile {
     margin-top: 70px;
 }

 h3 {
     font-size: 1.5rem;
 }
  /* Nav */

  nav {
      padding: 15px;
  }

  nav .flex {
      flex-direction: row;
  }
  nav ul {
      display: none;
  }
  nav .hamburger {
      display: flex;
      background-color: transparent;
      border: none;
      cursor: pointer;
  }
  nav .nav-logo {
      text-align: left;
  }

  /* Section */

  .bg-violet {
    background-image: url(./images/bg-pattern-how-we-work-mobile.svg);
  }
  .bg-violet h2 {
    width: 100%;
    margin-bottom: 30px;
    font-size: 2.4rem;
  }

  .row {
      gap: 1em;
  }

  /* Footer  */

  footer {
    background-image: url(./images/bg-pattern-footer-mobile.svg);
    background-size: 95% auto;
    background-position: top left;
    padding-top: 100px;
  }

  footer ul.flex {
    flex-direction: row;
  }

  footer .flex div {
    width: 100%;
  }
}

header {
    animation: fadeIn 2s forwards;
}
@keyframes fadeIn {
    from {
       opacity: 0;
       transform: translateY(-2em);
    }
 
    to {
       opacity: 1;
       transform: translateY(0);
    }
 }
