/* Local styles for /keysy/crm/ — page layout, icons and visual blocks */

body.case-study {
  --crm-violet: #6d50e8;
  --crm-deep: #4b23bf;
  --crm-blue: #1f78dc;
  --crm-cyan: #0f8fb4;
  --crm-magenta: #b93bb9;
}

/* ---------- Typography and wider compositions ---------- */

body.case-study h1,
body.case-study h2 {
  text-wrap: balance;
}

@media (min-width: 721px) {
  body.case-study h1 {
    font-size: clamp(30px, 3vw, 45px);
  }
}

body.case-study h3 {
  text-wrap: pretty;
}

.case-study .section-heading {
  max-width: 820px;
}

.case-study .section-heading--wide {
  max-width: 1040px;
}

.crm-sechead {
  display: grid;
  align-items: end;
  gap: 16px;
  margin-bottom: 34px;
}

.crm-sechead .section-heading {
  margin-bottom: 0;
}

.crm-sechead__note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(109, 80, 232, 0.16);
  border-radius: 999px;
  background: rgba(109, 80, 232, 0.06);
  color: var(--crm-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ---------- Icons ---------- */

.crm-ico {
  --crm-a: var(--crm-violet);
  --crm-a-bg: rgba(109, 80, 232, 0.08);
  --crm-a-bd: rgba(109, 80, 232, 0.18);
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--crm-a-bd);
  border-radius: 13px;
  color: var(--crm-a);
  background: var(--crm-a-bg);
}

