@import "./home_variables.scss";

body {
  margin: 0;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
  color: var(--fg-color);
  font-family: var(--font-sans);
}

header {
  position: fixed;
  padding-top: 2rem;
  width: calc(100vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffffd0;
  backdrop-filter: blur(2px);
  z-index: 1;
  padding: 0px calc(var(--margin) / 2);

  a.button {
    margin-right: 0 !important;
  }
}

a.button {
  font-size: 1.8rem;
  font-weight: var(--fw-regular);
  text-decoration: none;
  color: var(--primary-color);
  padding: 1.35rem 4.136rem;
  box-shadow: 0px 1rem 3rem rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  transition-duration: 200ms;
  margin: 1.5rem;

  &.primary {
    box-shadow: 0px 1rem 3rem var(--primary-shadow-color);
    background: var(--primary-color);
    color: #fff;

    &:hover {
      color: #fff;
    }
  }

  &:hover {
    transform: scale(0.98);
    opacity: 0.9;
    color: var(--secondary-color);
  }
}

main {
  margin: 0 calc(var(--margin) / 2);
  width: calc(100vw - var(--margin));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

section#hero {
/*  height: calc(100vh - 200px);*/
  width: 100%;
  flex: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-flow: row nowrap;
  margin-top: 10rem;

  div.content {
    width: 100%;

    h1 {
      font-size: 4.8rem;
      color: var(--fg-color);
      font-weight: var(--fw-regular);
      line-height: 1.5;
    }

    p {
      font-size: 2.4rem;
      font-weight: var(--fw-light);
      margin-bottom: 3.8rem;
    }

    .buttons {
      margin-left: -1.5rem;
    }
  }
}

.code-preview {
  font-size: 18px;
  padding: 2rem 4rem;
  border-radius: 10px;
  box-shadow: 0px 10px 50px rgba(0, 0, 0, 0.1);
  display: none;

  max-width: 343px;
  width: 100%;
  height: 157px;

  pre {
    display: inline;
  }

  span {
    font-family: var(--font-mono);
    // opacity: 0;
    // animation: appear 500ms linear forwards;

    //@for $i from 1 through 50 {
    //  &:nth-child(#{$i}) {
    //    animation-delay: 300ms * $i;
    //  }
    //}

    &.p {
      font-weight: var(--fw-bold);
      color: var(--primary-color);
    }

    &.s {
      color: var(--secondary-color);
    }

    &.i {
      font-style: italic;
    }
  }
}

footer {
  width: 100vw;
  padding: 40px calc(var(--margin) / 2);
  background: #f2edf5;
  color: #000;
  font-weight: 300;
  font-size: 13.5px;

  table {
    width: 100%;
    margin-bottom: 40px;

    td,
    th {
      text-align: left;
    }
    a:hover {
      color: #1a88ff;
    }
  }

  .row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  .light-hr {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 20px 0;
  }
}

// @keyframes appear {
//   0% {
//     opacity: 0;
//   }

//   100% {
//     opacity: 1;
//   }
// }

html[dir="rtl"] {
  main {
    margin-right: calc(var(--margin) / 2);
    margin-left: unset;
  }

  .code-preview {
    direction: ltr;
  }

  header {
    a.button {
      margin-left: 0 !important;
    }
  }

  footer {
    table {
      td,
      th {
        text-align: unset;
      }
    }
  }
}

.sponsors_container{
  margin: 8px 0 10px 0;
}

.link-sponsors {
  color: var(--col-fg);
}

/*
.become_sponsor{
  > a {
    justify-content: center;
    box-shadow: 0px 0.5rem 1rem rgba(0, 0, 0, 0.1);
    margin: 0;
    padding: 1rem;
    text-align: center;
  }
}
*/

.tippy-box {
  background-color: var(--primary-color);

  .tippy-arrow{
    color: var(--primary-color);
  }
}

.splide {
  height: 9rem;
  padding: 0 45px;
  margin: 0 calc(-1 * var(--margin) / 2);
}

li.sponsor-card {
  width: calc(12%);

  &[data-tier=silver] {
    width: calc(17%);
  }

  &[data-tier=gold] {
    width: calc(22%);
  }

  &[data-tier=platinum] {
    width: calc(30%);
  }
}

@media (max-width: 1400px) {
  li.sponsor-card {
    width: calc(20%);

    &[data-tier=silver] {
      width: calc(25%);
    }

    &[data-tier=gold] {
      width: calc(30%);
    }

    &[data-tier=platinum] {
      width: calc(35%);
    }
  }
}

@media (max-width: 1000px) {
  li.sponsor-card img + .caption {
    display: none;
  }


}
