/* Shared by every page on fw-suite.de and its subdomains: black, centered, one column. */

:root {
  color-scheme: dark;
  --bg: #000000;
  --text: #f2f3f5;
  --muted: #8b8f98;
  --line: #1f2024;
  --accent: #5865f2;
  /* Discord's embed colours, so patch notes read like the bot's posts. */
  --embed-bg: #2b2d31;
  --embed-text: #dbdee1;
  --embed-muted: #949ba4;
  --embed-link: #00a8fc;
  --embed-code: #1e1f22;
  --testing: #f0b232;
}
* { box-sizing: border-box; }
/* 100vw includes a desktop scrollbar, so the full-width carousel would overhang by its width. */
html { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px 16px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
a { color: inherit; }

.logo { width: 88px; height: 88px; margin-bottom: 20px; }
h1 { margin: 0; font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.byline { margin: 6px 0 0; color: var(--muted); font-size: 1.05rem; }

.download { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.button {
  display: inline-block;
  padding: 14px 44px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.1s ease, background 0.15s ease;
}
.button:hover { background: #ffffff; transform: translateY(-1px); }
.download .meta { margin: 0; color: var(--muted); font-size: 0.85rem; }
.download .meta a { color: var(--muted); }
.download .meta a:hover { color: var(--text); }

.note { margin: 0; color: var(--muted); font-size: 0.8rem; max-width: 420px; }

/* Screenshot carousel: wider than the column so the app is readable, one shot
   centred and 30% of each neighbour showing at the sides, so the centre shot
   shrinks to make room. --side is the gap plus the visible part of a neighbour. */
.carousel {
  --gap: 28px; --w: min(1000px, calc((100vw - 2 * var(--gap)) / 1.6)); --side: calc(var(--w) * 0.3 + var(--gap));
  position: relative; width: calc(var(--w) + 2 * var(--side)); flex: none; margin-top: 48px;
}
.track {
  display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 var(--side) 4px;
  /* Fade the neighbours out towards the edges. */
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.5), #000 var(--side), #000 calc(100% - var(--side)), rgba(0, 0, 0, 0.5));
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: none; }
.track.jumping .slide, .track.jumping figcaption { transition: none; }
.slide { flex: none; width: var(--w); margin: 0; scroll-snap-align: center; opacity: 0.5; transition: opacity 0.3s ease; }
.slide.active { opacity: 1; }
.slide a { display: block; }
.slide img {
  display: block; width: 100%; height: auto; aspect-ratio: 1200 / 736; object-fit: cover; object-position: top;
  border: 1px solid var(--line); border-radius: 10px;
}
.slide.active img { box-shadow: 0 24px 64px rgba(88, 101, 242, 0.12); }
.track:focus-visible .slide.active img { border-color: var(--muted); }
.slide figcaption { margin-top: 12px; color: var(--muted); font-size: 0.9rem; opacity: 0; transition: opacity 0.3s ease; }
.slide.active figcaption { opacity: 1; }
.nav {
  position: absolute; top: calc(var(--w) * 736 / 1200 / 2); transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.7); color: var(--text); font-size: 28px; line-height: 1; cursor: pointer;
  transition: border-color 0.15s ease;
}
.nav:hover { border-color: var(--muted); }
.nav.prev { left: calc(var(--side) - 22px); }
.nav.next { right: calc(var(--side) - 22px); }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--text); }

