/* site/site.css
 *
 * Shared styles for the public marketing pages.
 *
 * Tokens are copied verbatim from web/src/index.css rather than re-picked, so
 * the page someone reads before signing up and the console they land in
 * afterwards are visibly the same product. If a token changes there, change it
 * here — there is no build step to keep them in sync, and a marketing site that
 * no longer matches the app reads as an old page nobody maintains.
 *
 * Mobile first. Every layout rule below starts single-column and widens at a
 * breakpoint, because a Discord bot's invite link is very often opened on a
 * phone, from inside Discord's own in-app browser.
 */

:root {
  color-scheme: dark;

  /* Ground — from web/src/index.css, copied verbatim. */
  --bg: #0d1016;
  --surface: #151a22;
  --raised: #1e242e;
  --line: #2a323e;
  --line-soft: #1f2530;

  --text: #eef1f5;
  --text-dim: #a2acba;
  --text-muted: #727d8c;

  --accent: #5aa9ff;
  --accent-ink: #06121f;
  --accent-soft: #5aa9ff1f;
  --accent-line: #5aa9ff59;

  /* Signal. Same three steps as the console, used here only where the page is
   * actually reporting a state: free vs paid, included vs capped. */
  --ok: #35c99a;
  --watch: #e8a33d;
  /* Carried over for parity with the console even though nothing on a
   * marketing page should ever be in the "act now" state. If a future page
   * needs to mark something as failed, this is the colour it uses. */
  --act: #f2555a;

  /* Link text inside a paragraph.
   *
   * It exists for the same reason it always did, but the arithmetic inverted.
   * The old blurple was too DARK on the old ground (4.09:1) and had to be
   * lightened. The azure is already bright: #5aa9ff on #0d1016 clears AA
   * comfortably, so on this ground --accent-text is simply --accent. It stays
   * a separate token because on the light ground below it is not — a bright
   * azure on near-white fails as body text and has to go deep instead. One
   * token, two grounds, and no component has to know which it is on. */
  --accent-text: #5aa9ff;

  --display: "Archivo", system-ui, sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;

  --wrap: 1120px;
}

/* The site follows the reader's device and offers no switch of its own.
 *
 * The console has a toggle because it is an app someone lives in; this is six
 * pages of reading, and site/README.md commits to no JavaScript at all. A
 * toggle needs script and somewhere to persist a choice, so honouring the
 * device is the whole of what a static site can honestly do — and it is what
 * most people want anyway. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: #f5f6f8;
    --surface: #ffffff;
    --raised: #eceef2;
    --line: #d8dbe2;
    --line-soft: #e4e7ec;

    --text: #0e1116;
    --text-dim: #4d5561;
    --text-muted: #767e8b;

    --accent: #0b63ce;
    --accent-ink: #ffffff;
    --accent-soft: #0b63ce14;
    --accent-line: #0b63ce4d;

    --ok: #0b7a5a;
    --watch: #a35a06;
    --act: #c62828;

    --accent-text: #0b63ce;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.25rem);
}
h2 {
  font-size: clamp(1.4rem, 4vw, 2rem);
}
h3 {
  font-size: 1.0625rem;
}

p {
  margin: 0 0 1rem;
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--text);
}

/* Never removed, only restyled. Every page here has to work with a keyboard
 * alone; there is no pointer-only control anywhere on this site. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

code {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.875em;
  background: var(--raised);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.0625rem 0.3125rem;
}

/* ------------------------------------------------------------------ *
 * Skip link. First thing in the tab order on every page.
 * ------------------------------------------------------------------ */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--r-sm) 0;
  text-decoration: none;
}
.skip:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.lede {
  font-size: clamp(1.0625rem, 2.4vw, 1.3125rem);
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 62ch;
}

.dim {
  color: var(--text-dim);
}
.muted {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------ *
 * Header. No hamburger and no JS — the nav is four links and it wraps.
 * ------------------------------------------------------------------ */
.site-header {
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}
.site-header .home {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.site-header .home picture {
  display: inline-flex;
  line-height: 0;
}
.site-header .home img {
  width: 122px;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 1.25rem;
  margin-left: auto;
}
.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.btn:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #4a56d9;
  border-color: #4a56d9;
  color: #fff;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ------------------------------------------------------------------ *
 * Sections
 * ------------------------------------------------------------------ */
/* Scoped to direct children of <main>. The footer also uses <section> for its
 * link groups, and an unscoped selector gave each of those 3.5rem of padding
 * and a rule above it. */
main > section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line-soft);
}
main > section:first-child {
  border-top: 0;
}

.section-head {
  max-width: 62ch;
  margin-bottom: 2rem;
}
.section-head h2 {
  margin-bottom: 0.625rem;
}

/* ------------------------------------------------------------------ *
 * Hero
 * ------------------------------------------------------------------ */
