/* Colours are the client's own (frontend/index.html in chriscord-client-go),
   so the site and the app look like the same thing. System fonts only:
   no font CDN, nothing loaded from anyone else's servers. */
:root {
  --bg: #0e1117;
  --panel: #1a1d27;
  --panel-raised: #20232f;
  --border: #2e3248;
  --accent: #7289da;
  --accent-hover: #8299e6;
  --accent-ink: #0e1117;
  --green: #43b581;
  --yellow: #faa61a;
  --text: #dcddde;
  --muted: #8b8f96;
  --strong: #ffffff;

  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 36rem;
  --gutter: clamp(1rem, 5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main, footer {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
main { flex: 1; }

h1, h2, h3 { color: var(--strong); margin: 0; }
p { margin: 0; }
b { color: var(--strong); font-weight: 600; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* The one loud thing on the page: the name, set big and heavy, hung
   slightly into the left margin so the letterforms (not the box) line up
   with the text below. */
.hero { padding-top: clamp(4rem, 14vh, 9rem); }
.wordmark {
  font: 800 clamp(3.4rem, 15vw, 7.5rem)/0.9 var(--display);
  letter-spacing: -0.055em;
  margin-left: -0.05em;
  color: var(--strong);
}
.lede {
  margin-top: 1.5rem;
  max-width: 30rem;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--text);
}

.get { margin-top: 2.75rem; }
.download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.button {
  display: inline-block;
  padding: 0.95rem 1.6rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: background-color 120ms ease, transform 120ms ease;
}
.button:hover { background: var(--accent-hover); }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 3px solid var(--strong); outline-offset: 3px; }
.download[data-state="loading"] .button,
.download[data-state="missing"] .button {
  background: var(--panel-raised);
  color: var(--muted);
  pointer-events: none;
  cursor: default;
}
.download-meta { color: var(--muted); font-size: 0.9375rem; }
.download[data-state="missing"] .download-meta { color: var(--yellow); }

.platforms, .current {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.current { margin-top: 0.25rem; }
.current .dot {
  display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--green); margin-right: 0.45rem; vertical-align: 0.08em;
}

/* A real sequence, so a numbered list. */
.steps {
  margin-top: clamp(3.5rem, 10vh, 5.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.steps h2 { font-size: 1.25rem; font-weight: 650; }
.steps ol {
  list-style: none;
  counter-reset: step;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: 0.75rem;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--accent);
  font-weight: 650;
  font-size: 0.9375rem;
}
.steps h3 { font-size: 1.0625rem; font-weight: 600; line-height: 2.25rem; }
.steps li p { color: var(--text); }
.file, code, .hash { font-family: var(--mono); font-size: 0.875em; }
.file { color: var(--strong); }

.verify {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9375rem;
}
.verify summary { cursor: pointer; color: var(--strong); font-weight: 600; }
.verify summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.verify p { margin-top: 0.75rem; color: var(--muted); }
.verify code { color: var(--text); }
.hash {
  color: var(--text) !important;
  word-break: break-all;
  background: var(--bg);
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
}

footer {
  margin-top: 4rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* The only motion: the name settles in once on load. */
@media (prefers-reduced-motion: no-preference) {
  .wordmark { animation: settle 700ms cubic-bezier(.2,.7,.2,1) both; }
  @keyframes settle {
    from { opacity: 0; letter-spacing: 0.02em; }
    to   { opacity: 1; letter-spacing: -0.055em; }
  }
}

/* Hosting your own server, and where the code lives. */
.host {
  margin-top: clamp(3rem, 8vh, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.host h2 { font-size: 1.25rem; font-weight: 650; }
.host > p { margin-top: 1rem; }
.repos {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.repos li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}
.repos span { color: var(--muted); font-size: 0.9375rem; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.repos a { font-family: var(--mono); font-size: 0.9375rem; font-weight: 600; }
.button, .button:hover { color: var(--accent-ink); }
