/* =========================================================
   Корпоративный ИИ — презентация
   Tokens → reset → layout → components → sections → responsive
   ========================================================= */

:root {
  /* Surfaces & ink — light */
  --paper: #f2f4f1;
  --paper-2: #e9ece7;
  --surface: #ffffff;
  --surface-2: #f7f8f6;
  --ink: #14181b;
  --ink-2: #4b5257;
  --ink-3: #6a7278;
  --line: #d9ded8;
  --line-2: #c6ccc5;

  /* Brand & signals */
  --brand: #1c3fd8;
  --brand-ink: #ffffff;
  --brand-soft: #e7ebff;
  --brand-deep: #122aa0;
  --ok: #0a6b4d;
  --ok-soft: #e2f2ea;
  --warn: #ae2a1b;
  --warn-soft: #fbe6e2;
  --amber: #8a5a00;
  --amber-soft: #f6eed7;
  --focus: #1c3fd8;

  /* Type */
  --font-sans: "Golos Text", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --wrap: 1140px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(20, 24, 27, .05), 0 8px 24px -12px rgba(20, 24, 27, .18);
  --shadow-2: 0 2px 4px rgba(20, 24, 27, .06), 0 24px 60px -24px rgba(20, 24, 27, .28);

  /* Fixed dark "slab" — stays dark in both color schemes */
  --slab-bg: #0f151a;
  --slab-surface: #161d23;
  --slab-ink: #eef1ef;
  --slab-muted: #b6bfc5;
  --slab-line: rgba(255, 255, 255, .16);
  --slab-line-strong: rgba(255, 255, 255, .28);
  --slab-fill: rgba(255, 255, 255, .05);
  --slab-ok: #6ee0b0;
  --slab-ok-bg: rgba(110, 224, 176, .14);
  --slab-brand: #a9bcff;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c0f11;
    --paper-2: #121619;
    --surface: #141a1e;
    --surface-2: #1a2126;
    --ink: #edf0ef;
    --ink-2: #a6aeb4;
    --ink-3: #828b92;
    --line: #262d32;
    --line-2: #333b41;

    --brand: #8fa8ff;
    --brand-ink: #0c0f11;
    --brand-soft: #17203c;
    --brand-deep: #b9c6ff;
    --ok: #5ad1a0;
    --ok-soft: #12301f;
    --warn: #ff8e7e;
    --warn-soft: #3a1a17;
    --amber: #e7b65c;
    --amber-soft: #332913;
    --focus: #8fa8ff;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, .5), 0 24px 60px -24px rgba(0, 0, 0, .8);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.65rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--brand); color: var(--brand-ink); }

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

.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -100%;
  background: var(--brand); color: var(--brand-ink);
  padding: .6rem 1rem; border-radius: var(--radius-sm);
  z-index: 200; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-sans);
  font-size: .95rem; font-weight: 600; line-height: 1;
  padding: .85rem 1.35rem;
  min-height: 46px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--brand-deep); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-3); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; }
.brand-name { font-weight: 800; letter-spacing: -0.02em; font-size: 1.12rem; }
.brand-dot { color: var(--brand); }

.main-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.main-nav a {
  color: var(--ink-2); font-size: .93rem; font-weight: 500;
  padding: .35rem 0;
}
.main-nav a:hover { color: var(--ink); text-decoration: none; }
.header-cta { margin-left: .5rem; }

.menu-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-2); border-radius: 10px;
  cursor: pointer; flex-direction: column; gap: 5px;
}
.menu-bar { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] .menu-bar:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: .25rem;
  padding: .75rem var(--gutter) 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.mobile-nav a:not(.btn) { color: var(--ink-2); padding: .7rem .25rem; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: .75rem; }

/* ---------- Section scaffolding ---------- */
section { padding-block: clamp(3.2rem, 7vw, 6rem); }
.section-head { max-width: 44rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.kicker {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand);
  margin-bottom: .8rem;
}
.section-lede { color: var(--ink-2); font-size: 1.05rem; margin-top: 1rem; }
.section-head--light .kicker { color: var(--brand); }
.section-head--light h2, .section-head--light .section-lede { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.22rem); color: var(--ink-2); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }

/* ---------- Problem ---------- */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.problem-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem;
}
.problem-card h3 { margin: .8rem 0 .45rem; }
.problem-card p { color: var(--ink-2); font-size: .93rem; }
.problem-tag {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  padding: .22rem .55rem; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em;
}
.problem-tag--warn { background: var(--warn-soft); color: var(--warn); }
.problem-tag--amber { background: var(--amber-soft); color: var(--amber); }
.problem-bridge {
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 600; max-width: 42rem;
  display: flex; gap: .7rem; align-items: flex-start;
}
.bridge-mark { color: var(--brand); font-weight: 800; }

