:root {
  --bg: hsl(0 0% 100%);
  --fg: hsl(0 0% 0%);
  --fg-muted: hsl(0 0% 35%);
  --fg-disclaimer: hsl(0 0% 30%);
  --icon-color: hsl(0 0% 0%);
  --video-shadow: hsl(0 0% 0% / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: hsl(0 0% 7%);
    --fg: hsl(0 0% 95%);
    --fg-muted: hsl(0 0% 64%);
    --fg-disclaimer: hsl(0 0% 65%);
    --icon-color: hsl(0 0% 100%);
    --video-shadow: hsl(0 0% 100% / 0.15);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration-color: var(--fg-muted);
  text-underline-offset: 2px;

  &:hover {
    text-decoration-color: currentColor;
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.arena-logo,
.github-icon {
  display: inline-block;
  background-color: var(--icon-color);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.arena-logo {
  width: 32px;
  height: 32px;
  -webkit-mask-image: url("images/arena.svg");
  mask-image: url("images/arena.svg");
}

.github-icon {
  width: 24px;
  height: 24px;
  -webkit-mask-image: url("images/Octicons-mark-github.svg");
  mask-image: url("images/Octicons-mark-github.svg");
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px 0;

  h1 {
    margin: 8px 0 24px;
    font-size: 48px;
  }

  p {
    max-width: 430px;
  }
}

.unofficial {
  margin: 0;
  font-weight: bold;
  font-size: 32px;
  color: var(--fg-muted);
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px 10px 12px;
  background: hsl(0 0% 100%);
  border: 1px solid hsl(0 0% 23%);
  border-radius: 13px;
  text-decoration: none;
  color: hsl(0 0% 0%);
  font-size: 20px;
  transition: background 0.15s ease;

  &:hover {
    background: hsl(0 0% 95%);
  }

  img {
    width: 30px;
    object-fit: contain;
  }
}

.video-preview {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 1800 / 1126;
  margin-top: 24px;
  border-radius: 8px;
  box-shadow: 0 0 20px var(--video-shadow);
  cursor: pointer;
  line-height: 0;

  video {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    display: block;
    object-fit: cover;
  }

  .video-preview__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: hsl(0 0% 0% / 0.3);
    color: hsl(0 0% 100%);
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;

    svg {
      width: 26px;
      height: 26px;
    }

    .icon-pause {
      display: none;
    }
  }

  &:hover .video-preview__icon {
    opacity: 1;
  }

  &.is-playing .video-preview__icon {
    .icon-play {
      display: none;
    }

    .icon-pause {
      display: block;
    }
  }
}

.description {
  max-width: 760px;
  margin: 48px auto;
  padding: 0 20px;
  font-size: 20px;
  line-height: 1.5;
}

.description p + p {
  margin-top: 20px;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 32px;
  }

  .unofficial {
    font-size: 24px;
  }
}

.disclaimer {
  font-size: 16px;
  color: var(--fg-disclaimer);
}

.author {
  font-size: 16px;
  margin-bottom: 10px;
}
