/* CapMux website. Colours are the app's (capmux/static/app.css) and its icon's gradient. */
:root {
  --bg: #121419; --panel: #1a1d24; --panel2: #232732; --border: #2f3441; --fg: #e8eaf0; --muted: #9aa1b2;
  --accent: #4f8cff; --accent-ink: #7fabff; --seq: #7b5cff; --yellow: #ffd84d;
  --grad: linear-gradient(135deg, #2b7cff, #7b4dff);
  --radius: 14px; --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f4f8; --panel: #ffffff; --panel2: #eef0f5; --border: #d8dce6; --fg: #1b1f2a; --muted: #5b6272;
    --accent: #2f6be0; --accent-ink: #2459c4; --seq: #6a4cf0;
    --shadow: 0 18px 50px rgba(20, 30, 60, .16);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
code {
  font: .92em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; padding: .05em .35em;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin-bottom: 1.6rem; max-width: 26ch; }
h3 { font-size: 1.1rem; }
h4 { font-size: .95rem; margin: 1.4rem 0 .5rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 1rem; }
.small { font-size: .9rem; color: var(--muted); }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--panel); padding: .5rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.top-in { display: flex; align-items: center; gap: 1rem; height: 60px; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--fg); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.nav { display: none; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--fg); }
.lang { margin-left: auto; display: flex; background: var(--panel2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.lang button {
  font: inherit; font-size: .82rem; font-weight: 650; letter-spacing: .04em; color: var(--muted);
  background: none; border: 0; border-radius: 999px; padding: .25rem .7rem; min-height: 32px; min-width: 44px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--grad); color: #fff; }
@media (min-width: 760px) {
  .nav { display: flex; }
  .lang { margin-left: 0; }
}

/* hero */
.hero { padding: 2.2rem 0 3.5rem; overflow: hidden; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -30% -20% auto auto; width: 70vw; height: 70vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgba(123, 77, 255, .28), transparent); pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 10% auto auto -25%; width: 60vw; height: 60vw; max-width: 640px; max-height: 640px;
  background: radial-gradient(closest-side, rgba(43, 124, 255, .2), transparent); pointer-events: none;
}
.hero-in { position: relative; z-index: 1; display: grid; gap: 2.5rem; }
.eyebrow { color: var(--muted); font-size: .85rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .8rem; }
h1 { font-size: clamp(2.3rem, 1.4rem + 4.2vw, 4.2rem); font-weight: 800; letter-spacing: -.025em; margin-bottom: 1.1rem; }
mark {
  background: var(--yellow); color: #121419; border-radius: .18em; padding: 0 .16em; white-space: nowrap;
}
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--muted); max-width: 38em; }
.narrow { max-width: 44em; }

.downloads { display: grid; gap: .75rem; margin: 1.8rem 0 .9rem; }
.dl {
  display: flex; flex-direction: column; gap: .1rem; padding: .85rem 1.2rem; border-radius: var(--radius);
  text-decoration: none; color: var(--fg); background: var(--panel); border: 1px solid var(--border);
  transition: transform .15s ease, border-color .15s ease;
}
.dl:hover { transform: translateY(-1px); border-color: var(--accent); }
.dl.primary { order: -1; background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 30px rgba(79, 92, 255, .35); }
.dl-title { font-weight: 700; font-size: 1.08rem; }
.dl-meta { font-size: .85rem; opacity: .8; font-variant-numeric: tabular-nums; }
.downloads[data-state="loading"] .dl-meta { opacity: .55; }
.downloads[data-state="failed"] .dl { pointer-events: none; opacity: .55; }
.dl-note, .dl-free, .dl-mobile { font-size: .92rem; color: var(--muted); margin-bottom: .4rem; }
.dl-note:empty { display: none; }
.dl-mobile { color: var(--fg); background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: .6rem .8rem; }
@media (min-width: 520px) { .downloads { grid-template-columns: 1fr 1fr; max-width: 560px; } }

