/* ==================== GOOGLE FONTS ==================== */
/* Included via <link> in HTML */

/* ==================== CSS VARIABLES ==================== */
:root {
	/* Colors */
	--color-bg: #0d1117;
	--color-text: #e6edf3;
	--color-primary: #2f81f7;
	--color-secondary: #30363d;
	--color-success: #3fb950;
	--color-border: #30363d;

	/* Fonts */
	--font-family-headings: 'Onest', sans-serif;
	--font-family-body: 'Manrope', sans-serif;

	/* Other */
	--container-width: 1240px;
	--radius: 8px;
	--transition: 0.3s ease;
}

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

html {
	scroll-behavior: smooth;
}

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

a {
	text-decoration: none;
	color: inherit;
	transition: color var(--transition);
}

ul {
	list-style: none;
}

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

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

.container {
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

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

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

.header__logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.header__logo img {
	height: 32px;
	width: auto;
}

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

.header__nav-link {
	font-weight: 500;
	position: relative;
	padding: 0.5rem 0;
}

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

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

.header__nav-link--cta {
	background-color: var(--color-primary);
	color: #fff;
	padding: 0.5rem 1.25rem;
	border-radius: var(--radius);
	border: 1px solid var(--color-primary);
	transition: background-color var(--transition), color var(--transition);
}

.header__nav-link--cta:hover {
	background-color: transparent;
	color: var(--color-primary);
}

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

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

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

.footer__container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 3rem;
	padding-bottom: 4rem;
}

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

.footer__logo img {
	height: 36px;
	margin-bottom: 1rem;
}

.footer__tagline {
	color: #8b949e;
}

.footer__title {
	font-size: 1.1rem;
	margin-bottom: 1.5rem;
	font-weight: 500;
}

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

.footer__link {
	color: #8b949e;
}

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

.footer__list--contact li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.footer__icon {
	flex-shrink: 0;
	margin-top: 4px;
	width: 16px;
	height: 16px;
	color: var(--color-success);
}

.footer__text {
	color: #8b949e;
}

.footer__bottom {
	border-top: 1px solid var(--color-border);
	padding: 1.5rem 0;
}

.footer__bottom-container {
	text-align: center;
	color: #8b949e;
	font-size: 0.9rem;
}

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

@media (max-width: 768px) {
	.header__nav {
		position: fixed;
		top: 5rem; /* height of header */
		right: -100%;
		width: 100%;
		height: calc(100vh - 5rem);
		background-color: var(--color-bg);
		transition: right var(--transition);
		padding: 2rem;
	}

	.header__nav--open {
		right: 0;
	}

	.header__nav-list {
		flex-direction: column;
		align-items: center;
		gap: 2.5rem;
	}

	.header__nav-link {
		font-size: 1.2rem;
	}

	.header__burger {
		display: block;
	}
}

