/* ==========================================================================
   COMMUNITY PAGE

   Spec pulled from Figma (Website 2.0, node 73:14649, desktop 1512 frame).
   There is no tablet or mobile frame, so the narrower layouts below are
   our own: the type steps down and the hero's actions stack.

   Three sections: .hero, the sign-up cards (.signup, in signup.css) and
   .cta. The hero's content is 1230px wide at most, the same zone as the
   header and footer; the call to action's is 680px.
   ========================================================================== */

/* Buttons are 18px from 901px, as on the rest of this page's design */
@media (min-width: 901px) {
  main .button {
    font-size: 18px;
    line-height: 28px;
    letter-spacing: -0.64px;
  }
}

/* --------------------------------------------------------------------------
   Hero: the heading and lede, then Join Discord and the follow links
   -------------------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(64px, 12vw, 128px) max(var(--grid-margin), calc((100% - 1230px) / 2)) 40px;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 44px;
  line-height: 44px;
  letter-spacing: -1.76px;
  color: var(--color-text-light);
}

.hero h1 span {
  background: var(--gradient-label);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 + p {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: -0.32px;
  color: var(--color-text-regular);
}

.hero p:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  margin: 16px 0 0;
}

/* "Follow us:", then the links with a rule between them */
.hero p:last-child > span {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.64px;
  color: var(--color-text-light);
}

.hero p:last-child > span > a {
  position: relative;
  background: var(--gradient-label);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
}

.hero p:last-child > span > a:hover,
.hero p:last-child > span > a:focus-visible {
  text-decoration: underline;
  text-decoration-color: #5C55AD;
  text-underline-offset: 3px;
}

.hero p:last-child > span > a + a {
  margin-left: 17px;
}

.hero p:last-child > span > a + a::before {
  content: "";
  position: absolute;
  top: 4px;
  left: -17px;
  width: 1px;
  height: 16px;
  background-color: var(--color-border-neutral);
}

/* --------------------------------------------------------------------------
   Call to action: the logo mark (a short video, played by main.js while the
   button is hovered or focused), a heading, a line, the button and a note
   -------------------------------------------------------------------------- */

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 64px var(--grid-margin);
  text-align: center;
}

.cta video {
  display: block;
  width: 56px;
  height: 32px;
  object-fit: contain;
  pointer-events: none;
}

.cta h2 {
  margin: 0 0 -0.16em;
  padding-bottom: 0.16em;
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 48px;
  line-height: 48px;
  letter-spacing: -1.92px;
  /* Figma gives this headline its own angle (101.5deg); the stops are
     --gradient-main's. The bottom padding keeps descenders inside the
     area the clipped gradient paints. */
  background: linear-gradient(101.5deg, #7B6BB5 0%, #646444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* The line under the heading, 24px below it */
.cta h2 + p {
  max-width: 445px;
  margin: -8px 0 0;
  padding-inline: 24px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: -0.32px;
  color: var(--color-text-primary);
}

.cta p:last-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.cta small {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  line-height: 28px;
  letter-spacing: -0.48px;
  color: var(--color-text-light);
}

/* --------------------------------------------------------------------------
   Tablet and up
   -------------------------------------------------------------------------- */

@media (min-width: 700px) {
  .hero h1 {
    font-size: 60px;
    line-height: 58px;
    letter-spacing: -2.4px;
  }

  .hero h1 + p,
  .cta h2 + p {
    font-size: 18px;
    letter-spacing: -0.36px;
  }

  .hero p:last-child {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cta {
    padding-block: 96px;
  }

  .cta h2 {
    font-size: 64px;
    line-height: 62px;
    letter-spacing: -2.56px;
  }

  .cta h2 + p {
    padding-inline: 0;
  }
}

/* --------------------------------------------------------------------------
   Desktop
   -------------------------------------------------------------------------- */

@media (min-width: 901px) {
  .hero h1 {
    font-size: 72px;
    line-height: 68px;
    letter-spacing: -2.88px;
  }

  .cta {
    padding: 128px max(var(--grid-margin), calc((100% - 680px) / 2));
  }

  .cta h2 {
    font-size: 80px;
    line-height: 76px;
    letter-spacing: -3.2px;
  }
}