/* ---------- Example chat ---------- */
.demo { background: var(--paper-2); border-block: 1px solid var(--line); }
.demo-window { max-width: 58rem; margin-inline: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow-1); }
.demo-toggle { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; padding: .65rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.demo-tab { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem .8rem; font: 500 .9rem/1.3 var(--font-sans); color: var(--ink-2); background: transparent; border: 1px solid transparent; border-radius: 10px; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.demo-tab:hover { color: var(--ink); background: var(--paper-2); }
.demo-tab.is-active { color: var(--ink); background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow-1); }
.chat-header { display: flex; align-items: center; gap: .65rem; padding: 1rem 1.4rem; font-size: .9rem; font-weight: 600; }
.chat-avatar { display: grid; place-items: center; width: 28px; height: 28px; background: var(--brand-soft); color: var(--brand); border-radius: 8px; font-size: 1.3rem; }
.chat-demo-label { margin-left: auto; color: var(--ink-2); font-size: .78rem; font-weight: 400; }
.demo-body { padding: 1.5rem clamp(1rem, 4vw, 3rem) 2rem; min-height: 530px; }
.demo-panel { max-width: 42rem; margin-inline: auto; display: grid; gap: 2rem; }
.demo-panel:focus-visible { outline-offset: 8px; }
.msg { min-width: 0; font-size: .96rem; line-height: 1.7; }
.msg--user { justify-self: end; max-width: 88%; border-radius: 22px 22px 5px 22px; padding: .85rem 1.2rem; background: var(--paper-2); }
.msg--ai { display: grid; justify-self: stretch; gap: .9rem; padding: 0; }
.msg-who { color: var(--ink-2); font-size: .8rem; font-weight: 600; }
.msg--ai ul, .msg--ai ol { padding-left: 1.3rem; }
.msg--ai li + li { margin-top: .3rem; }
.chat-draft { padding: 1rem 1.2rem; background: var(--surface-2); border-left: 2px solid var(--line-2); border-radius: 0 12px 12px 0; }
.chat-draft p + p { margin-top: .8rem; }
.chat-sources { justify-self: start; width: 100%; margin-top: .3rem; font-size: .82rem; }
.chat-sources summary { display: inline-flex; align-items: center; gap: .7rem; min-height: 44px; padding: .45rem .85rem; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); cursor: pointer; list-style: none; font-weight: 500; }
.chat-sources summary::-webkit-details-marker { display: none; }
.chat-sources summary::after { content: "+"; color: var(--ink-2); }
.chat-sources[open] summary::after { content: "−"; }
.chat-sources summary:hover { color: var(--ink); border-color: var(--ink-3); }
.chat-source-list { display: grid; gap: .8rem; padding: 1rem; margin-top: .7rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.chat-source-list strong { font-weight: 600; }
.chat-source-list p { margin-top: .2rem; color: var(--ink-2); font-size: .8rem; }
.chat-footer { display: flex; justify-content: center; gap: .6rem; padding: 1rem 1.4rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .8rem; }
.demo-disclaimer { color: var(--ink-2); font-size: .8rem; text-align: center; margin: 1rem auto 0; max-width: 46rem; }

/* ---------- Integrations ---------- */
.integration-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.integration-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.integration-card h3 { margin-bottom: .4rem; }
.integration-card p { color: var(--ink-2); font-size: .9rem; }
.integrations-foot { margin-top: 1.4rem; color: var(--ink-2); }

/* ---------- Security ---------- */
.security { background: var(--slab-bg); color: var(--slab-ink); }
.security h2 { color: var(--slab-ink); }
.security .section-lede { color: var(--slab-muted); }
.security .kicker { color: var(--slab-brand); }
/* ---------- How ---------- */
.how-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.how-grid li { border-top: 2px solid var(--brand); padding-top: 1rem; }
.how-grid .step-num { font-size: .8rem; font-weight: 600; color: var(--brand); }
.how-grid h3 { margin: .5rem 0 .35rem; }
.how-grid p { color: var(--ink-2); font-size: .9rem; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 52rem; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative;
  font-weight: 600; font-size: 1.02rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 1.3rem; color: var(--brand); font-weight: 400;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { padding: 0 2.5rem 1.2rem 0; color: var(--ink-2); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--slab-bg); color: var(--slab-muted); padding-block: 2.5rem 1.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--slab-line); padding-bottom: 1.5rem; }
