/* Site styles — design pass following unslop by Damir Sokolovsky (@heydamir), CC BY 4.0
   Direction: exact, botanical, workshop-quiet. World: a 3D viewport at night.
   Moments: the before/after viewport and the tree turntable. Signature: mono triangle counts. */

:root {
  /* graphite ramp, tinted a touch toward leaf green */
  --bg-deep: #0c0e0d;
  --bg: #111312;
  --card: #161917;
  --raised: #1f2321;
  --line: rgba(236, 239, 234, 0.08);
  --line-2: rgba(236, 239, 234, 0.14);
  --text: #ecefea;
  --text-2: #a6ada7;
  --text-3: #868d87;
  --accent: #9be15d;          /* leaf green from the logo */
  --accent-ink: #0f1a07;

  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1200px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/22px var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }
code, .mono { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
kbd { font: 500 12px/16px var(--mono); color: var(--text); background: var(--raised); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 6px; }
::selection { background: rgba(155, 225, 93, 0.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

html[data-lang="en"] [data-l="ru"],
html[data-lang="ru"] [data-l="en"] { display: none !important; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }

/* ---------------- nav ---------------- */
.nav-bar { position: sticky; top: 0; z-index: 20; background: rgba(17, 19, 18, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; }
.logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--text-2); padding: 8px 12px; border-radius: 8px; transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.nav-links a:hover { color: var(--text); background: var(--card); }
.lang { display: inline-flex; margin-left: 8px; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; }
.lang button { font: 500 12px/16px var(--mono); color: var(--text-3); background: none; border: 0; border-radius: 6px; padding: 6px 8px; cursor: pointer; transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.lang button[aria-pressed="true"] { color: var(--text); background: var(--raised); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 10px; font: 500 15px/1 var(--font); border: 1px solid transparent; cursor: pointer;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; stroke-width: 1.5; }
.btn-primary { background: var(--text); color: var(--bg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn-primary:hover { background: #ffffff; }
.btn-secondary { background: var(--raised); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--line-2); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.menu-btn { display: none; margin-left: auto; height: 36px; padding: 0 12px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line); color: var(--text); font: 500 14px var(--font); }

/* ---------------- hero ---------------- */
.hero { padding: 48px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; min-height: calc(100vh - 176px); }
.hero-meta { color: var(--text-3); margin-bottom: 24px; }
.hero h1 { font-size: 60px; line-height: 1.04; letter-spacing: -0.03em; max-width: 15ch; text-wrap: balance; }
.hero .sub { margin-top: 24px; font-size: 19px; line-height: 29px; color: var(--text-2); max-width: 36rem; }
.hero .actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-copy { animation: rise 480ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-copy { animation: none; } html { scroll-behavior: auto; } }

.turntable { position: relative; aspect-ratio: 1 / 1; }
.turntable video { width: 100%; height: 100%; object-fit: cover; }
.turntable .count {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  white-space: nowrap; color: var(--text-2);
}
.count b { color: var(--accent); font-weight: 500; }

/* ---------------- sections ---------------- */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; margin-bottom: 40px; align-items: end; }
.section-head h2 { font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; }
.section-head p { color: var(--text-2); max-width: 36rem; }

/* stats as one viewport-style readout */
.readout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.readout > div { padding: 24px; border-left: 1px solid var(--line); }
.readout > div:first-child { border-left: 0; }
.readout .fig { font-size: 32px; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.readout .fig.key { color: var(--accent); }
.readout .lbl { margin-top: 12px; color: var(--text-2); font-size: 14px; line-height: 20px; }

/* viewport window: the comparison moment */
.viewport { border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg-deep); overflow: hidden; }
.vp-bar { display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.vp-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.vp-tabs button {
  height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: none;
  color: var(--text-2); font: 400 14px var(--font); cursor: pointer;
  transition: color 150ms var(--ease), background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.vp-tabs button:hover { color: var(--text); }
.vp-tabs button[aria-selected="true"] { color: var(--text); background: var(--raised); border-color: var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.vp-stat { margin-left: auto; color: var(--text-2); padding-right: 8px; }
.compare { position: relative; aspect-ratio: 2055 / 1291; user-select: none; touch-action: pan-y; background: #34373d; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 1px; background: rgba(255,255,255,0.9); }
.compare .handle::after {
  content: ""; position: absolute; top: 50%; left: 0; width: 32px; height: 32px; transform: translate(-50%, -50%);
  border-radius: 8px; background: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111312' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E");
  background-size: 18px; background-repeat: no-repeat; background-position: center;
}
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare .tag { position: absolute; top: 12px; padding: 4px 8px; border-radius: 6px; background: rgba(12,14,13,0.72); color: var(--text-2); }
.compare .tag.l { left: 12px; } .compare .tag.r { right: 12px; }

/* promo */
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-lite { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; }
.yt-lite .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px;
  background: var(--text); color: var(--bg); font: 500 15px var(--font);
  transition: background-color 150ms var(--ease);
}
.yt-lite:hover .play { background: #fff; }
.yt-lite .play svg { width: 16px; height: 16px; }

/* features as a list, not a card grid */
.features { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; }
.feature-list { border-top: 1px solid var(--line); }
.feature-list li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.feature-list h3 { font-size: 15px; line-height: 22px; }
.feature-list p { color: var(--text-2); }
ul.plain { list-style: none; margin: 0; padding: 0; }
.aside-figure { align-self: start; position: sticky; top: 96px; }
.aside-figure img { border-radius: 12px; border: 1px solid var(--line); width: 256px; }
.aside-figure figcaption { margin-top: 12px; }

/* pipeline */
.pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; }
.pipeline li { padding: 24px; border-left: 1px solid var(--line); }
.pipeline li:first-child { border-left: 0; }
.pipeline .n { color: var(--text-3); }
.pipeline h3 { margin-top: 16px; font-size: 16px; line-height: 24px; }
.pipeline p { margin-top: 8px; color: var(--text-2); font-size: 14px; line-height: 21px; }

/* gallery with varied widths */
.gallery { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.gallery figure { margin: 0; }
.gallery video, .gallery img { border-radius: 14px; border: 1px solid var(--line); width: 100%; }
.gallery figcaption { margin-top: 12px; color: var(--text-2); font-size: 14px; }
.gallery figcaption .mono { color: var(--text-3); margin-left: 8px; }

/* closing */
.closing { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; padding: 40px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.closing h2 { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; }
.closing p { color: var(--text-2); }
.closing .actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; align-items: center; }
.text-link { color: var(--text-2); padding: 8px 4px; transition: color 150ms var(--ease); }
.text-link:hover { color: var(--text); }

footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--text-3); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--text-2); }
footer a:hover { color: var(--text); }

/* ---------------- responsive ---------------- */
@media (max-width: 980px) {
  .hero-grid, .section-head, .features, .closing { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero-grid { min-height: 0; }
  .readout, .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout > div:nth-child(3), .pipeline li:nth-child(3) { border-left: 0; }
  .readout > div:nth-child(n+3), .pipeline li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .aside-figure { position: static; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .menu-btn { display: inline-block; }
  .hero { padding: 32px 0 48px; }
  .hero h1 { font-size: 40px; }
  .hero .sub { font-size: 17px; line-height: 26px; }
  .section { padding: 64px 0; }
  .section-head h2 { font-size: 28px; }
  .readout, .pipeline { grid-template-columns: minmax(0, 1fr); }
  .readout > div, .pipeline li { border-left: 0; }
  .readout > div + div, .pipeline li + li { border-top: 1px solid var(--line); }
  .feature-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .vp-stat { margin-left: 0; width: 100%; padding: 0 0 4px; }
  .closing { padding: 24px; }
}

/* ---------------- shared bits ---------------- */
.meta { color: var(--text-3); }
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.why h3 { font-size: 16px; line-height: 24px; }
.why p { margin-top: 8px; color: var(--text-2); }

/* ---------------- home ---------------- */
.product-card { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.product-card .media { background: var(--bg); border-right: 1px solid var(--line); }
.product-card .media video, .product-card .media img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.product-card h3 { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.product-card p { color: var(--text-2); }
.product-card .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.about-list { border-top: 1px solid var(--line); }
.about-list li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.about-list h3 { font-size: 15px; line-height: 22px; }
.about-list p { color: var(--text-2); }
.portrait { aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-deep); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- docs ---------------- */
.docs { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 56px; padding-top: 40px; padding-bottom: 96px; }
.docs-nav { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 112px); overflow-y: auto; padding-right: 8px; }
.docs-search { width: 100%; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font: 400 14px var(--font); margin-bottom: 24px; }
.docs-search::placeholder { color: var(--text-3); }
.docs-nav .group { margin-bottom: 24px; }
.docs-nav .group-title { font: 400 12px/16px var(--mono); color: var(--text-3); margin: 0 0 8px 12px; }
.docs-nav a { display: block; color: var(--text-2); font-size: 14px; line-height: 20px; padding: 6px 12px; border-radius: 8px; margin-bottom: 2px; transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.docs-nav a:hover { color: var(--text); }
.docs-nav a.active { color: var(--text); background: var(--raised); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.docs-nav-toggle { display: none; }
.docs-hero { padding: 8px 0 40px; border-bottom: 1px solid var(--line); }
.docs-hero h1 { font-size: 44px; line-height: 1.08; letter-spacing: -0.03em; margin-top: 16px; }
.docs-hero .lead { margin-top: 16px; font-size: 18px; line-height: 28px; color: var(--text-2); max-width: 36rem; }
.docs-content { max-width: 760px; }
.docs-content section { scroll-margin-top: 88px; padding: 48px 0; border-bottom: 1px solid var(--line); }
.docs-content section:last-child { border-bottom: 0; }
.docs-content h2 { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 16px; }
.docs-content h3 { font-size: 19px; line-height: 28px; margin: 32px 0 8px; scroll-margin-top: 88px; }
.docs-content h4 { font-size: 15px; line-height: 22px; margin: 24px 0 4px; }
.docs-content p, .docs-content li { color: #c5cbc6; overflow-wrap: anywhere; }
.docs-content p { margin: 0 0 12px; }
.docs-content ul, .docs-content ol { padding-left: 20px; margin: 0 0 12px; }
.docs-content li { margin: 4px 0; }
.docs-content strong { color: var(--text); font-weight: 500; }
.docs-content em { font-style: normal; color: var(--text); }
.docs-content a { color: var(--accent); }
.docs-content a:hover { text-decoration: underline; text-underline-offset: 3px; }
.docs-content code { color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 13px; }
.docs-content figure { margin: 24px 0; }
.docs-content figure img, .docs-content figure video { border-radius: 12px; border: 1px solid var(--line); width: 100%; }
.docs-content figcaption, .docs-content .caption { color: var(--text-3); font-size: 13px; line-height: 20px; margin-top: 8px; }
.docs-content table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 14px; line-height: 20px; display: block; overflow-x: auto; }
.docs-content th, .docs-content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-content th { color: var(--text-3); font: 400 12px/16px var(--mono); white-space: nowrap; }
.docs-content td { color: #c5cbc6; font-variant-numeric: tabular-nums; }
.docs-content td code { white-space: nowrap; }
.callout { margin: 20px 0; padding: 16px 20px; border: 1px solid var(--line); border-left: 2px solid var(--text-3); border-radius: 4px 12px 12px 4px; background: var(--card); }
.callout.tip { border-left-color: var(--accent); }
.callout.warn { border-left-color: #d9a85b; }
.callout b { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.callout p:last-child { margin: 0; }
.param-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.param-meta span { font: 400 12px/16px var(--mono); color: var(--text-2); background: var(--raised); border-radius: 4px; padding: 2px 8px; }
.fig-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

@media (max-width: 980px) {
  .product-card { grid-template-columns: minmax(0, 1fr); }
  .product-card .media { border-right: 0; border-bottom: 1px solid var(--line); }
  .why { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; }
  .docs-nav { position: fixed; inset: 64px 0 0 0; max-height: none; z-index: 15; background: var(--bg); padding: 24px 16px; transform: translateX(-100%); transition: transform 220ms var(--ease); }
  .docs-nav.open { transform: none; }
  .docs-nav-toggle { display: inline-flex; position: sticky; top: 76px; z-index: 10; margin-bottom: 16px; }
}
@media (max-width: 720px) {
  .product-card .body { padding: 24px; }
  .about-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .docs-hero h1 { font-size: 34px; }
  .fig-row { grid-template-columns: minmax(0, 1fr); }
}