.hero {
  padding: 3rem 0 3.5rem;
}
.hero h1 {
  max-width: 20ch;
  margin-bottom: 1.25rem;
}
.hero .lede {
  max-width: 58ch;
}

/* The door line. Marked up as a blockquote because it quotes someone else's
 * ban message, and the whole argument is that this product is the answer to
 * that sentence. */
.door {
  margin: 2.5rem 0 0;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  max-width: 62ch;
}
.door p {
  font-family: var(--display);
  font-size: clamp(1.0625rem, 2.6vw, 1.25rem);
  line-height: 1.4;
}
.door footer {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 0.625rem;
}

/* The screenshot under the door line. Bordered and rounded so it reads as a
 * quoted artifact rather than page furniture, and sized by the blockquote it
 * sits in — the global `img { max-width: 100% }` rule already handles the
 * narrow end, so nothing here needs a media query. */
.door-evidence {
  margin: 1rem 0 0;
}
.door-evidence img {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.door-evidence figcaption {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 0.5rem;
}

.hero-figure {
  display: none;
}

/* ------------------------------------------------------------------ *
 * Card grids
 * ------------------------------------------------------------------ */
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 1.25rem;
}
.card h3 {
  margin-bottom: 0.5rem;
}
.card p {
  color: var(--text-dim);
  font-size: 0.9375rem;
  margin: 0;
}
.card p + p {
  margin-top: 0.625rem;
}

/* Feature group: a heading, then a plain list of what is in it. Deliberately
 * a list rather than prose — someone scanning for "does it do tickets" should
 * find the word, not a paragraph about it. */
.group ul {
  margin: 0;
  padding-left: 1.125rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
}
.group li {
  margin-bottom: 0.375rem;
}
.group li:last-child {
  margin-bottom: 0;
}
.group li strong {
  color: var(--text);
  font-weight: 600;
}

/* ------------------------------------------------------------------ *
 * Steps
 * ------------------------------------------------------------------ */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
.steps li {
  counter-increment: step;
  padding-left: 3rem;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8125rem;
}
.steps h3 {
  margin-bottom: 0.25rem;
}
.steps p {
  color: var(--text-dim);
  font-size: 0.9375rem;
  margin: 0;
}

/* ------------------------------------------------------------------ *
 * Tables. Every wide table on this site scrolls inside its own box, so the
 * page body never scrolls sideways on a phone.
 * ------------------------------------------------------------------ */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 34rem;
}
caption {
  text-align: left;
  padding: 1rem 1rem 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
th,
td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
thead th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
tbody th {
  font-weight: 500;
  color: var(--text);
}
tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}
td.num,
th.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ *
 * Price cards
 * ------------------------------------------------------------------ */
.price {
  display: flex;
  flex-direction: column;
}
.price .amount {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  margin: 0.75rem 0 0.25rem;
}
.price .amount .unit {
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.price .per {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin: 0 0 1rem;
}
.price ul {
  margin: 0;
  padding-left: 1.125rem;
  color: var(--text-dim);
  font-size: 0.875rem;
}
.price li {
  margin-bottom: 0.3125rem;
}
.price .badge {
  align-self: flex-start;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.6875rem;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge.is-ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}
.badge.is-watch {
  color: var(--watch);
  border-color: color-mix(in srgb, var(--watch) 35%, transparent);
}

/* ------------------------------------------------------------------ *
 * Callout — a bordered aside for the things that need reading rather than
 * skimming: annual-only billing, and the no-unlimited rule.
 * ------------------------------------------------------------------ */
.callout {
  border: 1px solid var(--line);
  border-left: 2px solid var(--watch);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--surface);
  padding: 1.125rem 1.25rem;
  margin: 1.75rem 0;
  font-size: 0.9375rem;
  color: var(--text-dim);
  max-width: 68ch;
}
.callout strong {
  color: var(--text);
}
.callout.is-accent {
  border-left-color: var(--accent);
}

/* ------------------------------------------------------------------ *
 * Prose pages (privacy, terms)
 * ------------------------------------------------------------------ */
.prose {
  max-width: 70ch;
  padding: 3rem 0 4rem;
}
/* The pricing page carries a five-column table. 70ch would force it to scroll
 * on a desktop, where there is plenty of room — so that page widens, and the
 * running text inside it is held back to a readable measure on its own. */
.prose.wide {
  max-width: 62rem;
}
.prose.wide > p,
.prose.wide > ul,
.prose.wide > ol,
.prose.wide > pre,
.prose.wide > .callout {
  max-width: 70ch;
}

