/* Kadr Cloud — B2B-платформа видеотрансляций. Тёмная тема, всё локально. */

@font-face {
  font-family: "Kadr Mono";
  src: url("kadr-mono.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --bg:        #080b11;
  --bg-2:      #0b0f18;
  --surface:   #111827;
  --surface-2: #161f31;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.15);
  --text:      #eef2f8;
  --muted:     #9aa6bd;
  --muted-2:   #616d86;
  --accent:    #3b82f6;
  --accent-2:  #5b9dff;
  --indigo:    #7c6bff;
  --live:      #ff4d5e;
  --steel:     #5b7089;
  --radius:    14px;
  --radius-sm: 9px;
  --ease:      cubic-bezier(.2,.8,.2,1);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Kadr Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1200px;
  --head-h: 66px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }
img { max-width: 100%; }
::selection { background: rgba(59,130,246,.32); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* ---------- типографика ---------- */
h1, h2, h3, h4 { font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-2);
}
.eyebrow::before { content: ""; width: 16px; height: 1px; background: var(--accent); }
.lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 60ch; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14.5px; font-weight: 600;
  transition: all .18s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(59,130,246,.08); }
.btn-lg { padding: 15px 26px; font-size: 15px; }

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--head-h);
  background: rgba(8,11,17,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { display: block; width: 30px; height: 30px; flex: none; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.brand-name b { color: var(--accent-2); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 13px; border-radius: 8px;
  font-size: 14.5px; color: var(--muted);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-link.is-current { color: var(--text); }
.head-actions { display: flex; align-items: center; gap: 10px; }
.head-actions .nav-link { color: var(--text); }
.burger { display: none; padding: 8px; color: var(--text); }

/* ---------- герой ---------- */
.hero { position: relative; padding: 92px 0 76px; overflow: hidden; }
.hero-glow {
  position: absolute; z-index: 0; pointer-events: none;
  top: -180px; right: -120px; width: 720px; height: 620px;
  background: radial-gradient(circle at 60% 40%, rgba(59,130,246,.22), transparent 62%),
              radial-gradient(circle at 30% 70%, rgba(124,107,255,.16), transparent 60%);
  filter: blur(6px);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-title { font-size: clamp(36px, 5vw, 60px); margin: 20px 0 22px; }
.hero-title b { color: var(--accent-2); font-weight: 650; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted-2); }

/* макет плеера/дашборда в герое */
.glass {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  overflow: hidden;
}
.glass-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); }
.glass-body { padding: 0; }

/* бейдж LIVE */
.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(255,77,94,.14); color: #ff8791;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .1em;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255,77,94,.6); animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,94,.5); } 70% { box-shadow: 0 0 0 8px rgba(255,77,94,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,94,0); } }

/* ---------- доверие / логотипы ---------- */
.trust { padding: 8px 0 4px; }
.trust-lab { text-align: center; font-size: 12.5px; color: var(--muted-2); letter-spacing: .04em; margin-bottom: 22px; }
.logo-wall { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 40px; }
.logo { display: flex; align-items: center; gap: 9px; color: var(--muted); opacity: .8; transition: opacity .2s var(--ease); }
.logo:hover { opacity: 1; }
.logo svg { width: 22px; height: 22px; color: var(--steel); }
.logo span { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }

/* ---------- секции ---------- */
.section { padding: 84px 0; }
.section-sm { padding: 60px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-title { font-size: clamp(27px, 3.4vw, 40px); margin: 14px 0 16px; }

/* ---------- возможности ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat {
  padding: 26px 24px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.feat:hover { border-color: var(--line-2); transform: translateY(-3px); }
.feat-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(59,130,246,.12); color: var(--accent-2);
  margin-bottom: 18px;
}
.feat-icon svg { width: 22px; height: 22px; }
.feat-title { font-size: 18px; margin-bottom: 9px; }
.feat-text { font-size: 14.5px; color: var(--muted); }

/* ---------- шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.step { position: relative; padding: 0 26px; }
.step + .step::before { content: ""; position: absolute; left: 0; top: 22px; width: 1px; height: calc(100% - 30px); background: var(--line); }
.step-num { font-family: var(--mono); font-size: 13px; color: var(--accent-2); margin-bottom: 14px; }
.step-title { font-size: 17px; margin-bottom: 8px; }
.step-text { font-size: 14px; color: var(--muted); }

/* ---------- тарифы ---------- */
.toggle { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin: 0 auto 40px; }
.toggle button { padding: 8px 18px; border-radius: 7px; font-size: 14px; color: var(--muted); transition: all .18s var(--ease); }
.toggle button.is-active { background: var(--accent); color: #fff; }
.toggle .save { font-size: 11px; color: var(--accent-2); margin-left: 6px; }
.toggle button.is-active .save { color: rgba(255,255,255,.85); }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.price-card { padding: 30px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: relative; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 60px rgba(59,130,246,.14); }
.price-tag { position: absolute; top: -11px; left: 26px; padding: 3px 11px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.price-name { font-size: 15px; font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.price-amt { font-size: 40px; font-weight: 700; letter-spacing: -.03em; margin: 14px 0 2px; }
.price-amt span { font-size: 15px; font-weight: 500; color: var(--muted-2); }
.price-desc { font-size: 13.5px; color: var(--muted); min-height: 40px; margin-bottom: 20px; }
.price-list { list-style: none; display: grid; gap: 11px; margin: 22px 0; font-size: 14px; }
.price-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.price-list svg { flex: none; width: 16px; height: 16px; color: var(--accent); margin-top: 3px; }
.price-cta { display: block; text-align: center; width: 100%; margin-top: 8px; }

/* ---------- статистика / кейсы ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg); padding: 30px 26px; }
.stat-num { font-size: 38px; font-weight: 700; letter-spacing: -.03em; }
.stat-num b { color: var(--accent-2); font-weight: 700; }
.stat-lab { margin-top: 8px; font-size: 13px; color: var(--muted); }

.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.case { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.case-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; color: var(--text); }
.case-logo svg { width: 26px; height: 26px; color: var(--steel); }
.case-logo b { font-size: 17px; }
.case-quote { font-size: 17px; line-height: 1.55; margin-bottom: 22px; }
.case-metrics { display: flex; gap: 32px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.case-metric b { display: block; font-size: 24px; font-weight: 700; color: var(--accent-2); letter-spacing: -.02em; }
.case-metric span { font-size: 12.5px; color: var(--muted); }
.case-person { margin-top: 18px; font-size: 13px; color: var(--muted-2); }
.case-person b { color: var(--text); font-weight: 600; }

/* ---------- документация ---------- */
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.doc-main, .prose, .doc-side, .toc { min-width: 0; }
.doc-side { position: sticky; top: calc(var(--head-h) + 24px); }
.doc-side-group + .doc-side-group { margin-top: 26px; }
.doc-side-title { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; }
.doc-side a { display: block; padding: 6px 0; font-size: 14px; color: var(--muted); transition: color .16s var(--ease); }
.doc-side a:hover { color: var(--accent-2); }
.doc-main h2 { font-size: 26px; margin: 0 0 16px; scroll-margin-top: 90px; }
.doc-main h3 { font-size: 18px; margin: 34px 0 12px; }
.doc-main p { color: var(--muted); margin-bottom: 16px; }
.doc-main > section + section { margin-top: 44px; padding-top: 44px; border-top: 1px solid var(--line); }
.doc-main ul { color: var(--muted); margin: 0 0 16px 20px; }
.doc-main li { margin-bottom: 7px; }

.code { background: #0a0e17; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 16px 0; overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.code pre { padding: 16px; max-width: 100%; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: #cdd6e6; }
.code .c-key { color: #79b8ff; }
.code .c-str { color: #7ee0b8; }
.code .c-com { color: var(--muted-2); }
.code .c-fn  { color: var(--indigo); }

/* строчный код: моноширинный, с переносом длинных путей */
.doc-main code, .prose code, .callout code, .faq-a-inner code {
  font-family: var(--mono);
  font-size: .88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(91,157,255,.1);
  color: var(--accent-2);
  overflow-wrap: anywhere;
}

.endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; overflow-wrap: anywhere; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 13.5px; margin: 12px 0; }
.method { padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.method.get { background: rgba(59,130,246,.16); color: var(--accent-2); }
.method.post { background: rgba(126,224,184,.14); color: #7ee0b8; }
.endpoint .path { color: var(--text); }

.dtable { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.dtable th, .dtable td { overflow-wrap: anywhere; }
.dtable th, .dtable td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.dtable th { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); font-weight: 500; }
.dtable td { color: var(--muted); }
.dtable td code { font-family: var(--mono); font-size: 13px; color: var(--accent-2); }

.callout { display: flex; gap: 12px; padding: 16px 18px; background: rgba(59,130,246,.07); border: 1px solid rgba(59,130,246,.2); border-radius: var(--radius-sm); margin: 18px 0; font-size: 14px; color: var(--muted); }
.callout svg { flex: none; width: 18px; height: 18px; color: var(--accent-2); margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 20px 0; text-align: left; font-size: 16.5px; font-weight: 600; }
.faq-q svg { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform .22s var(--ease); }
.faq-item.open .faq-q svg { transform: rotate(45deg); color: var(--accent-2); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-item.open .faq-a { max-height: 600px; }
.faq-a-inner { padding: 0 0 22px; color: var(--muted); font-size: 15px; }

/* ---------- полоса-призыв ---------- */
.cta-band { position: relative; overflow: hidden; text-align: center; padding: 72px 28px; background: linear-gradient(160deg, var(--surface), var(--bg-2)); border: 1px solid var(--line-2); border-radius: 20px; }
.cta-band .hero-glow { top: -160px; left: 50%; transform: translateX(-50%); right: auto; opacity: .8; }
.cta-title { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 14px; position: relative; }
.cta-sub { color: var(--muted); max-width: 52ch; margin: 0 auto 28px; position: relative; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; position: relative; }

/* ---------- внутренние страницы ---------- */
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.page-title { font-size: clamp(30px, 4vw, 46px); margin: 12px 0 0; }
.crumbs { margin-top: 14px; font-size: 13px; color: var(--muted-2); }
.crumbs a:hover { color: var(--accent-2); }
.crumbs span { margin: 0 8px; opacity: .5; }

.prose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; }
.prose h2 { font-size: 24px; margin: 0 0 14px; scroll-margin-top: 90px; }
.prose h3 { font-size: 18px; margin: 0 0 10px; }
.prose p { color: var(--muted); margin-bottom: 16px; }
.prose ul { color: var(--muted); margin: 0 0 16px 20px; }
.prose li { margin-bottom: 7px; }
.prose > section + section { margin-top: 44px; padding-top: 44px; border-top: 1px solid var(--line); }
.toc { position: sticky; top: calc(var(--head-h) + 24px); padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.toc-title { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; }
.toc a { display: block; padding: 6px 0; font-size: 13.5px; color: var(--muted); transition: color .16s var(--ease); }
.toc a:hover { color: var(--accent-2); }

/* ---------- подвал ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 66px 0 0; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand .brand { margin-bottom: 16px; }
.foot-about { font-size: 14px; color: var(--muted); max-width: 34ch; }
.foot-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.foot-status .live-dot { background: #33d17a; box-shadow: none; animation: none; }
.foot-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.foot-links { list-style: none; display: grid; gap: 11px; font-size: 14px; }
.foot-links a { color: var(--muted); transition: color .16s var(--ease); }
.foot-links a:hover { color: var(--accent-2); }
.foot-bottom { margin-top: 54px; padding: 22px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted-2); }
.foot-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-legal a:hover { color: var(--muted); }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .feat-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .step + .step::before { display: none; }
  .step { padding: 0; }
  .price-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: 1fr; }
  .doc-layout, .prose-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .doc-side, .toc { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 1000px) {
  .topbar-inner { gap: 14px; }
  .nav {
    position: fixed; inset: var(--head-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 14px 18px 20px;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: all .22s var(--ease);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav-link { padding: 12px 6px; font-size: 15px; }
  .burger { display: block; order: 3; }
  .head-actions .nav-link { display: none; }
}

@media (max-width: 680px) {
  .wrap { padding: 0 18px; }
  .feat-grid, .steps, .stat-row, .foot-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .case-metrics { gap: 22px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
  .head-actions .btn { padding: 10px 14px; font-size: 13.5px; }
  .brand-name { font-size: 17px; }
}

@media (max-width: 560px) {
  .head-actions .btn { padding: 9px 12px; font-size: 12.5px; }
  .dtable { display: block; overflow-x: auto; }
}

@media (max-width: 359px) {
  .head-actions { display: none; }
}

/* ---------- растровая статика: сетка, обложки кейсов, карта краёв ---------- */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("setka.png") 0 0 repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.35) 62%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.35) 62%, transparent 100%);
}

.case-shot {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2); margin-bottom: 22px;
}

.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("karta-kraev.webp") 50% 38% / cover no-repeat;
  opacity: .5;
}
.cta-band > * { position: relative; }
