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

/* ====================
   CSS VARIABLES
   ==================== */
:root {
	--color-primary: #4f46e5; /* Indigo */
	--color-primary-light: #6366f1;
	--color-dark: #111827; /* Gray 900 */
	--color-text: #374151; /* Gray 700 */
	--color-text-light: #6b7280; /* Gray 500 */
	--color-bg: #f9fafb; /* Gray 50 */
	--color-white: #ffffff;
	--color-border: #e5e7eb; /* Gray 200 */

	--font-family-headings: 'Inter', sans-serif;
	--font-family-body: 'Roboto Mono', monospace;

	--header-height: 4.5rem;
	--container-width: 1120px;
	--container-padding: 1rem;
}

/* ====================
   BASE & RESET
   ==================== */
*,
*::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);
}

ul {
	list-style: none;
}

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

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

h1,
h2,
h3 {
	font-family: var(--font-family-headings);
	color: var(--color-dark);
	font-weight: 700;
}

/* ====================
   REUSABLE COMPONENTS
   ==================== */
.container {
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-padding);
	padding-right: var(--container-padding);
}

.button {
	display: inline-block;
	background-color: var(--color-primary);
	color: var(--color-white);
	padding: 0.75rem 1.5rem;
	border-radius: 0.5rem;
	font-family: var(--font-family-headings);
	font-weight: 500;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

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

.logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-family-headings);
	font-weight: 700;
	font-size: 1.5rem;
	color: var(--color-dark);
}

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

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

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

.nav__list {
	display: flex;
	align-items: center;
	gap: 2rem;
}

.nav__link {
	font-family: var(--font-family-headings);
	font-weight: 500;
	color: var(--color-text);
	position: relative;
	padding: 0.5rem 0;
}

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

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

.nav__link.button {
	padding: 0.5rem 1rem; /* Smaller padding for header button */
}

.nav__link.button:hover::after {
	width: 0;
}

/* Burger */
.burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
	background: none;
	border: none;
	z-index: 110;
}

.burger__line {
	width: 25px;
	height: 3px;
	background-color: var(--color-dark);
	border-radius: 3px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.footer__container {
	display: grid;
	gap: 3rem;
}

.footer__column--brand .footer__logo {
	margin-bottom: 1rem;
}

.footer__tagline {
	color: var(--color-text-light);
	font-size: 0.9rem;
}

.footer__title {
	font-size: 1.1rem;
	margin-bottom: 1rem;
}

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

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

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

.footer__list--contact .footer__link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.footer__icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.footer__bottom {
	margin-top: 4rem;
	padding: 1.5rem 0;
	border-top: 1px solid var(--color-border);
	text-align: center;
	font-size: 0.9rem;
	color: var(--color-text-light);
}

/* ====================
   RESPONSIVE (Mobile-First)
   ==================== */

/* Tablet */
@media screen and (min-width: 768px) {
	.footer__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Desktop */
@media screen and (min-width: 1024px) {
	.footer__container {
		grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
	}
}

/* Mobile Menu - Hidden by default on desktop */
@media screen and (max-width: 1023px) {
	.nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 70%;
		height: 100vh;
		background-color: var(--color-white);
		padding: 6rem 2rem 2rem;
		transition: right 0.4s ease-in-out;
		box-shadow: -10px 0px 30px rgba(0, 0, 0, 0.1);
	}

	.nav.is-active {
		right: 0;
	}

	.nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 2.5rem;
	}

	.nav__link {
		font-size: 1.2rem;
	}

	.burger {
		display: flex;
	}

	/* Animate burger to 'X' */
	.burger.is-active .burger__line:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}
	.burger.is-active .burger__line:nth-child(2) {
		opacity: 0;
	}
	.burger.is-active .burger__line:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}
}

/* ====================
   HERO (New Version)
   ==================== */
.hero {
	padding-top: var(--header-height);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 80vh;
	background-color: var(--color-dark);
	/* Вы можете использовать фоновое изображение. Замените placeholder.png */
	/* background-image: url('../img/placeholder.png'); */
	background-size: cover;
	background-position: center;
	color: var(--color-white);
}

.hero__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(17, 24, 39, 0.6); /* Темный оверлей для читаемости */
	z-index: 1;
}

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

