/* Space Grotesk — SIL OFL 1.1, self-hosted (see assets/fonts/OFL.txt). Two
   subsets, one variable file each; a browser fetches only the range it uses. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Cool neutrals. The product lives in Discord's dark UI, so the page's canvas
     is that world's black rather than a warm one. */
  --ink: #08090b;
  --ink-soft: #0e1116;
  --ink-band: #0a0f1c;
  --paper: #f5f7fb;
  --text-body: #c3cad6;
  --muted: #8b94a5;
  --line: #1d2229;
  --line-strong: #2c333d;

  /* Two hues with two jobs, both taken from the bot's own embeds
     (packages/sdk/result.py): blurple is who it is, green is what happened.
     Blue names things; green acts and reports. Neither is decoration. */
  --brand: #5865f2;
  --brand-ink: #ffffff;
  --brand-text: #a6b1ff;
  --action: #57f287;
  --action-hover: #7bf5a5;
  --action-ink: #06170d;

  /* Status. Beta is a quiet note, not a third accent. */
  --notice-bg: #101a2e;
  --notice-line: #2c4070;
  --notice-text: #a8c2ff;

  /* Commands, identifiers and inline code. */
  --code-ink: #dfe6f5;

  /* Discord's own surfaces and semantic colours, mirrored from the bot's posts.
     Fidelity values, not brand roles: the mockups must look like the messages
     they reproduce, so they never collapse into the tokens above. */
  --mock-card: #1e1f22;
  --mock-embed: #2b2d31;
  --mock-rule: #3f4147;
  --mock-avatar: #3f4147;
  --mock-badge: #5865f2;
  --mock-badge-ink: #ffffff;
  --mock-button: #4e5058;
  --mock-button-line: #5c5f66;
  --mock-strong: #f2f3f5;
  --mock-muted: #949ba4;
  --mock-link: #00a8fc;
  --mock-news-rule: #5865f2;
  --mock-image: #232428;
  --mock-image-line: #3f4147;
  --mock-text: #dbdee1;
  /* Result stripes: a win is SUCCESS green, a loss DANGER #ed4245, brand posts
     blurple, final standings HIGHLIGHT #f1c40f. The samples on this page are
     all wins, so only the green is used here. */
  --mock-success: #57f287;

  --font-display: "Space Grotesk", ui-sans-serif, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-body: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --wrap: 68rem;
  --step: clamp(3rem, 7vw, 5.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

p,
figcaption {
  text-wrap: pretty;
}

::selection {
  background: var(--brand);
  color: var(--brand-ink);
}

:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 0.4rem;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

/* Header ---------------------------------------------------------------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.4rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark .mark {
  display: block;
  width: 1.9rem;
  height: 1.9rem;
}

.site-nav {
  display: flex;
  gap: 1.6rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--paper);
}

.site-head .btn {
  padding: 0.55rem 1.05rem;
  font-size: 0.92rem;
}

/* Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 0.55rem;
  background: var(--action);
  color: var(--action-ink);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 120ms ease, transform 120ms ease;
}

.btn:hover {
  background: var(--action-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--ink-soft);
  border-color: var(--muted);
}

/* Hero ------------------------------------------------------------------ */

.hero {
  padding-block: clamp(2rem, 5vw, 4rem) var(--step);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-text);
}

h1 {
  margin: 0 0 1.2rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.6vw, 4.1rem);
  line-height: 1.01;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 1.9rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-body);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.promises {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.promises li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.promises li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--action);
}

/* The message reel ------------------------------------------------------- */
/* Three messages from one weekend, cycling with CSS only. The frames share one
   grid cell, so the figure is as tall as the tallest message and nothing is
   clipped. prefers-reduced-motion turns the reel into a plain stack. */

.reel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.reel .discord {
  grid-area: 1 / 1;
  align-self: start;
  opacity: 0;
  animation: reel-cycle 15s infinite;
}

.reel .discord:nth-child(2) {
  animation-delay: 5s;
}

.reel .discord:nth-child(3) {
  animation-delay: 10s;
}

@keyframes reel-cycle {
  0% {
    opacity: 0;
  }
  1.5% {
    opacity: 1;
  }
  31.5% {
    opacity: 1;
  }
  33% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reel {
    gap: 0.9rem;
  }

  .reel .discord {
    grid-area: auto;
    opacity: 1;
    animation: none;
  }
}

/* The reel cycles on its own, so it carries its own stop control (WCAG 2.2.2).
   A checkbox drives the state; no script, and it keeps working at 200% zoom. */
.reel-control {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line-strong);
}

.reel-control:hover {
  color: var(--paper);
  text-decoration-color: currentColor;
}

.reel-control span {
  border-radius: 2px;
}

.reel-pause {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.reel-paused {
  display: none;
}

.reel-pause:checked ~ .reel-idle {
  display: none;
}

.reel-pause:checked ~ .reel-paused {
  display: inline;
}

.reel-pause:focus-visible ~ span {
  outline: 2px solid var(--action);
  outline-offset: 3px;
}

figure:has(.reel-pause:checked) .reel .discord {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  /* Nothing cycles here, so the control has no job. */
  .reel-control {
    display: none;
  }
}

/* The message mock ------------------------------------------------------- */
/* Mirrors features/tournament_watch/render.py: a Components V2 container with
   an accent stripe, result lines, an optional standings block, a link button
   and a small footer. Swap this figure for an <img> when real screenshots exist. */

.shot {
  margin: 0;
}

.discord {
  background: var(--mock-card);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 24px 60px -30px #000;
}

.discord-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.discord-head .avatar {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--mock-avatar);
  color: var(--paper);
  font: 700 0.62rem/1 var(--font-body);
  letter-spacing: 0.02em;
}

