/* Страница /ai/ (ИИ-решения). Подключается только на ней, дополняет стили главной (#layout.home). */

#layout.home .ai-hero,
#layout.home .ai-pillar,
#layout.home .ai-band {
	--ink: #15171C;
	--accent: #1771F8;
	--accent-soft: #4C9BFF;
	--muted: #6B6F7A;
	--bg: #F0F0F3;
	--line: rgba(21, 23, 28, 0.1);
}

/* ================= Hero ================= */
#layout.home #direction.ai-hero {
	padding: 24px 0 0;
	text-align: left;
}

.ai-hero .panel {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
	align-items: center;
	column-gap: 40px;
	padding: 72px 64px;
	overflow: hidden;
	color: #fff;
	background:
		radial-gradient(640px 440px at 92% 0%, rgba(23, 113, 248, 0.5), transparent 70%),
		radial-gradient(520px 360px at 0% 100%, rgba(23, 113, 248, 0.2), transparent 70%),
		#15171C;
	border-radius: 40px;
}

.ai-hero .kicker {
	display: inline-block;
	margin-bottom: 28px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.82);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
}

.ai-hero .kicker i {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 10px;
	vertical-align: 1px;
	background: var(--accent-soft);
	border-radius: 50%;
	animation: ai-pulse 2s infinite;
}

#layout.home .ai-hero h1 {
	max-width: 640px;
	margin: 0 0 28px;
	font-size: 54px;
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: #fff;
}

#layout.home .ai-hero h1 span,
#layout.home .ai-hero .kicker span {
	display: inline;
}

#layout.home .ai-hero .text {
	max-width: 520px;
	font-size: 19px;
	color: rgba(255, 255, 255, 0.7);
}

#layout.home .ai-hero .text p {
	margin-bottom: 36px;
}

#layout.home .ai-hero .actions {
	margin-bottom: 0;
}

#layout.home .ai-hero .actions .btn {
	margin-bottom: 12px;
}

#layout.home .ai-hero .actions .ghost {
	padding: 17px 30px;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.4);
}

#layout.home .ai-hero .actions .ghost:hover {
	color: var(--ink);
	background: #fff;
	border-color: #fff;
}

.ai-hero .viz {
	width: 100%;
}

.ai-hero .hub {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.hub .ln {
	fill: none;
	stroke: rgba(255, 255, 255, 0.22);
	stroke-width: 1.5;
	stroke-dasharray: 3 7;
	animation: ai-dash 1.4s linear infinite;
}

.hub .pk {
	fill: var(--accent-soft);
	filter: drop-shadow(0 0 6px rgba(76, 155, 255, 0.9));
}

.hub .n rect {
	fill: rgba(255, 255, 255, 0.07);
	stroke: rgba(255, 255, 255, 0.18);
}

.hub .n circle {
	fill: var(--accent-soft);
}

.hub .n text {
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	fill: #fff;
}

.hub .core .disc {
	fill: var(--accent);
}

.hub .core .ring {
	fill: none;
	stroke: rgba(76, 155, 255, 0.55);
	stroke-width: 1.5;
	transform-box: fill-box;
	transform-origin: center;
	animation: ai-ring 2.6s ease-out infinite;
}

.hub .core text {
	font-family: inherit;
	font-size: 26px;
	font-weight: 700;
	fill: #fff;
}

/* ================= Блоки направлений ================= */
#layout.home .ai-pillar {
	padding: 56px 0;
}

#layout.home .ai-pillar.dark {
	padding: 24px 0;
}

.ai-pillar.dark .wrap {
	padding: 72px 64px;
	color: #fff;
	background:
		radial-gradient(560px 380px at 100% 0%, rgba(23, 113, 248, 0.38), transparent 70%),
		#15171C;
	border-radius: 40px;
}

.ai-pillar.light:first-of-type {
	padding-top: 96px;
}

.ai-head {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	align-items: end;
	column-gap: 56px;
	margin-bottom: 40px;
}

.ai-head .label {
	margin-bottom: 18px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

.ai-pillar.dark .ai-head .label {
	color: var(--accent-soft);
}

#layout.home .ai-head h2 {
	max-width: 640px;
	margin: 0;
	font-size: 44px;
	line-height: 1.1;
	letter-spacing: -0.03em;
}

#layout.home .ai-head .lead {
	margin: 0;
	font-size: 18px;
	line-height: 1.55;
	color: var(--muted);
}

.ai-pillar.dark .ai-head .lead {
	color: rgba(255, 255, 255, 0.68);
}

/* схема потока */
.ai-pillar .flow {
	display: flex;
	gap: 30px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}

.ai-pillar .flow li {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
}

.ai-pillar .flow li:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 100%;
	width: 30px;
	height: 2px;
	margin-top: -1px;
	background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 10px);
	background-size: 10px 2px;
	opacity: 0.6;
	animation: ai-flow 0.9s linear infinite;
}

.ai-pillar .flow span {
	display: block;
	padding: 15px 10px;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 999px;
}

