/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Poppins:wght@600;700&display=swap');

/* --- CSS Variables --- */
:root {
	--bg-primary: #0d0d1a;
	--bg-secondary: #1e1e2f;
	--text-primary: #f0f0f0;
	--text-secondary: #a0a0b8;
	--accent-primary: #7f5af0;
	--accent-hover: #9877ff;

	--font-header: 'Poppins', sans-serif;
	--font-body: 'Inter', sans-serif;

	--header-height: 70px;
}

/* --- Global Styles & Reset --- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

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

ul {
	list-style: none;
}

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

img,
svg {
	max-width: 100%;
	display: block;
}

h1,
h2,
h3 {
	font-family: var(--font-header);
	font-weight: 600;
}

.container {
	max-width: 1200px;
	width: 90%;
	margin-left: auto;
	margin-right: auto;
}

/* --- Header --- */
.header {
	background-color: rgba(13, 13, 26, 0.8);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--bg-secondary);
	position: sticky;
	top: 0;
	width: 100%;
	z-index: 100;
	height: var(--header-height);
}

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

.logo {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-header);
	font-weight: 600;
	font-size: 1.25rem;
	color: var(--text-primary);
}

.header__nav-list {
	display: flex;
	align-items: center;
	gap: 32px;
}

.header__nav-link {
	color: var(--text-secondary);
	font-weight: 500;
	padding: 8px 0;
	position: relative;
}

.header__nav-link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--accent-primary);
	transition: width 0.3s ease;
}

.header__nav-link:hover {
	color: var(--text-primary);
}

/* Скрываем кнопку закрытия на десктопе */
.header__nav-close {
	display: none;
}

.header__nav-link:hover::after {
	width: 100%;
}

.header__nav-link--button {
	background-color: var(--accent-primary);
	color: var(--text-primary);
	padding: 8px 20px;
	border-radius: 6px;
	transition: background-color 0.3s ease;
}

.header__nav-link--button:hover {
	background-color: var(--accent-hover);
	color: var(--text-primary);
}

.header__nav-link--button::after {
	display: none;
}

.header__burger {
	display: none;
	background: none;
	border: none;
	color: var(--text-primary);
	cursor: pointer;
}

/* --- Footer --- */
.footer {
	background-color: var(--bg-secondary);
	padding: 60px 0;
	border-top: 1px solid rgba(160, 160, 184, 0.1);
}

.footer__container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 40px;
}

.footer__column--main {
	grid-column: span 1;
}

.footer__copyright {
	margin-top: 16px;
	font-size: 0.9rem;
	color: var(--text-secondary);
}

.footer__title {
	font-size: 1.1rem;
	margin-bottom: 16px;
	color: var(--text-primary);
}

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

.footer__link,
.footer__text {
	color: var(--text-secondary);
	font-size: 0.95rem;
}

.footer__link:hover {
	color: var(--accent-primary);
}