/* Patch notes, one Discord-style embed per version. */
.notes { width: 100%; margin-top: 56px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.embed {
  background: var(--embed-bg);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 12px 16px 14px 14px;
  color: var(--embed-text);
  font-size: 0.875rem;
  line-height: 1.375;
}
.embed.older { border-left-color: #4e5058; }
.embed-title { margin: 0 0 4px; color: #ffffff; font-size: 1rem; font-weight: 600; }
.embed-field { margin-top: 10px; }
.embed-field h3 { margin: 0 0 2px; color: #ffffff; font-size: 0.875rem; font-weight: 600; }
.embed-field.testing h3 { color: var(--testing); }
.embed ul { margin: 0; padding-left: 1.25em; }
.embed li { margin: 3px 0; }
.embed a { color: var(--embed-link); text-decoration: none; }
.embed a:hover { text-decoration: underline; }
.embed code { background: var(--embed-code); padding: 1px 4px; border-radius: 3px; font-size: 0.85em; }
.embed-footer { margin-top: 12px; color: var(--embed-muted); font-size: 0.75rem; }

/* Landing page: a list of projects. */
.projects { width: 100%; margin-top: 48px; display: flex; flex-direction: column; gap: 12px; }
.project {
  display: flex; gap: 16px; align-items: center; text-align: left;
  padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; transition: border-color 0.15s ease;
}
a.project:hover { border-color: var(--muted); }
.project img, .project svg { width: 48px; height: 48px; flex: none; }
.project h2, .project h3 { margin: 0; font-size: 1.1rem; }
/* A heading above a group of projects, e.g. per game. */
.projects h2.group {
  margin: 28px 0 0; text-align: left; color: var(--muted);
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
}
.projects h2.group:first-child { margin-top: 0; }
.project p { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }

footer { margin-top: 64px; color: var(--muted); font-size: 0.85rem; }
footer p { margin: 0 0 10px; }
footer a { color: var(--muted); }
/* The links people come to the footer for. */
footer a.highlight { color: var(--embed-link); }
footer a.highlight:hover { color: #4cc3ff; }

@media (max-width: 520px) {
  main { padding-top: 56px; }
  h1 { font-size: 2.1rem; }
  .button { width: 100%; }
  .download { width: 100%; }
  .carousel { --gap: 12px; --side: 40px; --w: calc(100vw - 2 * var(--side)); }
  .nav { display: none; }
}

/* Replay Renderer page. */
.lead { margin: 20px 0 0; max-width: 480px; color: var(--text); font-size: 1.05rem; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.88em; }
.download .meta code { color: var(--text); }
/* The video sits wider than the column, like the Tactics Suite's carousel. */
.video { width: min(900px, calc(100vw - 32px)); flex: none; margin: 48px 0 0; }
.video video {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; background: #0b0d12;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 64px rgba(88, 101, 242, 0.12);
}
.video figcaption { margin-top: 12px; color: var(--muted); font-size: 0.9rem; }

.section { width: 100%; margin-top: 72px; text-align: left; }
.section > h2 { margin: 0 0 20px; font-size: 1.35rem; text-align: center; letter-spacing: -0.01em; }

/* A mock of the command and the bot's answer, in Discord's colours. */
.discord { background: #313338; border-radius: 8px; padding: 8px 0; color: var(--embed-text); font-size: 0.94rem; line-height: 1.375; }
.msg { display: flex; gap: 14px; padding: 8px 16px; }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; }
.avatar.user { background: linear-gradient(135deg, #f0b232, #e8590c); }
.avatar.bot { background: #14161c url("/replays/icon.svg") center / 100% no-repeat; }
.msg .body { min-width: 0; flex: 1; }
.msg p { margin: 0; }
.who { color: #ffffff; font-weight: 600; }
.when { margin-left: 4px; color: var(--embed-muted); font-size: 0.75rem; font-weight: 400; }
.tag { margin-left: 2px; padding: 0 4px; border-radius: 3px; background: var(--accent); color: #fff; font-size: 0.62rem; font-weight: 600; vertical-align: 2px; }
.cmd { margin-top: 2px !important; overflow-wrap: anywhere; }
.slash { color: #c9cdfb; background: rgba(88, 101, 242, 0.3); padding: 0 3px; border-radius: 3px; font-weight: 500; }
.opt { color: var(--embed-muted); }
.file { color: var(--embed-link); }
.attachment { display: block; margin-top: 6px; width: 100%; max-width: 400px; height: auto; border-radius: 8px; }

.steps { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; color: var(--muted); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--text); font-size: 0.85rem; font-weight: 600; display: grid; place-items: center;
}
.steps strong { color: var(--text); font-weight: 600; }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; }
.card h3 { margin: 0 0 8px; font-size: 1rem; }
.card ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: 0.92rem; }
.card li { margin: 5px 0; }

.facts { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; }
.facts > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 20px; }
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--text); font-weight: 600; font-size: 0.92rem; }
.facts dd { margin: 0; color: var(--muted); font-size: 0.92rem; }

a.project h3 .badge {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 0.68rem; font-weight: 600; vertical-align: 2px; letter-spacing: 0.02em;
}
/* Links still waiting for their real target. */
a[data-placeholder] { outline: 1px dashed rgba(240, 178, 50, 0.6); outline-offset: 3px; }

@media (max-width: 520px) {
  .columns { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .section { margin-top: 56px; }
}
