/* ============================================================
   Vibe CRM — сайт
   Принципы: без внешних шрифтов и библиотек, тёплая «бумага»,
   крупная антиква в заголовках, тонкие линии вместо карточек.
   ============================================================ */

:root {
  --paper: #f7f4ed;
  --paper-2: #efeade;
  --paper-3: #e7e0d1;
  --ink: #17140f;
  --ink-soft: #4b453c;
  --muted: #7e776a;
  --line: #ddd5c5;
  --line-strong: #c9bfab;
  --accent: #5a48c8;
  --accent-soft: #ece7fb;
  --good: #2f7a58;
  --warn: #a8611f;
  --dark: #1a1712;
  --radius: 12px;
  --wrap: 1160px;
  --display: Georgia, "Times New Roman", "PT Serif", serif;
  --sans: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.015em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

/* Skip link */
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 244, 237, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 26px; height: 70px; }
.brand { display: inline-flex; align-items: baseline; gap: 7px; }
.brand-glyph {
  align-self: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
}
.brand-name { font-family: var(--display); font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.brand-suffix {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { font-size: 14.5px; color: var(--ink-soft); }
.nav a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.link-quiet { font-size: 14.5px; color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; white-space: nowrap;
  transition: background .16s, color .16s, border-color .16s, transform .16s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15.5px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 7px; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--accent); }
.btn-line { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); background: var(--paper-2); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: #fff; }

.burger { display: none; width: 40px; height: 40px; margin-left: auto; background: none; border: 0; padding: 9px; }
.burger span { display: block; height: 1.7px; background: var(--ink); margin: 5px 0; transition: .2s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.4px) rotate(-45deg); }

/* Hero */
.hero { padding: 74px 0 84px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 56px; align-items: start; }
.kicker {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 5.4vw, 66px); line-height: 1.03; letter-spacing: -.025em;
  margin-bottom: 24px;
}
.underlined { position: relative; white-space: nowrap; color: var(--accent); }
.underlined svg {
  position: absolute; left: -2%; bottom: -.14em; width: 104%; height: .16em;
  color: var(--accent); opacity: .45; overflow: visible;
}
.lead { font-size: 18px; color: var(--ink-soft); max-width: 490px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 26px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 0; font-size: 13.5px; color: var(--muted); }
.hero-meta li { padding: 0 14px; border-left: 1px solid var(--line-strong); }
.hero-meta li:first-child { padding-left: 0; border-left: 0; }

