/* Insta-CRM — публичные страницы.
   Палитра: чернила, холодная бумага, кобальт (сигнал), мох (успех). */

:root {
  --ink: #14161a;
  --paper: #f1f2f4;
  --card: #ffffff;
  --cobalt: #2743e3;
  --moss: #2f6b4f;
  --line: #d7d9de;
  --muted: #6b7280;
  --radius: 4px;
  --measure: 68ch;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Шапка ---------- */

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 19px;
  text-decoration: none;
  color: var(--ink);
}

.brand span { color: var(--cobalt); }

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  margin-left: 20px;
}

nav a:hover { color: var(--ink); }

.langs { display: flex; gap: 6px; }

.langs button {
  font: inherit;
  font-size: 13px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
}

.langs button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- Заголовки ---------- */

h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 48px 0 16px;
  max-width: 20ch;
}

h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 40px 0 10px;
}

h3 { font-size: 17px; font-weight: 700; margin: 26px 0 6px; }

p, li { max-width: var(--measure); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  color: var(--cobalt);
  margin-top: 56px;
}

.lead { font-size: 19px; color: #333941; max-width: 62ch; }

.muted { color: var(--muted); font-size: 15px; }

/* ---------- Сигнатура: путь «комментарий → личное сообщение» ---------- */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  margin: 40px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.flow .side { padding: 22px 24px; }

.flow .public {
  border-right: 1px dashed var(--line);
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 7px, rgba(39, 67, 227, 0.045) 7px, rgba(39, 67, 227, 0.045) 8px
  );
}

.flow .private { background: var(--card); }

.flow .arrow {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--cobalt);
  font-weight: 800;
  font-size: 22px;
  border-right: 1px dashed var(--line);
}

.flow .label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.flow .bubble {
  font-size: 15px;
  line-height: 1.5;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  max-width: 34ch;
}

.flow .private .bubble {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
}

@media (max-width: 720px) {
  .flow { grid-template-columns: 1fr; }
  .flow .public, .flow .arrow { border-right: 0; border-bottom: 1px dashed var(--line); }
  .flow .arrow { padding: 10px 24px; }
}

/* ---------- Карточки ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card h3 { margin-top: 0; }

.card p { font-size: 15px; color: #3c434c; margin-bottom: 0; }

/* ---------- Таблица правил ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 15px;
  background: var(--card);
}

th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- Прочее ---------- */

.notice {
  border-left: 3px solid var(--cobalt);
  background: var(--card);
  padding: 14px 18px;
  margin: 22px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: #e7e9ed;
  padding: 1px 5px;
  border-radius: 3px;
}

a { color: var(--cobalt); }

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 72px;
  padding: 28px 0 56px;
  color: var(--muted);
  font-size: 14px;
  background: var(--card);
}

footer.site a { color: var(--muted); margin-right: 18px; }

[data-lang] { display: none; }
[data-lang].on { display: block; }

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
