:root {
  --gray: rgb(192, 192, 192);
  --d:2px;
}

@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 79px;
}

body {
  margin: 0;
  font-family: "Zain", sans-serif;
  font-weight: 300;
  font-style: normal;
  padding:0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

p {
  font-family: "DM Sans", sans-serif;
  line-height: 1.5rem;
}

em {
  text-decoration: underline;
  font-style: normal;
}

a {
  text-decoration: none;
  color: unset;
}

a:hover {
  text-decoration: underline;
}

header {
  width: calc(100vw - 160px);
  background-color: #fff5;
  position: sticky;
  background-color: white;
  top: 0px;
  padding: 10px 80px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}

.logo {
  font-weight: 300;
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  img {
    margin-bottom: 4px;
    height: 30px;
  }
}

nav ul {
  list-style: none;
  display: flex;
  gap:40px;
  padding: 0;
  li {
    cursor: pointer;
  }
  li:hover {
    text-decoration: underline;
  }
}

.button {
  background-color: black;
  color: white;
  border-radius: 100px;
  cursor: pointer;
  font-weight: 400;
  border: none;
  padding: 14px 20px;
  font-size: 16px;
  font-family: sans-serif;
}

.button:hover {
  background-color: #333;
  text-decoration: none;
}

/* Sections */
main > section {
  display: flex;
  justify-content: space-between;
  padding: 40px 80px;
  border-bottom: 1px solid rgb(192, 192, 192);
}

#landing {
  gap: 100px;
  min-height: calc(100vh - 120px);
  align-items: start;
  padding-bottom: 0;

  #pitch {
    h2 {
      font-size: 64px;
      margin-bottom: 0;
    }
  }
}

#stats {
  .block {
    border-right: 2px solid rgb(192, 192, 192);
    padding: 0px 20px;
    flex: 1 1 0;
  }
  .block:last-child {
    border-right: 0;
  }
}

#services {
  padding: 80px;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid var(--gray);
  p {
    max-width: 700px;
    text-align: center;
    color: #666;
  }
  h2 {
    font-size: 48px;
    padding: 0;
    margin-bottom: 0;
    line-height: 40px;
  }

  h3 {
    font-size: 24px;
    margin: 0;
    padding: 0;
  }

  .cards {
    display: flex;
    gap: 30px;
    margin-top: 50px;
    max-width: 70vw;
    flex-wrap: wrap;
  }

  .card {
    padding: 20px;
    padding-top: 80px;
    border: 1px solid var(--gray);
    border-radius: 15px;
    min-width: 200px;
    flex: 1 1 0;
    box-shadow: 8px 8px 6px rgba(0, 0, 0, 0.1);
    transition: transform 200ms;

    p{
      text-align: start;
    }

    .icon {
      width: 60px;
      height: 60px;
      background-color: white;
      position: absolute;
      margin-top: -81px;
      margin-left: -21px;
      border: 1px solid var(--gray);
      border-left: 0;
      border-top: 0;
      border-radius: 0 0 15px 0;
      img {
        z-index: 3;
        position: absolute;
        width: 40px;
        border: 1px solid var(--gray);
        padding: 6px;
        border-radius: 10px;
        box-shadow: 4px 4px 3px rgba(0, 0, 0, 0.1);
      }
    }

    .icon.small img {
      z-index: 3;
      position: absolute;
      width: 30px;
      border: 1px solid var(--gray);
      padding: 11px;
      border-radius: 10px;
      box-shadow: 4px 4px 3px rgba(0, 0, 0, 0.1);
    }
  }

  .card:hover {
    transform: translateY(-5px);
  }
}

#why-us {
  padding: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  p {
    max-width: 700px;
    text-align: center;
    color: #666;
  }
  h2 {
    font-size: 48px;
    padding: 0;
    margin-bottom: 0;
    line-height: 40px;
  }

  .cards {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    column-gap: 20vw;
    row-gap: 100px;
    width: 70vw;
    align-items: start;
    margin-top: 50px;

    background: radial-gradient(
      circle at 
      var(--d) 
      var(--d), 
      #8a929e calc(var(--d) - 1px), 
      #0000 var(--d)
    ) 
    20px 20px / 50px 50px;
  }

  .card {
    border: 1px solid var(--gray);
    background-color: white;
    box-shadow: 4px 4px 3px rgba(0, 0, 0, 0.1);
    padding: 40px;
    flex: 1 1 0;
    transform: rotate(5deg);
    border-radius: 15px;
    p{
      text-align: left;
    }

    h3 {
      margin-top: 0;
    }
  }

  .card:nth-child(even) {
    transform: rotate(-5deg);
    margin-top: 100px;
  }

  .card::after {
    border-top: 2px dashed var(--gray);
    width: 20vw;
    display: block;
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
  }

  .card:nth-child(even)::after{
    left: -35.5vw;
    transform: rotate(-40deg);
    top: 90%;
    width: 40vw;
  }

  .card:last-child::after {
    display: none;
  }

  .icon {
    width: 30px;
  }
}

footer {
  background-color: #000;
  color: var(--gray);
  padding: 40px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  img {
    filter: brightness(0) saturate(100%) invert(92%) sepia(14%) saturate(0%) hue-rotate(177deg) brightness(82%) contrast(91%);
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 60px;
  }

  header {
    width: calc(100vw - 40px);
    padding: 10px 20px;
    flex-wrap: wrap;
  }

  .logo {
    font-size: 20px;
    img {
      height: 24px;
    }
  }

  nav {
    display: none;
  }

  nav ul {
    gap: 20px;
    font-size: 14px;
    justify-content: center;
  }

  .button {
    padding: 10px 16px;
    font-size: 14px;
  }

  main > section {
    padding: 30px 20px;
    flex-direction: column;
  }

  #landing {
    gap: 40px;
    min-height: auto;
    padding-bottom: 30px;
    flex-direction: column-reverse;
    align-items: center;

    #pitch h2 {
      font-size: 36px;
      line-height: 1.2;
    }
  }

  #stats {
    display: none;
  }

  #services {
    padding: 40px 20px;

    h2 {
      font-size: 36px;
      text-align: center;
    }

    p {
      font-size: 14px;
    }

    .cards {
      max-width: 100%;
      gap: 20px;
      margin-top: 30px;
    }

    .card {
      min-width: unset;
      flex: 1 1 100%;
    }
  }

  #why-us {
    padding: 40px 20px;

    h2 {
      font-size: 36px;
      text-align: center;
    }

    p {
      font-size: 14px;
    }

    .cards {
      width: 100%;
      column-gap: 0;
      row-gap: 40px;
      background: none;
    }

    .card {
      transform: rotate(0deg) !important;
      margin-top: 0 !important;
      flex: 1 1 100%;
      padding: 30px 20px;
    }

    .card::after {
      display: none !important;
    }
  }

  footer {
    padding: 30px 20px;
    flex-direction: column;
    gap: 20px;
    text-align: center;

    .logo {
      justify-content: center;
    }
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  nav ul {
    gap: 15px;
    font-size: 13px;
  }

  #landing #pitch h2 {
    font-size: 28px;
  }

  #stats h2 {
    font-size: 28px;
  }

  #services h2,
  #why-us h2 {
    font-size: 28px;
  }

  .button {
    padding: 8px 14px;
    font-size: 13px;
  }
}