/* ==========================================================================
   YouGile Connector Cloud — лендинг. Пурпурная XStorm-тема (#6f42c1 → #9a2ff0).
   Офлайн-совместимо: без внешних шрифтов и CDN. Шрифт — system-ui стек.
   ========================================================================== */

:root {
  --brand: #6f42c1;
  --brand-2: #9a2ff0;
  --brand-deep: #5a2ea6;
  --grad: linear-gradient(135deg, #6f42c1 0%, #9a2ff0 100%);
  --ink: #1b1530;
  --muted: #5f5a75;
  --line: #e7e3f2;
  --card: #ffffff;
  --bg-soft: #f6f4fc;
  --ok: #157f3d;
  --err: #b3261e;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(58, 32, 120, 0.08);
  --shadow-lg: 0 16px 48px rgba(58, 32, 120, 0.16);
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand); }
code { font-family: var(--mono); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); font-weight: 800; font-size: 16.5px;
}
.brand img { height: 26px; flex: 0 0 auto; }
.brand .brand-sub {
  display: inline-block; margin-left: 6px; padding: 2px 8px;
  font-size: 10px; font-weight: 800; letter-spacing: 1px; color: #fff;
  background: var(--grad); border-radius: 10px; vertical-align: middle;
}
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: #4a4360; text-decoration: none; font-size: 14.5px; font-weight: 600;
}
.nav a:hover { background: #f3edff; color: var(--brand-deep); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------------------------------------------------------------- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 10px 26px rgba(124, 58, 237, 0.45); }
.btn-ghost {
  background: #fff; color: var(--brand-deep); border-color: #d5cdee;
}
.btn-ghost:hover { background: #f6f2ff; border-color: var(--brand); }
.btn-light { background: #fff; color: var(--brand-deep); box-shadow: 0 8px 22px rgba(20, 10, 40, 0.25); }
.btn-light:hover { filter: brightness(0.97); }
.btn-sm { padding: 8px 15px; font-size: 13.5px; border-radius: 8px; }
/* ghost на тёмном фоне (hero, cta) */
.on-dark .btn-ghost, .hero .btn-ghost, .cta .btn-ghost {
  background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.42); color: #fff;
}
.on-dark .btn-ghost:hover, .hero .btn-ghost:hover, .cta .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.7); color: #fff;
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(154, 47, 240, 0.42), transparent 62%),
    radial-gradient(900px 520px at -8% 112%, rgba(111, 66, 193, 0.5), transparent 58%),
    linear-gradient(160deg, #160d2b 0%, #221243 58%, #2c1150 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.6px);
  background-size: 26px 26px;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center;
  padding: 74px 0 84px;
}
.hero-copy { min-width: 0; }
.hero-code { min-width: 0; }
.hero-badge {
  display: inline-block; margin-bottom: 18px; padding: 5px 13px;
  font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: #e6dcff; background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 20px;
}
.hero-title { font-size: 45px; line-height: 1.14; font-weight: 800; margin: 0 0 18px; letter-spacing: -0.5px; }
.hero-title .hl {
  background: linear-gradient(92deg, #c4a8ff, #f0b7ff); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.hero-sub { font-size: 17.5px; line-height: 1.62; color: #cbc2e8; margin: 0 0 30px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; }
.hero-stats .s b { display: block; font-size: 23px; font-weight: 800; color: #fff; }
.hero-stats .s span { font-size: 12.5px; color: #a89fca; }

/* код-блок в hero */
.code-card {
  background: #110a24; border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
  font-family: var(--mono); font-size: 12.5px;
}
.code-head {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.code-head .dot { width: 10px; height: 10px; border-radius: 50%; }
.code-head .d1 { background: #ff5f57; } .code-head .d2 { background: #febc2e; } .code-head .d3 { background: #28c840; }
.code-head .code-title { margin-left: 6px; color: #9d93c0; font-size: 11.5px; }
.code-body { padding: 16px 18px; overflow-x: auto; }
.code-body pre { margin: 0; line-height: 1.7; color: #e8e3f8; }
.code-body .cm { color: #7d74a6; }      /* комментарий */
.code-body .ck { color: #8be9fd; }      /* ключевое слово */
.code-body .cs { color: #c4a8ff; }      /* строка */
.code-body .cw { color: #ff9ecb; }      /* значение */

/* ---------------------------------------------------------------- секции */
.section { padding: 76px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 46px; }
.kicker {
  display: inline-block; margin-bottom: 12px; padding: 5px 13px;
  font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--brand-deep); background: #efe8fc; border-radius: 20px;
}
.section-head h2 { font-size: 33px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.4px; }
.section-head p { color: var(--muted); margin: 0; font-size: 16px; }

/* колонки */
.cols { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* карточка фичи */
.fcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: 0 2px 10px rgba(60, 32, 120, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.fcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #d9cdf2; }
.fic {
  width: 48px; height: 48px; border-radius: 13px; margin-bottom: 18px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
}
.fic svg { width: 24px; height: 24px; }
.fcard h3 { font-size: 18.5px; margin: 0 0 8px; }
.fcard p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 14px; }
.fcard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fcard li { position: relative; padding-left: 24px; font-size: 14px; color: #3a3452; }
.fcard li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--brand-2); font-weight: 800;
}
.fcard code { background: #f1f2f7; border-radius: 4px; padding: 1px 5px; font-size: 12px; }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px; box-shadow: 0 2px 10px rgba(60, 32, 120, 0.05);
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%; margin-bottom: 16px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 14px rgba(124, 58, 237, 0.35);
}
.step h3 { font-size: 16.5px; margin: 0 0 8px; }
.step p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }

/* ---------------------------------------------------------------- прайс */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; align-items: stretch; }
.pcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 26px; box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pcard.featured {
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box;
  box-shadow: var(--shadow-lg);
}
.ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; white-space: nowrap;
  font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 15px; border-radius: 20px; box-shadow: 0 4px 12px rgba(124, 58, 237, 0.45);
}
.plan-tag { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-deep); }
.price { font-size: 36px; font-weight: 800; line-height: 1.1; margin: 6px 0 2px; letter-spacing: -0.5px; }
.price small { font-size: 15px; color: var(--muted); font-weight: 600; }
.per { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.pcard ul { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; flex: 1; }
.pcard li { position: relative; padding-left: 26px; font-size: 14.5px; color: #3a3452; }
.pcard li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand-2); font-weight: 800; }
.pcard li.no::before { content: "—"; color: #b9b3cf; }
.pcard .btn { width: 100%; }
.price-note { text-align: center; margin: 30px 0 0; font-size: 15px; }

/* ---------------------------------------------------------------- FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
details.faq-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: 0 2px 8px rgba(60, 32, 120, 0.04);
}
details.faq-item summary {
  padding: 18px 48px 18px 22px; cursor: pointer; font-weight: 700; font-size: 15.5px;
  position: relative; list-style: none; color: var(--ink);
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 9px; height: 9px; border-right: 2px solid var(--brand-2); border-bottom: 2px solid var(--brand-2);
  transform: translateY(-68%) rotate(45deg); transition: transform 0.2s ease;
}
details.faq-item[open] summary { color: var(--brand-deep); }
details.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-a { padding: 0 22px 20px; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.faq-a p { margin: 0 0 10px; } .faq-a p:last-child { margin-bottom: 0; }
.faq-a code { background: #f1f2f7; border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }

/* ---------------------------------------------------------------- CTA */
.cta {
  position: relative; overflow: hidden;
  background:
    radial-gradient(700px 320px at 85% -30%, rgba(255, 255, 255, 0.22), transparent 60%),
    var(--grad);
  border-radius: 22px; color: #fff; text-align: center; padding: 60px 36px;
  box-shadow: var(--shadow-lg);
}
.cta h2 { font-size: 31px; margin: 0 0 12px; letter-spacing: -0.4px; }
.cta p { color: #eadfff; margin: 0 0 28px; font-size: 16.5px; }
.cta .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- страницы */
.page-head {
  background: var(--bg-soft); border-bottom: 1px solid var(--line);
  padding: 58px 0 46px; text-align: center;
}
.page-head h1 { font-size: 38px; margin: 10px 0 10px; letter-spacing: -0.5px; }
.page-head p { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 16.5px; }

/* карточки документации */
.doc-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 24px; text-decoration: none;
  color: inherit; box-shadow: 0 2px 10px rgba(60, 32, 120, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.doc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-2); text-decoration: none; }
.doc-num {
  display: inline-block; font-size: 12px; font-weight: 800; color: var(--brand-deep);
  background: #efe8fc; border-radius: 6px; padding: 2px 8px; margin-bottom: 12px;
  font-family: var(--mono);
}
.doc-card h3 { font-size: 17.5px; margin: 0 0 7px; color: var(--ink); }
.doc-card p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 12px; }
.doc-file { font-family: var(--mono); font-size: 12.5px; color: var(--brand); }
.docs-note { margin-top: 28px; color: var(--muted); font-size: 14px; text-align: center; }

/* таблица тарифов */
.ptable-wrap {
  overflow-x: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 880px; }
.ptable th, .ptable td { padding: 15px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.ptable th {
  background: #f8f6fd; font-size: 12px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px; white-space: nowrap;
}
.ptable th:first-child, .ptable td:first-child { text-align: left; font-weight: 700; }
.ptable tr:last-child td { border-bottom: none; }
.ptable .row-featured { background: #faf7ff; }
.ptable .yes { color: var(--ok); font-weight: 800; }
.ptable .no { color: #b9b3cf; }
.ptable .tag { font-size: 12px; padding: 3px 10px; }
.ptable-note { color: var(--muted); font-size: 13.5px; text-align: center; margin: 22px auto 0; max-width: 720px; }

/* теги (на публичных страницах) */
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.tag-trial { background: #eef0f5; color: #4a5060; }
.tag-basic { background: #e3f0fb; color: #15568f; }
.tag-pro { background: #f3edff; color: #4b2a8f; }
.tag-unlimited { background: #e6f6ec; color: #157f3d; }

/* ---------------------------------------------------------------- футер */
.site-footer { background: #160d2b; color: #b9b0d8; margin-top: 0; }
.site-footer .container { padding: 38px 20px 30px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.fcol { display: flex; align-items: center; gap: 12px; }
.fcol img { height: 24px; }
.fcol .copy { font-size: 13.5px; color: #9d93c0; }
.flinks { display: flex; gap: 20px; margin-left: auto; }
.flinks a { color: #cfc6ea; text-decoration: none; font-size: 14px; font-weight: 600; }
.flinks a:hover { color: #fff; text-decoration: underline; }
.fnote {
  flex-basis: 100%; margin: 4px 0 0; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px; color: #8f86b3;
}

/* ---------------------------------------------------------------- адаптив */
@media (max-width: 900px) {
  .site-header .container { padding-top: 8px; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; gap: 0; border-top: 1px solid var(--line); padding-top: 6px; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding: 52px 0 64px; }
  .hero-title { font-size: 34px; }
  .hero-sub { font-size: 16px; }
  .cols-2, .cols-3, .cols-4, .steps, .price-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 56px 0; }
  .section-head h2 { font-size: 27px; }
  .cta h2 { font-size: 25px; }
  .page-head h1 { font-size: 31px; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
  .flinks { margin-left: 0; }
}
@media (max-width: 560px) {
  .cols-2, .cols-3, .cols-4, .steps, .price-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 29px; }
  .btn { width: 100%; }
  .hero-cta .btn, .cta .btn { width: 100%; }
  .brand .brand-sub { display: none; }
  .site-header .container { gap: 10px; }
}