.footer-brand { display: grid; gap: .6rem; max-width: 24rem; }
.site-footer .brand { color: var(--slab-ink); }
.footer-brand p { font-size: .88rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-nav a { color: var(--slab-muted); font-size: .9rem; }
.footer-nav a:hover { color: var(--slab-ink); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; padding-top: 1.2rem; font-size: .78rem; color: var(--slab-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-nav, .header-cta { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav { display: flex; }
  
  .problem-grid, .integration-grid { grid-template-columns: 1fr 1fr; }
  .how-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .problem-grid, .integration-grid, .how-grid { grid-template-columns: 1fr; }
  .demo-toggle { grid-template-columns: repeat(2, 1fr); }
  .hero-actions .btn { width: 100%; }
  .footer-nav { gap: .8rem 1.2rem; }

}

/* Presentation: integration examples, access and deployment options */
section[id] { scroll-margin-top: 88px; }
.hero-detail { margin-top: 1rem; max-width: 34rem; color: var(--ink-2); font-size: .98rem; }
.problem { border-top: 1px solid var(--line); }
.problem-card h3 { margin-top: 0; line-height: 1.3; }
.source-note { margin-top: 1.4rem; max-width: 53rem; font-size: .88rem; color: var(--ink-2); }
.source-note a, .legal-links a { text-decoration: underline; text-underline-offset: 3px; }
.integrations { padding-top: 0; }
.integration-card h3 { line-height: 1.3; }
.demo-disclaimer { color: var(--ink-2); font-size: .8rem; max-width: 46rem; margin-inline: auto; }
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.access-card { padding: clamp(1.4rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.access-label { color: var(--brand); font-size: .85rem; font-weight: 600; }
.access-card h3 { margin: .65rem 0 .85rem; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.25; }
.access-card p { color: var(--ink-2); font-size: .96rem; }
.access-card .access-example { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .9rem; }
.deployment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.deployment-card { background: var(--slab-surface); border: 1px solid var(--slab-line); border-radius: var(--radius); padding: 1.5rem; }
.deployment-label { color: var(--slab-brand); font-size: .82rem; }
.deployment-card h3 { margin: .7rem 0 .85rem; font-size: 1.3rem; line-height: 1.3; }
.deployment-card p { color: var(--slab-muted); font-size: .93rem; }
.deployment-card ul { border-top: 1px solid var(--slab-line); padding: 1rem 0 0 1.1rem; margin-top: 1.1rem; font-size: .86rem; }
.deployment-card li + li { margin-top: .6rem; }
.security-contract { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--slab-line); }
.security-contract h3 { font-size: 1.3rem; line-height: 1.3; }
.security-contract p { margin-top: .8rem; max-width: 54rem; color: var(--slab-muted); font-size: .94rem; }
.legal-links { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; margin-top: 1.3rem; }
.legal-links a { color: var(--slab-brand); font-size: .84rem; }
.how { background: var(--paper-2); border-block: 1px solid var(--line); }
.how-grid h3 { line-height: 1.3; }
.faq { padding-bottom: clamp(3rem, 6vw, 5rem); }
@media (max-width: 1100px) and (min-width: 961px) {
  .header-inner { gap: 1rem; }
  .main-nav { gap: .9rem; }
  .main-nav a { font-size: .85rem; }
  .header-cta { font-size: .85rem; padding-inline: 1rem; }
}
@media (max-width: 960px) {
  .deployment-grid { grid-template-columns: 1fr; }
  .deployment-card { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .deployment-card .deployment-label, .deployment-card h3 { grid-column: 1; }
  .deployment-card p { grid-column: 1; }
  .deployment-card ul { grid-column: 2; grid-row: 1 / 4; border-top: 0; border-left: 1px solid var(--slab-line); margin: 0; padding: .2rem 0 .2rem 2rem; align-self: center; }
}
@media (max-width: 600px) {
  .access-grid { grid-template-columns: 1fr; }
  .deployment-card { display: block; }
  .deployment-card ul { border-left: 0; border-top: 1px solid var(--slab-line); margin-top: 1.1rem; padding: 1rem 0 0 1.1rem; }
  .legal-links { flex-direction: column; align-items: flex-start; }
}

/* Simple first screen and employee tools */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem); }
.hero-copy { max-width: 49rem; }
.hero-copy h1 { font-size: clamp(2.4rem, 5.8vw, 4.4rem); line-height: 1.1; margin-bottom: 1.4rem; }
.hero-copy .lede { max-width: 47rem; }
.hero-detail { max-width: 45rem; }
.privacy .problem-grid { grid-template-columns: repeat(2, 1fr); }
.employee-media { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.employee-media h4 { font-size: 1rem; margin-bottom: .5rem; }
.employee-media p { font-size: .9rem; }
@media (max-width: 600px) {
  .hero-copy h1 { font-size: clamp(2.3rem, 9vw, 3rem); }
  .privacy .problem-grid { grid-template-columns: 1fr; }
  .demo-body { min-height: 0; padding: 1rem 1.1rem 1.8rem; }
  .demo-panel { gap: 1.5rem; }
  .msg--user { max-width: 95%; padding: .8rem 1rem; }
  .chat-header { padding: .9rem 1.1rem; }
  .chat-demo-label { font-size: .72rem; }
  .chat-footer { padding-inline: 1.1rem; text-align: center; }
}