@media (max-width: 576px) {
	.footer__container {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.footer__list--contact li {
		justify-content: center;
	}
	.footer__column--brand {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
}

/* ==================== BUTTON ==================== */
.button {
	display: inline-block;
	padding: 0.9rem 2.5rem;
	font-family: var(--font-family-headings);
	font-weight: 500;
	font-size: 1rem;
	color: #fff;
	background-color: var(--color-primary);
	border: 2px solid var(--color-primary);
	border-radius: var(--radius);
	cursor: pointer;
	transition: background-color var(--transition), color var(--transition),
		transform var(--transition);
	text-align: center;
}

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

/* ==================== HERO ==================== */
.hero {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden; /* Важно для canvas */
	padding-top: 5rem; /* Отступ от хедера */
}

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

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

.hero__content {
	max-width: 800px;
	margin: 0 auto;
}

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

.hero__subtitle {
	font-size: 1.2rem;
	color: #8b949e;
	max-width: 650px;
	margin: 0 auto 2.5rem;
}

.hero__cta {
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(47, 129, 247, 0.7);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(47, 129, 247, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(47, 129, 247, 0);
	}
}

/* ==================== RESPONSIVENESS (Hero Section) ==================== */
@media (max-width: 768px) {
	.hero__title {
		font-size: 2.5rem;
	}

	.hero__subtitle {
		font-size: 1rem;
	}
}

@media (max-width: 576px) {
	.hero {
		min-height: 80vh;
	}
	.hero__title {
		font-size: 2rem;
	}
}

/* ==================== REUSABLE SECTION STYLES ==================== */
.section {
	padding-top: 6rem;
	padding-bottom: 6rem;
}

.section__header {
	text-align: center;
	max-width: 700px;
	margin: 0 auto 4rem;
}

.section__title {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.section__subtitle {
	font-size: 1.1rem;
	color: #8b949e;
	line-height: 1.7;
}

/* ==================== CONCEPTS SECTION ==================== */
.concepts {
	background-color: #010409;
}

.concepts__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}

.concepts__card {
	background-color: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 2.5rem 2rem;
	display: flex;
	flex-direction: column;
	transition: transform var(--transition), box-shadow var(--transition);
}

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

.concepts__card-icon {
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	background-color: var(--color-secondary);
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

.concepts__card-icon i {
	width: 24px;
	height: 24px;
	color: var(--color-success);
}

.concepts__card-title {
	font-size: 1.5rem;
	margin-bottom: 1rem;
}

.concepts__card-description {
	color: #8b949e;
	line-height: 1.7;
	margin-bottom: 1.5rem;
	flex-grow: 1; /* Pushes the link to the bottom */
}

.concepts__card-link {
	color: var(--color-primary);
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.concepts__card-link i {
	width: 16px;
	height: 16px;
	transition: transform var(--transition);
}

.concepts__card-link:hover i {
	transform: translateX(5px);
}

/* ==================== RESPONSIVENESS (Section) ==================== */
@media (max-width: 768px) {
	.section {
		padding-top: 4rem;
		padding-bottom: 4rem;
	}
	.section__title {
		font-size: 2rem;
	}
}

/* ==================== MECHANISMS SECTION ==================== */
.mechanisms__layout {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 4rem;
	align-items: center;
}

.mechanisms__heading {
	font-size: 1.8rem;
	margin-bottom: 1.5rem;
}

.mechanisms__text-content p {
	color: #8b949e;
	margin-bottom: 2rem;
}

.mechanisms__text-content ul {
	list-style: none;
	padding: 0;
}

.mechanisms__text-content ul li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.mechanisms__text-content ul i {
	color: var(--color-success);
	width: 20px;
	height: 20px;
}

.mechanisms__tabs {
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
}

.mechanisms__tab-headers {
	display: flex;
	background-color: var(--color-secondary);
}

.mechanisms__tab-header {
	flex: 1;
	padding: 1rem;
	background-color: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	color: #8b949e;
	font-size: 1rem;
	font-family: var(--font-family-headings);
	cursor: pointer;
	transition: all var(--transition);
}

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

.mechanisms__tab-header--active {
	color: var(--color-text);
	border-bottom-color: var(--color-primary);
	background-color: rgba(47, 129, 247, 0.1);
}

.mechanisms__tab-contents {
	padding: 2rem;
}

.mechanisms__tab-content {
	display: none;
	animation: fadeIn 0.5s ease;
}

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

.mechanisms__tab-content--active {
	display: block;
}

.mechanisms__content-title {
	font-size: 1.2rem;
	margin-bottom: 1rem;
}

.mechanisms__content-img {
	margin-top: 1.5rem;
	border-radius: var(--radius);
	border: 1px solid var(--color-border);
}

/* ==================== RESPONSIVENESS (Mechanisms Section) ==================== */
@media (max-width: 992px) {
	.mechanisms__layout {
		grid-template-columns: 1fr;
		gap: 3rem;
	}
}

/* ==================== CASES SECTION ==================== */
.cases {
	background-color: #010409;
}

.cases__slider {
	position: relative;
	max-width: 900px;
	margin: 0 auto;
	overflow: hidden;
}

.cases__slider-wrapper {
	display: flex;
	transition: transform 0.5s ease-in-out;
}

.cases__slide {
	flex: 0 0 100%;
	width: 100%;
	background-color: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
}

.cases__slide-img {
	width: 100%;
	height: 350px;
	object-fit: cover;
}

.cases__slide-content {
	padding: 2.5rem;
}

.cases__slide-tag {
	display: inline-block;
	background-color: var(--color-secondary);
	color: var(--color-success);
	padding: 0.25rem 0.75rem;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 700;
	margin-bottom: 1rem;
}

.cases__slide-title {
	font-size: 1.6rem;
	margin-bottom: 1rem;
}

.cases__slide-description {
	color: #8b949e;
}

.cases__slider-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-color: rgba(13, 17, 23, 0.7);
	border: 1px solid var(--color-border);
	color: var(--color-text);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: all var(--transition);
	z-index: 10;
}

.cases__slider-btn:hover {
	background-color: var(--color-primary);
	border-color: var(--color-primary);
}

.cases__slider-btn--prev {
	left: 1rem;
}

.cases__slider-btn--next {
	right: 1rem;
}

/* ==================== RESPONSIVENESS (Cases Section) ==================== */
@media (max-width: 768px) {
	.cases__slide-img {
		height: 250px;
	}
	.cases__slide-title {
		font-size: 1.3rem;
	}
	.cases__slide-content {
		padding: 2rem;
	}
	.cases__slider-btn {
		bottom: 1rem;
		top: auto;
		transform: none;
	}
	.cases__slider-btn--prev {
		left: auto;
		right: 4.5rem;
	}
}

/* ==================== TOOLS SECTION (ACCORDION) ==================== */
.tools__accordion {
	max-width: 800px;
	margin: 0 auto;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
}

.tools__accordion-item:not(:last-child) {
	border-bottom: 1px solid var(--color-border);
}

.tools__accordion-header {
	width: 100%;
	padding: 1.5rem 2rem;
	background-color: var(--color-bg);
	border: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	text-align: left;
	font-size: 1.2rem;
	font-family: var(--font-family-headings);
	color: var(--color-text);
	cursor: pointer;
	transition: background-color var(--transition);
}

.tools__accordion-header:hover {
	background-color: var(--color-secondary);
}

.tools__accordion-icon {
	transition: transform 0.4s ease;
}

.tools__accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, padding 0.4s ease;
	background-color: #010409;
}

.tools__accordion-content p {
	color: #8b949e;
	margin-bottom: 1.5rem;
}

.tools__list {
	list-style: none;
	padding: 0;
}

.tools__list li {
	margin-bottom: 0.75rem;
}

.tools__list a {
	color: var(--color-primary);
	text-decoration: none;
}
.tools__list a:hover {
	text-decoration: underline;
}

/* Logic for open state */
.tools__accordion-item--open .tools__accordion-header {
	background-color: var(--color-secondary);
}

.tools__accordion-item--open .tools__accordion-icon {
	transform: rotate(45deg);
}

.tools__accordion-item--open .tools__accordion-content {
	/* max-height should be large enough to fit the content */
	max-height: 500px;
	padding: 2rem;
}

/* ==================== CONTACT SECTION ==================== */
.contact {
	background-color: #010409;
}

.contact__layout {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 4rem;
	align-items: center;
	background-color: var(--color-bg);
	padding: 4rem;
	border-radius: var(--radius);
	border: 1px solid var(--color-border);
}

.contact__info-title {
	font-size: 1.8rem;
	margin-bottom: 1.5rem;
}

.contact__info p {
	color: #8b949e;
	margin-bottom: 2rem;
}

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

.contact__form-group {
	margin-bottom: 1.5rem;
}

.contact__form-label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
}

.contact__form-input {
	width: 100%;
	padding: 0.9rem 1rem;
	background-color: #010409;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	color: var(--color-text);
	font-size: 1rem;
	font-family: var(--font-family-body);
	transition: border-color var(--transition), box-shadow var(--transition);
}

.contact__form-input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.3);
}

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