.ai-pillar.dark .flow li:not(:last-child)::after {
	background-image: repeating-linear-gradient(90deg, var(--accent-soft) 0 5px, transparent 5px 10px);
}

.ai-pillar.dark .flow span {
	color: #fff;
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(255, 255, 255, 0.16);
}

/* схема «хаос -> порядок» */
.ai-pillar .compare {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin: 0 0 28px;
}

.ai-pillar .compare .side {
	padding: 28px 28px 20px;
	background: #fff;
	border-radius: 28px;
}

.ai-pillar .compare .after {
	background: linear-gradient(160deg, #fff, #EEF4FF);
	box-shadow: inset 0 0 0 1.5px rgba(23, 113, 248, 0.25);
}

.ai-pillar .compare .cap {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 8px;
}

.ai-pillar .compare .cap b {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.ai-pillar .compare .after .cap b {
	color: var(--accent);
}

.ai-pillar .compare .cap span {
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.ai-pillar .compare .viz {
	display: block;
	width: 100%;
	height: auto;
}

.compare .pl rect {
	fill: #fff;
	stroke: rgba(21, 23, 28, 0.2);
}

.compare .pl text {
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	fill: #15171C;
}

.compare .order .pl rect {
	stroke: rgba(23, 113, 248, 0.35);
}

.compare .chaos .tw {
	fill: none;
	stroke: rgba(21, 23, 28, 0.28);
	stroke-width: 1.4;
	stroke-dasharray: 2 5;
	stroke-linecap: round;
}

.compare .who circle {
	fill: #F0F0F3;
	stroke: rgba(21, 23, 28, 0.25);
	stroke-width: 1.5;
}

.compare .who circle + circle {
	fill: #15171C;
	stroke: none;
}

.compare .who path {
	fill: none;
	stroke: #15171C;
	stroke-width: 6;
	stroke-linecap: round;
}

.compare .order .ln {
	fill: none;
	stroke: rgba(23, 113, 248, 0.4);
	stroke-width: 1.8;
	stroke-dasharray: 3 7;
	animation: ai-dash 1.4s linear infinite;
}

.compare .order .pk {
	fill: var(--accent);
	filter: drop-shadow(0 0 5px rgba(23, 113, 248, 0.7));
}

.compare .core .disc {
	fill: var(--accent);
}

.compare .core .ring {
	fill: none;
	stroke: rgba(23, 113, 248, 0.5);
	stroke-width: 1.5;
	transform-box: fill-box;
	transform-origin: center;
	animation: ai-ring 2.6s ease-out infinite;
}

.compare .core text {
	font-family: inherit;
	font-size: 22px;
	font-weight: 700;
	fill: #fff;
}

/* карточки */
.ai-pillar .cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.ai-pillar .card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 330px;
	padding: 34px 32px 100px;
	background: #fff;
	border-radius: 28px;
	transition: transform 0.25s, box-shadow 0.25s;
}

.ai-pillar .card:hover {
	transform: translateY(-4px);
	box-shadow: 0 22px 50px rgba(21, 23, 28, 0.1);
}

#layout.home .ai-pillar .card h3 {
	margin: 0 0 14px;
	font-size: 23px;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

#layout.home .ai-pillar .card p {
	margin: 0;
	font-size: 16px;
	line-height: 1.55;
	color: var(--muted);
}

.ai-pillar .tags {
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 8px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}

.ai-pillar .tags li span {
	display: inline;
	padding: 0;
	background: none;
	border: 0;
}

.ai-pillar .tags li {
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #4A4E59;
	background: var(--bg);
	border-radius: 999px;
}

.ai-pillar .card .go {
	position: absolute;
	right: 26px;
	bottom: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	color: #fff;
	background: var(--ink);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}

.ai-pillar .card .go svg {
	width: 22px;
	height: 22px;
	transition: transform 0.2s;
}

.ai-pillar .card:hover .go {
	background: var(--accent);
}

.ai-pillar .card .go:hover svg {
	transform: translateX(3px);
}

.ai-pillar.dark .card {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-pillar.dark .card:hover {
	background: rgba(255, 255, 255, 0.1);
	box-shadow: none;
}

#layout.home .ai-pillar.dark .card h3 {
	color: #fff;
}

#layout.home .ai-pillar.dark .card p {
	color: rgba(255, 255, 255, 0.68);
}

.ai-pillar.dark .tags li {
	color: rgba(255, 255, 255, 0.82);
	background: rgba(255, 255, 255, 0.1);
}

.ai-pillar.dark .card .go {
	color: var(--ink);
	background: #fff;
}

.ai-pillar.dark .card:hover .go {
	color: #fff;
	background: var(--accent);
}

.ai-cta {
	margin-top: 36px;
	text-align: center;
}

.ai-cta .btn,
.ai-band .btn {
	padding: 18px 38px;
	font-size: 18px;
	font-weight: 500;
}

.ai-pillar.light .wrap {
	padding: 0 24px;
}

