/* ==================== GOOGLE FONTS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap');

/* ==================== VARIABLES CSS ==================== */
:root {
	--header-height: 5rem;

	/*========== Colors ==========*/
	--primary-color: #00f5d4; /* Яркий бирюзовый */
	--body-bg-color: #0a0f18; /* Глубокий тёмно-синий */
	--container-color: #141b2b;
	--text-color: #e1e1e1; /* Светло-серый */
	--text-color-light: #a7b2c1;
	--title-color: #ffffff;
	--border-color: #3a4b67;

	/*========== Font and typography ==========*/
	--body-font: 'Inter', sans-serif;
	--title-font: 'Space Mono', monospace;

	--h1-font-size: 2.5rem;
	--h2-font-size: 1.75rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;

	/*========== Font weight ==========*/
	--font-regular: 400;
	--font-medium: 500;
	--font-bold: 700;

	/*========== z-index ==========*/
	--z-tooltip: 10;
	--z-fixed: 100;
}

/* ==================== BASE ==================== */
* {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	background-color: var(--body-bg-color);
	color: var(--text-color);
}

h1,
h2,
h3 {
	font-family: var(--title-font);
	color: var(--title-color);
	font-weight: var(--font-bold);
}

ul {
	list-style: none;
}

a {
	text-decoration: none;
	color: inherit;
}

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

/* ==================== REUSABLE CSS CLASSES ==================== */
.container {
	max-width: 1120px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 1.5rem;
}

/* ==================== HEADER & NAV ==================== */
.header {
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: var(--z-fixed);
	background-color: rgba(10, 15, 24, 0.8);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border-color);
}

.header__container {
	height: var(--header-height);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.header__logo,
.footer__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--title-font);
	font-weight: var(--font-bold);
	color: var(--title-color);
	transition: color 0.3s;
}

.header__logo-img,
.footer__logo-img {
	width: 32px;
	height: 32px;
}

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

.header__toggle {
	display: none;
	cursor: pointer;
	color: var(--title-color);
}

.nav__list {
	display: flex;
	gap: 2.5rem;
}

.nav__link {
	font-size: var(--normal-font-size);
	color: var(--text-color);
	position: relative;
	transition: color 0.3s;
}

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

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

.nav__link:hover::after {
	width: 100%;
}

.nav__close {
	display: none;
}

/* ==================== FOOTER ==================== */
.footer {
	padding: 4rem 0 2rem;
	border-top: 1px solid var(--border-color);
}

.footer__container {
	display: flex;
	flex-direction: column;
}

.footer__group {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2.5rem;
	margin-bottom: 3rem;
}

.footer__section {
	display: flex;
	flex-direction: column;
}

.footer__logo {
	margin-bottom: 1rem;
}

.footer__description {
	color: var(--text-color-light);
	font-size: var(--small-font-size);
	max-width: 250px;
}

.footer__title {
	font-size: var(--h3-font-size);
	margin-bottom: 1.5rem;
}

.footer__links {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.footer__link {
	color: var(--text-color-light);
	transition: color 0.3s, padding-left 0.3s;
}

.footer__link:hover {
	color: var(--primary-color);
	padding-left: 5px;
}

.footer__contact {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.footer__contact p {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--text-color-light);
}

.footer__contact-icon {
	width: 20px;
	height: 20px;
	color: var(--primary-color);
}

.footer__copy {
	text-align: center;
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	border-top: 1px solid var(--border-color);
	padding-top: 2rem;
}

/* ==================== MEDIA QUERIES ==================== */
@media screen and (max-width: 768px) {
	.header__toggle,
	.nav__close {
		display: block;
	}

	.nav {
		position: fixed;
		top: 0;
		right: -100%;
		background-color: var(--body-bg-color);
		width: 70%;
		height: 100vh;
		padding: 6rem 2rem 0;
		box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
		transition: right 0.4s ease;
	}

	.nav.show-menu {
		right: 0;
	}

	.nav__list {
		flex-direction: column;
		gap: 3rem;
	}

	.nav__link {
		font-size: var(--h3-font-size);
	}

	.nav__close {
		position: absolute;
		top: 1.5rem;
		right: 1.5rem;
		cursor: pointer;
	}
}

/* ==================== BUTTON ==================== */
.button {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	background-color: var(--primary-color);
	color: var(--body-bg-color);
	padding: 1rem 2rem;
	font-weight: var(--font-bold);
	border-radius: 0.5rem;
	transition: transform 0.3s, box-shadow 0.3s;
	font-family: var(--title-font);
}

.button:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 20px rgba(0, 245, 212, 0.2);
}

.button__icon {
	width: 24px;
	height: 24px;
}

/* ==================== HERO SECTION ==================== */
.hero {
	padding-top: var(--header-height); /* чтобы контент не уезжал под шапку */
}

.hero__container {
	padding-top: 4rem;
	padding-bottom: 4rem;
	min-height: 100vh;
	display: grid;
	grid-template-columns: 1fr;
	align-content: center;
	gap: 3rem;
}

.hero__title {
	font-size: 1.5rem;
	margin-bottom: 1.5rem;
	line-height: 1.3;
}

