/* --- Глобальные настройки и переменные --- */
:root {
	--font-primary: 'Inter', sans-serif;
	--font-secondary: 'Manrope', sans-serif;

	--color-bg: #111827;
	--color-text: #f3f4f6;
	--color-text-muted: #9ca3af;
	--color-accent: #34d399;
	--color-border: #4b5563;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-primary);
	background-color: var(--color-bg);
	color: var(--color-text);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.container {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

ul {
	list-style: none;
}

button {
	font-family: inherit;
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* --- Хедер --- */
.header {
	padding: 20px 0;
	border-bottom: 1px solid var(--color-border);
	position: sticky;
	top: 0;
	background-color: rgba(17, 24, 39, 0.8);
	backdrop-filter: blur(10px);
	z-index: 100;
}

.header__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-secondary);
	font-weight: 700;
	font-size: 24px;
}

.nav__list {
	display: flex;
	gap: 32px;
}

.nav__link {
	font-size: 16px;
	font-weight: 500;
	color: var(--color-text-muted);
	position: relative;
	padding: 4px 0;
}

.nav__link:hover {
	color: var(--color-text);
}

.nav__link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: var(--color-accent);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.3s ease-out;
}

.nav__link:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

.header__burger {
	display: none;
	color: var(--color-text);
}

/* --- Мобильное меню --- */
.mobile-nav {
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	background-color: var(--color-bg);
	transform: translateX(100%);
	transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
	z-index: 200;
	display: flex;
	flex-direction: column;
	padding: 20px;
}

.mobile-nav--open {
	transform: translateX(0);
}

.mobile-nav__close {
	align-self: flex-end;
	margin-bottom: 40px;
}

.mobile-nav__list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
}

.mobile-nav__link {
	font-size: 24px;
	font-weight: 600;
	font-family: var(--font-secondary);
	color: var(--color-text-muted);
}
.mobile-nav__link:hover {
	color: var(--color-accent);
}

/* --- Футер --- */
.footer {
	padding: 80px 0;
	background-color: #0c121c; /* Slightly darker than main bg */
	border-top: 1px solid var(--color-border);
}

.footer__container {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.5fr;
	gap: 40px;
}

.footer__column--brand {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
}

.footer__copyright {
	color: var(--color-text-muted);
	font-size: 14px;
	margin-top: auto;
}

.footer__title {
	font-family: var(--font-secondary);
	font-size: 18px;
	margin-bottom: 20px;
	color: var(--color-text);
}

.footer__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.footer__link,
.footer__address {
	font-size: 15px;
	color: var(--color-text-muted);
}

.footer__link:hover {
	color: var(--color-accent);
	text-decoration: underline;
}

/* --- Адаптивность --- */
@media (max-width: 992px) {
	.footer__container {
		grid-template-columns: repeat(2, 1fr);
		gap: 60px;
	}
}

@media (max-width: 768px) {
	.header__nav {
		display: none;
	}
	.header__burger {
		display: block;
	}
}

