/* ==========================================================================
   Discord landing (views/discord.ejs): a standalone page with no navbar,
   one screen on desktop. The invite column uses the kit (page header,
   buttons, chips); the live preview is the chat shell (chat.css) with kit
   slips. Unlayered and token-only.
   ========================================================================== */

.discord-page { margin: 0; min-height: 100dvh; overflow-x: hidden; background-color: var(--color-canvas); color: var(--color-ink); }

/* Stacked on phones, two columns from 64rem. */
.discord-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 74rem;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

/* --- Invite ------------------------------------------------------------- */
.discord-invite { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.discord-logo img { display: block; width: 3.5rem; height: 3.5rem; border-radius: var(--shape-md); box-shadow: var(--shadow-lift); }

.discord-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--color-accent); animation: discord-pulse 2s infinite; }

@keyframes discord-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 50%, transparent); }
  70% { box-shadow: 0 0 0 0.5rem transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.discord-benefits { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.discord-benefits li { display: flex; gap: 0.625rem; }
.discord-benefits li > i { flex: none; margin-top: 0.3em; color: var(--color-accent-ink); }

/* --- Live preview: the chat shell, sized by the page --------------------- */
.discord-chat.chat-shell { width: 100%; height: clamp(20rem, 55dvh, 34rem); min-height: 0; }

.discord-chat-foot {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--color-rule);
  color: var(--color-ink-muted);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
}

.discord-chat-foot > i { color: var(--color-accent-ink); }
.discord-chat-foot > a { margin-inline-start: auto; }

.discord-noscript { position: fixed; bottom: 1rem; width: 100%; color: var(--color-ink-muted); font-family: var(--font-ui); font-size: 0.8125rem; text-align: center; }

@media (min-width: 64rem) {
  .discord-shell {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding-inline: 2rem;
  }

  .discord-invite { flex: 1 1 46%; max-height: 100%; overflow: auto; padding-inline-end: 0.5rem; }
  .discord-chat.chat-shell { flex: 1 1 54%; height: min(100%, 40rem); }
}

/* Short desktop windows: tighten so nothing clips. */
@media (min-width: 64rem) and (max-height: 40rem) {
  .discord-shell { gap: 1.75rem; }
  .discord-invite { gap: 0.625rem; }
  .discord-logo img { width: 2.875rem; height: 2.875rem; }
}

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