.hero__title {
	font-size: 2.8rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--color-white);
	margin-bottom: 1rem;
}

.hero__title--animated {
	color: var(--color-primary-light);
	position: relative;
	display: inline-block;
}

/* Анимация курсора для эффекта печати */
.hero__title--animated::after {
	content: '|';
	display: inline-block;
	animation: blink 0.7s infinite;
	color: var(--color-primary-light);
	margin-left: 0.25rem;
}

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

.hero__description {
	font-size: 1.1rem;
	max-width: 650px;
	margin: 0 auto 2.5rem auto;
	color: rgba(255, 255, 255, 0.8);
}

/* ====================
   RESPONSIVE (Hero Section)
   ==================== */
@media screen and (min-width: 768px) {
	.hero {
		min-height: 90vh;
	}

	.hero__title {
		font-size: 4rem;
	}

	.hero__description {
		font-size: 1.25rem;
	}
}

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

.section__header {
	text-align: center;
	margin-bottom: 3rem;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

.section__title {
	font-size: 2rem;
	margin-bottom: 0.75rem;
}

.section__subtitle {
	font-size: 1.1rem;
	color: var(--color-text-light);
	line-height: 1.7;
}

/* ====================
   STAGES SECTION
   ==================== */
.stages {
	background-color: var(--color-bg);
}

.stages__grid {
	display: grid;
	gap: 1.5rem;
}

.stage-card {
	background-color: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: 0.75rem;
	padding: 2rem;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stage-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.stage-card__icon {
	display: inline-flex;
	padding: 1rem;
	background-color: #eef2ff; /* Indigo 100 */
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

.stage-card__icon svg {
	width: 32px;
	height: 32px;
	color: var(--color-primary);
}

.stage-card__title {
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
}

.stage-card__description {
	color: var(--color-text-light);
}

/* ====================
   RESPONSIVE (Stages Section)
   ==================== */
@media screen and (min-width: 576px) {
	.stages__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 992px) {
	.section {
		padding: 6rem 0;
	}

	.section__title {
		font-size: 2.5rem;
	}

	.stages__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ====================
   TECHNOLOGIES SECTION
   ==================== */
.tech {
	background-color: var(--color-white);
}

.tech__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
	max-width: 900px;
	margin: 0 auto;
}

.tech-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 2rem 1rem;
	background-color: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: 0.75rem;
	transition: transform 0.3s ease, border-color 0.3s ease;
}

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

.tech-item__icon {
	width: 48px;
	height: 48px;
	color: var(--color-primary);
}

.tech-item__name {
	font-family: var(--font-family-headings);
	font-weight: 500;
	color: var(--color-dark);
}

/* ====================
   RESPONSIVE (Technologies Section)
   ==================== */
@media screen and (min-width: 576px) {
	.tech__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media screen and (min-width: 992px) {
	.tech__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ====================
   EXAMPLES SECTION
   ==================== */
.examples {
	background-color: var(--color-bg);
}

.examples__container {
	display: flex;
	flex-direction: column;
	gap: 4rem;
}

.example-item {
	display: grid;
	gap: 2rem;
	align-items: center;
}

.example-item__image-wrapper {
	border-radius: 0.75rem;
	overflow: hidden;
	border: 1px solid var(--color-border);
}

.example-item__img {
	/* Для плейсхолдера можно задать соотношение сторон */
	aspect-ratio: 16 / 10;
	object-fit: cover;
	width: 100%;
}

.example-item__title {
	font-size: 1.75rem;
	margin-bottom: 1rem;
}

.example-item__description {
	margin-bottom: 1.5rem;
	color: var(--color-text-light);
}

.example-item__features {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.example-item__features li {
	background-color: #eef2ff; /* Indigo 100 */
	color: var(--color-primary);
	padding: 0.25rem 0.75rem;
	border-radius: 999px; /* pill shape */
	font-size: 0.875rem;
	font-family: var(--font-family-headings);
	font-weight: 500;
}

/* ====================
   RESPONSIVE (Examples Section)
   ==================== */

@media screen and (min-width: 768px) {
	.example-item {
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
	}

	/* Модификатор для "зигзаг" расположения */
	.example-item--reverse .example-item__image-wrapper {
		order: 2;
	}
}

/* ====================
   PROCESS SECTION
   ==================== */
.process {
	background-color: var(--color-white);
}

.process__container {
	display: grid;
	gap: 2rem;
	max-width: 900px;
	margin: 0 auto;
}

.process-step {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	background-color: var(--color-bg);
	padding: 2rem;
	border: 1px solid var(--color-border);
	border-radius: 0.75rem;
}

.process-step__number {
	font-size: 3rem;
	font-weight: 700;
	font-family: var(--font-family-headings);
	color: var(--color-border);
	line-height: 1;
}

.process-step__title {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

.process-step__description {
	color: var(--color-text-light);
}

/* ====================
   RESPONSIVE (Process Section)
   ==================== */
@media screen and (min-width: 768px) {
	.process__container {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}
}

/* ====================
   CONTACT SECTION
   ==================== */
.contact {
	background-color: var(--color-bg);
}

.contact__container {
	display: grid;
	gap: 3rem;
}

.contact__info-title {
	font-size: 1.75rem;
	margin-bottom: 1rem;
}

.contact__info-text {
	color: var(--color-text-light);
	margin-bottom: 2rem;
}

.contact__info-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
	color: var(--color-text);
}

.contact__info-item i {
	color: var(--color-primary);
	width: 24px;
	height: 24px;
}

.contact__form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	background: var(--color-white);
	padding: 2rem;
	border-radius: 0.75rem;
	border: 1px solid var(--color-border);
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-label {
	font-family: var(--font-family-headings);
	font-weight: 500;
	margin-bottom: 0.5rem;
	color: var(--color-dark);
}

.form-input {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 1px solid var(--color-border);
	border-radius: 0.5rem;
	font-family: var(--font-family-body);
	font-size: 1rem;
	transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-group--checkbox {
	flex-direction: row;
	align-items: flex-start;
	gap: 0.75rem;
	font-size: 0.875rem;
	color: var(--color-text-light);
}

.form-group--checkbox input {
	margin-top: 3px;
	flex-shrink: 0;
}

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

.button--full {
	width: 100%;
	justify-content: center;
	padding-top: 1rem;
	padding-bottom: 1rem;
	font-size: 1.1rem;
}

#form-message {
	padding: 1rem;
	border-radius: 0.5rem;
	text-align: center;
	display: none; /* Скрыто по умолчанию */
	margin-top: 1rem;
}

#form-message.success {
	background-color: #d1fae5; /* Green 100 */
	color: #065f46; /* Green 800 */
}

#form-message.error {
	background-color: #fee2e2; /* Red 100 */
	color: #991b1b; /* Red 800 */
}

/* ====================
   RESPONSIVE (Contact Section)
   ==================== */
@media screen and (min-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr 1.2fr;
		gap: 5rem;
	}
}

/* ====================
   COOKIE POPUP
   ==================== */
.cookie-popup {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--color-white);
	padding: 1.5rem;
	box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	z-index: 200;
	transform: translateY(100%);
	transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__text {
	color: var(--color-text-light);
	text-align: center;
}

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

.cookie-popup__button {
	padding: 0.5rem 1.5rem;
	white-space: nowrap;
}

@media screen and (min-width: 768px) {
	.cookie-popup {
		flex-direction: row;
		padding-left: calc(
			(100% - var(--container-width)) / 2 + var(--container-padding)
		);
		padding-right: calc(
			(100% - var(--container-width)) / 2 + var(--container-padding)
		);
	}

	.cookie-popup__text {
		text-align: left;
	}
}

/* ====================
   GENERIC PAGES (Privacy, Terms, etc.)
   ==================== */
.pages {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	background-color: var(--color-white);
}

.pages .container {
	max-width: 800px; /* Ограничиваем ширину для лучшей читаемости */
}

.pages h1,
.pages h2 {
	font-family: var(--font-family-headings);
	color: var(--color-dark);
	margin-bottom: 1.5rem;
}

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

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

.pages p {
	font-family: var(--font-family-body);
	font-size: 1rem;
	line-height: 1.8;
	color: var(--color-text);
	margin-bottom: 1.5rem;
}

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

.pages li {
	margin-bottom: 0.75rem;
	line-height: 1.8;
}

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

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

.pages strong {
	font-weight: 700;
	color: var(--color-dark);
}