@media (max-width: 576px) {
	.footer__container {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.footer__column--brand {
		gap: 20px;
	}
}

/* --- Секция Hero --- */
.hero {
	position: relative;
	height: calc(100vh - 81px); /* Высота экрана минус высота хедера */
	min-height: 600px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	text-align: center;
}

.hero__canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.hero__container {
	position: relative;
	z-index: 2;
}

.hero__content {
	max-width: 800px;
	margin: 0 auto;
	animation: fadeIn 1.5s 0.5s ease-out forwards;
	opacity: 0;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hero__title {
	font-family: var(--font-secondary);
	font-size: 56px;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 24px;
	color: var(--color-text);
}

.hero__subtitle {
	font-size: 20px;
	line-height: 1.6;
	color: var(--color-text-muted);
	margin-bottom: 40px;
}

.btn {
	display: inline-block;
	padding: 14px 32px;
	font-family: var(--font-secondary);
	font-size: 18px;
	font-weight: 600;
	color: var(--color-bg);
	background-color: var(--color-accent);
	border-radius: 8px;
	border: 2px solid var(--color-accent);
	transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
	background-color: transparent;
	color: var(--color-accent);
	transform: translateY(-3px);
}

/* --- Адаптивность для Hero --- */
@media (max-width: 768px) {
	.hero__title {
		font-size: 42px;
	}
	.hero__subtitle {
		font-size: 18px;
	}
}

@media (max-width: 576px) {
	.hero {
		min-height: 500px;
		height: auto;
		padding: 80px 0;
	}
	.hero__title {
		font-size: 32px;
	}
	.hero__subtitle {
		font-size: 16px;
	}
	.btn {
		padding: 12px 28px;
		font-size: 16px;
	}
}

/* --- Общие стили для секций --- */
.section {
	padding: 100px 0;
}

.section-header {
	text-align: center;
	max-width: 700px;
	margin: 0 auto 60px;
}

.section-title {
	font-family: var(--font-secondary);
	font-size: 42px;
	font-weight: 700;
	margin-bottom: 16px;
}

.section-subtitle {
	font-size: 18px;
	color: var(--color-text-muted);
	line-height: 1.6;
}

/* --- Секция Направления --- */
.directions__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

.direction-card {
	background-color: #1a2333; /* Slightly lighter than bg */
	border: 1px solid var(--color-border);
	border-radius: 12px;
	padding: 40px;
	transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.direction-card:hover {
	transform: translateY(-8px);
	border-color: var(--color-accent);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.direction-card__icon {
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(52, 211, 153, 0.1);
	border-radius: 50%;
	margin-bottom: 30px;
}

.direction-card__icon i {
	width: 28px;
	height: 28px;
	color: var(--color-accent);
}

.direction-card__title {
	font-family: var(--font-secondary);
	font-size: 22px;
	font-weight: 600;
	margin-bottom: 12px;
}

.direction-card__text {
	font-size: 16px;
	color: var(--color-text-muted);
	line-height: 1.7;
}

/* --- Адаптивность для Направлений --- */
@media (max-width: 992px) {
	.directions__grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.section {
		padding: 80px 0;
	}
	.section-title {
		font-size: 36px;
	}
	.section-subtitle {
		font-size: 16px;
	}
}

/* --- Секция Аналитика --- */
.analytics {
	background-color: #0c121c; /* Slightly darker than main bg */
}

.analytics__content {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	align-items: center;
	gap: 80px;
}

/* Левая колонка: Визуализация */
.analytics__visual {
	background-color: #1a2333;
	border: 1px solid var(--color-border);
	border-radius: 12px;
	padding: 40px;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.visual__chart {
	width: 200px;
	height: 150px;
	position: relative;
	display: flex;
	justify-content: space-around;
	align-items: flex-end;
	border-bottom: 2px solid var(--color-border);
}

.visual__bar {
	width: 25px;
	background-color: var(--color-border);
	border-radius: 4px 4px 0 0;
	height: var(--height);
	animation: grow 1.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes grow {
	from {
		height: 0;
	}
	to {
		height: var(--height);
	}
}

.visual__bar--2 {
	background-color: #4f5e74;
	animation-delay: 0.2s;
}
.visual__bar--3 {
	background-color: var(--color-accent);
	animation-delay: 0.4s;
}

.visual__line {
	position: absolute;
	bottom: 50%;
	left: -10%;
	width: 120%;
	height: 2px;
	background: linear-gradient(
		90deg,
		transparent,
		var(--color-accent),
		transparent
	);
	animation: slide 2s ease-in-out infinite;
}

@keyframes slide {
	0% {
		transform: translateX(-100%);
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
	100% {
		transform: translateX(100%);
		opacity: 0;
	}
}

.visual__label {
	margin-top: 24px;
	font-family: var(--font-secondary);
	color: var(--color-text-muted);
}

/* Правая колонка: Табы */
.analytics__tabs {
	display: flex;
	gap: 10px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--color-border);
}

.analytics__tab-btn {
	padding: 12px 20px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 8px 8px 0 0;
	border: 1px solid transparent;
	border-bottom: none;
	position: relative;
	bottom: -1px;
	transition: all 0.3s ease;
}

.analytics__tab-btn:hover {
	background-color: #1a2333;
	color: var(--color-text);
}

.analytics__tab-btn--active {
	background-color: #1a2333;
	border-color: var(--color-border);
	color: var(--color-accent);
}

.analytics__panel {
	display: none;
	animation: panelFadeIn 0.6s ease;
}

@keyframes panelFadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.analytics__panel--active {
	display: block;
}

.panel__title {
	font-family: var(--font-secondary);
	font-size: 24px;
	margin-bottom: 16px;
}

.panel__text {
	font-size: 17px;
	line-height: 1.7;
	color: var(--color-text-muted);
	max-width: 500px;
}

/* Адаптивность для Аналитики */
@media (max-width: 992px) {
	.analytics__content {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.analytics__visual {
		min-height: 300px;
	}
}

@media (max-width: 576px) {
	.analytics__tabs {
		flex-direction: column;
		gap: 0;
		border-bottom: none;
	}
	.analytics__tab-btn {
		width: 100%;
		border-radius: 8px;
		margin-bottom: 8px;
		border: 1px solid var(--color-border);
	}
	.analytics__tab-btn--active {
		background-color: var(--color-accent);
		color: var(--color-bg);
		border-color: var(--color-accent);
	}
}

/* --- Секция Кейсы --- */
.cases__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

.case-card {
	background-color: #1a2333;
	border: 1px solid var(--color-border);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.case-card__image-wrapper {
	position: relative;
	height: 220px;
}

.case-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.case-card:hover .case-card__image {
	transform: scale(1.05);
}

.case-card__metric {
	position: absolute;
	top: 20px;
	right: 20px;
	background-color: var(--color-accent);
	color: var(--color-bg);
	padding: 6px 14px;
	border-radius: 30px;
	font-family: var(--font-secondary);
	font-size: 18px;
	font-weight: 700;
	backdrop-filter: blur(5px);
}

.case-card__content {
	padding: 30px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.case-card__tags {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}

.case-card__tag {
	background-color: rgba(75, 85, 99, 0.5);
	color: var(--color-text);
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
}

.case-card__title {
	font-family: var(--font-secondary);
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 12px;
	flex-grow: 1; /* Title will push text down */
}

.case-card__text {
	font-size: 15px;
	color: var(--color-text-muted);
	line-height: 1.6;
}

/* --- Адаптивность для Кейсов --- */
@media (max-width: 992px) {
	.cases__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.cases__grid {
		grid-template-columns: 1fr;
	}
}

/* --- Секция Блог --- */
.blog {
	background-color: #0c121c; /* Slightly darker than main bg */
}

.blog__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

.blog-card {
	background-color: #1a2333;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--color-border);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.blog-card__image-link {
	display: block;
	height: 220px;
	overflow: hidden;
}

.blog-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__image {
	transform: scale(1.05);
}

.blog-card__content {
	padding: 30px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.blog-card__meta {
	display: flex;
	gap: 16px;
	margin-bottom: 12px;
	font-size: 14px;
	color: var(--color-text-muted);
}

.blog-card__category {
	color: var(--color-accent);
	font-weight: 600;
}

.blog-card__title {
	font-family: var(--font-secondary);
	font-size: 20px;
	line-height: 1.4;
	font-weight: 600;
	margin-bottom: 16px;
	flex-grow: 1;
}

.blog-card__title a:hover {
	color: var(--color-accent);
}

.blog-card__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	color: var(--color-text);
	align-self: flex-start; /* Button at the bottom */
}

.blog-card__link i {
	width: 18px;
	height: 18px;
	transition: transform 0.3s ease;
}

.blog-card__link:hover {
	color: var(--color-accent);
}

.blog-card__link:hover i {
	transform: translateX(4px);
}

/* --- Адаптивность для Блога --- */
@media (max-width: 992px) {
	.blog__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.blog__grid {
		grid-template-columns: 1fr;
	}
}

/* --- Секция Контакты --- */
.contact__grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 60px;
	align-items: center;
}

.contact__form-wrapper {
	background-color: #1a2333;
	padding: 50px;
	border-radius: 12px;
	border: 1px solid var(--color-border);
}

.form-group {
	margin-bottom: 24px;
}

.form-label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 500;
	color: var(--color-text-muted);
}

.form-input {
	width: 100%;
	padding: 12px 16px;
	background-color: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	color: var(--color-text);
	font-size: 16px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
	outline: none;
	border-color: var(--color-accent);
	box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

/* Стилизация чекбокса */
.form-group--checkbox {
	display: flex;
	align-items: center;
	gap: 12px;
}

.form-checkbox {
	appearance: none;
	width: 20px;
	height: 20px;
	background-color: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: 4px;
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
}

.form-checkbox:checked {
	background-color: var(--color-accent);
	border-color: var(--color-accent);
}

.form-checkbox:checked::after {
	content: '✔';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: var(--color-bg);
	font-size: 14px;
}

.form-checkbox-label {
	font-size: 14px;
	color: var(--color-text-muted);
}
.form-checkbox-label a {
	color: var(--color-accent);
	text-decoration: underline;
}

.contact__btn {
	width: 100%;
}

/* Сообщение об успехе */
.form-success {
	display: none; /* Скрыто по умолчанию */
	text-align: center;
	padding: 40px;
}

.form-success--active {
	display: block; /* Показываем при успехе */
}

.form-success__icon {
	color: var(--color-accent);
	margin-bottom: 16px;
}
.form-success__icon i {
	width: 48px;
	height: 48px;
}
.form-success__title {
	font-family: var(--font-secondary);
	font-size: 24px;
	margin-bottom: 8px;
}
.form-success__text {
	color: var(--color-text-muted);
}

/* Правая колонка: Информация */
.contact__info {
	display: flex;
	flex-direction: column;
	gap: 30px;
}
.contact-item {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}
.contact-item__icon {
	color: var(--color-accent);
	width: 24px;
	flex-shrink: 0;
	margin-top: 4px;
}
.contact-item__title {
	font-family: var(--font-secondary);
	font-size: 18px;
	margin-bottom: 4px;
}
.contact-item__link,
.contact-item__text {
	color: var(--color-text-muted);
	font-size: 16px;
}
.contact-item__link:hover {
	color: var(--color-accent);
}

/* Адаптивность для Контактов */
@media (max-width: 992px) {
	.contact__grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}

/* --- Cookie Pop-up --- */
.cookie-popup {
	position: fixed;
	bottom: -100%; /* Initially hidden */
	left: 0;
	width: 100%;
	background-color: #1a2333;
	border-top: 1px solid var(--color-border);
	padding: 20px 0;
	z-index: 200;
	transition: bottom 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.cookie-popup--show {
	bottom: 0; /* Show the popup */
}

.cookie-popup__content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
}

.cookie-popup__text {
	color: var(--color-text-muted);
	font-size: 15px;
}

.cookie-popup__text a {
	color: var(--color-accent);
	text-decoration: underline;
}

.cookie-popup__btn {
	padding: 8px 20px;
	background-color: var(--color-accent);
	color: var(--color-bg);
	border-radius: 6px;
	font-size: 15px;
	font-weight: 500;
	white-space: nowrap;
	transition: background-color 0.3s ease;
}

.cookie-popup__btn:hover {
	background-color: #2dbf8a; /* Slightly lighter accent */
}

/* Адаптивность для Cookie Pop-up */
@media (max-width: 768px) {
	.cookie-popup__content {
		flex-direction: column;
		text-align: center;
	}
}

/* --- Стили для статичных текстовых страниц (Политики и т.д.) --- */
.pages .container {
	padding-top: 60px;
	max-width: 900px; /* Уменьшаем ширину для лучшей читабельности текста */
}

.pages h1,
.pages h2,
.pages h3 {
	font-family: var(--font-secondary);
	color: var(--color-text);
	line-height: 1.4;
}

.pages h1 {
	font-size: 1.5rem;
	margin-bottom: 32px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--color-border);
}

.pages h2 {
	font-size: 1.5rem;
	margin-top: 48px;
	margin-bottom: 20px;
}

.pages h3 {
	font-size: 22px;
	margin-top: 32px;
	margin-bottom: 16px;
}

.pages p {
	font-size: 17px;
	line-height: 1.8;
	color: var(--color-text-muted);
	margin-bottom: 20px;
}

.pages ul {
	list-style-type: disc;
	padding-left: 25px;
	margin-bottom: 20px;
}

.pages li {
	font-size: 17px;
	color: var(--color-text-muted);
	line-height: 1.8;
	margin-bottom: 12px;
}

.pages strong {
	color: var(--color-text);
	font-weight: 600;
}

.pages a {
	color: var(--color-accent);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s ease;
}

.pages a:hover {
	border-color: var(--color-accent);
}
