/* --------------------------------------------------------------------------
   Страница «Анализ и консалтинг» (page-consulting.php), 2026-10-02.
   Собрана из общих компонентов /ai-communications/ (.rcm-pains, .rcm-caps,
   .rcm-lead) и hero /platform/ (.robin-hero-*) из style.css; здесь — только
   дополнения под эту страницу с префиксом .rcn-, общие правила не меняются.
   Отдельный файл (подключается только на этом шаблоне, см. functions.php),
   чтобы не пересекаться с параллельными правками style.css.
   -------------------------------------------------------------------------- */
.rcm-pains .rcn-pains-lead {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	letter-spacing: -0.023em;
	color: var(--rcm-graphite);
}
.rcn-list-caption {
	margin: 0 0 16px;
	font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--rcm-smoke);
}
/* «от 3-х дней» — тем же шрифтом, что заголовок «Предпроектное
   обследование/консалтинг» (прямой, не курсив), но мельче заголовка. */
.rcm-pains .rcm-pains-stat-num {
	white-space: nowrap;
	font-family: var(--robin-font-head);
	font-style: normal;
	font-weight: 400;
	font-size: 30px;
	line-height: 1.08;
	letter-spacing: -0.025em;
}
@media (max-width: 639px) {
	.rcm-pains .rcm-pains-stat-num { font-size: 24px; }
}

/* Услуги — сетка 2×2 вместо 3 колонок */
.rcm-caps-grid.rcn-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rcm-caps .rcn-card-title { font-size: 26px; }
.rcm-caps .rcn-card-title + .rcm-caps-desc { margin-top: 14px; }
.rcn-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 20px;
	font-family: var(--rcm-mono);
	font-size: 13px;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: var(--rcm-accent);
	transition: gap .15s ease;
}
.rcn-link:hover { gap: 10px; }
/* Мини-схемы в широких карточках — не растягиваем на всю ширину;
   контурные иконки в узлах-результатах не заливаем (правило
   .rcm-caps-node--out circle рассчитано на точку-маркер). */
.rcn-grid-2 .rcm-caps-art { max-width: 400px; margin-left: auto; margin-right: auto; }
.rcn-grid-2 .rcm-caps-icon circle { fill: none; }

/* Этапы внедрения — лента из 5 карточек с коннекторами */
.rcn-stages {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rcn-stage {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 24px 22px;
	border: 1px solid var(--rcm-ash);
	border-radius: 24px;
	background: var(--rcm-parchment);
	transition: border-color .2s ease;
}
.rcn-stage:hover { border-color: var(--rcm-result-soft); }
.rcn-stage:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 32px;
	right: -17px;
	width: 18px;
	height: 1px;
	background: var(--rcm-accent);
}
.rcn-stage-num {
	font-family: var(--rcm-mono);
	font-size: 12px;
	letter-spacing: -0.03em;
	color: var(--rcm-accent);
}
.rcm-caps .rcn-stage-title {
	margin: 0;
	font-family: var(--robin-font-head);
	font-weight: 400;
	font-size: 20px;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--rcm-ink);
}
.rcn-stage-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rcn-stage-list li {
	position: relative;
	padding-left: 14px;
	font-size: 14px;
	line-height: 1.45;
	letter-spacing: -0.02em;
	color: var(--rcm-graphite);
}
.rcn-stage-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--rcm-accent);
}
.rcm-caps .rcn-stage-time {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: auto 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--rcm-ash);
	font-family: var(--rcm-mono);
	font-size: 12px;
	line-height: 1.3;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--rcm-ink);
}
.rcn-stage-time svg { flex-shrink: 0; color: var(--rcm-result); }

/* Результаты контроля качества */
.rcm-caps .rcn-results-title {
	max-width: 46rem;
	margin: 0 auto 40px;
	font-family: var(--robin-font-head);
	font-weight: 400;
	font-size: 30px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-align: center;
	color: var(--rcm-ink);
}
.rcn-results {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rcn-results > li {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 24px;
	border: 1px solid var(--rcm-ash);
	border-radius: 24px;
	background: #fff;
}
.rcn-results-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--rcm-mono); font-size: 12px; }
.rcn-results p {
	margin: 0;
	font-family: var(--robin-font-head);
	font-size: 18px;
	line-height: 1.35;
	letter-spacing: -0.02em;
	color: var(--rcm-ink);
}