.prose h1 {
  font-size: clamp(1.875rem, 5vw, 2.5rem);
  margin-bottom: 0.75rem;
}
.prose h2 {
  font-size: 1.25rem;
  margin: 2.5rem 0 0.75rem;
}
.prose h3 {
  margin: 1.75rem 0 0.5rem;
}
.prose p,
.prose li {
  color: var(--text-dim);
}
.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose .updated {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.prose .table-scroll {
  margin: 1.5rem 0;
}

/* ------------------------------------------------------------------ *
 * Docs (/docs)
 *
 * The docs pages are `.prose` plus three things prose did not need until the
 * repository's markdown moved onto the site: code blocks, a sibling-page nav,
 * and cards that are whole links.
 * ------------------------------------------------------------------ */

/* No `pre` rule existed before this section, because no page had a code block
 * — privacy and terms are running text. Docs have shell commands and env
 * fragments, and an unstyled `pre` inherits the body background, which reads
 * as a paragraph in the wrong font rather than as something you can copy. */
pre {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 1rem 1.125rem;
  margin: 1.25rem 0;
  /* A command line is one line. Wrapping it mid-flag produces something that
   * looks copyable and is not, so it scrolls instead — and the box scrolls,
   * never the page. */
  overflow-x: auto;
  color: var(--text-dim);
  max-width: 70ch;
}
/* `code` inside `pre` would otherwise draw its own inline chip on top of the
 * block's background: a border and a fill around every line. */
pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}
/* Sibling pages, above the heading. Not a sidebar: at 360px a sidebar becomes
 * a stack of links the reader has to scroll past to reach the page they
 * already chose, and there are five documents, not fifty. */
.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0 0 1.75rem;
  margin: 0;
  list-style: none;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9375rem;
}
.doc-nav a {
  color: var(--text-muted);
  text-decoration: none;
}
.doc-nav a:hover {
  color: var(--text);
}
.doc-nav a[aria-current="page"] {
  color: var(--text);
}

/* The hub's index. `.card` with the whole tile as the link target, because a
 * card whose only hit area is four words of heading is a card that gets
 * missed on a phone. */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.card-link:hover {
  border-color: var(--accent-line);
}
.card-link h3 {
  color: var(--text);
}

/* Where to go after reading one. Sits at the end of every docs page so the
 * reader is never returned to a dead end. */
.doc-foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Breadcrumbs, on the query-targeted pages only.
 *
 * Selectors are `.crumbs ol li` rather than `.crumbs li`, because `.prose li`
 * already sets a bottom margin at the same specificity and whichever rule came
 * later would win. Winning by source order is not winning. */
.crumbs {
  margin: 0 0 1.75rem;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
}
.crumbs ol li {
  margin: 0;
  color: var(--text-muted);
}
.crumbs ol li + li::before {
  content: "/";
  margin-right: 0.375rem;
  color: var(--line);
}
.crumbs a {
  color: var(--text-muted);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 2.5rem 0 3rem;
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
.footer-grid h2 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-grid li {
  margin-bottom: 0.4375rem;
}
.footer-grid a {
  color: var(--text-dim);
  text-decoration: none;
}
.footer-grid a:hover {
  color: var(--text);
  text-decoration: underline;
}
.colophon {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.colophon img {
  width: 24px;
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* ------------------------------------------------------------------ *
 * Breakpoints.
 *
 * 360px  — the narrowest target. Nothing has a fixed width below this; the
 *          only elements that could overflow are the tables, and those are
 *          wrapped in .table-scroll.
 * 640px  — two columns fit without either dropping below ~40 characters.
 * 900px  — three columns, and the hero gains the mark beside it.
 * 1120px — .wrap stops growing. Nothing else changes above this width.
 * ------------------------------------------------------------------ */
@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .btn {
    padding: 0.8125rem 1.5rem;
  }
}

@media (min-width: 900px) {
  section {
    padding: 4.5rem 0;
  }
  .hero {
    padding: 4.5rem 0 5rem;
  }
  /* The grid lives on .wrap, not on the section, so the max-width and the
   * side padding that every other section gets still apply here. */
  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
  }
  .hero-body {
    min-width: 0;
  }
  /* Decorative. The mark already appears in the header with a real alt, so
   * repeating it here would announce the product name twice to a screen
   * reader for no added meaning — hence alt="" on the image itself. */
  .hero-figure {
    display: block;
    margin: 0;
    justify-self: center;
  }
  .hero-figure img {
    width: min(260px, 100%);
    opacity: 0.9;
  }
  /* Two columns is what .cards already does from 640px up, so this rule is
     the class earning its name rather than changing anything: cols-2 marked a
     grid that only looked right by coincidence, and would have silently become
     three columns the day the default changed. */
  .cards.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cards.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .cards.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  /* auto-fit rather than a fixed count: the footer grew a fifth column when
     Support was added, and a hard repeat(4) drops the last one onto a row of
     its own looking like an afterthought. This packs whatever fits. */
  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