/* --- Mobile-first adaptivity --- */
@media (max-width: 992px) {
	.footer__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.header__nav {
		display: none; /* Will be controlled by JS */
	}

	.header__burger {
		display: block;
	}

	.footer__container {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.logo,
	.footer__list {
		justify-content: center;
	}
}

/* --- Global Styles & Reset (добавление) --- */
/* ... существующие стили ... */
body.no-scroll {
	overflow: hidden;
}

/* --- Mobile-first adaptivity (изменения и дополнения) --- */
@media (max-width: 768px) {
	.header__nav {
		/* Стили для мобильного меню */
		position: fixed;
		top: 0;
		right: 0;
		width: 85%;
		max-width: 320px;
		height: 100vh;
		background-color: var(--bg-secondary);
		z-index: 130;
		transform: translateY(-100%);
		transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
		display: flex;
		flex-direction: column;
		padding: 60px 20px 20px;
	}

	.header__nav.is-open {
		transform: translateY(0);
	}

	.header__nav-list {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		width: 100%;
	}

	.header__nav-item {
		width: 100%;
	}

	.header__nav-link {
		font-size: 1.1rem;
		padding: 12px 0;
		display: block;
		width: 100%;
	}
	.header__nav-link:hover,
	.header__nav-link:hover::after {
		width: auto; /* отключаем эффект подчеркивания на мобильных */
	}

	.header__nav-link--button {
		text-align: center;
		width: 100%;
		padding: 14px 20px;
	}

	.header__burger {
		display: block;
		z-index: 120; /* поверх всего, кроме открытого меню */
	}

	.header__nav-close {
		display: block;
		position: absolute;
		top: 20px;
		right: 20px;
		background: none;
		border: none;
		color: var(--text-primary);
		cursor: pointer;
	}

	.footer__container {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.logo,
	.footer__list {
		justify-content: center;
	}
}

/* --- Button --- */
.button {
	display: inline-block;
	background-color: var(--accent-primary);
	color: var(--text-primary);
	padding: 12px 28px;
	border-radius: 6px;
	font-family: var(--font-header);
	font-weight: 600;
	font-size: 1rem;
	text-align: center;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
	background-color: var(--accent-hover);
	transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero {
	min-height: calc(100vh - var(--header-height));
	display: flex;
	align-items: center;
	padding: 60px 0;
}

.hero__container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 60px;
}

.hero__content {
	animation: fadeIn 1s ease-out forwards;
}

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

.hero__title {
	font-size: 3rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 24px;
	min-height: 115px; /* Резервируем место под 2 строки текста */
}

/* Эффект курсора для пишущей машинки */
.hero__title::after {
	content: '|';
	font-weight: 400;
	animation: blink 1s step-end infinite;
	color: var(--accent-primary);
	margin-left: 4px;
}

@keyframes blink {
	from,
	to {
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
}

.hero__description {
	font-size: 1.1rem;
	color: var(--text-secondary);
	margin-bottom: 32px;
	max-width: 500px;
}

.hero__visual {
	display: flex;
	justify-content: center;
	align-items: center;
}

.hero__image {
	width: 100%;
	max-width: 450px;
	height: auto;
	border-radius: 12px;
	object-fit: cover;
	opacity: 0.7;
}

/* --- Адаптивность для Hero --- */
@media (max-width: 992px) {
	.hero__title {
		font-size: 2.5rem;
		min-height: 96px;
	}
}

@media (max-width: 768px) {
	.hero {
		text-align: center;
		min-height: auto;
		padding: 40px 0;
	}
	.hero__container {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.hero__content {
		order: 2;
	}

	.hero__visual {
		order: 1;
	}

	.hero__description {
		margin-left: auto;
		margin-right: auto;
	}

	.hero__title {
		font-size: 2.2rem;
		min-height: 130px; /* Больше места для переносов */
	}
}

/* --- Section Header --- */
.section-header {
	text-align: center;
	margin-bottom: 60px;
}

.section-header__title {
	font-size: 2.2rem;
	margin-bottom: 12px;
}

.section-header__subtitle {
	font-size: 1.1rem;
	color: var(--text-secondary);
	max-width: 600px;
	margin: 0 auto;
}

/* --- Solutions Section --- */
.solutions {
	padding: 80px 0;
	background-color: var(--bg-secondary);
}

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

.solutions__card {
	background-color: var(--bg-primary);
	border: 1px solid rgba(160, 160, 184, 0.1);
	border-radius: 12px;
	padding: 32px;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.solutions__card-icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 64px;
	height: 64px;
	background-color: rgba(127, 90, 240, 0.1);
	border-radius: 50%;
	margin-bottom: 24px;
}

.solutions__card-icon i {
	width: 32px;
	height: 32px;
	color: var(--accent-primary);
}

.solutions__card-title {
	font-size: 1.4rem;
	margin-bottom: 12px;
}

.solutions__card-description {
	color: var(--text-secondary);
}

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

@media (max-width: 768px) {
	.solutions {
		padding: 60px 0;
	}

	.section-header__title {
		font-size: 1.8rem;
	}
}

/* --- Process Section --- */
.process {
	padding: 80px 0;
	background-color: var(--bg-primary); /* Возвращаемся к основному фону */
}

.process__timeline {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
}

/* Центральная линия таймлайна */
.process__timeline::after {
	content: '';
	position: absolute;
	width: 3px;
	background-color: var(--bg-secondary);
	top: 0;
	bottom: 0;
	left: 50%;
	margin-left: -1.5px;
	border-radius: 3px;
}

.process__item {
	padding: 10px 40px;
	position: relative;
	width: 50%;
}

/* Размещение элементов по сторонам */
.process__item:nth-child(odd) {
	left: 0;
	padding-right: 60px; /* Отступ от центральной точки */
	text-align: right;
}

.process__item:nth-child(even) {
	left: 50%;
}

/* Иконка-точка на линии */
.process__item-icon {
	position: absolute;
	width: 50px;
	height: 50px;
	right: -25px;
	top: 50%;
	transform: translateY(-50%);
	background-color: var(--accent-primary);
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1;
	border: 4px solid var(--bg-primary);
}
.process__item-icon i {
	width: 24px;
	height: 24px;
	color: var(--text-primary);
}

.process__item:nth-child(even) .process__item-icon {
	left: -25px;
}

.process__item-content {
	padding: 20px 30px;
	background-color: var(--bg-secondary);
	border-radius: 12px;
	position: relative;
}

.process__item-title {
	font-size: 1.3rem;
	margin-bottom: 8px;
}

.process__item-description {
	color: var(--text-secondary);
	font-size: 0.95rem;
}

/* --- Адаптивность для Process --- */
@media (max-width: 768px) {
	.process__timeline::after {
		left: 25px; /* Смещаем линию влево */
	}

	.process__item {
		width: 100%;
		padding-left: 70px; /* Отступ для контента */
		padding-right: 15px;
	}

	.process__item:nth-child(odd),
	.process__item:nth-child(even) {
		left: 0;
		text-align: left;
	}

	.process__item-icon {
		left: 0;
	}

	.process__item:nth-child(even) .process__item-icon {
		left: 0;
	}
}

/* --- Stack Section --- */
.stack {
	padding: 80px 0;
	background-color: var(--bg-secondary);
}

.stack__grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 20px;
	max-width: 900px;
	margin: 0 auto;
}

.stack__item {
	background-color: var(--bg-primary);
	border: 1px solid rgba(160, 160, 184, 0.1);
	border-radius: 12px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	transition: transform 0.3s ease, border-color 0.3s ease;
}

.stack__item:hover {
	transform: translateY(-5px);
	border-color: var(--accent-primary);
}

.stack__item i {
	width: 40px;
	height: 40px;
	color: var(--text-secondary);
	transition: color 0.3s ease;
}

.stack__item:hover i {
	color: var(--accent-primary);
}

.stack__item-name {
	font-weight: 500;
	color: var(--text-primary);
}

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

@media (max-width: 576px) {
	.stack__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.stack__item {
		padding: 20px;
	}
}

/* --- Blog Section --- */
.blog {
	padding: 80px 0;
	background-color: var(--bg-primary);
}

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

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

.blog__post-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
	border-color: rgba(127, 90, 240, 0.5);
}

.blog__card-image-link {
	display: block;
	overflow: hidden;
}

.blog__card-image {
	width: 100%;
	height: 200px;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.blog__post-card:hover .blog__card-image {
	transform: scale(1.05);
}

.blog__card-content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex-grow: 1; /* Позволяет футеру ссылки прижаться к низу */
}

.blog__card-meta {
	display: flex;
	gap: 16px;
	font-size: 0.85rem;
	color: var(--text-secondary);
	margin-bottom: 12px;
}

.blog__card-category {
	color: var(--accent-primary);
	font-weight: 600;
}

.blog__card-title {
	font-size: 1.25rem;
	line-height: 1.4;
	margin-bottom: 12px;
}

.blog__card-title a {
	color: var(--text-primary);
	transition: color 0.3s ease;
}

.blog__card-title a:hover {
	color: var(--accent-primary);
}

.blog__card-excerpt {
	color: var(--text-secondary);
	font-size: 0.95rem;
	margin-bottom: 20px;
	flex-grow: 1;
}

.blog__card-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--accent-primary);
	font-weight: 600;
	align-self: flex-start; /* Прижимаем к левому краю */
	transition: gap 0.3s ease;
}

