/* Персональный агент — общие стили сайта (лендинг + страницы документов) */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+20BD, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0E1116;
  --bg-2: #141922;
  --card: #171D26;
  --line: #232B36;
  --line-2: #2A313D;
  --text: #E8EAED;
  --muted: #9BA3AF;
  --accent: #FF7A1A;
  --accent-soft: rgba(255, 122, 26, 0.12);
  --radius: 22px;
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

p, li, a, summary { overflow-wrap: anywhere; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* ---------- шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 17, 22, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }

.logo {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.07em;
  color: var(--text);
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo-dot { color: var(--accent); }

.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--muted); font-size: 15px; font-weight: 500; white-space: nowrap; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); }

.header-cta { margin-left: 8px; flex-shrink: 0; }

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 11px 10px;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 15px;
  cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; margin: 4px 0; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #1A0F04; }
.btn-primary:hover { background: #FF8B3D; }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }

/* ---------- секции ---------- */

.section { padding: 84px 0; }
.section-dark { background: var(--bg); color: var(--text); }

.section-light {
  --card: #FFFFFF;
  --line: #E3E7EE;
  --line-2: #D6DCE5;
  --text: #141922;
  --muted: #5A6472;
  background: #F6F7F9;
  color: var(--text);
}

.section-alt { background: var(--bg-2); }

section[id], [id^="приложение"] { scroll-margin-top: 84px; }

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
h2 { font-size: clamp(26px, 3.2vw, 38px); margin-bottom: 26px; }
h3 { font-size: 19px; }

.section-lead { color: var(--muted); margin: -10px 0 34px; max-width: 760px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 104px 0 72px;
  background: radial-gradient(900px 420px at 78% -10%, rgba(255, 122, 26, 0.14), transparent 70%), var(--bg);
}

.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 80%, rgba(0,0,0,.5) 92%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 80%, rgba(0,0,0,.5) 92%, transparent 100%);
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.6s ease, transform 7.4s linear;
  will-change: opacity, transform;
}
.hero-slide.is-active { opacity: 1; transform: scale(1.07); }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(14,17,22,.9) 0%, rgba(14,17,22,.83) 38%, rgba(14,17,22,.46) 64%, rgba(14,17,22,.13) 88%, rgba(14,17,22,.05) 100%),
    linear-gradient(180deg, rgba(14,17,22,.08) 0%, rgba(14,17,22,.24) 100%);
}
.hero .container { position: relative; z-index: 2; }

/* мягкая нижняя кромка: размытие + уход в фон */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 180px;
  z-index: 1;
  pointer-events: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(14,17,22,0) 0%, rgba(14,17,22,.22) 55%, rgba(14,17,22,.6) 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 55%, #000 100%);
}

  to { transform: scale(1.1); }
}
.hero-content { max-width: 830px; }
.hero h1 { font-size: clamp(32px, 5vw, 56px); text-shadow: 0 2px 24px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.45); }
.hero p { color: #C6CCD5; font-size: 19px; margin: 22px 0 0; max-width: 730px; text-shadow: 0 1px 14px rgba(0,0,0,.6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  margin: 36px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px;
}
.hero-facts li::before { content: "—"; color: var(--accent); margin-right: 8px; }

/* ---------- сетки ---------- */

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
}

.feature-card svg {
  width: 30px; height: 30px;
  fill: none; stroke: var(--accent);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 16px;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- чат-демо ---------- */

.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 48px; align-items: center; }
.chat-intro { color: var(--muted); margin: 0 0 18px; }
.chat-points { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.chat-shell {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 20px;
  display: grid;
  gap: 12px;
}
.bubble { font-size: 15px; line-height: 1.5; padding: 13px 16px; border-radius: 18px; max-width: 92%; }
.bubble-author {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 4px;
}
.bubble.human {
  justify-self: end; background: #1F2733; border: 1px solid var(--line-2); color: var(--text);
}
.bubble.human .bubble-author { color: var(--muted); }
.bubble.assistant {
  justify-self: start; background: var(--accent-soft);
  border: 1px solid rgba(255, 122, 26, .35); color: var(--text);
}
.bubble.assistant .bubble-author { color: var(--accent); }
.chat-note { color: var(--muted); font-size: 13px; margin: 14px 0 0; }


/* ---------- примеры задач ---------- */

.case-card { display: flex; flex-direction: column; }
.case-card h3 { margin-bottom: 10px; }
.case-card p { color: var(--muted); font-size: 16px; margin: 0 0 14px; }
.case-card .badge { margin-bottom: 14px; }
.case-card .case-result {
  margin: auto 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
}
.case-card .case-result strong { color: var(--accent); }

/* ---------- цены ---------- */

.pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.price-card { display: flex; flex-direction: column; }
.price-card h3 { margin-bottom: 6px; }
.price-value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 10px 0 4px;
}
.price-value span { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-card ul { margin: 18px 0 26px; padding-left: 20px; color: var(--muted); font-size: 16px; display: grid; gap: 8px; }
.price-card .btn { margin-top: auto; }
.price-card-featured { border-color: rgba(255, 122, 26, .5); box-shadow: 0 0 0 1px rgba(255, 122, 26, .15) inset; }
.badge {
  display: inline-block; align-self: flex-start; margin: 0 0 14px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.price-note { color: var(--muted); font-size: 15px; margin-top: 22px; max-width: 780px; }

/* ---------- шаги ---------- */

.steps-list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
  margin: 0; padding: 0; list-style: none; counter-reset: step;
}
.steps-list li {
  counter-increment: step;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px;
}
.steps-list li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); margin-bottom: 12px;
}
.steps-list h3 { margin-bottom: 8px; font-size: 18px; }
.steps-list p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- оплата ---------- */

