/* ==================== GOOGLE FONTS ==================== */
/* Обновите эту строку в начале файла */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Roboto+Mono&family=Space+Grotesk:wght@500;700&display=swap');

/* ==================== CSS VARIABLES ==================== */
:root {
	/* Colors */
	--color-bg: #12181f;
	--color-text: #e2e8f0;
	--color-accent: #34d399;
	--color-secondary: #475569;
	--color-surface: #1e293b;

	/* Typography */
	--font-family-headings: 'Space Grotesk', sans-serif;
	--font-family-body: 'Inter', sans-serif;

	/* Other */
	--header-height: 5rem;
	--border-radius: 0.5rem;
	--transition: 0.3s ease;
}

/* ==================== BASE STYLES ==================== */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4 {
	font-family: var(--font-family-headings);
	line-height: 1.2;
	font-weight: 700;
}

ul {
	list-style: none;
}

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

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

/* ==================== REUSABLE CLASSES ==================== */
.container {
	max-width: 1120px;
	margin-inline: auto;
	padding-inline: 1rem;
}

/* ==================== LOGO ==================== */
.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-family-headings);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--color-text);
	transition: color var(--transition);
}

.logo img {
	width: 32px;
	height: 32px;
}

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

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

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

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

/* ==================== NAVIGATION ==================== */
.nav__list {
	display: flex;
	align-items: center;
	gap: 2rem;
}

.nav__link {
	position: relative;
	font-weight: 500;
	color: var(--color-text);
	transition: color var(--transition);
}

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

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

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

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

.footer__container {
	display: grid;
	gap: 2.5rem;
	grid-template-columns: repeat(1, 1fr);
}

.footer__description {
	margin-top: 1rem;
	color: #94a3b8; /* Lighter than main text */
	max-width: 250px;
}

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

.footer__list li:not(:last-child) {
	margin-bottom: 0.5rem;
}

.footer__link {
	color: #94a3b8;
	transition: color var(--transition), padding-left var(--transition);
}

.footer__link:hover {
	color: var(--color-accent);
	padding-left: 0.25rem;
}

.footer__address {
	color: #94a3b8;
	font-style: normal;
}

.footer__bottom {
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 1px solid var(--color-secondary);
	text-align: center;
	color: #94a3b8;
	font-size: 0.9rem;
}

/* ==================== MEDIA QUERIES ==================== */

/* For medium devices (tablets) */
@media screen and (min-width: 768px) {
	.footer__container {
		grid-template-columns: repeat(4, 1fr);
	}
	.footer__column--main {
		grid-column: 1 / 2;
	}
}

/* For small devices (mobile) */
@media screen and (max-width: 767px) {
	.header__burger-btn {
		display: block;
	}
	.nav {
		position: fixed;
		top: var(--header-height);
		right: -100%;
		width: 70%;
		height: calc(100vh - var(--header-height));
		background-color: var(--color-surface);
		padding: 2rem;
		transition: right var(--transition);
	}
	.nav.is-active {
		right: 0;
	}
	.nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.5rem;
	}
}

/* ==================== BUTTONS ==================== */
.btn {
	display: inline-block;
	padding: 0.8rem 2rem;
	background-color: var(--color-accent);
	color: var(--color-bg);
	border-radius: var(--border-radius);
	font-weight: 500;
	font-family: var(--font-family-headings);
	transition: transform var(--transition), box-shadow var(--transition);
	border: 2px solid var(--color-accent);
}

.btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 15px rgba(52, 211, 153, 0.2);
}

/* ==================== HERO ==================== */
.hero {
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding-top: var(--header-height);
}

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

.hero__title {
	font-size: 1.5rem; /* 40px */
	margin-bottom: 1rem;
}

.hero__description {
	font-size: 1.125rem; /* 18px */
	color: #cbd5e1; /* Lighter than main text */
	margin-bottom: 2rem;
	max-width: 500px;
}

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