.blog__card-link:hover {
	gap: 12px;
}

.blog__card-link i {
	width: 18px;
	height: 18px;
}

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

/* --- Contact Section --- */
.contact {
	padding: 80px 0;
	background-color: var(--bg-secondary);
}

.contact__wrapper {
	max-width: 700px;
	margin: 0 auto;
	background-color: var(--bg-primary);
	padding: 40px;
	border-radius: 12px;
	border: 1px solid rgba(160, 160, 184, 0.1);
}

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

.form-group__label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: var(--text-secondary);
}

.form-group__input {
	width: 100%;
	padding: 12px 16px;
	background-color: var(--bg-secondary);
	border: 1px solid transparent;
	border-radius: 6px;
	color: var(--text-primary);
	font-size: 1rem;
	font-family: var(--font-body);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group__input::placeholder {
	color: var(--text-secondary);
	opacity: 0.7;
}

.form-group__input:focus {
	outline: none;
	border-color: var(--accent-primary);
	box-shadow: 0 0 0 3px rgba(127, 90, 240, 0.2);
}

.form-group--checkbox {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 24px;
}

.form-group__checkbox-input {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	min-width: 20px;
	border: 2px solid var(--text-secondary);
	border-radius: 4px;
	cursor: pointer;
	position: relative;
	top: 2px;
	transition: background-color 0.3s, border-color 0.3s;
}

.form-group__checkbox-input:checked {
	background-color: var(--accent-primary);
	border-color: var(--accent-primary);
}

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

.form-group__checkbox-label {
	font-size: 0.9rem;
	color: var(--text-secondary);
	line-height: 1.5;
}

.form-group__checkbox-label a {
	color: var(--accent-primary);
	text-decoration: underline;
}
.form-group__checkbox-label a:hover {
	text-decoration: none;
}

.contact__form-button {
	width: 100%;
	padding: 14px;
	margin-top: 24px;
}

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

.form-success-message i {
	width: 60px;
	height: 60px;
	color: #22c55e; /* Зеленый цвет успеха */
	margin-bottom: 20px;
}

.form-success-message__title {
	font-size: 1.8rem;
	margin-bottom: 12px;
}
.form-success-message__text {
	color: var(--text-secondary);
}

/* --- Адаптивность для Contact --- */
@media (max-width: 576px) {
	.contact__wrapper {
		padding: 24px;
	}
}

/* --- Cookie Pop-up --- */
.cookie-popup {
	position: fixed;
	bottom: 20px;
	left: 20px;
	right: 20px;
	background-color: var(--bg-secondary);
	padding: 20px 24px;
	border: 1px solid rgba(160, 160, 184, 0.1);
	border-radius: 12px;
	z-index: 200;
	max-width: 600px;
	margin: 0 auto;

	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;

	/* Скрыто по умолчанию, управляется JS */
	opacity: 0;
	transform: translateY(20px);
	pointer-events: none;
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.cookie-popup.is-shown {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.cookie-popup__text {
	font-size: 0.9rem;
	color: var(--text-secondary);
}

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

.cookie-popup__text a:hover {
	text-decoration: none;
}

.cookie-popup__button {
	padding: 8px 20px;
	flex-shrink: 0; /* Чтобы кнопка не сжималась */
}

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

/* --- Text Pages (Privacy, Terms, etc.) --- */
.pages {
	padding: 80px 0;
}

.pages .container {
	max-width: 800px; /* Вужчий контейнер для кращої читабельності */
}

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

.pages h2 {
	font-size: 1.5rem;
	font-weight: 600;
	margin-top: 40px;
	margin-bottom: 16px;
}

.pages p {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--text-secondary);
	margin-bottom: 16px;
}

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

.pages li {
	margin-bottom: 12px;
	color: var(--text-secondary);
	line-height: 1.7;
}

.pages a {
	color: var(--accent-primary);
	text-decoration: underline;
	transition: color 0.3s ease;
}

.pages a:hover {
	color: var(--accent-hover);
	text-decoration: none;
}

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

/* --- Адаптивність для Text Pages --- */
@media (max-width: 768px) {
	.pages {
		padding: 40px 0;
	}
}