/* Форма: заголовок слева, форма шире */
.rcm-lead.rcn-lead { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

@media (max-width: 1279px) {
	.rcn-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.rcn-stage::after { display: none; }
}
@media (max-width: 1023px) {
	.rcm-caps-grid.rcn-grid-2 { grid-template-columns: minmax(0, 1fr); }
	.rcn-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rcn-results { grid-template-columns: minmax(0, 1fr); }
	.rcm-caps .rcn-results-title { font-size: 26px; }
	.rcm-lead.rcn-lead { grid-template-columns: minmax(0, 1fr); padding: 40px 32px; }
}
@media (max-width: 639px) {
	.rcn-stages { grid-template-columns: minmax(0, 1fr); }
	.rcm-caps .rcn-card-title { font-size: 22px; }
	.rcm-caps .rcn-results-title { font-size: 22px; }
	.rcm-lead.rcn-lead { padding: 32px 20px; border-radius: 24px; }
	.rcm-lead.rcn-lead .rcm-lead-title { font-size: 30px; }
}

/* --------------------------------------------------------------------------
   Hero: ядро «лесенка этапов» (.robin-hero-core--glass) вместо красной
   сферы с графиком. 6 матовых стеклянных карточек (номер, иконка, название
   этапа) поднимаются ступенями слева направо; коралловый свет позади
   стоит за активным этапом и переезжает к следующему, пройденные этапы
   получают галочку. Образ стекла — Coral Glow Through Frosted Glass.png
   (Marketing/Site ROBIN/Photos).
     --a        — индекс активного этапа (JS; без JS — последний);
     --rx/--ry  — наклон сцены за курсором (JS).
   Состояния карточек — data-state="done|active" (JS). Без JS карточки
   нейтральные, свет за последней; при prefers-reduced-motion все этапы
   показаны пройденными, без цикла.
   На десктопе чипы на орбитах скрыты — их тексты теперь на карточках;
   на мобильных (≤640px) ядро скрыто, чипы — облако тегов, как раньше.
   -------------------------------------------------------------------------- */
@media (min-width: 641px) {
	.rcn-hero-steps .robin-hero-orbit { display: none; }
	/* Свет за активным этапом не должен резаться прямой линией: контейнер
	   не обрезает содержимое, обрезка и угасание сверху — только у колец
	   (.rcn-hero-rings). Геометрия сцены ниже держит свет внутри карточки. */
	.rcn-hero-steps.robin-hero-orbits {
		overflow: visible;
		-webkit-mask-image: none;
		mask-image: none;
	}
}
.rcn-hero-rings {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40px, #000 100%);
	mask-image: linear-gradient(to bottom, transparent 0, #000 40px, #000 100%);
}
@media (max-width: 640px) {
	.rcn-hero-rings { display: none; }
}

.robin-hero-core.robin-hero-core--glass {
	background: none;
	box-shadow: none;
	border-radius: 0;
	pointer-events: auto;
}

.rcn-glass {
	--rx: 0deg;
	--ry: 0deg;
	--step-x: 17.4%;
	--step-y: 10.5%;
	position: absolute;
	/* Сцена шире ядра (кольца остаются по центру), но уже прежних ±40%,
	   и приподнята над низом карточки — чтобы свет помещался целиком. */
	inset: 0 -24% 30% -24%;
	perspective: 1200px;
}

/* Свет позади активного этапа. */
.rcn-glass-light {
	position: absolute;
	left: calc(5.5% + var(--a) * var(--step-x));
	bottom: calc(20% + var(--a) * var(--step-y));
	width: 24%;
	aspect-ratio: 1 / 1;
	border-radius: 9999px;
	/* Цвета CTA-кнопки (.robin-btn-primary): #C72329 → #A30C33. */
	background: radial-gradient(circle, #C72329 0%, #B3152F 30%, rgba(163, 12, 51, 0.45) 52%, rgba(163, 12, 51, 0) 72%);
	filter: blur(14px);
	transform: translate(-50%, 50%);
	transition: left 0.9s cubic-bezier(0.22, 1, 0.36, 1), bottom 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.rcn-glass-light::after {
	content: '';
	position: absolute;
	inset: 22%;
	border-radius: inherit;
	background: radial-gradient(circle, #E85A60 0%, rgba(199, 35, 41, 0) 70%);
	animation: rcn-glass-breathe 3s ease-in-out infinite;
}

.rcn-glass-scene {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	transform: rotateX(calc(6deg + var(--rx))) rotateY(calc(-8deg + var(--ry)));
}

.rcn-step {
	position: absolute;
	left: calc(-5% + var(--i) * var(--step-x));
	bottom: calc(3% + var(--i) * var(--step-y));
	width: 21.5%;
	aspect-ratio: 1 / 0.82;
	color: inherit;
	text-decoration: none;
	transform-style: preserve-3d;
	transform: translateZ(calc(var(--i) * 6px));
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	animation: rcn-step-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: calc(0.15s + var(--i) * 0.08s);
}
.rcn-step[data-state="active"] {
	transform: translateZ(60px) translateY(-6%);
	z-index: 2;
}

.rcn-step-pane {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	padding: 9% 10%;
	border-radius: 14%;
	background: linear-gradient(140deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 236, 228, 0.24) 50%, rgba(255, 140, 115, 0.14) 100%);
	-webkit-backdrop-filter: blur(7px) saturate(1.5);
	backdrop-filter: blur(7px) saturate(1.5);
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.8),
		inset 0 0 0 2.5px rgba(255, 110, 85, 0.3),
		4px 3px 0 -1px rgba(255, 105, 80, 0.45),
		0 18px 34px -20px rgba(163, 12, 51, 0.4);
	overflow: hidden;
	transition: background 0.5s ease, box-shadow 0.5s ease;
}
.rcn-step[data-state="active"] .rcn-step-pane {
	background: linear-gradient(140deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 245, 240, 0.66) 55%, rgba(255, 200, 180, 0.4) 100%);
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.95),
		inset 0 0 0 2.5px rgba(255, 90, 65, 0.55),
		4px 3px 0 -1px rgba(255, 90, 65, 0.7),
		0 26px 44px -18px rgba(163, 12, 51, 0.55);
}
.rcn-step:hover .rcn-step-pane { background-color: rgba(255, 255, 255, 0.2); }

.rcn-step-head {
	display: flex;
	align-items: center;
	gap: 6px;
}
.rcn-step-num {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #c81f1a;
	opacity: 0.55;
	transition: opacity 0.4s ease;
}
.rcn-step-check {
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border-radius: 9999px;
	background: #e11d48;
	color: #fff;
	transform: scale(0);
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rcn-step-check svg { width: 12px; height: 12px; }
.rcn-step-icon {
	margin-top: auto;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.7);
	color: #e11d48;
}
.rcn-step-icon svg { width: 15px; height: 15px; }
.rcn-step-title {
	margin-top: 6px;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.25;
	color: #4b5563;
	transition: color 0.4s ease;
}
.rcn-step[data-state="active"] .rcn-step-num,
.rcn-step[data-state="done"] .rcn-step-num { opacity: 1; }
.rcn-step[data-state="active"] .rcn-step-title { color: #111827; }
.rcn-step[data-state="done"] .rcn-step-check { transform: scale(1); }

@media (min-width: 1100px) {
	.rcn-step-title { font-size: 13.5px; }
}
/* Правый край каждой карточки, кроме последней, накрыт следующей ступенью —
   подпись переносится раньше, чтобы не уходить под соседнее стекло. */
.rcn-step:not(:last-child) .rcn-step-title { max-width: 86%; }

@keyframes rcn-step-in {
	from { opacity: 0; translate: -18% 18%; }
	to   { opacity: 1; translate: 0 0; }
}
@keyframes rcn-glass-breathe {
	0%, 100% { opacity: 0.55; transform: scale(0.9); }
	50%      { opacity: 1; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
	.rcn-step,
	.rcn-glass-light::after { animation: none; }
	.rcn-glass-light { transition: none; }
}