.pay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pay-grid .card h3 { margin-bottom: 8px; }
.pay-grid .card p { margin: 0; color: var(--muted); font-size: 16px; }
.pay-note { margin-top: 24px; color: var(--muted); font-size: 15px; max-width: 860px; }

/* ---------- FAQ ---------- */

.faq-list { display: grid; gap: 12px; max-width: 880px; }
.faq-list details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 18px 24px;
}
.faq-list summary {
  cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { margin: 12px 0 0; color: var(--muted); }

/* ---------- финальный призыв ---------- */

.final-cta { text-align: center; }
.final-cta p { color: var(--muted); margin: 0 auto 26px; max-width: 640px; }

/* ---------- подвал ---------- */

.site-footer { background: #0A0D12; border-top: 1px solid var(--line); padding: 48px 0 34px; font-size: 15px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h4 {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 12px; font-weight: 700;
}
.footer-grid p { margin: 0 0 8px; }
.footer-grid a { color: var(--text); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand { font-weight: 800; letter-spacing: .12em; color: var(--text); font-size: 17px; margin-bottom: 10px; }
.footer-bottom {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 14px;
}

/* страница 404 — подвал к низу экрана */
body.page-single { min-height: 100vh; display: flex; flex-direction: column; }
body.page-single main { flex: 1; }

/* ---------- страницы документов ---------- */

.doc-header { padding: 64px 0 40px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 8px; }
.doc-header h1 { font-size: clamp(28px, 4vw, 44px); }
.doc-meta { color: var(--muted); margin: 14px 0 0; font-size: 15px; }

.doc-wrap { padding: 56px 0 84px; }
.doc { max-width: 980px; }
.doc h2 { font-size: 22px; margin: 38px 0 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { font-size: 18px; margin: 26px 0 10px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 24px; }
.doc li { margin-bottom: 8px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 14px; }
.doc table.perechen { table-layout: fixed; font-size: 12.5px; overflow-wrap: break-word; }
.doc table.perechen th, .doc table.perechen td { padding: 8px 9px; }
.doc table.perechen th:nth-child(2) { width: 19%; }
.doc table.perechen th:nth-child(3) { width: 13%; }
.doc table.perechen th:nth-child(4) { width: 23%; }
.doc table.perechen th:nth-child(5) { width: 13%; }
.doc table.perechen th:nth-child(6) { width: 14%; }
.doc table.perechen th:nth-child(7) { width: 15%; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 11px; text-align: left; vertical-align: top; overflow-wrap: break-word; }
.doc th { background: var(--card); font-weight: 700; }
.doc table.perechen th:first-child, .doc table.perechen td:first-child { width: 32px; }
.doc .doc-sign { margin-top: 36px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.doc .doc-lead { color: var(--muted); font-size: 18px; }
.doc-back { margin-top: 40px; }

/* ---------- адаптив ---------- */

@media (max-width: 980px) {
  .cards-grid, .pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-layout { grid-template-columns: 1fr; gap: 28px; }
  .steps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .header-cta { display: none; }
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 6px 24px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }
  .hero { padding: 64px 0 60px; }
  .hero-bg::after { background: linear-gradient(180deg, rgba(14,17,22,.82) 0%, rgba(14,17,22,.88) 58%, rgba(14,17,22,.92) 100%); }
  .pricing-grid, .cards-grid, .pay-grid, .steps-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .doc-header { padding: 44px 0 30px; }
  .doc-wrap { padding: 36px 0 60px; }
  .doc table { display: block; overflow-x: auto; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
  .hero-slide { transition: opacity 1.6s ease; }
  .hero-slide.is-active { transform: none; }
}