.hero__code-window {
	width: 100%;
	max-width: 450px;
	background-color: var(--color-surface);
	border: 1px solid var(--color-secondary);
	border-radius: var(--border-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero__code-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem;
	border-bottom: 1px solid var(--color-secondary);
}

.hero__code-header span {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background-color: #ef4444;
}
.hero__code-header span:nth-child(2) {
	background-color: #f59e0b;
}
.hero__code-header span:nth-child(3) {
	background-color: #22c55e;
}

.hero__code-body {
	padding: 2rem 1.5rem 16rem;
	font-family: 'Roboto Mono', monospace;
	font-size: 1.1rem;
	color: var(--color-accent);
	min-height: 80px;
}

.hero__cursor {
	display: inline-block;
	background-color: var(--color-accent);
	animation: blink 1s infinite;
}

@keyframes blink {
	0%,
	100% {
		background-color: var(--color-accent);
	}
	50% {
		background-color: transparent;
	}
}

/* ==================== MEDIA QUERIES (Hero) ==================== */
@media screen and (min-width: 768px) {
	.hero__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 1024px) {
	.hero__title {
		font-size: 2.5rem; /* 56px */
	}
}

/* ==================== REUSABLE SECTION STYLES ==================== */
.section {
	padding-block: 5rem;
}

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

.section__title {
	font-size: 2.25rem; /* 36px */
	margin-bottom: 0.5rem;
}

.section__subtitle {
	font-size: 1.125rem; /* 18px */
	color: #cbd5e1;
	max-width: 600px;
	margin-inline: auto;
}

/* ==================== FORMATS SECTION ==================== */
.formats__container {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(1, 1fr);
}

.formats__card {
	background-color: var(--color-surface);
	border: 1px solid var(--color-secondary);
	border-radius: var(--border-radius);
	padding: 2rem;
	text-align: center;
	transition: transform var(--transition), box-shadow var(--transition);
}

.formats__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 8px 25px rgba(52, 211, 153, 0.15);
}

.formats__icon-wrapper {
	margin-inline: auto;
	margin-bottom: 1.5rem;
	width: 64px;
	height: 64px;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: rgba(52, 211, 153, 0.1);
	border-radius: 50%;
}

.formats__icon-wrapper i {
	width: 32px;
	height: 32px;
	color: var(--color-accent);
}

.formats__title {
	font-size: 1.25rem; /* 20px */
	margin-bottom: 0.75rem;
}

.formats__description {
	color: #94a3b8;
}