.discord-head .name {
  font-weight: 600;
}

.discord-head .app {
  padding: 0.1rem 0.32rem;
  border-radius: 0.2rem;
  background: var(--mock-badge);
  color: var(--mock-badge-ink);
  font: 600 0.58rem/1.4 var(--font-body);
  letter-spacing: 0.04em;
}

.discord-head time {
  color: var(--mock-muted);
  font-size: 0.78rem;
}

.message {
  /* A result message carries its outcome's colour: green for a win, red for a
     loss, blurple for brand. These three samples are all wins. */
  border-left: 4px solid var(--mock-success);
  background: var(--mock-embed);
  border-radius: 0.25rem;
  padding: 0.9rem 1rem 0.8rem;
}

.message-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.message-intro {
  margin: 0;
  font-size: 0.87rem;
  color: var(--mock-text);
}

.message-rule {
  height: 1px;
  margin: 0.6rem 0;
  border: 0;
  background: var(--mock-rule);
}

.message-line {
  margin: 0.1rem 0 0;
  font-size: 0.87rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.message-sub {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  color: var(--mock-muted);
}

.message-standings {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--mock-text);
  font-variant-numeric: tabular-nums;
}

.message-standings-head {
  display: block;
  font-weight: 600;
  color: var(--paper);
}

.message-button {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--mock-button-line);
  border-radius: 0.3rem;
  background: var(--mock-button);
  color: var(--mock-strong);
  font-size: 0.78rem;
  font-weight: 600;
}

.message-foot {
  margin: 0.55rem 0 0;
  font-size: 0.7rem;
  color: var(--mock-muted);
}

.shot figcaption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Sections -------------------------------------------------------------- */

section {
  padding-block: var(--step);
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-lede {
  margin: 0 0 1.6rem;
  max-width: 40rem;
  color: var(--text-body);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.commands-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.commands-inline code {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--ink-soft);
  color: var(--code-ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.5rem);
  margin-top: 2rem;
  counter-reset: step;
}

.step {
  border-top: 2px solid var(--action);
  padding-top: 1rem;
}

.step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 650;
  counter-increment: step;
}

.step h3::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--action);
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-body);
}

/* Commands table -------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  margin-top: 1.6rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

caption {
  text-align: left;
  color: var(--muted);
  font-size: 0.85rem;
  padding-bottom: 0.6rem;
}

th,
td {
  text-align: left;
  padding: 0.65rem 1rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

td code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--code-ink);
  white-space: nowrap;
}

/* FAQ ------------------------------------------------------------------- */

.faq {
  display: grid;
  gap: 0.2rem;
  margin-top: 1.4rem;
  max-width: 46rem;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "+";
  color: var(--brand-text);
  font-family: var(--font-mono);
}

details[open] summary::after {
  content: "–";
}

details p {
  margin: 0.7rem 0 0;
  max-width: 46rem;
  color: var(--text-body);
}

/* Footer ---------------------------------------------------------------- */

.site-foot {
  /* One raised surface closes the page: the same black, one step lighter. */
  background: var(--ink-band);
  border-top: 1px solid var(--line-strong);
}

.site-foot .wrap {
  padding-block: var(--step) 2.5rem;
  display: grid;
  gap: 2rem;
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.foot-cta p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2rem);
  max-width: 30rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.fine {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.fine a,
.prose a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line-strong);
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

.fine a:hover,
.prose a:hover {
  color: var(--paper);
  text-decoration-color: currentColor;
}

/* Narrow ---------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    gap: 2.5rem;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
  }

  /* The anchor row fits at 320px; it carries the page's own table of contents,
     so it moves to a second header row instead of disappearing. */
  .site-head {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 2rem;
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .site-nav {
    justify-content: space-between;
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}

/* Privacy note ------------------------------------------------------------- */

.prose {
  max-width: 36rem;
  margin-inline: auto;
  padding-block: var(--step);
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.prose h2 {
  margin-top: 2.4rem;
  font-size: 1.2rem;
  font-family: var(--font-body);
  font-weight: 650;
  letter-spacing: 0;
}

.prose p,
.prose li {
  color: var(--text-body);
}

.prose ul {
  padding-left: 1.1rem;
}

.prose li {
  margin-block: 0.35rem;
}

.prose .back {
  margin-top: 2.5rem;
  font-size: 0.9rem;
}

/* Beta marker ------------------------------------------------------------- */

.beta {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--notice-line);
  border-radius: 0.25rem;
  background: var(--notice-bg);
  color: var(--notice-text);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.15em;
}

/* The news example ------------------------------------------------------- */
/* A classic Discord embed, as features/warcom/jobs.py builds it: author,
   linked title, summary, image, footer. The image is a placeholder because the
   real one belongs to the article. */

.news-embed {
  border-left: 4px solid var(--mock-news-rule);
  background: var(--mock-embed);
  border-radius: 0.25rem;
  padding: 0.8rem 1rem 0.7rem;
}

.news-author {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mock-strong);
}

.news-title {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

.news-link {
  color: var(--mock-link);
}

.news-summary {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--mock-text);
}

.news-image {
  display: grid;
  place-items: center;
  height: 6.5rem;
  border: 1px dashed var(--mock-image-line);
  border-radius: 0.2rem;
  background: var(--mock-image);
  color: var(--mock-muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.news-foot {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  color: var(--mock-muted);
}