.hero__description {
	font-size: var(--normal-font-size);
	color: var(--text-color-light);
	line-height: 1.6;
	margin-bottom: 2.5rem;
	max-width: 500px;
}

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

.hero__image {
	width: 100%;
	border-radius: 1rem;
	border: 1px solid var(--border-color);
	background-color: var(--container-color);
}

/* ==================== MEDIA QUERIES (add to existing) ==================== */
@media screen and (min-width: 992px) {
	.hero__container {
		grid-template-columns: 1fr 0.8fr;
		align-items: center;
		gap: 5rem;
	}

	.hero__title {
		font-size: 2.5rem;
	}
}

/* ==================== REUSABLE SECTION STYLES ==================== */
.section {
	padding: 6rem 0 2rem;
}

.section__header {
	text-align: center;
	margin-bottom: 3rem;
}

.section__title {
	font-size: var(--h2-font-size);
	margin-bottom: 1rem;
}

.section__subtitle {
	color: var(--text-color-light);
	max-width: 600px;
	margin: 0 auto;
	line-height: 1.6;
}

/* ==================== PLATFORM SECTION ==================== */
.platform__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
}

.platform__card {
	background-color: var(--container-color);
	padding: 2.5rem 2rem;
	border: 1px solid var(--border-color);
	border-radius: 1rem;
	text-align: center;
	transition: transform 0.3s, box-shadow 0.3s;
}

.platform__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 25px rgba(0, 245, 212, 0.1);
}

.platform__card-icon {
	display: inline-flex;
	padding: 1rem;
	background-color: var(--body-bg-color);
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

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

.platform__card-title {
	font-size: var(--h3-font-size);
	margin-bottom: 0.75rem;
}

.platform__card-description {
	color: var(--text-color-light);
	font-size: var(--small-font-size);
	line-height: 1.7;
}

/* ==================== MEDIA QUERIES (add to existing) ==================== */
@media screen and (min-width: 768px) {
	.section {
		padding: 8rem 0 4rem;
	}
	.section__title {
		font-size: 2.25rem;
	}
}

/* ==================== FEATURES SECTION ==================== */
.features__grid {
	display: flex;
	flex-direction: column;
	gap: 4rem;
}

.features__item {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
}

.features__image-wrapper {
	order: 1; /* По умолчанию картинка первая */
}

.features__image {
	border-radius: 1rem;
	border: 1px solid var(--border-color);
	background-color: var(--container-color);
}

.features__content {
	order: 2; /* По умолчанию текст второй */
}

.features__title {
	font-size: var(--h2-font-size);
	margin-bottom: 1rem;
}

.features__description {
	color: var(--text-color-light);
	line-height: 1.7;
	margin-bottom: 2rem;
}

.features__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--primary-color);
	font-weight: var(--font-bold);
	transition: gap 0.3s;
}

.features__link:hover {
	gap: 0.75rem;
}

.features__link-icon {
	width: 20px;
	height: 20px;
}

/* ==================== MEDIA QUERIES (add to existing) ==================== */
@media screen and (min-width: 768px) {
	.features__item {
		grid-template-columns: 1fr 1fr;
		gap: 5rem;
	}

	/* Чередование блоков: для каждого второго .features__item */
	.features__item:nth-child(even) .features__image-wrapper {
		order: 2; /* Картинка становится второй */
	}

	.features__item:nth-child(even) .features__content {
		order: 1; /* Текст становится первым */
	}
}

/* ==================== PROCESS SECTION ==================== */
.process__timeline {
	position: relative;
	max-width: 600px;
	margin: 0 auto;
	padding: 2rem 0;
}

/* The vertical line */
.process__timeline::after {
	content: '';
	position: absolute;
	width: 3px;
	background-color: var(--border-color);
	top: 0;
	bottom: 0;
	left: 50%;
	margin-left: -1.5px;
}

.process__item {
	padding: 1rem 2rem;
	position: relative;
	width: 50%;
}

/* The circle markers */
.process__marker {
	position: absolute;
	width: 50px;
	height: 50px;
	right: -25px;
	top: 50%;
	transform: translateY(-50%);
	background-color: var(--container-color);
	border: 3px solid var(--primary-color);
	border-radius: 50%;
	z-index: var(--z-tooltip);
	display: flex;
	justify-content: center;
	align-items: center;
}

.process__number {
	font-family: var(--title-font);
	font-weight: var(--font-bold);
	font-size: 1.25rem;
	color: var(--primary-color);
}

/* Placement of the items */
.process__item:nth-child(odd) {
	left: 0;
	padding-right: 50px;
	text-align: right;
}

.process__item:nth-child(even) {
	left: 50%;
	padding-left: 50px;
	text-align: left;
}

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

.process__content {
	padding: 1rem;
	background-color: var(--container-color);
	border-radius: 0.5rem;
	border: 1px solid var(--border-color);
}

.process__title {
	font-size: var(--h3-font-size);
	margin-bottom: 0.5rem;
}

.process__description {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	line-height: 1.6;
}

