@font-face {
  font-family: "Inter";
  src: url("fonts/webfonts/inter-latin-400-normal.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/webfonts/space-grotesk-latin-400-normal.woff2") format("woff2");
}

:root {
  --prioxity-primary: #00F0FF;
  --prioxity-secondary: #8A2BE2;
  --prioxity-tertiary: #FED639;
  --prioxity-neutral: #0A0A0A;
  --black: #0f0f0f;
  --white: #ffffff;
  --gray: #3f3f3f;
}

body {
  margin: 0;
  background: #0f0f0f;
}

.nav-wrap {
  border: 1px solid var(--gray);
  width: fit-content;
  margin: 10 auto;
  /*border-radius: 500px;*/
  background: linear-gradient(0deg, var(--prioxity-neutral), #212121);
  position: relative;
  box-shadow: inset 10px 5px 10px var(--prioxity-neutral);

  &:after {
    content: '';
    display: block;
    position: absolute;
    inset: -5px;
    background: linear-gradient(0deg, var(--prioxity-neutral), var(--prioxity-primary));
    z-index: -1;
    /*border-radius: 500px;*/
  }
}

.nav {
  width: fit-content;
  anchor-name: --nav;
  margin: 6.7px;

  a {
    z-index: 10;
    position: relative;
    color: white;
    font-family: space-mono;
    display: inline-block;
    padding: 20px 50px;
    text-decoration: none;
    font-family: "Inter";

    &:before {
      content: "";
      display: block;
      position: absolute;
      inset: 0;
      opacity: 0.2;
    }

    &.active {
      anchor-name: --active;
      color: var(--prioxity-primary);
    }

    &:hover:before {
      /*z-index: -2;*/
      anchor-name: --nav;
    }
  }
}

.bubble {
  background: white;
  /*z-index: 5;*/
  top: anchor(top);
  right: anchor(right);
  bottom: anchor(bottom);
  left: anchor(left);
  position: absolute;
  transition: all 0.2s;
  /*border-radius: 500px;*/
  &.active {
    position-anchor: --active;
    z-index: 2;
    top: auto;
    height: 3px;
    bottom: anchor(bottom);
    /*border-radius: 999px;*/
    background: var(--prioxity-primary);
    box-shadow: none;
  }
  &.hover {
    /*z-index: -2;*/
    background: gray;
    z-index: 1;
    position-anchor: --nav;
    background: linear-gradient(180deg, var(--gray), #212121);
    box-shadow: inset 0 2px 7px #ffffff29;
  }
}

.page {
  box-sizing: border-box;
  display: none;
  opacity: 0;
  animation: slide-up 0.6s ease forwards;
  background: linear-gradient(180deg, var(--prioxity-neutral), #0f0f0f);
  padding: 10px;
  margin: 10px;
  border-radius: 10px;
  font-family: "Space Grotesk";
  color: white;
}

.page.active {
  display: block;
  opacity: 1;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  padding: 50px;
}

.title {
  font-size: 2.5rem;
  align-self: center;
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: min(100%, 72rem);
  margin: 1rem auto;
  justify-content: center;
  height: fit-content;
}

@media (max-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--prioxity-neutral);
  color: var(--prioxity-primary);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  height: 150px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;

  &:before {
    content: ">";
    background: var(--prioxity-neutral);
    color: var(--prioxity-secondary);
    font-size: 3.5rem;
    align-self: center;
    justify-content: center;
  }
}

@keyframes slide-up {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.page.animate {
  opacity: 0;
  animation: fade-in 0.6s ease forwards;
}

/* stagger each child */
.page.animate:nth-child(1) { animation-delay: 0s; }
.page.animate:nth-child(2) { animation-delay: 0.15s; }
.page.animate:nth-child(3) { animation-delay: 0.3s; }
.page.animate:nth-child(4) { animation-delay: 0.45s; }

.logo {
  width: 300px;
  height: 300px;
  align-self: center;
}

footer {
  text-align: center;
  color: var(--prioxity-tertiary);
}