.phone {
  margin: 0 auto; width: min(300px, 78vw); padding: 10px; border-radius: 38px;
  background: linear-gradient(160deg, #3a3f4d, #15171d); box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.phone img { border-radius: 29px; width: 100%; }

@media (min-width: 900px) {
  .hero { padding: 4.5rem 0 3.5rem; }
  .hero-in { grid-template-columns: 1.25fr .75fr; align-items: center; gap: 3rem; }
  .phone { width: 300px; transform: rotate(2deg); }
}

/* sections */
.section { padding: 4rem 0; }
.section.alt { background: var(--panel); border-block: 1px solid var(--border); }
@media (min-width: 900px) { .section { padding: 5.5rem 0; } }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.features li { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.3rem .4rem; }
.features svg {
  width: 40px; height: 40px; padding: 8px; border-radius: 11px; background: var(--grad); margin-bottom: .9rem;
  fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.features h3 { margin-bottom: .45rem; }
.features p { color: var(--muted); font-size: .97rem; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }

.shots { display: grid; gap: 1.6rem; }
.shot { margin: 0; }
.shot a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #121419; }
.shot img { width: 100%; }
.shot figcaption { margin-top: .8rem; color: var(--muted); font-size: .95rem; }
.shot figcaption strong { color: var(--fg); }
@media (min-width: 760px) {
  .shots { grid-template-columns: 1fr 1fr; gap: 2rem 1.6rem; }
  .shot.wide { grid-column: 1 / -1; }
}

.cols { display: grid; gap: 1rem; }
@media (min-width: 860px) { .cols { grid-template-columns: 1fr 1fr; } }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; min-width: 0; }
.card h3 { font-size: 1.35rem; margin-bottom: .8rem; }
.ticks, .facts { list-style: none; margin: 0; padding: 0; }
.ticks li, .facts li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.ticks li::before, .facts li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: .8rem; height: .45rem;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}
.steps { margin: 0 0 .8rem; padding-left: 1.3rem; }
.steps li { margin-bottom: .45rem; }
.cmd { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: .45rem .45rem .45rem .8rem; margin-bottom: .8rem; }
.cmd code { background: none; border: 0; padding: 0; flex: 1 1 auto; min-width: 0; overflow-wrap: normal; }
.howto code { white-space: nowrap; }
.copy, .btn {
  font: inherit; font-weight: 650; cursor: pointer; border-radius: 9px; text-decoration: none; display: inline-block;
}
.copy { font-size: .85rem; color: var(--fg); background: var(--panel2); border: 1px solid var(--border); padding: .35rem .8rem; min-height: 36px; }
.copy:hover { border-color: var(--accent); }
.notes { margin-top: 1.6rem; display: grid; gap: .2rem; color: var(--muted); max-width: 52em; }
.notes strong { color: var(--fg); }

.howto { list-style: none; margin: 2rem 0; padding: 0; display: grid; gap: 1rem; counter-reset: none; }
.howto li { display: flex; gap: 1rem; align-items: flex-start; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem .2rem; }
.howto .num {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 750;
}
@media (min-width: 860px) { .howto { grid-template-columns: repeat(3, 1fr); } }
.facts { display: grid; gap: .2rem 2rem; margin-bottom: 2rem; }
@media (min-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.btn { background: var(--grad); color: #fff; padding: .8rem 1.4rem; box-shadow: 0 10px 30px rgba(79, 92, 255, .3); }
.btn:hover { color: #fff; }
.docs { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: 1.4rem; }

/* footer */
.foot { padding: 2rem 0 2.5rem; color: var(--muted); font-size: .9rem; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; }
.foot p { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--fg); }
.foot-privacy { flex-basis: 100%; font-size: .82rem; max-width: 60rem; }

/* legal pages (built from LICENSE.md and THIRD-PARTY-NOTICES.md) */
.doc { padding: 2.5rem 0 4rem; overflow-wrap: break-word; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin-bottom: 1.4rem; }
.doc h2 { font-size: 1.35rem; margin: 2.2rem 0 .8rem; max-width: none; }
.doc h3 { margin: 1.6rem 0 .6rem; }
.doc li { margin-bottom: .35rem; }
.doc blockquote { margin: 0 0 1rem; padding: .8rem 1rem; border-left: 4px solid var(--yellow); background: var(--panel); border-radius: 0 10px 10px 0; }
.doc blockquote p:last-child { margin: 0; }
.doc .table { overflow-x: auto; margin-bottom: 1.2rem; border: 1px solid var(--border); border-radius: 10px; }
.doc table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: .5rem .7rem; border-bottom: 1px solid var(--border); }
.doc th { background: var(--panel2); }
.doc tr:last-child td { border-bottom: 0; }
.doc pre { overflow-x: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: .8rem 1rem; }
.doc pre code { background: none; border: 0; padding: 0; }
.back { display: inline-block; margin-bottom: 1.4rem; }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 3rem 0; }
.notfound h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem); }
