/* E-PEOPLES — реферальный сервис. Белая тема, бренд: #141414 + лайм #d7ff1f. */

:root {
  --ink: #141414;
  --ink-2: #3d3d3a;
  --muted: #6b6b66;
  --line: #e4e4df;
  --bg: #ffffff;
  --bg-muted: #f5f5f1;
  --lime: #d7ff1f;
  --lime-soft: #f3ffc2;
  --error: #c62828;
  --ok: #2e7d32;

  --radius: 6px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.4vw, 44px); }
h3 { font-size: 20px; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--muted); }
b { font-weight: 600; }

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

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; background: var(--lime-soft); padding: 1px 6px; border-radius: 4px; font-weight: 500; }
.visually-hidden, .hp-field {
  position: absolute !important; 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: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }

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

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { backdrop-filter: blur(8px); background: rgba(255, 255, 255, 0.82); } }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: 0.02em; text-decoration: none; margin: 0; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.site-nav a { text-decoration: none; padding: 8px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }
.site-nav .nav-cta { background: var(--ink); color: #fff; padding: 9px 16px; border-radius: var(--radius); }
.site-nav .nav-cta:hover { text-decoration: none; background: var(--ink-2); }
.nav-toggle-input, .nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; cursor: pointer; }
  .nav-toggle-input { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
  .nav-toggle-input:focus-visible + .nav-toggle { outline: 2px solid var(--ink); }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .site-nav .nav-cta { margin-top: 16px; text-align: center; border-bottom: 0; }
  .nav-toggle-input:checked ~ .site-nav { display: flex; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); transition: background-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--lime); color: var(--ink); }
.btn-primary:hover { background: #c8f000; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--bg-muted); }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.link-arrow { display: inline-block; margin-top: 16px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.link-arrow::after { content: " →"; }

/* ---------- Секции ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.section-muted { background: var(--bg-muted); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { margin-top: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px clamp(32px, 6vw, 96px); align-items: start; }
.split-head p { margin-top: 14px; max-width: 34ch; }
@media (min-width: 961px) { .split-head { position: sticky; top: 96px; } }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

.kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 60ch; margin-top: 24px; }

/* ---------- Главная: hero и два режима ---------- */
.hero-home { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 88px); }
.hero-intro { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px 48px; align-items: end; }
.hero-intro .lead { margin-top: 0; }
.hero-home h1 { font-size: clamp(36px, 5vw, 68px); letter-spacing: -0.035em; line-height: 1.03; max-width: 20ch; }
@media (max-width: 960px) { .hero-intro { grid-template-columns: 1fr; } }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(32px, 4vw, 56px); }
.mode {
  display: flex; flex-direction: column; min-height: 340px; padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--ink); border-radius: var(--radius); text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.mode:hover { transform: translateY(-3px); box-shadow: 0 6px 0 var(--ink); }
.mode-partner { background: var(--lime); }
.mode-label { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.mode-title { font-size: clamp(26px, 2.8vw, 38px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; margin-top: 20px; max-width: 16ch; }
.mode-points { display: flex; flex-direction: column; margin-top: 28px; border-top: 1px solid currentColor; }
.mode-points span { padding: 10px 0; border-bottom: 1px solid rgba(20, 20, 20, .18); }
.mode-go { display: inline-flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 32px; font-weight: 600; font-size: 18px; }
.mode:hover .mode-go .icon { transform: translateX(4px); }
.mode-go .icon { transition: transform .2s ease; }
@media (max-width: 760px) { .modes { grid-template-columns: 1fr; } .mode { min-height: 0; } }

/* Цепочка «как устроено» */
.chain { list-style: none; margin: 0; padding: 0; counter-reset: chain; }
.chain li { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); counter-increment: chain; }
.chain li:first-child { border-top: 1px solid var(--ink); }
.chain-who { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.chain-who::before { content: counter(chain, decimal-leading-zero) "  "; color: var(--ink); }
.chain-what { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.4; }
.chain li:last-child .chain-what b { background: var(--lime); padding: 0 4px; }
@media (max-width: 560px) { .chain li { grid-template-columns: 1fr; gap: 6px; } }

/* Список компаний */
/* Аватарка компании: картинка из панели или первая буква названия. */
.company-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); object-fit: contain; }
.company-avatar-empty { background: var(--bg-muted); color: var(--ink-2); font-weight: 600; font-size: 17px; line-height: 1; }
.company-avatar-32 { width: 32px; height: 32px; font-size: 15px; }
.company-avatar-48 { width: 48px; height: 48px; font-size: 20px; border-radius: 8px; }