/* ==================== MEDIA QUERIES (Formats) ==================== */
@media screen and (min-width: 768px) {
	.formats__container {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ==================== TECHNOLOGIES SECTION ==================== */
.tech__container {
	display: grid;
	gap: 1.5rem;
	/* Creates a responsive grid that fits as many items as possible */
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.tech__item {
	background-color: var(--color-surface);
	border: 1px solid var(--color-secondary);
	border-radius: var(--border-radius);
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	transition: transform var(--transition);
}

.tech__item:hover {
	transform: scale(1.05);
}

/* Найдите этот блок в вашем CSS... */
.tech__logo {
	width: 48px;
	height: 48px;
	object-fit: contain;
}

/* ...и замените его на этот: */
/* Найдите этот блок... */
.tech__item i {
	font-size: 48px;
}

/* ...и замените его на этот универсальный селектор: */
.tech__item i,
.tech__item svg {
	font-size: 48px; /* Для иконок-шрифтов */
	width: 48px; /* Для SVG */
	height: 48px; /* Для SVG */
	color: #cbd5e1; /* Единый цвет для всех иконок */
}

/* Стили для .tech__item и .tech__name остаются без изменений */

.tech__name {
	font-weight: 500;
	color: #cbd5e1;
}

/* ==================== MEDIA QUERIES (Technologies) ==================== */
@media screen and (max-width: 480px) {
	.tech__container {
		grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	}
	.tech__item {
		padding: 1rem;
	}
}

/* ==================== STAGES SECTION ==================== */
.stages__container {
	position: relative;
	max-width: 800px;
	margin-inline: auto;
}

/* The vertical timeline */
.stages__container::after {
	content: '';
	position: absolute;
	width: 3px;
	background-color: var(--color-secondary);
	top: 0;
	bottom: 0;
	left: 1.5rem;
}

.stages__item {
	padding-left: 4rem;
	position: relative;
	margin-bottom: 2rem;
}

/* The circle on the timeline */
.stages__item::after {
	content: '';
	position: absolute;
	width: 20px;
	height: 20px;
	left: calc(1.5rem - 8.5px); /* Position the circle on the line */
	background-color: var(--color-bg);
	border: 3px solid var(--color-accent);
	top: -10px;
	border-radius: 50%;
	z-index: 1;
}

.stages__content {
	background-color: var(--color-surface);
	border: 1px solid var(--color-secondary);
	border-radius: var(--border-radius);
	padding: 1.5rem;
}

.stages__title {
	font-size: 1.25rem;
	color: var(--color-accent);
	margin-bottom: 0.5rem;
}

.stages__description {
	color: #94a3b8;
}

/* ==================== MEDIA QUERIES (Stages) ==================== */
@media screen and (min-width: 768px) {
	.stages__container::after {
		left: 50%;
		margin-left: -1.5px;
	}

	.stages__item {
		padding-left: 0;
		width: 50%;
	}

	/* Position items to the left */
	.stages__item:nth-child(odd) {
		left: 0;
		padding-right: 2rem;
	}

	/* Position items to the right */
	.stages__item:nth-child(even) {
		left: 50%;
		padding-left: 2rem;
	}

	.stages__item::after {
		left: calc(50% - 10px);
		margin-left: -10px; /* Center the circle */
	}
}

/* ==================== CASES SECTION ==================== */
.cases__container {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(1, 1fr);
}

.cases__card {
	background-color: var(--color-surface);
	border: 1px solid var(--color-secondary);
	border-radius: var(--border-radius);
	overflow: hidden; /* Important for image zoom effect */
	transition: transform var(--transition), box-shadow var(--transition);
}

.cases__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cases__image {
	overflow: hidden;
}

.cases__image img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform var(--transition);
}

.cases__card:hover .cases__image img {
	transform: scale(1.05);
}

.cases__content {
	padding: 1.5rem;
}

.cases__category {
	display: block;
	font-size: 0.875rem;
	color: var(--color-accent);
	margin-bottom: 0.5rem;
	font-weight: 500;
}

.cases__title {
	font-size: 1.25rem;
	margin-bottom: 0.75rem;
}

.cases__description {
	color: #94a3b8;
	margin-bottom: 1.5rem;
}

.cases__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.cases__tag {
	font-size: 0.8rem;
	background-color: var(--color-secondary);
	color: var(--color-text);
	padding: 0.25rem 0.75rem;
	border-radius: 999px; /* Pill shape */
}

/* ==================== MEDIA QUERIES (Cases) ==================== */
@media screen and (min-width: 768px) {
	.cases__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 1024px) {
	.cases__container {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ==================== CONTACT SECTION ==================== */
.contact__container {
	max-width: 600px;
	margin-inline: auto;
}

.contact__form-wrapper {
	background-color: var(--color-surface);
	padding: 2rem;
	border: 1px solid var(--color-secondary);
	border-radius: var(--border-radius);
}

.form__group {
	margin-bottom: 1.5rem;
}

.form__label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	font-size: 0.9rem;
	color: #cbd5e1;
}

.form__input {
	width: 100%;
	padding: 0.8rem 1rem;
	background-color: var(--color-bg);
	border: 1px solid var(--color-secondary);
	border-radius: var(--border-radius);
	color: var(--color-text);
	font-size: 1rem;
	transition: border-color var(--transition), box-shadow var(--transition);
}

.form__input::placeholder {
	color: #94a3b8;
}

.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: flex-start;
	gap: 0.75rem;
}

.form__checkbox {
	margin-top: 4px;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

.form__checkbox-label {
	font-size: 0.9rem;
	color: #94a3b8;
}

.form__checkbox-label a {
	color: var(--color-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.contact__btn {
	width: 100%;
	padding-block: 1rem;
	font-size: 1.1rem;
}

/* Success Message */
.form__success-message {
	text-align: center;
	padding: 2rem;
	border: 1px solid var(--color-accent);
	border-radius: var(--border-radius);
	background-color: rgba(52, 211, 153, 0.05);
}

.form__success-icon i {
	width: 48px;
	height: 48px;
	color: var(--color-accent);
	margin-bottom: 1rem;
}

.form__success-title {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

.is-hidden {
	display: none;
}

/* ==================== BUTTON MODIFIER ==================== */
.btn--small {
	padding: 0.5rem 1.25rem;
	font-size: 0.9rem;
}

/* ==================== COOKIE POP-UP ==================== */
.cookie-popup {
	position: fixed;
	bottom: 1.5rem;
	left: 1.5rem;
	right: 1.5rem;
	z-index: 200;

	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;

	background-color: var(--color-surface);
	padding: 1rem 1.5rem;
	border: 1px solid var(--color-secondary);
	border-radius: var(--border-radius);
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);

	transform: translateY(200%);
	opacity: 0;
	transition: transform 0.5s ease, opacity 0.5s ease;
}

.cookie-popup.is-visible {
	transform: translateY(0);
	opacity: 1;
}

.cookie-popup__text {
	font-size: 0.9rem;
	color: #cbd5e1;
}

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

/* On mobile, stack the button below the text */
@media screen and (max-width: 600px) {
	.cookie-popup {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
	}
}

/* ==================== GENERIC PAGES (Privacy, Terms, etc.) ==================== */
.pages {
	padding-block: calc(var(--header-height) + 3rem) 5rem;
}

.pages .container {
	max-width: 800px; /* Narrower container for better readability */
}

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

.pages h2 {
	font-size: 1.5rem;
	margin-block: 2.5rem 1rem;
}

.pages p {
	margin-bottom: 1rem;
	color: #cbd5e1;
}

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

.pages li {
	margin-bottom: 0.5rem;
	color: #cbd5e1;
}

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

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

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