.crm-ico svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crm-ico--sm {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.crm-ico--sm svg {
  width: 20px;
  height: 20px;
}

.crm-ico--xs {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.crm-ico--xs svg {
  width: 17px;
  height: 17px;
}

.crm-ico--lg {
  width: 64px;
  height: 64px;
  border-radius: 19px;
}

.crm-ico--lg svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.5;
}

.crm-ico--blue {
  --crm-a: var(--crm-blue);
  --crm-a-bg: rgba(31, 120, 220, 0.08);
  --crm-a-bd: rgba(31, 120, 220, 0.18);
}

.crm-ico--cyan {
  --crm-a: var(--crm-cyan);
  --crm-a-bg: rgba(15, 143, 180, 0.09);
  --crm-a-bd: rgba(15, 143, 180, 0.2);
}

.crm-ico--magenta {
  --crm-a: var(--crm-magenta);
  --crm-a-bg: rgba(185, 59, 185, 0.08);
  --crm-a-bd: rgba(185, 59, 185, 0.18);
}

.crm-ico--solid {
  --crm-a: #ffffff;
  --crm-a-bd: transparent;
  background: var(--gradient-brand-wide);
  box-shadow: 0 12px 26px rgba(108, 79, 231, 0.24);
}

/* ---------- Hero ---------- */

.crm-hero-media {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0;
  justify-self: center;
}

.crm-hero-media::before {
  position: absolute;
  z-index: -1;
  inset: 14% -6% -7% 6%;
  border-radius: 30px;
  background: var(--gradient-brand);
  content: "";
  opacity: 0.13;
  transform: rotate(-3deg);
}

.crm-hero-media__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.crm-hero-media__frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

.crm-hero-media figcaption {
  margin-top: 14px;
  color: var(--color-muted);
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: center;
}

.crm-hero-media__floats {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.crm-hero-chain {
  display: grid;
  gap: 10px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.crm-hero-chain li {
  display: grid;
  align-items: center;
  gap: 11px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 23, 47, 0.05);
  color: var(--color-ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
}

.crm-hero-chain__text {
  min-width: 0;
}

.crm-float {
  position: absolute;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid rgba(23, 21, 28, 0.07);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 36px rgba(31, 23, 47, 0.14);
}

.crm-float__text {
  display: grid;
  gap: 2px;
}

.crm-float__title {
  color: var(--color-ink);
  font-family: var(--rk-font-head, Montserrat, Arial, sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.crm-float__meta {
  color: var(--color-muted);
  font-size: 0.71rem;
  line-height: 1.3;
}

/* ---------- Short result tiles ---------- */

.crm-tiles {
  display: grid;
  gap: 14px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  grid-template-columns: 1fr;
}

.crm-tile {
  display: flex;
  min-width: 0;
  padding: 22px 20px;
  flex-direction: column;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  background: #ffffff;
}

.crm-tile h3 {
  margin: 16px 0 7px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.crm-tile p {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: 0.93rem;
  line-height: 1.5;
}

.crm-tile--violet {
  border-color: rgba(109, 80, 232, 0.18);
  background: linear-gradient(180deg, rgba(109, 80, 232, 0.075), rgba(109, 80, 232, 0.015));
}

.crm-tile--blue {
  border-color: rgba(31, 120, 220, 0.18);
  background: linear-gradient(180deg, rgba(31, 120, 220, 0.07), rgba(31, 120, 220, 0.015));
}

.crm-tile--cyan {
  border-color: rgba(15, 143, 180, 0.2);
  background: linear-gradient(180deg, rgba(15, 143, 180, 0.075), rgba(15, 143, 180, 0.015));
}

.crm-tile--magenta {
  border-color: rgba(185, 59, 185, 0.18);
  background: linear-gradient(180deg, rgba(185, 59, 185, 0.07), rgba(185, 59, 185, 0.015));
}

/* ---------- Task: scattered channels + problem cards ---------- */

.crm-task {
  display: grid;
  align-items: start;
  gap: 24px;
  grid-template-columns: 1fr;
}

.crm-scatter {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 22px 20px 24px;
  border: 1px solid var(--color-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 10%, rgba(109, 80, 232, 0.1), transparent 52%),
    radial-gradient(circle at 88% 88%, rgba(185, 59, 185, 0.08), transparent 46%),
    #ffffff;
  box-shadow: var(--shadow-sm);
}

.crm-scatter__label {
  margin: 0 0 16px;
  color: var(--crm-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.crm-scatter__grid {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-scatter__grid li {
  display: grid;
  align-items: center;
  gap: 11px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  padding: 13px 13px;
  border: 1px dashed rgba(109, 80, 232, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(31, 23, 47, 0.05);
  color: var(--color-ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
}

.crm-scatter__grid li:nth-child(odd) {
  transform: rotate(-1.4deg);
}

.crm-scatter__grid li:nth-child(even) {
  transform: rotate(1.2deg);
}

.crm-scatter__note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--color-line);
  color: var(--color-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.crm-problems {
  position: relative;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.crm-problem {
  display: grid;
  align-items: start;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  padding: 18px 17px;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(31, 23, 47, 0.04);
}

.crm-problem h3 {
  margin: 0 0 5px;
  font-size: 1rem;
  line-height: 1.3;
  text-wrap: balance;
}

.crm-problem p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Diagnostics panel ---------- */

.crm-diag {
  display: grid;
  align-items: start;
  gap: 28px;
  grid-template-columns: 1fr;
}

.crm-diag__aside .section-heading {
  margin-bottom: 0;
}

.crm-diag__aside .crm-ico {
  margin-bottom: 18px;
}

.crm-diag__panel {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.crm-diag__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(109, 80, 232, 0.16);
  background: linear-gradient(90deg, rgba(109, 80, 232, 0.11), rgba(15, 143, 180, 0.07));
  color: var(--crm-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-diag__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.crm-diag__list li {
  display: grid;
  align-items: center;
  gap: 13px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--color-line);
  color: var(--color-ink-soft);
  font-size: 0.93rem;
  line-height: 1.4;
}

.crm-diag__list li:first-child {
  border-top: 0;
}

.crm-diag__mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(109, 80, 232, 0.24);
  border-radius: 50%;
  color: var(--crm-violet);
  background: rgba(109, 80, 232, 0.1);
}

.crm-diag__mark svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Solution: modules around the core ---------- */

.crm-builder {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.crm-hub {
  position: relative;
  overflow: hidden;
  padding: 24px 22px;
  border-radius: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at 92% 6%, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(28, 13, 66, 0.12), rgba(28, 13, 66, 0.12)),
    var(--gradient-brand-wide);
  box-shadow: 0 18px 48px rgba(99, 61, 190, 0.2);
}

.crm-hub__label {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.crm-hub h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1.18rem;
}

.crm-hub p {
  margin: 0;
  color: rgba(255, 255, 255, 0.93);
  font-size: 0.93rem;
  line-height: 1.55;
}

.crm-hub__media {
  width: 100%;
  max-width: 260px;
  margin: 18px auto 0;
  padding: 9px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
}

.crm-hub__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
}

.crm-mod {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 20px 18px;
  flex-direction: column;
  border: 1px solid var(--color-line);
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(31, 23, 47, 0.045);
}

.crm-mod h3 {
  margin: 14px 0 6px;
  font-size: 1.02rem;
  line-height: 1.3;
  text-wrap: balance;
}

.crm-mod p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Journey ---------- */

.crm-journey-panel {
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(109, 80, 232, 0.14);
  border-radius: 26px;
  background:
    radial-gradient(circle at 6% 0%, rgba(109, 80, 232, 0.09), transparent 42%),
    radial-gradient(circle at 96% 100%, rgba(15, 143, 180, 0.09), transparent 40%),
    #ffffff;
  box-shadow: var(--shadow-sm);
}

.crm-journey {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  counter-reset: crm-journey;
  list-style: none;
  grid-template-columns: 1fr;
}

.crm-journey li {
  --jr: var(--crm-violet);
  position: relative;
  display: grid;
  align-items: start;
  gap: 13px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  padding: 18px 16px 18px;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(31, 23, 47, 0.05);
}

.crm-journey li::before {
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--jr);
  content: "";
  opacity: 0.75;
}

.crm-journey li::after {
  position: absolute;
  top: calc(100% + 2px);
  left: 34px;
  width: 9px;
  height: 9px;
  border-top: 2px solid rgba(109, 80, 232, 0.6);
  border-right: 2px solid rgba(109, 80, 232, 0.6);
  content: "";
  transform: rotate(135deg);
}

.crm-journey li:last-child::after {
  display: none;
}

.crm-journey__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crm-journey__title {
  color: var(--color-ink);
  font-family: var(--rk-font-head, Montserrat, Arial, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.crm-journey li {
  counter-increment: crm-journey;
}

.crm-journey__title::before {
  display: inline-flex;
  width: 19px;
  height: 19px;
  margin-right: 8px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--jr);
  background: rgba(109, 80, 232, 0.11);
  content: counter(crm-journey);
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: 2px;
}

.crm-journey__text {
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.crm-journey li:nth-child(3),
.crm-journey li:nth-child(4) {
  --jr: var(--crm-blue);
}

.crm-journey li:nth-child(5),
.crm-journey li:nth-child(6) {
  --jr: var(--crm-cyan);
}

.crm-journey li:nth-child(7) {
  --jr: var(--crm-magenta);
}

.crm-journey li:nth-child(3) .crm-ico,
.crm-journey li:nth-child(4) .crm-ico {
  --crm-a: var(--crm-blue);
  --crm-a-bg: rgba(31, 120, 220, 0.08);
  --crm-a-bd: rgba(31, 120, 220, 0.18);
}

.crm-journey li:nth-child(5) .crm-ico,
.crm-journey li:nth-child(6) .crm-ico {
  --crm-a: var(--crm-cyan);
  --crm-a-bg: rgba(15, 143, 180, 0.09);
  --crm-a-bd: rgba(15, 143, 180, 0.2);
}

.crm-journey li:nth-child(7) .crm-ico {
  --crm-a: var(--crm-magenta);
  --crm-a-bg: rgba(185, 59, 185, 0.08);
  --crm-a-bd: rgba(185, 59, 185, 0.18);
}

/* ---------- Implementation steps ---------- */

.crm-steps {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crm-steps li {
  position: relative;
  min-width: 0;
  padding: 18px 18px 20px;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(31, 23, 47, 0.05);
}

.crm-steps__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}

.crm-steps__num {
  display: inline-flex;
  min-width: 62px;
  padding: 6px 11px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  color: var(--crm-deep);
  background: rgba(109, 80, 232, 0.09);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.crm-steps li h3 {
  margin: 0 0 7px;
  font-size: 1.1rem;
}

.crm-steps li p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.91rem;
  line-height: 1.55;
}

.crm-steps li:nth-child(3n + 2) .crm-ico {
  --crm-a: var(--crm-blue);
  --crm-a-bg: rgba(31, 120, 220, 0.08);
  --crm-a-bd: rgba(31, 120, 220, 0.18);
}

.crm-steps li:nth-child(3n + 2) .crm-steps__num {
  color: #145aa8;
  background: rgba(31, 120, 220, 0.1);
}

.crm-steps li:nth-child(3n) .crm-ico {
  --crm-a: var(--crm-cyan);
  --crm-a-bg: rgba(15, 143, 180, 0.09);
  --crm-a-bd: rgba(15, 143, 180, 0.2);
}

.crm-steps li:nth-child(3n) .crm-steps__num {
  color: #0a6a86;
  background: rgba(15, 143, 180, 0.11);
}

/* ---------- Business outcome ---------- */

.crm-outcome {
  display: grid;
  align-items: start;
  gap: 26px;
  grid-template-columns: 1fr;
}

.crm-dash {
  overflow: hidden;
  border: 1px solid rgba(109, 80, 232, 0.18);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(31, 23, 47, 0.1);
}

.crm-dash__top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(109, 80, 232, 0.16);
  background: linear-gradient(90deg, rgba(109, 80, 232, 0.12), rgba(15, 143, 180, 0.08));
  color: var(--crm-deep);
  font-family: var(--rk-font-head, Montserrat, Arial, sans-serif);
  font-size: 0.86rem;
  font-weight: 700;
}

.crm-dash__dots {
  display: inline-flex;
  gap: 5px;
  margin-left: auto;
}

.crm-dash__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(109, 80, 232, 0.32);
}

.crm-dash__body {
  padding: 18px;
}

.crm-dash__row {
  display: grid;
  align-items: center;
  gap: 12px;
  grid-template-columns: minmax(96px, 0.4fr) minmax(0, 1fr);
  margin-bottom: 14px;
}

.crm-dash__stage {
  color: var(--color-ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.crm-dash__bar {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(109, 80, 232, 0.1);
}

.crm-dash__bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--gradient-brand);
}

.crm-dash__bar--w1 i {
  width: 88%;
}

.crm-dash__bar--w2 i {
  width: 66%;
}

.crm-dash__bar--w3 i {
  width: 48%;
}

.crm-dash__bar--w4 i {
  width: 32%;
}

.crm-dash__tasks {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 15px 0 0;
  border-top: 1px solid var(--color-line);
  list-style: none;
}

.crm-dash__tasks li {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  color: var(--color-ink-soft);
  font-size: 0.88rem;
  line-height: 1.4;
}

.crm-benefits {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crm-benefits li {
  display: grid;
  align-items: center;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--color-ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.crm-benefits li.is-key {
  padding: 15px 15px;
  border-color: rgba(109, 80, 232, 0.3);
  background: linear-gradient(180deg, rgba(109, 80, 232, 0.1), rgba(109, 80, 232, 0.02));
  box-shadow: 0 10px 26px rgba(108, 79, 231, 0.08);
  color: var(--color-ink);
  font-size: 0.96rem;
  font-weight: 600;
}

/* ---------- Control and analytics ---------- */

.crm-analytics {
  display: grid;
  align-items: center;
  gap: 26px;
  grid-template-columns: 1fr;
}

.crm-analytics__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.crm-analytics__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.crm-analytics__media figcaption {
  padding: 13px 16px;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.crm-rows {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.crm-rows li {
  display: grid;
  align-items: center;
  gap: 11px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--color-line);
  border-radius: 13px;
  background: #ffffff;
  color: var(--color-ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* ---------- FAQ heading icon and decorative dialogue ---------- */

.faq .section-heading .crm-ico {
  margin-bottom: 16px;
}

.case-study .faq__grid {
  gap: clamp(34px, 4.4vw, 62px);
}

.crm-faq-visual {
  display: none;
  gap: 12px;
  max-width: 330px;
  margin-top: 28px;
}

.crm-faq-visual__bubble {
  display: grid;
  gap: 7px;
  padding: 15px 16px;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(31, 23, 47, 0.05);
}

.crm-faq-visual__bubble i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 23, 47, 0.1);
}

.crm-faq-visual__bubble i:last-child {
  width: 64%;
}

.crm-faq-visual__bubble--q {
  border-bottom-left-radius: 6px;
}

.crm-faq-visual__bubble--a {
  margin-left: 26px;
  border-color: rgba(109, 80, 232, 0.22);
  border-bottom-right-radius: 6px;
  background: linear-gradient(180deg, rgba(109, 80, 232, 0.1), rgba(109, 80, 232, 0.02));
}

.crm-faq-visual__bubble--a i {
  background: rgba(109, 80, 232, 0.3);
}

.crm-faq-visual__bubble:last-child {
  width: 78%;
}

/* ---------- Final CTA ---------- */

.crm-cta-band {
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 5vw, 66px);
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(28, 13, 66, 0.1), rgba(28, 13, 66, 0.1)),
    var(--gradient-brand-wide);
}

.crm-cta-band__inner {
  display: grid;
  align-items: center;
  gap: 26px;
}

.crm-cta-band .section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.crm-cta-band h2,
.crm-cta-band p {
  color: #ffffff;
}

.crm-cta-band p,
.crm-cta-band .section-heading > p:not(.section-label) {
  color: rgba(255, 255, 255, 0.95);
}

.crm-cta-band .section-heading > p:not(.section-label) {
  font-size: clamp(14px, 1.15vw, 16.5px);
}

.crm-cta-band .section-label {
  color: rgba(255, 255, 255, 0.9);
}

.crm-cta-band .hero__actions {
  margin-bottom: 0;
}

.crm-cta-band .button--primary {
  color: var(--color-brand-deep);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(31, 23, 47, 0.18);
}

.crm-cta-band .button--secondary {
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background: transparent;
  box-shadow: none;
}

.crm-cta-band .button--secondary:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.crm-cta-chips {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crm-cta-chips li {
  display: grid;
  align-items: center;
  gap: 11px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  background: rgba(43, 24, 96, 0.24);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.crm-cta-chips .crm-ico {
  --crm-a: #ffffff;
  --crm-a-bg: rgba(255, 255, 255, 0.16);
  --crm-a-bd: rgba(255, 255, 255, 0.34);
}

/* ---------- Modal + form (self-contained; home-clean.js opens via data-rk-open-modal) ---------- */

body.rk-modal-open {
  overflow: hidden;
}

.rk-modal[hidden] {
  display: none;
}

.rk-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
}

.rk-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.rk-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 520px);
  max-height: min(90vh, 760px);
  padding: 28px 26px 24px;
  overflow: auto;
  flex-direction: column;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.rk-modal__dialog > p {
  margin: 0 0 10px;
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.rk-modal__title {
  margin: 0 0 8px;
  padding-right: 36px;
  color: var(--color-ink);
  font-family: var(--rk-font-head, Montserrat, Arial, sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.rk-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--color-ink);
  font-size: 24px;
  line-height: 1;
}

.rk-modal__close:hover {
  background: #f2f2f7;
}

.rk-modal__dialog form {
  display: flex;
  margin-top: 8px;
  flex-direction: column;
  gap: 0;
}

.rk-field {
  display: flex;
  margin-bottom: 12px;
  flex-direction: column;
  gap: 6px;
}

.rk-field label {
  color: var(--color-ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
}

.rk-field input,
.rk-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d9d5df;
  border-radius: 10px;
  color: var(--color-ink);
  background: #fff;
  font: inherit;
}

.rk-field textarea {
  min-height: 96px;
  resize: vertical;
}

.rk-consent {
  display: flex;
  margin: 4px 0 14px;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.rk-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.rk-consent a {
  color: var(--color-brand);
  text-decoration: underline;
}

.rk-btn {
  display: inline-flex;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.rk-btn--primary {
  width: 100%;
  color: #fff;
  background: var(--gradient-brand-wide);
}

.rk-req {
  color: #b00020;
}

/* ---------- Responsive ---------- */

@media (min-width: 721px) {
  .crm-hero-chain {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .crm-hero-chain li {
    align-items: start;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
    padding: 15px 15px 16px;
  }

  .crm-sechead {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .crm-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-problems {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-builder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-hub {
    display: grid;
    align-items: center;
    gap: 22px;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
    padding: 26px 24px;
  }

  .crm-hub__media {
    margin: 0;
  }

  .crm-journey {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-journey li::after {
    display: none;
  }

  .crm-journey li:last-child {
    grid-column: 1 / -1;
  }

  .crm-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-cta-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crm-float {
    display: inline-flex;
  }

  .crm-float--a {
    top: 14px;
    left: 14px;
  }

  .crm-float--b {
    top: 22%;
    right: 14px;
  }

  .crm-float--c {
    bottom: 24%;
    left: 14px;
  }

  .crm-float--d {
    right: 14px;
    bottom: 16px;
  }
}

@media (min-width: 981px) {
  .case-study .hero__grid {
    align-items: center;
    grid-template-columns: minmax(0, 0.99fr) minmax(0, 1.01fr);
  }

  .case-study .hero__content {
    max-width: none;
  }

  .crm-hero-media {
    justify-self: end;
  }

  .crm-faq-visual {
    display: grid;
  }

  .crm-task {
    align-items: stretch;
    gap: 44px;
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  }

  .crm-scatter {
    padding: 28px 26px 30px;
  }

  .crm-scatter__grid {
    flex: 1 1 auto;
    align-content: center;
  }

  .crm-problems::before {
    position: absolute;
    top: 50%;
    left: -44px;
    width: 44px;
    height: 0;
    border-top: 1px dashed rgba(109, 80, 232, 0.42);
    content: "";
  }

  .crm-problems::after {
    position: absolute;
    top: 50%;
    left: -47px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(109, 80, 232, 0.5);
    content: "";
    transform: translateY(-50%);
  }

  .crm-diag {
    gap: 44px;
    grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  }

  .crm-diag__aside {
    position: sticky;
    top: calc(var(--header-height) + 40px);
    padding-top: 4px;
  }

  .crm-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .crm-builder {
    gap: 18px 30px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crm-hub {
    grid-column: 2;
    grid-row: 1 / span 3;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    padding: 28px 26px;
  }

  .crm-hub__media {
    margin-top: 20px;
  }

  .crm-mod:nth-child(2) {
    grid-column: 1;
    grid-row: 1;
  }

  .crm-mod:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }

  .crm-mod:nth-child(4) {
    grid-column: 1;
    grid-row: 2;
  }

  .crm-mod:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
  }

  .crm-mod:nth-child(6) {
    grid-column: 1;
    grid-row: 3;
  }

  .crm-mod:nth-child(7) {
    grid-column: 3;
    grid-row: 3;
  }

  .crm-mod::after {
    position: absolute;
    top: 50%;
    width: 30px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(109, 80, 232, 0.12), rgba(109, 80, 232, 0.55));
    content: "";
  }

  .crm-mod:nth-child(2)::after,
  .crm-mod:nth-child(4)::after,
  .crm-mod:nth-child(6)::after {
    right: -30px;
  }

  .crm-mod:nth-child(3)::after,
  .crm-mod:nth-child(5)::after,
  .crm-mod:nth-child(7)::after {
    left: -30px;
    background: linear-gradient(270deg, rgba(109, 80, 232, 0.12), rgba(109, 80, 232, 0.55));
  }

  .crm-steps {
    gap: 0;
  }

  .crm-steps::before {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, rgba(109, 80, 232, 0.55), rgba(185, 59, 185, 0.35));
    content: "";
    transform: translateX(-50%);
  }

  .crm-steps li {
    width: calc(50% - 34px);
    margin-bottom: 22px;
  }

  .crm-steps li:nth-child(even) {
    margin-left: auto;
  }

  .crm-steps li::after {
    position: absolute;
    top: 30px;
    width: 15px;
    height: 15px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--color-brand);
    box-shadow: 0 0 0 2px rgba(109, 80, 232, 0.22);
    content: "";
  }

  .crm-steps li:nth-child(odd)::after {
    right: -42px;
  }

  .crm-steps li:nth-child(even)::after {
    left: -42px;
  }

  .crm-outcome {
    gap: 44px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
  }

  .crm-analytics {
    gap: 46px;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  }

  .crm-cta-band__inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 46px;
  }

  .crm-cta-chips {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1100px) {
  .crm-journey {
    gap: 0 26px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .crm-journey li {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 22px 16px 24px;
  }

  .crm-journey li:last-child {
    grid-column: auto;
  }

  .crm-journey li::after {
    top: 50%;
    left: auto;
    right: -19px;
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2.4px solid var(--jr);
    border-right: 2.4px solid var(--jr);
    background: none;
    opacity: 0.85;
    transform: translateY(-50%) rotate(45deg);
  }

  .crm-journey li:last-child::after {
    display: none;
  }
}

@media (min-width: 1480px) {
  .crm-float--a {
    top: 22px;
    left: -26px;
  }

  .crm-float--b {
    top: 24%;
    right: -26px;
  }

  .crm-float--c {
    bottom: 26%;
    left: -30px;
  }

  .crm-float--d {
    right: -18px;
    bottom: 18px;
  }
}

@media (hover: hover) and (min-width: 981px) {
  .crm-tile,
  .crm-problem,
  .crm-mod,
  .crm-benefits li,
  .crm-rows li {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .crm-tile:hover,
  .crm-problem:hover,
  .crm-mod:hover {
    border-color: rgba(109, 80, 232, 0.32);
    box-shadow: 0 18px 44px rgba(31, 23, 47, 0.1);
    transform: translateY(-4px);
  }

  .crm-benefits li:hover,
  .crm-rows li:hover {
    border-color: rgba(109, 80, 232, 0.28);
    box-shadow: 0 10px 26px rgba(31, 23, 47, 0.07);
  }
}

@media (max-width: 980px) {
  .crm-steps li:not(:last-child)::after {
    position: absolute;
    top: 100%;
    left: 32px;
    width: 2px;
    height: 14px;
    background: linear-gradient(to bottom, rgba(109, 80, 232, 0.5), rgba(109, 80, 232, 0.12));
    content: "";
  }

  .crm-hub__media {
    max-width: 220px;
  }
}

@media (max-width: 480px) {
  .crm-hero-media__frame {
    border-radius: 18px;
  }

  .crm-scatter__grid {
    grid-template-columns: 1fr;
  }

  .crm-scatter__grid li:nth-child(odd),
  .crm-scatter__grid li:nth-child(even) {
    transform: none;
  }

  .crm-diag__list li,
  .crm-diag__head {
    padding-inline: 14px;
  }

  .crm-dash__row {
    grid-template-columns: minmax(78px, 0.44fr) minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .crm-float {
    animation: crm-drift 7s ease-in-out infinite;
  }

  .crm-float--b {
    animation-duration: 8.5s;
    animation-delay: -1.4s;
  }

  .crm-float--c {
    animation-duration: 9.5s;
    animation-delay: -3s;
  }

  .crm-float--d {
    animation-duration: 8s;
    animation-delay: -2.2s;
  }
}

@keyframes crm-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -7px, 0);
  }
}

/* Prevent contact card text from overflowing mid breakpoints */
.rk-contact-card__body,
.rk-contact-card__title,
.rk-contact-card__value,
.rk-contact-card__note {
  min-width: 0;
  overflow-wrap: anywhere;
}