/* ==================== MEDIA QUERIES (add to existing) ==================== */
@media screen and (max-width: 640px) {
	.process__timeline::after {
		left: 25px;
	}

	.process__item {
		width: 100%;
		padding-left: 60px;
		padding-right: 1rem;
	}

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

	.process__item:nth-child(even) {
		left: 0;
		padding-left: 60px;
	}

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

/* ==================== FAQ SECTION ==================== */
.faq__container {
	max-width: 700px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.faq__item {
	background-color: var(--container-color);
	border: 1px solid var(--border-color);
	border-radius: 0.5rem;
	overflow: hidden;
	transition: all 0.3s;
}

.faq__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem;
	cursor: pointer;
}

.faq__question {
	font-family: var(--body-font);
	font-size: 1.1rem;
	font-weight: var(--font-medium);
}

.faq__icon {
	width: 24px;
	height: 24px;
	color: var(--primary-color);
	transition: transform 0.4s;
}

.faq__content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.faq__answer {
	padding: 0 1.5rem;
	color: var(--text-color-light);
	line-height: 1.7;
	font-size: var(--small-font-size);
}

/* Active state for accordion */
.faq__item.active .faq__content {
	max-height: 200px; /* Adjust if content is longer */
	padding-bottom: 1.5rem;
}

.faq__item.active .faq__icon {
	transform: rotate(180deg);
}

.faq__item.active {
	border-color: var(--primary-color);
}

/* ==================== CONTACT SECTION ==================== */
.contact__container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
}

.contact__content {
	text-align: center;
}

.contact__form-group {
	position: relative;
	margin-bottom: 2rem;
}

.contact__form-input {
	width: 100%;
	padding: 1rem;
	background-color: transparent;
	border: 2px solid var(--border-color);
	border-radius: 0.5rem;
	color: var(--text-color);
	font-size: var(--normal-font-size);
	outline: none;
	transition: border-color 0.3s;
}

.contact__form-label {
	position: absolute;
	top: 1rem;
	left: 1rem;
	color: var(--text-color-light);
	background-color: var(--body-bg-color);
	padding: 0 0.25rem;
	transition: top 0.3s, font-size 0.3s;
	pointer-events: none;
}

/* Input focus styles */
.contact__form-input:focus {
	border-color: var(--primary-color);
}

.contact__form-input:focus + .contact__form-label,
.contact__form-input:not(:placeholder-shown) + .contact__form-label {
	top: -0.75rem;
	font-size: var(--small-font-size);
	color: var(--primary-color);
}

.contact__form-checkbox {
	margin-bottom: 2rem;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.contact__form-checkbox-input {
	min-width: 1em;
	min-height: 1em;
	margin-top: 0.25em;
}

.contact__form-checkbox-label {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
}

.contact__form-checkbox-label a {
	color: var(--primary-color);
	text-decoration: underline;
}

.contact__form-button {
	width: 100%;
	justify-content: center;
}

.contact__success-message {
	display: none; /* Hidden by default */
	text-align: center;
	padding: 2rem;
	border: 2px solid var(--primary-color);
	border-radius: 0.5rem;
}
.contact__success-message h3 {
	font-family: var(--title-font);
	font-size: var(--h3-font-size);
	color: var(--primary-color);
	margin-bottom: 1rem;
}

/* ==================== MEDIA QUERIES (add to existing) ==================== */
@media screen and (min-width: 992px) {
	.contact__container {
		grid-template-columns: 0.8fr 1fr;
		gap: 5rem;
		align-items: center;
	}
	.contact__content {
		text-align: left;
	}
}

/* ==================== COOKIE POP-UP ==================== */
.cookie {
	position: fixed;
	bottom: -100%; /* Initially hidden */
	left: 0;
	width: 100%;
	background-color: var(--container-color);
	border-top: 1px solid var(--border-color);
	box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
	padding: 1.5rem;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1.5rem;
	z-index: var(--z-fixed);
	transition: bottom 0.5s ease-in-out;
}

.cookie.show {
	bottom: 0;
}

.cookie__text {
	color: var(--text-color-light);
	font-size: var(--small-font-size);
	text-align: center;
}

.cookie__link {
	color: var(--primary-color);
	text-decoration: underline;
}

.cookie__button {
	padding: 0.75rem 1.5rem;
	white-space: nowrap; /* Prevent button text from wrapping */
}

/* ==================== STYLES FOR POLICY PAGES ==================== */
.pages .container {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	max-width: 800px; /* Limit line length for readability */
}

.pages h1 {
	font-size: 1.5rem;
	margin-bottom: 2rem;
	text-align: center;
}

.pages h2 {
	font-size: 1.5rem;
	margin-top: 3rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 0.5rem;
}

.pages p,
.pages li {
	line-height: 1.8;
	color: var(--text-color-light);
	margin-bottom: 1rem;
}

.pages a {
	color: var(--primary-color);
	text-decoration: underline;
	font-weight: var(--font-medium);
}

.pages ul {
	list-style-type: disc;
	padding-left: 1.5rem;
}

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

/* ==================== MEDIA QUERIES (add to existing) ==================== */
@media screen and (max-width: 576px) {
	.cookie {
		flex-direction: column;
		text-align: center;
	}
}