/* Product mock */
.mock-wrap { margin: 0; position: relative; }
.mock {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px;
  overflow: hidden; box-shadow: 18px 22px 0 -8px var(--paper-2), 18px 22px 0 -7px var(--line);
}
.mock-bar { display: flex; align-items: center; gap: 5px; padding: 9px 11px; border-bottom: 1px solid var(--line); background: var(--paper); }
.mock-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.mock-url {
  margin-left: 8px; flex: 1; height: 18px; border-radius: 4px; background: #fff;
  border: 1px solid var(--line); font-family: var(--mono); font-size: 9.5px; color: var(--muted);
  display: flex; align-items: center; padding: 0 7px;
}
.mock-body { display: grid; grid-template-columns: 96px minmax(0, 1fr); min-height: 340px; }
.mock-side { border-right: 1px solid var(--line); background: #fdfcf9; padding: 12px 10px; }
.mock-logo {
  width: 20px; height: 20px; border-radius: 5px; background: var(--ink); color: var(--paper);
  font-size: 10px; font-weight: 700; display: grid; place-items: center; margin-bottom: 14px;
}
.m-row { display: block; height: 7px; border-radius: 3px; background: var(--paper-3); margin-bottom: 9px; }
.m-row.on { background: var(--ink); width: 88%; }
.m-row.w70 { width: 70%; }
.m-row.w85 { width: 85%; }
.m-row.w60 { width: 60%; }
.mock-side-foot { margin-top: 26px; height: 26px; border-radius: 5px; border: 1px dashed var(--line-strong); }
.mock-main { padding: 14px 16px 12px; }
.mock-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.mock-head b { font-size: 13px; display: block; }
.mock-head small { font-size: 9.5px; color: var(--muted); }
.m-chip {
  font-size: 9px; padding: 3px 7px; border-radius: 4px; background: var(--accent-soft);
  color: var(--accent); font-weight: 600; white-space: nowrap;
}
.mock-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.mock-kpi > div { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.mock-kpi small { display: block; font-size: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mock-kpi strong { font-size: 13px; }
.mock-kpi .warn { color: var(--warn); }
.mock-list { border-top: 1px solid var(--line); }
.deal { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ava {
  width: 21px; height: 21px; border-radius: 5px; background: var(--accent-soft); color: var(--accent);
  font-size: 8.5px; font-weight: 700; display: grid; place-items: center; flex: none;
}
.ava.alt { background: #e6f2ec; color: var(--good); }
.ava.alt2 { background: #f7ecdf; color: var(--warn); }
.deal-t { flex: 1; min-width: 0; }
.deal-t b { display: block; font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-t small { font-size: 8.5px; color: var(--muted); }
.pill { font-size: 7.5px; padding: 2px 6px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.pill-ok { background: #e6f2ec; color: var(--good); }
.pill-warn { background: #f7ecdf; color: var(--warn); }
.mock-chart { display: flex; align-items: flex-end; gap: 5px; height: 46px; margin-top: 12px; }
.mock-chart span { flex: 1; background: var(--paper-3); border-radius: 2px 2px 0 0; }
.mock-chart span:nth-child(1) { height: 38%; }
.mock-chart span:nth-child(2) { height: 62%; }
.mock-chart span:nth-child(3) { height: 48%; }
.mock-chart span:nth-child(4) { height: 80%; }
.mock-chart span:nth-child(5) { height: 56%; }
.mock-chart span:nth-child(6) { height: 92%; }
.mock-chart span:nth-child(7) { height: 70%; }
.mock-chart span:nth-child(4), .mock-chart span:nth-child(6) { background: var(--accent); opacity: .6; }
.mock-wrap figcaption {
  margin-top: 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; color: var(--muted);
}
.spec {
  position: absolute; z-index: 2; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); background: var(--paper); padding: 3px 7px;
  border: 1px solid var(--line); border-radius: 4px;
}
.spec-a { top: -12px; left: 18px; }
.spec-b { left: -16px; bottom: 40px; }

/* Strip */
.strip { background: var(--dark); color: var(--paper); }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-top: 18px; padding-bottom: 18px; }
.strip p { font-size: 12.8px; line-height: 1.45; color: #cdc5b6; }
.strip b { font-family: var(--display); font-size: 20px; font-weight: 400; color: var(--paper); margin-right: 4px; }

/* Sections */
.section { padding: 84px 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 22px; margin-bottom: 48px; align-items: start; }
.sec-num { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 8px; }
.sec-head h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.12; letter-spacing: -.02em; margin-bottom: 12px; max-width: 760px;
}
.sec-head p { color: var(--ink-soft); max-width: 620px; }

/* Features */
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.feature { padding: 24px 0 26px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; }
.feature:nth-child(-n+2) { border-top: 0; }
.f-num { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 4px; }
.feature h3 { grid-column: 2; font-size: 18px; font-weight: 600; margin-bottom: 7px; }
.feature p { grid-column: 2; color: var(--ink-soft); font-size: 14.8px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.steps li { padding: 0 32px 0 0; border-right: 1px solid var(--line); margin-right: 32px; }
.steps li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.step-num {
  display: inline-block; font-family: var(--display); font-size: 40px; line-height: 1;
  color: var(--accent); margin-bottom: 14px;
}
.steps h3 { font-size: 19px; margin-bottom: 8px; }
.steps p { color: var(--ink-soft); font-size: 14.8px; }

/* Pricing */
.price-table { border-top: 1px solid var(--ink); }
.price-row {
  display: grid; grid-template-columns: minmax(0, 1.6fr) 120px 180px 190px;
  gap: 16px; align-items: center; padding: 20px 4px; border-bottom: 1px solid var(--line);
}
.price-head {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.price-row.featured { background: var(--paper-2); padding-left: 16px; padding-right: 16px; margin: 0 -12px; border-radius: 8px; border-bottom-color: transparent; }
.price-row.featured + .price-row { border-top: 1px solid var(--line); }
.p-name b { display: block; font-size: 17px; font-weight: 600; }
.p-name small { font-size: 13px; color: var(--muted); }
.p-users { font-size: 14.5px; color: var(--ink-soft); }
.p-cost b { font-family: var(--display); font-size: 26px; font-weight: 400; }
.p-cost small { display: block; font-size: 12px; color: var(--muted); }
.p-act { text-align: right; }
.price-note { margin-top: 22px; font-size: 13.5px; color: var(--muted); max-width: 720px; }
.price-note a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }

/* FAQ */
.faq { max-width: 840px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-size: 16.5px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-size: 22px; color: var(--muted); line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 60px 22px 0; color: var(--ink-soft); font-size: 15px; }
.faq .answer a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }

/* Contacts */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: stretch; }
.contact-dark { background: var(--dark); color: var(--paper); border-radius: var(--radius); padding: 44px 42px; }
.kicker-light { color: #b9b0a0; }
.contact-dark h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1; margin-bottom: 14px;
}
.contact-dark p { color: #c9c1b2; max-width: 430px; font-size: 15px; }
.contact-dark .btn { margin-top: 26px; }
.contact-side { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 30px; background: #fff; display: grid; align-content: center; }
.contact-side dl > div { padding: 15px 0; border-bottom: 1px solid var(--line); }
.contact-side dl > div:last-child { border-bottom: 0; }
.contact-side dt { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.contact-side dd { font-size: 15px; }
.contact-side a { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); padding: 48px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 34px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 13.5px; color: var(--muted); max-width: 280px; }
.footer-col h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.footer-col a, .footer-col p { display: block; font-size: 14px; color: var(--ink-soft); padding: 3px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 10px 24px; font-size: 12.5px; color: var(--muted);
}
.footer-slim { border-top: 0; padding-top: 0; }

.e404 { padding-top: 96px; padding-bottom: 110px; max-width: 800px; }
.e404 h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; margin-bottom: 16px; }
.e404 p { color: var(--ink-soft); margin-bottom: 26px; max-width: 520px; }

section[id], [id="cookies"] { scroll-margin-top: 86px; }

/* Cookie note */
.cookie {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 60;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 18px 40px -24px rgba(23, 20, 15, .5);
  padding: 14px 16px; display: flex; align-items: center; gap: 18px; max-width: 720px; margin: 0 auto;
}
.cookie p { font-size: 13px; color: var(--ink-soft); }
.cookie a { color: var(--accent); }
.cookie .btn { flex: none; }

/* Legal pages */
.legal-hero { padding: 46px 0 34px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.legal-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; margin-bottom: 12px; }
.legal-hero p { color: var(--ink-soft); max-width: 760px; font-size: 15.5px; }
.legal-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.legal-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 46px; padding: 42px 0 76px; align-items: start; }
.legal-nav { position: sticky; top: 92px; border-top: 1px solid var(--ink); }
.legal-nav a { display: block; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.legal-nav a:hover { color: var(--accent); }
.legal-nav a.active { color: var(--accent); font-weight: 600; }
.legal-body { max-width: 800px; }
.legal-body h2 {
  font-family: var(--display); font-weight: 400; font-size: 23px; line-height: 1.2;
  margin: 36px 0 10px; padding-top: 22px; border-top: 1px solid var(--line);
}
.legal-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 15.3px; }
.legal-body p { margin-bottom: 12px; }
.legal-body ul { padding-left: 20px; list-style: disc; margin: 0 0 14px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.legal-body .note {
  border-left: 3px solid var(--accent); background: #fff; padding: 16px 18px;
  font-size: 14.4px; margin: 18px 0; color: var(--ink-soft);
}
.legal-updated { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* Animations (very light) */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Responsive ============ */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .feature-list { column-gap: 36px; }
  .price-row { grid-template-columns: minmax(0, 1.4fr) 90px 150px 170px; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .header-actions .link-quiet { display: none; }
  .burger { display: block; margin-left: 6px; }
  .nav.open {
    display: flex; flex-direction: column; gap: 0; position: absolute; left: 0; right: 0; top: 70px;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 28px 18px;
    box-shadow: 0 20px 30px -30px rgba(23,20,15,.6);
  }
  .nav.open a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .strip-inner { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 0; margin-right: 0; padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 56px minmax(0,1fr); column-gap: 12px; }
  .steps li:last-child { border-bottom: 0; padding-bottom: 0; }
  .step-num { grid-row: span 2; margin-bottom: 0; }
  .steps h3, .steps p { grid-column: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .price-head { display: none; }
  .price-row { grid-template-columns: minmax(0,1fr) auto; row-gap: 8px; padding: 20px 0; }
  .p-users { grid-column: 2; grid-row: 1; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--muted); }
  .p-cost { grid-column: 1; grid-row: 2; }
  .p-act { grid-column: 2; grid-row: 2; }
  .price-row.featured { margin: 0 -12px; }
  .legal-layout { grid-template-columns: 1fr; gap: 26px; }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; gap: 0 18px; border-top: 0; }
  .legal-nav a { border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 13px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .hero { padding: 46px 0 56px; }
  .hero-meta li { padding: 0 10px; }
  .section { padding: 58px 0; }
  .sec-head { grid-template-columns: 1fr; gap: 8px; margin-bottom: 32px; }
  .sec-num { padding-top: 0; }
  .feature-list { grid-template-columns: 1fr; }
  .feature { padding: 20px 0; }
  .feature:nth-child(2) { border-top: 1px solid var(--line); }
  .strip-inner { grid-template-columns: 1fr; gap: 10px; padding: 18px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-brand { grid-column: 1 / -1; }
  .mock { box-shadow: 10px 12px 0 -6px var(--paper-2), 10px 12px 0 -5px var(--line); }
  .spec { display: none; }
  .contact-dark { padding: 32px 24px; }
  .contact-side { padding: 8px 22px; }
  .cookie { left: 12px; right: 12px; bottom: 12px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .legal-body h2 { font-size: 20px; }
}