.contact__form-checkbox {
	margin-top: 5px;
	flex-shrink: 0;
}

.contact__form-checkbox-label {
	font-size: 0.9rem;
	color: #8b949e;
}

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

.contact__form-button {
	width: 100%;
	font-size: 1.1rem;
}

.contact__success-message {
	display: none; /* Hidden by default */
	text-align: center;
	padding: 3rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
}

.contact__success-message i {
	color: var(--color-success);
	width: 48px;
	height: 48px;
	margin-bottom: 1rem;
}

/* ==================== RESPONSIVENESS (Contact Section) ==================== */
@media (max-width: 992px) {
	.contact__layout {
		grid-template-columns: 1fr;
		padding: 2rem;
	}
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--color-secondary);
	border-top: 1px solid var(--color-border);
	padding: 1.5rem 0;
	z-index: 200;
	transform: translateY(0);
	transition: transform 0.5s ease-in-out;
}

.cookie-popup--hidden {
	transform: translateY(100%);
}

.cookie-popup__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 2rem;
}

.cookie-popup__text {
	color: #8b949e;
}

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

.cookie-popup__btn {
	padding: 0.6rem 1.5rem;
	flex-shrink: 0;
}

/* ==================== RESPONSIVENESS (Cookie Popup) ==================== */
@media (max-width: 768px) {
	.cookie-popup__container {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}
}

/* ==================== GENERIC PAGES (privacy, terms, etc.) ==================== */
.pages {
	padding-top: 8rem; /* Extra padding to account for fixed header */
	padding-bottom: 6rem;
	min-height: 80vh;
}

.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-border);
	padding-bottom: 1rem;
}

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

.pages p,
.pages ul li {
	font-size: 1.1rem;
	line-height: 1.8;
	color: #8b949e;
	margin-bottom: 1.5rem;
}

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

.pages a {
	color: var(--color-primary);
	text-decoration: none;
	border-bottom: 1px dashed var(--color-primary);
}

.pages a:hover {
	border-bottom-style: solid;
}

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