/* Группа C: «Роли команды», «Быстрый старт», «Интеграции», «Сбор базы».
   Макет Figma: десктоп 130:202, 137:21330, 137:21545, 139:21547; мобильный 180:4480, 180:4821, 180:4533, 180:5024. */

.rs-roles h2, .rs-quick h2, .rs-integrations h2, .rs-builder h2 { font-size: clamp(28px, 3.4vw, 49px); }
.rs-roles .rs-head, .rs-quick .rs-head, .rs-integrations .rs-head, .rs-builder .rs-head { max-width: 996px; margin-bottom: 50px; }
.rs-roles .rs-lead, .rs-quick .rs-lead, .rs-integrations .rs-lead, .rs-builder .rs-lead { max-width: 880px; font-size: 20px; }

/* ---------- Роли ---------- */
.rs-roles-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.rs-role {
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: 385px; padding: 20px 20px 9px;
  background: var(--white); border: 1px solid var(--light); border-radius: 30px;
}
.rs-role-ic, .rs-channel-ic {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px;
  border-radius: 14px; background: var(--yellow);
}
.rs-role-ic img { display: block; width: 20px; height: 20px; }
.rs-role h3 { margin-top: 20px; font: 600 20px/1.2 var(--sans); letter-spacing: 0; }
.rs-role p { margin-top: 16px; color: var(--muted); font-size: 16px; font-weight: 300; line-height: 1.4; }
.rs-role-photo {
  display: block; width: calc(100% + 24px); max-width: none; height: 191px;
  margin: auto -12px 0; padding-top: 0; border-radius: 30px; object-fit: cover;
}
.rs-role p + .rs-role-photo { margin-top: auto; }
/* Роль и её задача: задача — главное в карточке (решение владельца 22.10.2026) */
.rs-role h3 { color: var(--muted); font-size: 15px; font-weight: 500; }
.rs-role .rs-role-task { margin: 10px 0 20px; color: var(--black); font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }

.rs-fit { max-width: 1100px; margin: 30px auto 0; text-align: center; }
.rs-fit h3 { font: 600 25px/1.2 var(--sans); letter-spacing: 0; }
.rs-fit p { max-width: 590px; margin: 12px auto 0; color: var(--muted); font-size: 16px; font-weight: 300; line-height: 1.4; }
.rs-fit-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; margin-top: 20px; list-style: none; }
.rs-fit-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 300; line-height: 1.4; text-align: left;
}
.rs-fit-list li::before {
  content: ""; flex: none; width: 20px; height: 20px;
  background: url("../../assets/intent/roles/ic-check.svg") center / 20px 20px no-repeat;
}

/* ---------- Быстрый старт ---------- */
.rs-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; list-style: none; }
.rs-step {
  display: flex; flex-direction: column;
  padding: 20px; background: var(--white); border: 1px solid var(--light); border-radius: 30px;
}
.rs-step-ill {
  display: grid; place-items: center; height: 130px;
  border: 1px solid var(--light); border-radius: 30px;
}
.rs-step-ill img { display: block; width: auto; max-height: 80px; }
.rs-step-num { margin-top: 32px; color: var(--yellow); font: 400 14px/1.2 var(--sans); }
.rs-step h3 { margin-top: 12px; font: 600 20px/1.2 var(--sans); letter-spacing: 0; }
.rs-step p { margin-top: 16px; color: var(--muted); font-size: 16px; font-weight: 300; line-height: 1.4; }

