/* ГРАФЕМА — лендинг. Палитра фирменного одностраничника. Без загрузки шрифтов:
   заголовки — засечки (документный характер), текст — системный гротеск. */

:root {
  --ink: #1B2A3A;        /* чернильный: тёмные секции и текст */
  --accent: #E8833A;     /* оранжевый: только CTA и ключевые цифры, дозированно */
  --bg: #EEF2F6;         /* светлый фон */
  --line: #D5DEE6;       /* линии */
  --muted: #77869A;      /* приглушённый текст */
  --white: #ffffff;

  --serif: Cambria, Georgia, "Times New Roman", serif;
  --sans: -apple-system, "Segoe UI", Roboto, "PT Sans", sans-serif;

  --wrap: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden; /* защита от случайного горизонтального скролла на узких экранах */
  overflow-wrap: break-word; /* длинные токены переносятся, а не распирают макет на ≤360px */
}

h1, h2, h3, .brand-name { font-family: var(--serif); }
h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.14; margin: 0 0 .6em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); line-height: 1.2; margin: 0 0 .7em; }
h3 { font-size: 1.2rem; margin: 0 0 .5em; }

a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

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

.skip-link {
  position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--white);
  padding: 10px 16px; z-index: 100; transition: top .15s;
}
.skip-link:focus { top: 8px; }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 13px 22px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; font-size: 1rem; line-height: 1.2; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: #d9752e; }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94);
  backdrop-filter: saturate(120%) blur(6px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px;
  background: var(--ink); color: var(--bg); font-family: var(--serif); font-weight: 700; font-size: 1.25rem;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 700; font-size: 1.12rem; letter-spacing: .04em; }
.brand-sub { font-size: .72rem; color: var(--muted); }

.nav { margin-left: auto; }
.nav-list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; color: var(--ink); font-size: .95rem; }
.nav-list a:hover { color: var(--accent); }
.nav-toggle { display: none; }
.header-cta { white-space: nowrap; }

/* --- Sections --- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-alt { background: var(--bg); }
.dark { background: var(--ink); color: var(--bg); }
.dark h2 { color: var(--white); }
.dark a { color: var(--bg); }
.section-intro { font-size: 1.1rem; max-width: 760px; color: var(--ink); }
.dark .section-intro { color: var(--bg); }

/* --- Hero --- */
.hero { padding: clamp(52px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); background:
  radial-gradient(1200px 400px at 80% -10%, rgba(232,131,58,.10), transparent 60%), var(--white); }
.hero .lead { font-size: clamp(1.15rem, 2.2vw, 1.5rem); max-width: 820px; margin: 0 0 1em; }
.hero-body { max-width: 820px; color: #2b3b4d; }
.trust-line { font-size: .86rem; color: var(--muted); margin: 1.6em 0 1.4em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- Dark quote --- */
.doc-quote {
  margin: 0 0 1.6em; padding: 22px 26px; border-left: 4px solid var(--accent);
  background: rgba(255,255,255,.05); border-radius: 0 var(--radius) var(--radius) 0;
}
.doc-quote p { font-size: 1.2rem; margin: 0 0 .6em; }
.doc-quote cite { display: block; font-style: normal; font-size: .85rem; color: #aab6c4; }
.points-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); list-style: none; padding: 0; margin: 0 0 1.6em; }
.points-3 li { padding: 18px 20px; background: rgba(255,255,255,.05); border-radius: var(--radius); font-size: .96rem; }
.closing-line { font-size: 1.15rem; font-weight: 600; max-width: 900px; }

/* --- Four value cards --- */
.cards-4 { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.card { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.section-alt .card { background: var(--white); }
.card h3 { color: var(--accent); }
.card p { font-size: .95rem; margin: 0; }

/* --- Scheme (5 steps) --- */
.scheme { margin: 8px 0 32px; }
.scheme svg { width: 100%; height: auto; max-height: 160px; }
.steps { counter-reset: none; display: grid; gap: 14px; grid-template-columns: repeat(5, 1fr); list-style: none; padding: 0; margin: 0 0 1.4em; }
.steps li { padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); font-size: .92rem; }
.section-alt .steps li { background: var(--white); }
.steps .step-human { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.scheme-caption { max-width: 820px; color: var(--muted); font-size: .95rem; }

/* --- Compare table --- */
.compare { width: 100%; border-collapse: collapse; margin-top: 6px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: 15px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: .96rem; }
.compare thead th { background: var(--ink); color: var(--bg); font-family: var(--sans); font-weight: 600; }
.compare tbody th[scope="row"] { font-weight: 700; background: var(--bg); width: 22%; }
.compare .accent-col { }
.compare thead .accent-col { background: #24384c; color: var(--white); }
.compare tbody td.accent-col { background: rgba(232,131,58,.06); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --- Deploy list (dark) --- */
.deploy-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.deploy-list li { padding: 18px 20px; background: rgba(255,255,255,.05); border-radius: var(--radius); border-left: 3px solid var(--accent); }

/* --- Plans --- */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); align-items: start; }
.plan { padding: 26px 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.plan-featured { border: 2px solid var(--accent); box-shadow: 0 8px 30px rgba(27,42,58,.10); }
.plan h3 { letter-spacing: .06em; }
.plan-price { margin: 4px 0 18px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-price strong { font-family: var(--serif); font-size: 1.7rem; color: var(--accent); }
.plan-price span { color: var(--muted); font-size: .9rem; }
.plan-specs { margin: 0; }
.plan-specs > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.plan-specs dt { color: var(--muted); font-size: .92rem; margin: 0; }
.plan-specs dd { margin: 0; font-weight: 600; text-align: right; }
.plan-note { margin: 16px 0 0; font-size: .86rem; color: var(--muted); }
.pricing-line { margin-top: 26px; font-weight: 600; }
.pricing-fine { font-size: .82rem; color: var(--muted); }

/* --- FAQ accordion --- */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; position: relative; padding-right: 46px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 20px 18px; color: #2b3b4d; }

/* --- Lead form --- */
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 600; }
.req { color: var(--accent); margin-left: 2px; }
.field input, .field textarea {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.consent .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: .92rem; }
.consent input { margin-top: 3px; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.form-status { grid-column: 1 / -1; margin: 0; font-weight: 600; }
.form-status.ok { color: #1c7c4a; }
.form-status.err { color: #b23b3b; }
.contacts-inline { margin-top: 22px; color: var(--muted); }

/* --- Footer --- */
.site-footer { background: var(--ink); color: #aab6c4; padding: 30px 0; font-size: .88rem; }
.site-footer a { color: var(--bg); }
.site-footer .fine { color: var(--muted); margin-top: 8px; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .points-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .deploy-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .header-cta { display: none; }
  .nav { margin-left: auto; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; }
  .nav-list {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .nav-list.open { display: flex; }
  .nav-list li { border-top: 1px solid var(--line); }
  .nav-list a { display: block; padding: 12px 0; }

  .cards-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .lead-form { grid-template-columns: 1fr; }

  /* Таблица сравнения → карточки */
  .compare, .compare thead, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare { border: 0; background: transparent; }
  .compare thead { display: none; }
  .compare tbody tr {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    margin-bottom: 16px; overflow: hidden;
  }
  .compare tbody th[scope="row"] { width: auto; background: var(--ink); color: var(--bg); font-size: 1rem; }
  .compare tbody td { border-bottom: 1px solid var(--line); }
  .compare tbody td::before {
    content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; font-weight: 600;
  }
  .compare tbody td.accent-col::before { color: var(--accent); }
}