.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ledger-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); gap: 8px 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ledger-name { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 600; font-size: 18px; }
.ledger-name a { text-decoration: none; }
.ledger-name a:hover { text-decoration: underline; }
.ledger-meta { color: var(--muted); font-size: 15px; }
.ledger-reward { justify-self: end; text-align: right; font-weight: 600; font-size: 15px; background: var(--lime-soft); padding: 2px 8px; border-radius: 4px; }
@media (max-width: 640px) {
  .ledger-row { grid-template-columns: 1fr auto; }
  .ledger-meta { grid-column: 1 / -1; grid-row: 2; }
  .ledger-about { display: none; }
}
.empty { border: 1px dashed #bdbdb6; border-radius: var(--radius); padding: 28px; color: var(--ink-2); }

/* Сценарии */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.case { padding: 24px 24px 8px 0; }
.case + .case { padding-left: 24px; border-left: 1px solid var(--line); }
.case p { margin-top: 10px; color: var(--ink-2); }
@media (max-width: 760px) {
  .cases { grid-template-columns: 1fr; }
  .case, .case + .case { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* FAQ */
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 26px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; max-width: 66ch; color: var(--ink-2); }

/* Финальный блок */
.closing { text-align: left; }
.closing-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.closing-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Внутренние страницы ---------- */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); }
.page-hero h1 { font-size: clamp(34px, 4.6vw, 60px); letter-spacing: -0.03em; line-height: 1.05; max-width: 18ch; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 960px) { .page-hero-grid { grid-template-columns: 1fr; } }

/* Пример отчёта */
.sheet { margin: 0; border: 1px solid var(--ink); border-radius: var(--radius); background: #fff; box-shadow: 8px 8px 0 var(--lime); }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--ink); font-weight: 600; font-size: 15px; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { padding: 12px 20px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sheet th:first-child, .sheet td:first-child { text-align: left; white-space: normal; }
.sheet thead th { font-size: 13px; font-weight: 500; color: var(--muted); }
.sheet tfoot th, .sheet tfoot td { font-weight: 600; border-bottom: 0; border-top: 1px solid var(--ink); }
.sheet-note { padding: 12px 20px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 420px) { .sheet th, .sheet td { padding: 10px 12px; } }

/* Нумерованные преимущества */
.numbered { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; counter-reset: num; }
.numbered li { padding: 24px 0 28px; border-top: 1px solid var(--ink); counter-increment: num; }
.numbered li::before { content: counter(num, decimal-leading-zero); display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.numbered p { margin-top: 10px; color: var(--ink-2); }
@media (max-width: 640px) { .numbered { grid-template-columns: 1fr; } }

.steps { margin: 0; padding: 0 0 0 1.4em; font-size: 19px; }
.steps li { padding: 0 0 20px 8px; }
.steps li::marker { font-weight: 600; }

/* Факты под заголовком */
.facts { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--ink); }
.facts li { flex: 1 1 120px; padding: 16px 16px 0 0; }
.facts b { display: block; font-size: 28px; letter-spacing: -0.02em; }
.facts span { font-size: 14px; color: var(--muted); }

/* Тарифы */
.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tier { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.tier-top { background: var(--lime); border-color: var(--ink); }
.tier-name { font-weight: 600; }
.tier-share { font-size: clamp(44px, 5vw, 64px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin-top: 20px; }
.tier-price { margin-top: 8px; font-weight: 500; }
.tier-note { margin-top: auto; padding-top: 24px; font-size: 14px; color: var(--ink-2); }
.tiers-foot { margin-top: 20px; max-width: 70ch; }
@media (max-width: 960px) { .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tiers { grid-template-columns: 1fr; } }

/* ---------- Формы ---------- */
.form-card { background: #fff; border: 1px solid var(--ink); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.form-title { font-size: 26px; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.req { color: var(--error); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid #c9c9c3; border-radius: var(--radius); transition: border-color .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
.field-help { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field-error { font-size: 14px; color: var(--error); margin-top: 6px; }
.field-consent .check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 4px 0; font-weight: 400; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.field-consent input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ink); cursor: pointer; }
.form-foot { margin-top: 16px; }

.notice { border: 1px solid var(--ink); background: var(--bg-muted); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.notice p + p { margin-top: 6px; }
.notice-title { font-weight: 600; margin-bottom: 4px; }
.notice-success { border-color: var(--ok); }
.notice-error { border-color: var(--error); color: var(--error); }
.notice-draft { background: var(--lime-soft); border-color: var(--ink); }

.auth { padding: clamp(48px, 8vw, 96px) 0; min-height: 70vh; }
.auth-inner { max-width: 480px; }
.auth .muted { margin-bottom: 20px; }

.cabinet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.cabinet-title { font-size: clamp(30px, 4vw, 44px); }

/* ---------- Футер ---------- */
.site-footer { border-top: 1px solid var(--ink); padding: 48px 0 56px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 5fr 3fr 4fr; gap: 32px; }
.footer-grid .brand { margin-bottom: 10px; }
.footer-nav { display: flex; flex-direction: column; gap: 0; }
.footer-nav a { text-decoration: none; display: inline-block; padding: 10px 0; }
.footer-nav a:hover { text-decoration: underline; }
.footer-grid p + p { margin-top: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Служебные страницы (политика, ошибки) ---------- */
.section-light { border-top: 0; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.legal h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 24px; }
.legal h2 { font-size: 24px; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 1.2em; }
.error-page h1 { font-size: clamp(34px, 5vw, 56px); margin-bottom: 16px; }
.error-page .btn { margin-top: 28px; }
