* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: dark;

  --purple: #9E8CFC;
  --blue: #7DB8FF;
  --light-blue: #8AE8FF;
  --cyan: #95F3D9;
  --green: #C4F042;
  --red: #F16053;
  --orange: #FFCB47;
  --yellow: #FFEF5C;
  --pale-yellow: #FFEE9B;
}

html {
  scroll-snap-type: y mandatory;
  /* scroll-behavior: smooth; */
}

body {
  font-family: Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  background-color: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;

  >a {
    text-decoration: none;

    &::after {
      position: absolute;
      /* fix for Mobile Safari */
      margin-left: 8px;
      vertical-align: middle;
      content: url("/img/link.svg");
      width: 16px;
      transform-origin: bottom;
      opacity: 0;
    }

    &:hover::after {
      opacity: 0.7;
    }
  }
}

h1>a::after {
  scale: 1.25;
}

h2>a::after {
  scale: 2;
}

h3>a::after {
  scale: 1.25;
}

h5>a::after {
  scale: 0.8;
}

a {
  color: #fff;
}

h1 {
  font-size: 36px;
  font-weight: 600;
}

.hstack {
  display: flex;
}

.vstack {
  display: flex;
  flex-direction: column;
}

.zstack {
  display: grid;
  place-items: center;

  >* {
    grid-area: 1 / 1;
  }
}

nav#menu {
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 56px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background-color: rgba(0, 0, 0, 0.4);
  border-bottom: solid 1px rgba(255, 255, 255, 0.12);
  box-sizing: content-box;
  overflow: hidden;
  z-index: 10;
  font-family: "Work Sans", sans-serif;

  a {
    text-decoration: none;

    &.button {
      text-decoration: none;
      border: 1px solid #fff;
      border-radius: 4px;
      padding: 18px 24px;
      font-size: 18px;
      font-weight: 600;

      &.primary {
        border: unset;
        background-color: #FF4C4F;
        color: #000;

        &:hover {
          background-color: #fff;
        }
      }
    }
  }

  .logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;

    img {
      display: block;
    }

    #button-toggle {
      display: none;
      cursor: pointer;
      -webkit-user-select: none;
      user-select: none;
    }
  }

  .links {
    display: flex;
    flex: 1 0 0px;
    gap: 12px;
    padding: 0 16px 0 0;
    align-items: center;
    font-weight: 500;

    a {
      height: 56px;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 20px 16px;
      position: relative;

      &::before {
        position: absolute;
        content: '';
        inset: 0 -20px;
        background: radial-gradient(50% 50% at 50% 100%, rgba(255, 255, 255, 0.19) 0%, rgba(255, 255, 255, 0) 100%);
        opacity: 0;
        transition: opacity 0.3s cubic-bezier(0, 0, 0.3, 1);
      }

      &:hover::before {
        opacity: 1;
      }

      &.button {
        height: 32px;
        padding: 8px 18px;
        font-size: 15px;
        line-height: 2em;
      }
    }
  }

  .spacer {
    align-self: stretch;
    flex: 1 0 0px;
  }
}

@media (max-width: 809px) {
  nav#menu {
    flex-direction: column;
    gap: 0px;
    height: min-content;

    .logo {
      padding: 0px 10px 0px 16px;
      width: 100%;
      height: 56px;

      #button-toggle {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;

        #icon-close {
          display: none;
        }
      }
    }

    .links {
      display: none;
      flex-direction: column;
      gap: 0;
      align-items: flex-start;
      padding: 20px;
      width: 100%;

      a.button {
        margin-top: 16px;
      }
    }
  }

  nav#menu.expanded {
    .links {
      display: flex;
    }

    .logo {
      #button-toggle {
        #icon-expand {
          display: none;
        }

        #icon-close {
          display: block;
        }
      }
    }
  }
}