/* ---------- Интеграции ---------- */
.rs-channels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.rs-channel {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-areas: "ic name tag" "text text text";
  align-items: center; column-gap: 12px; row-gap: 20px; align-content: start;
  min-height: 160px; padding: 24px;
  background: var(--white); border: 1px solid var(--light); border-radius: 30px;
}
.rs-channel-wide { grid-column: span 2; }
.rs-channel-ic { grid-area: ic; background: var(--light); }
.rs-channel-ic-yellow { background: var(--yellow); }
.rs-channel strong { grid-area: name; min-width: 0; font: 600 20px/1.2 var(--sans); }
.rs-channel-tag {
  grid-area: tag; display: inline-flex; align-items: center; height: 28px; padding: 0 14px;
  border-radius: 999px; background: var(--light); color: var(--black); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.rs-channel-tag.is-on { background: var(--yellow); }
.rs-channel p { grid-area: text; align-self: start; color: var(--muted); font-size: 16px; font-weight: 300; line-height: 1.4; }
.rs-channel-dark { background: var(--black); border-color: var(--black); color: var(--white); }
.rs-channel-dark p { color: var(--white); }
.rs-channel-soft { background: var(--light); border-color: var(--light); }
.rs-channel-soft p { color: var(--black); }

/* ---------- Сбор базы (тёмный блок) ---------- */
.rs-builder {
  position: relative; overflow: hidden;
  width: min(1420px, calc(100% - 20px)); margin: 60px auto; padding: 64px 0 60px;
  border-radius: 30px; background: var(--black); color: var(--white);
}
.rs-builder .rs-head { position: relative; z-index: 1; }
.rs-builder .rs-lead { color: var(--dark-muted); }
.rs-builder-frame {
  position: relative; max-width: 1000px; margin: 0 auto; padding: 18px;
  overflow: hidden; border-radius: 30px; background: #e9e3d6;
}
.rs-builder-preview { display: grid; gap: 12px; color: var(--black); user-select: none; }
.rs-builder-bar { display: flex; gap: 16px; align-items: center; padding: 6px 8px; font-size: 13px; }
.rs-builder-bar span { color: var(--muted); }
.rs-builder-bar-end { margin-left: auto; }
.rs-builder-row {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border-radius: 16px; background: rgb(255 255 255 / 55%);
}
.rs-builder-row span { display: grid; gap: 4px; min-width: 0; }
.rs-builder-row b { font-size: 16px; font-weight: 600; }
.rs-builder-row small { color: var(--body); font-size: 13px; }
.rs-builder-row em {
  display: grid; place-items: center; flex: none; width: 46px; height: 46px; margin-left: auto;
  border-radius: 50%; background: var(--yellow-soft); font: 400 15px/1 var(--sans);
}
.rs-bi { flex: none; width: 46px; height: 46px; border-radius: 12px; }
.rs-bi-olive { background: #8f9a3c; }
.rs-bi-orange { background: #d98a2e; }
.rs-bi-teal { background: #3f7f74; }
.rs-bi-slate { background: #66708f; }

/* ---------- Планшет ---------- */
@media (max-width: 960px) {
  .rs-roles-grid, .rs-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-channel-tg { order: 1; }
  .rs-channel-mail { order: 2; }
  .rs-channel-bx, .rs-channel-amo, .rs-channel-api, .rs-channel-mcp { order: 3; }
}

/* ---------- Мобильный (макет 360 px) ---------- */
@media (max-width: 640px) {
  .rs-roles h2, .rs-quick h2, .rs-integrations h2, .rs-builder h2 { font-size: 28px; }
  .rs-roles .rs-head, .rs-quick .rs-head, .rs-integrations .rs-head, .rs-builder .rs-head { margin-bottom: 32px; }
  .rs-roles .rs-lead, .rs-quick .rs-lead, .rs-integrations .rs-lead, .rs-builder .rs-lead { font-size: 14px; font-weight: 300; }

  .rs-roles-grid, .rs-quick-grid, .rs-channels { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .rs-role { min-height: 0; padding: 16px; }
  .rs-role h3 { font-size: 17px; }
  .rs-role p { margin-top: 8px; font-size: 14px; }
  .rs-role .rs-role-task { margin-bottom: 0; font-size: 18px; }
  .rs-role-photo { display: none; }

  .rs-fit { margin-top: 40px; text-align: left; }
  .rs-fit h3 { font-size: 21px; }
  .rs-fit p { margin: 12px 0 0; font-size: 14px; }
  .rs-fit-list { flex-direction: column; align-items: flex-start; gap: 12px; }
  .rs-fit-list li { font-size: 14px; }

  .rs-step { padding: 16px; }
  .rs-step-ill { justify-content: start; height: auto; border: 0; border-radius: 0; }
  .rs-step-ill img { max-height: 52px; }
  .rs-step-num { margin-top: 16px; }
  .rs-step h3 { margin-top: 8px; font-size: 17px; }
  .rs-step p { margin-top: 8px; font-size: 14px; }

  .rs-channel {
    grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-areas: "ic . tag" "name name name" "text text text";
    row-gap: 0; min-height: 0; padding: 16px;
  }
  .rs-channel-wide { grid-column: auto; }
  .rs-channel strong { margin-top: 20px; font-size: 17px; }
  .rs-channel p { margin-top: 8px; font-size: 14px; }

  .rs-builder { width: 100%; padding: 48px 0 0; border-radius: 30px; }
  .rs-builder h2 em { display: block; }
  .rs-builder-frame { padding: 12px; border-radius: 24px 24px 0 0; }
  .rs-builder-preview { gap: 8px; }
  .rs-builder-row { padding: 12px; gap: 10px; }
  .rs-builder-row small { display: none; }
  .rs-builder-row b { font-size: 13px; }
  .rs-bi, .rs-builder-row em { width: 34px; height: 34px; }
  .rs-builder-bar span { display: none; }
    }
@media (max-width: 640px) { .rs-builder { margin: 40px auto; } }

/* «Кому подходит» — выделенная плашка: светлый фон, знак Интента, пункты-таблетки */
.rs-fit {
  position: relative; max-width: none; margin: 40px auto 0; padding: 48px 48px 44px;
  border: 0; border-radius: 32px; background: var(--light); text-align: center;
}
.rs-fit::before {
  content: ""; display: block; width: 38px; height: 38px; margin: 0 auto 16px;
  background: url("../../assets/intent/logo.svg") left center / auto 100% no-repeat;
}
.rs-fit h3 { font-size: 30px; }
.rs-fit p { max-width: 640px; color: var(--body); font-size: 17px; font-weight: 400; }
.rs-fit-list { gap: 12px; margin-top: 28px; }
.rs-fit-list li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px; background: var(--white);
  font-size: 16px; font-weight: 500;
}
@media (max-width: 640px) {
  .rs-fit { margin-top: 32px; padding: 32px 20px; border-radius: 24px; text-align: left; }
  .rs-fit::before { margin-left: 0; }
  .rs-fit h3 { font-size: 24px; }
  .rs-fit p { margin: 12px 0 0; font-size: 15px; }
  .rs-fit-list { align-items: stretch; }
  .rs-fit-list li { width: 100%; padding: 12px 16px; font-size: 15px; }
}

/* Линии-волны на тёмной плашке «Нет своей базы?» (Figma 139:21617, 109px от верха) */
.rs-builder { isolation: isolate; }
.rs-builder::before {
  content: ""; position: absolute; z-index: -1; top: 109px; left: 0;
  width: 100%; aspect-ratio: 1400 / 599;
  background: url("../../assets/intent/lines/builder-waves.svg") center / 100% 100% no-repeat; pointer-events: none;
}
