/* Colours from the app's KDE look (qml/KdeLook.qml). The page sits one shade darker than the
   app window so the screenshots, which use the window colour, stand out from it. */
:root {
  --page: #0d0d12;
  --window: #1a1a24;
  --raised: #222230;
  --text: #e2e2ec;
  --muted: #9a9aae;
  --line: #2d2d3e;
  --line-strong: #3f3f57;
  --accent: #8859a4;
  --accent-soft: rgba(136, 89, 164, 0.14);
  --link: #b393d0;
  --gold: #f1c86f;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.6 "Noto Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: var(--link); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0 0 12px; }

code, pre, kbd { font-family: "Hack", "JetBrains Mono", "Cascadia Mono", Consolas, monospace; font-size: 0.9em; }
code { background: var(--raised); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
pre {
  margin: 0 0 14px; padding: 14px 16px; overflow-x: auto;
  background: #111118; border: 1px solid var(--line); border-radius: 8px; line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; font-size: 14px; }
pre .c { color: #707d8a; }
kbd {
  display: inline-block; padding: 0 6px; border-radius: 4px; line-height: 1.5;
  background: var(--raised); border: 1px solid var(--line-strong); border-bottom-width: 2px;
}

/* Navigation: brand, the page's own sections, then links to other places. */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  padding: 12px max(16px, calc((100% - 1120px) / 2));
  background: rgba(13, 13, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand-sub { color: var(--muted); font-weight: 400; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--text); }
.menu { display: flex; gap: 22px; }
.links { display: flex; align-items: center; gap: 18px; margin-left: auto; padding-left: 20px; border-left: 1px solid var(--line); }
.gh { display: flex; }

main, footer { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Hero */
.hero { text-align: center; padding: 72px 0 48px; }
.hero-icon { margin: 0 auto 20px; filter: drop-shadow(0 8px 30px rgba(182, 124, 196, 0.3)); }
.hero h1 { font-size: clamp(36px, 6vw, 56px); letter-spacing: -0.02em; }
.lead { max-width: 660px; margin: 16px auto 32px; color: var(--muted); font-size: 18px; }
.lead strong { color: var(--text); font-weight: 600; }

.tag {
  display: inline-block; padding: 1px 9px; border-radius: 6px; vertical-align: 2px;
  border: 1px solid var(--line); background: var(--raised);
  color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.01em;
}
.tag-poc { border-color: rgba(241, 200, 111, 0.35); color: var(--gold); }

/* Sections */
.block { padding: 64px 0 8px; }
.block > h2 { font-size: clamp(28px, 4vw, 36px); margin-bottom: 24px; letter-spacing: -0.01em; }
.block > h2::after { content: ""; display: block; width: 40px; height: 3px; margin-top: 12px; border-radius: 2px; background: var(--accent); }
.block > p, .numbered, .faq, table { max-width: 760px; }
.intro { color: var(--muted); }
h3.sub { font-size: 19px; margin: 36px 0 10px; }
.muted { color: var(--muted); }
.note { color: var(--muted); max-width: 760px; margin-top: 32px; }

/* Screenshots: a drop shadow and a faint accent glow lift them off the page. */
.shots img, .shots-wide img, .steps img {
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(179, 147, 208, 0.18), 0 18px 48px rgba(0, 0, 0, 0.65), 0 0 60px rgba(136, 89, 164, 0.12);
}
.shots-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 28px; }
.group {
  margin: 0; padding: 20px; border-radius: 14px;
  background: radial-gradient(ellipse at 50% 30%, rgba(136, 89, 164, 0.10), transparent 70%), #111118;
  border: 1px solid var(--line);
}
.group figcaption { font-weight: 700; margin-bottom: 16px; text-align: center; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.shots-wide { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 28px; margin-top: 48px; }
.shots-wide img { flex: 0 1 auto; width: auto; max-height: 300px; }

.features {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 32px;
}
.features h3 { font-size: 17px; margin-bottom: 4px; }
.features h3::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 2px; background: var(--accent); vertical-align: 2px; }
.features p { margin: 0; color: var(--muted); font-size: 15px; }

/* Install cards */
/* One column: install commands are long and shouldn't scroll sideways. */
.cards { display: grid; gap: 20px; margin: 8px 0 20px; max-width: 860px; }
.card { min-width: 0; padding: 22px 22px 10px 26px; background: var(--window); border: 1px solid var(--line); border-radius: 12px; position: relative; }
.card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--accent); }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { font-size: 15px; }

.numbered { padding-left: 0; list-style: none; counter-reset: n; margin: 0 0 12px; }
.numbered li { counter-increment: n; position: relative; padding-left: 40px; margin-bottom: 14px; }
.numbered li::before {
  content: counter(n); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 700;
}

table { width: 100%; border-collapse: collapse; margin: 4px 0 16px; font-size: 15px; }
th, td { text-align: left; padding: 8px 12px; }
th { border-bottom: 1px solid var(--line-strong); }
tbody tr:nth-child(even) { background: rgba(226, 226, 236, 0.05); }

.faq dt { font-weight: 700; margin-top: 22px; }
.faq dd { margin: 6px 0 0; color: var(--muted); }

/* Android */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.steps img { width: 100%; max-width: 270px; margin: 0 auto 20px; border-radius: 18px; }
.steps h3 { font-size: 18px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.steps h3 span {
  display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 14px;
}
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

.stats { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.stats li { padding: 20px 22px; background: var(--window); border: 1px solid var(--line); border-radius: 12px; }
.stats strong { display: block; font-size: 32px; color: var(--gold); line-height: 1.2; }
.stats span { color: var(--muted); font-size: 15px; }

/* Calls to action */
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; }
.cta.center { justify-content: center; }
.button {
  display: inline-block; padding: 10px 18px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--raised);
  color: var(--text); text-decoration: none; font-weight: 600;
}
.button:hover { border-color: var(--link); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: #9666b3; }
.button .size { font-weight: 400; opacity: 0.75; }
.button .size:not(:empty)::before { content: "· "; }
.version:not(:empty)::before { content: ", "; }
.fine { color: var(--muted); font-size: 14px; }

footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 32px 16px 48px; color: var(--muted); font-size: 14px; text-align: center; }
footer p { margin: 4px 0; }

/* Narrow screens: the section menu gets its own scrollable row under the brand. */
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; gap: 10px 16px; }
  .menu {
    order: 3; width: 100%; overflow-x: auto; gap: 18px; padding: 0 24px 2px 0; scrollbar-width: none;
    mask-image: linear-gradient(to right, #000 85%, transparent); /* hints that the row scrolls */
  }
  .nav a { font-size: 14px; }
  html { scroll-padding-top: 110px; }
}
@media (max-width: 600px) {
  .hero { padding-top: 44px; }
  .shots-pair { grid-template-columns: 1fr; }
  .group { padding: 14px; }
  .shots { gap: 10px; }
  .card { padding: 18px 16px 6px 20px; }
}

/* Lightbox (lightbox.js): screenshots open full size over a dimmed page. */
.shots img, .shots-wide img, .steps img { cursor: zoom-in; transition: transform 0.15s, box-shadow 0.15s; }
.shots img:hover, .shots-wide img:hover, .steps img:hover { transform: translateY(-2px); }
.shots img:focus-visible, .shots-wide img:focus-visible, .steps img:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; color: var(--text);
  display: none; align-items: center; justify-content: center;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: rgba(6, 6, 10, 0.88); backdrop-filter: blur(4px); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; padding: 56px 72px 20px; cursor: zoom-out; }
