/* ═══════════════════════════════════════════════
   Knack — landing, guide, about, privacy
   Palette taken from the cover: pure black, white,
   greys. No colour accent at all — white is the
   accent. Unlike every other site here.
   ═══════════════════════════════════════════════ */

:root {
  --bg: #0a0a0a;
  --bg-2: #121212;
  --card: #141414;
  --card-2: #1a1a1a;
  --line: #262626;
  --line-2: #363636;
  --ink: #fafafa;
  --ink-2: #c4c4c4;
  --muted: #7d7d7d;
  --muted-2: #5a5a5a;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --r: 12px;
  --r-lg: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 62px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
  /* мягкая виньетка сверху, как на обложке */
  background-image: radial-gradient(80% 50% at 50% -10%, #1c1c1c, transparent 70%);
  background-repeat: no-repeat;
}

::selection { background: rgba(255, 255, 255, 0.2); }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }

html[lang="en"] .only-ru { display: none !important; }
html[lang="ru"] .only-en { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: 99px;
  border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #4a4a4a; background-clip: padding-box; }

/* ═══ Nav ═══ */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid var(--line);
}
.nav-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 700; font-size: 1.16rem; letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  color: var(--muted); font-size: 0.92rem; font-weight: 500;
  padding: 7px 12px; border-radius: 9px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--bg-2); color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--ink); background: var(--card-2); }
.nav-cta {
  background: var(--ink) !important; color: #0a0a0a !important;
  font-weight: 600 !important; padding: 9px 18px !important; margin-left: 18px;
}
.nav-cta:hover { background: #fff !important; }

.lang-btn {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 9px;
  padding: 6px 12px; margin-left: 8px;
  font-family: var(--mono); font-size: 0.73rem; font-weight: 700;
  letter-spacing: 0.04em; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.lang-btn:hover { border-color: var(--ink); color: var(--ink); }

.burger {
  display: none; background: none; border: 1px solid var(--line-2);
  border-radius: 9px; width: 40px; height: 36px; cursor: pointer;
  color: var(--ink); font-size: 1rem; align-items: center; justify-content: center;
}
@media (max-width: 900px) {
  .burger { display: flex; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 10px 24px 16px;
  }
  .nav-links[hidden] { display: none; }
  .nav-links a { padding: 10px 12px; }
  .nav-cta { text-align: center; margin: 6px 0 0; }
  .lang-btn { margin: 8px 0 0; width: 100%; }
}

/* ═══ Section furniture ═══ */
.eyebrow {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2);
  margin-bottom: 14px;
}
section { padding: 86px 0; }
section h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  letter-spacing: -0.035em; line-height: 1.15; margin-bottom: 12px;
}
.section-sub { color: var(--muted); max-width: 620px; margin-bottom: 40px; }

/* ═══ Hero ═══ */
.hero { padding: 92px 0 64px; text-align: center; }
.hero-logo {
  width: 84px; height: 84px; margin: 0 auto 30px; display: block;
}
.hero h1 {
  font-size: clamp(3rem, 9vw, 5.2rem);
  line-height: 1; letter-spacing: -0.055em; font-weight: 800;
  margin-bottom: 18px;
}
.hero .lead {
  font-size: 1.16rem; color: var(--muted);
  max-width: 620px; margin: 0 auto 34px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.96rem; font-weight: 600; padding: 13px 26px;
  border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: #0a0a0a; }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 22px; justify-content: center;
  margin-top: 30px; font-size: 0.86rem; color: var(--muted-2);
}
.hero-meta b { color: var(--ink-2); font-weight: 600; }

/* ═══ Shots ═══ */
.shot {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 52px auto 0;
  max-width: 900px;
}
.shot img { width: 100%; display: block; }
.ph {
  aspect-ratio: 16 / 9;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--muted-2); background: var(--bg-2);
}
.ph b { font-size: 0.94rem; color: var(--muted); font-weight: 600; }
.ph span { font-family: var(--mono); font-size: 0.75rem; }

/* ═══ Tabs grid ═══ */
.tabs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.tab-card {
  background: var(--bg);
  padding: 28px 26px 30px;
  transition: background 0.25s;
}
.tab-card:hover { background: var(--card); }
.tab-card .ico {
  font-size: 1.3rem; margin-bottom: 14px; display: block;
  filter: grayscale(1) brightness(1.6);
}
.tab-card h3 { font-size: 1.04rem; letter-spacing: -0.015em; margin-bottom: 8px; }
.tab-card p { color: var(--muted); font-size: 0.91rem; }

/* ═══ Keys ═══ */
kbd {
  font-family: var(--mono); font-size: 0.8em;
  background: var(--card-2); border: 1px solid var(--line-2);
  border-bottom-width: 2px; border-radius: 6px;
  padding: 2px 7px; color: var(--ink-2); white-space: nowrap;
}

.keys { display: grid; gap: 10px; max-width: 640px; }
.key-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 15px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
}
.key-row span { color: var(--ink-2); font-size: 0.94rem; }

/* ═══ Download ═══ */
.download {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 56px 44px;
  text-align: center;
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
}
.download .section-sub { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .download { padding: 36px 22px; border-radius: 18px; } }

.req { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.req span {
  font-family: var(--mono); font-size: 0.74rem; color: var(--muted-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
}
.note-line { margin-top: 18px; font-size: 0.85rem; color: var(--muted-2); }

/* ═══ FAQ ═══ */
.faq { display: grid; gap: 10px; max-width: 820px; }
details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 22px; transition: border-color 0.2s;
}
details[open] { border-color: var(--line-2); }
summary {
  cursor: pointer; font-weight: 600; font-size: 0.98rem; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; font-family: var(--mono); font-size: 1.25rem;
  color: var(--muted); transition: transform 0.2s; flex: none;
}
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); font-size: 0.93rem; margin-top: 12px; }
details p + p { margin-top: 10px; }

/* ═══ Prose ═══ */
.prose { padding: 54px 0 90px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.7rem); letter-spacing: -0.045em; margin-bottom: 12px; }
.prose .lead-p { color: var(--muted); font-size: 1.04rem; margin-bottom: 38px; }
.prose h2 {
  font-size: 1.4rem; letter-spacing: -0.03em; margin: 48px 0 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.prose h3 { font-size: 1.06rem; margin: 28px 0 10px; letter-spacing: -0.015em; }
.prose p { margin-bottom: 14px; color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 16px 24px; color: var(--ink-2); }
.prose li { margin-bottom: 8px; }
.prose code {
  font-family: var(--mono); font-size: 0.87em;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; color: var(--ink);
}
.prose img {
  max-width: 100%; border-radius: var(--r); border: 1px solid var(--line);
  margin: 12px 0 20px; display: block;
}
.callout {
  background: var(--card); border: 1px solid var(--line);
  border-left: 2px solid var(--ink); border-radius: 0 var(--r) var(--r) 0;
  padding: 14px 20px; margin-bottom: 20px; font-size: 0.95rem; color: var(--ink-2);
}
.callout b, .callout strong { color: var(--ink); }

.tbl-wrap { overflow-x: auto; margin-bottom: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 420px; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted-2); background: var(--bg-2); white-space: nowrap;
}
td:first-child { white-space: nowrap; color: var(--ink); }
tbody tr:hover { background: var(--card); }

/* ═══ Footer ═══ */
.foot { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.9rem; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--ink); }
.foot small { color: var(--muted-2); font-size: 0.83rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
