:root {
  --bg: #0b0f17;
  --bg-alt: #0f1521;
  --card: #131a27;
  --border: #223047;
  --text: #e6e9ef;
  --muted: #9aa6b8;
  --accent: #2dd4bf;
  --accent-ink: #04201c;
  --amber: #f59e0b;
  --code: #0a0e15;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f9fc;
    --bg-alt: #eef2f8;
    --card: #ffffff;
    --border: #d9e1ec;
    --text: #0f172a;
    --muted: #4b5a70;
    --accent: #0f766e;
    --accent-ink: #ffffff;
    --amber: #b45309;
    --code: #0f172a;
    --shadow: 0 20px 50px rgba(15, 23, 42, .18);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Noto Sans", sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.bar { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 19px; text-decoration: none; }
.brand svg { border-radius: 7px; }
.links { display: flex; gap: 20px; margin-left: auto; }
.links a, .langs a { color: var(--muted); text-decoration: none; font-size: 15px; }
.links a:hover, .langs a:hover { color: var(--text); }
.langs { display: flex; gap: 4px; }
.langs a { padding: 3px 7px; border-radius: 6px; font-size: 13px; font-weight: 600; letter-spacing: .03em; }
.langs a[aria-current] { color: var(--text); background: var(--card); border: 1px solid var(--border); }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; background: radial-gradient(1000px 420px at 50% -80px, color-mix(in srgb, var(--accent) 16%, transparent), transparent); }
h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.08; letter-spacing: -.02em; margin: 0 auto 14px; max-width: 900px; }
.sub { font-size: clamp(19px, 2.4vw, 24px); color: var(--text); margin: 0 0 18px; font-weight: 500; }
.lead { color: var(--muted); max-width: 760px; margin: 0 auto 28px; font-size: 18px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--border); color: var(--text); background: var(--card);
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.note { color: var(--muted); font-size: 14px; margin: 16px 0 40px; }

.shot { margin: 0; }
.shot img { border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero-shot { max-width: 1040px; margin: 0 auto; }

.stats { list-style: none; padding: 0; margin: 44px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1040px; }
.stats li { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 14px; }
.stats strong { display: block; font-size: 30px; color: var(--accent); line-height: 1.2; }
.stats span { color: var(--muted); font-size: 14px; }

/* Sections */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font-size: 19px; margin: 0 0 8px; line-height: 1.3; }
.intro { color: var(--muted); max-width: 780px; margin: 0 0 32px; }

.grid { display: grid; gap: 18px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.how { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery { grid-template-columns: repeat(2, 1fr); gap: 28px; }
.downloads { grid-template-columns: repeat(3, 1fr); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card.dl { display: flex; flex-direction: column; gap: 14px; }
.card.dl p { flex: 1; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btns .btn { padding: 10px 16px; font-size: 15px; }
.all { margin: 20px 0 0; }

figcaption { color: var(--muted); font-size: 15px; margin-top: 12px; }

.table { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: 16px; }
thead th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
tbody th { font-weight: 500; }
tbody td { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.src { margin-top: 40px; }
pre { background: var(--code); color: #e6e9ef; border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; overflow-x: auto; font-size: 15px; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, "DejaVu Sans Mono", monospace; }

.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style-position: outside; }
.faq details[open] summary { color: var(--accent); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

.foot { padding: 36px 0 44px; color: var(--muted); font-size: 15px; text-align: center; }
.foot p { margin: 6px 0; }
.foot strong { color: var(--text); }

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

@media (max-width: 900px) {
  .links { display: none; }
  .langs { margin-left: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .gallery, .downloads { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero { padding-top: 48px; }
  .section { padding: 56px 0; }
  .stats strong { font-size: 24px; }
  th, td { padding: 11px 12px; font-size: 15px; }
}

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