/* Discord page. Markup, selectors, and values copied from the live
   /discord page (nws.css and app.js discordPage(), fetched 2026-11-19). */

main:has(.discord-page) {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--page-px) 7rem;
  min-width: 0;
}

@media (width >= 768px) {
  main:has(.discord-page) {
    padding: 24px var(--page-px) 4rem;
  }
}

.discord-page {
  margin-top: 8px;
}

.discord-page h1 {
  letter-spacing: -.025em;
  color: var(--red);
  margin: 8px 0 0;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.1;
}

@media (width >= 640px) {
  .discord-page h1 {
    font-size: 3rem;
    line-height: 1;
  }
}

.discord-page h1 .discord-accent,
.discord-accent {
  color: var(--red);
}

.discord-grid {
  align-items: start;
  gap: 40px;
  margin-top: 32px;
  display: grid;
}

.discord-widget-col {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 64px;
  display: flex;
  order: 2;
}

.discord-widget {
  width: 350px;
  max-width: 100%;
  position: relative;
}

.discord-widget iframe {
  background: #111;
  border: 0;
  width: 100%;
  height: 500px;
  display: block;
}

.discord-start {
  color: var(--red);
  letter-spacing: .04em;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
}

.discord-start svg {
  flex-shrink: 0;
  display: block;
}

.discord-join-arrow {
  transform-origin: 50%;
  animation: 1s ease-in-out infinite discord-join-wobble;
  display: block;
}

@keyframes discord-join-wobble {
  0%, to {
    transform: rotate(0);
  }
  20% {
    transform: rotate(-14deg);
  }
  40% {
    transform: rotate(12deg);
  }
  60% {
    transform: rotate(-8deg);
  }
  80% {
    transform: rotate(6deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .discord-join-arrow {
    animation: none;
  }
}

.discord-start-side {
  display: none;
}

.discord-start-below {
  white-space: nowrap;
  margin-top: 8px;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%);
}

.discord-copy {
  color: #595959;
  order: 1;
  font-size: 16px;
  line-height: 1.55;
}

.discord-lede {
  margin: 0;
}

.discord-copy a {
  color: #111;
  text-underline-offset: 4px;
  font-weight: 500;
  text-decoration: underline;
}

.discord-copy a.discord-join {
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
}

.discord-meta {
  margin-top: 32px;
}

.discord-meta p {
  color: #595959;
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.5;
}

.discord-meta b {
  color: #111;
  font-weight: 600;
}

@media (width >= 1024px) {
  .discord-grid {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 40px;
  }
  .discord-widget-col {
    flex-direction: row;
    order: 1;
    justify-content: flex-start;
    align-items: flex-end;
    padding-bottom: 0;
  }
  .discord-copy {
    order: 2;
  }
  .discord-start-below {
    display: none;
  }
  .discord-start-side {
    margin: 0 0 4px 8px;
    font-size: 18px;
    display: flex;
  }
  .discord-start-side svg {
    width: 56px;
    height: 56px;
  }
}