/* разработка и интеграции: сетка 6 колонок */
.ai-pillar .dev-cards {
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ai-pillar .dev-cards .wide {
	grid-column: span 2;
}

.ai-pillar .dev-cards .half {
	grid-column: span 3;
}

.ai-pillar .dev-cards .card {
	min-height: 290px;
}

.ai-pillar .dev-cards .tags li {
	background: transparent;
	border: 1px solid rgba(21, 23, 28, 0.18);
}

/* ================= Финальный призыв ================= */
#layout.home .ai-band {
	padding: 56px 0 24px;
}

.ai-band .box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	padding: 56px 64px;
	color: #fff;
	background: linear-gradient(120deg, #1771F8, #0B4FBF);
	border-radius: 40px;
}

#layout.home .ai-band h2 {
	max-width: 620px;
	margin: 0 0 12px;
	font-size: 38px;
	line-height: 1.12;
	letter-spacing: -0.03em;
	color: #fff;
}

#layout.home .ai-band p {
	margin: 0;
	font-size: 18px;
	color: rgba(255, 255, 255, 0.85);
}

.ai-band .btn {
	flex: 0 0 auto;
	color: var(--ink);
	background: #fff;
}

.ai-band .btn:hover {
	color: var(--ink);
	background: #E8F0FF;
}

/* ================= Анимации ================= */
@keyframes ai-pulse {
	0% { box-shadow: 0 0 0 0 rgba(76, 155, 255, 0.6); }
	70%, 100% { box-shadow: 0 0 0 10px rgba(76, 155, 255, 0); }
}

@keyframes ai-dash {
	to { stroke-dashoffset: -20; }
}

@keyframes ai-flow {
	to { background-position: 10px 0; }
}

@keyframes ai-ring {
	0% { opacity: 0.9; transform: scale(1); }
	100% { opacity: 0; transform: scale(1.45); }
}

@media (prefers-reduced-motion: reduce) {
	.ai-hero .kicker i,
	.hub .ln,
	.hub .core .ring,
	.compare .order .ln,
	.compare .core .ring,
	.ai-pillar .flow li::after { animation: none; }
	.hub .pk,
	.compare .pk { display: none; }
	.ai-pillar .card { transition: none; }
}

/* ================= Адаптив ================= */
@media (max-width: 1180px) {
	.ai-hero .panel { padding: 56px 40px; }
	#layout.home .ai-hero h1 { font-size: 42px; }
	.ai-pillar.dark .wrap { padding: 56px 40px; }
	#layout.home .ai-head h2 { font-size: 36px; }
	.ai-pillar .flow { gap: 22px; }
	.ai-pillar .flow li:not(:last-child)::after { width: 22px; }
	.ai-band .box { padding: 44px 40px; }
}

@media (max-width: 1000px) {
	.ai-hero .panel { grid-template-columns: 1fr; row-gap: 40px; border-radius: 32px; }
	.ai-hero .viz { max-width: 520px; margin: 0 auto; }
	.ai-head { grid-template-columns: 1fr; row-gap: 18px; }
	.ai-pillar .flow { flex-wrap: wrap; gap: 10px; }
	.ai-pillar .flow li { flex: 1 1 30%; }
	.ai-pillar .flow li:not(:last-child)::after { display: none; }
	.ai-pillar .compare { grid-template-columns: 1fr; }
	.ai-pillar .cards { grid-template-columns: 1fr; }
	.ai-pillar .card { min-height: 0; }
	.ai-pillar .dev-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ai-pillar .dev-cards .wide,
	.ai-pillar .dev-cards .half { grid-column: auto; }
	.ai-pillar .dev-cards .card:last-child { grid-column: 1 / -1; }
	.ai-band .box { flex-direction: column; align-items: flex-start; border-radius: 32px; }
}

@media (max-width: 620px) {
	#layout.home #direction.ai-hero { padding-top: 12px; }
	.ai-hero .panel { padding: 40px 22px; border-radius: 28px; }
	#layout.home .ai-hero h1 { font-size: 32px; }
	#layout.home .ai-hero .text { font-size: 17px; }
	#layout.home .ai-pillar { padding: 40px 0; }
	#layout.home .ai-pillar.dark { padding: 12px 0; }
	.ai-pillar.light:first-of-type { padding-top: 56px; }
	.ai-pillar.dark .wrap { padding: 40px 22px; border-radius: 28px; }
	#layout.home .ai-head h2 { font-size: 30px; }
	#layout.home .ai-head .lead { font-size: 16px; }
	.ai-pillar .compare .side { padding: 20px 16px 12px; }
	.ai-pillar .compare .cap span { font-size: 17px; }
	.ai-pillar .flow li { flex: 1 1 44%; }
	.ai-pillar .flow span { padding: 12px 8px; font-size: 14px; }
	.ai-pillar .card { padding: 28px 24px 92px; }
	.ai-pillar .dev-cards { grid-template-columns: 1fr; }
	.ai-band .box { padding: 36px 24px; border-radius: 28px; }
	#layout.home .ai-band h2 { font-size: 28px; }
	.ai-cta .btn, .ai-band .btn { width: 100%; }
}