.lightbox img {
  max-width: min(100%, 1100px); max-height: calc(100vh - 120px); width: auto; height: auto;
  border-radius: 10px; cursor: default;
  box-shadow: 0 0 0 1px rgba(179, 147, 208, 0.25), 0 24px 70px rgba(0, 0, 0, 0.8);
}
.lightbox figcaption { color: var(--muted); font-size: 14px; text-align: center; max-width: 600px; cursor: default; }
.lightbox button {
  position: fixed; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(34, 34, 48, 0.9);
  color: var(--text); font-family: inherit; line-height: 1; cursor: pointer;
}
.lightbox button:hover { border-color: var(--link); }
.lb-close { top: 14px; right: 14px; font-size: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); font-size: 28px; }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); font-size: 28px; }

@media (max-width: 600px) {
  .lightbox figure { padding: 64px 8px 72px; }
  .lightbox img { max-height: calc(100vh - 136px); }
  .lightbox figcaption { display: none; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
}

/* Copy buttons on code blocks (copy.js): an icon in the corner, like on GitHub. */
.code { position: relative; }
.code pre { padding-right: 52px; }
.copy {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border-radius: 6px; border: 1px solid transparent;
  background: #111118; color: var(--muted); cursor: pointer;
  /* Covers text that scrolls under the button: solid to the block edge, a short fade on the left. */
  box-shadow: 7px 0 0 #111118, -10px 0 10px #111118;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.copy svg { width: 16px; height: 16px; fill: currentColor; }
.copy .check { display: none; }
.copy:hover, .copy:focus-visible { color: var(--text); border-color: var(--line-strong); background: var(--raised); }
.copy.done { color: #7ec27e; border-color: rgba(126, 194, 126, 0.5); }
.copy.done .icon { display: none; }
.copy.done .check { display: block; }

/* Changelog sections, filled in from the GitHub releases by scripts/build.py: a timeline with
   the newest release on top. */
.timeline { list-style: none; margin: 0; padding: 0 0 0 30px; max-width: 760px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.release { position: relative; padding-bottom: 28px; }
.release::before {
  content: ""; position: absolute; left: -30px; top: 7px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--page); border: 2px solid var(--accent);
}
.release:has(.rel-latest)::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.release h3 { font-size: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 10px; }
.release h3 a { color: var(--text); text-decoration: none; }
.release h3 a:hover { color: var(--link); }
.release time { color: var(--muted); font-size: 14px; font-weight: 400; }
.rel-latest {
  padding: 1px 9px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: var(--accent-soft); border: 1px solid rgba(136, 89, 164, 0.45); color: var(--link);
}
.release h4 {
  margin: 14px 0 6px; color: var(--link); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.release ul { margin: 0; padding-left: 18px; }
.release li { margin-bottom: 4px; }
.release li::marker { color: var(--accent); }
.release li a { color: var(--muted); }
.release li a:hover { color: var(--link); }
.older { max-width: 760px; }
.older summary { cursor: pointer; color: var(--link); margin: 0 0 20px 30px; width: fit-content; }
.older summary:hover { color: var(--text); }
