/*=============== GOOGLE FONTS ===============*/
/* font-family: 'Inter', sans-serif; */
/* font-family: 'Manrope', sans-serif; */

/*=============== CSS VARIABLES ===============*/
:root {
	/* Colors */
	--primary-color: #8a3ffc;
	--primary-color-hover: #9d5cff;
	--background-color: #ffffff;
	--surface-color: #f8f9fa;
	--border-color: #e0e0e5;
	--text-color: #1a1821;
	--text-color-secondary: #5a5a6a;

	/* Fonts */
	--body-font: 'Inter', sans-serif;
	--title-font: 'Manrope', sans-serif;

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

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

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

html {
	scroll-behavior: smooth;
}

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

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

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

ul {
	list-style: none;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

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

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

.header__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--title-font);
	font-weight: 700;
	font-size: 1.5rem;
	color: var(--text-color);
	transition: var(--transition);
}

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

.header__toggle {
	display: none;
	font-size: 1.5rem;
	cursor: pointer;
	background: none;
	border: none;
	color: var(--text-color);
}

.header__list {
	display: flex;
	align-items: center;
	gap: 2.5rem;
}

.header__link {
	color: var(--text-color-secondary);
	font-weight: 500;
	transition: var(--transition);
}

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

.header__link--button {
	background-color: var(--primary-color);
	color: var(--text-color);
	padding: 0.75rem 1.5rem;
	border-radius: var(--border-radius);
}

.header__link--button:hover {
	background-color: var(--primary-color-hover);
}

/* Mobile Nav Styles */
@media screen and (max-width: 992px) {
	.header__nav {
		position: fixed;
		top: var(--header-height);
		right: -100%;
		width: 100%;
		height: 100vh;
		background-color: var(--background-color);
		padding: 2rem;
		transition: right 0.4s ease;
	}

	.header__list {
		flex-direction: column;
		gap: 2rem;
		text-align: center;
	}

	.header__link {
		font-size: var(--h3-font-size);
		color: var(--text-color);
	}

	.header__toggle {
		display: block;
	}

	/* Show menu */
	.show-menu {
		right: 0;
	}
}

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

.footer__container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2rem;
	row-gap: 3rem;
}

.footer__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--title-font);
	font-weight: 700;
	font-size: 1.5rem;
	margin-bottom: 1rem;
}

.footer__tagline {
	color: var(--text-color-secondary);
	font-size: var(--small-font-size);
}

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

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

.footer__link {
	color: var(--text-color-secondary);
	transition: var(--transition);
	font-size: var(--normal-font-size);
}

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

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

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

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


/*=============== HERO ===============*/
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    overflow: hidden; /* Важно, чтобы анимация не выходила за пределы */
}

.hero__animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Стили для canvas, который будет создан JS */
}

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

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

.hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Адаптивный размер шрифта */
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

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

.hero__description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-color-secondary);
    max-width: 650px;
    margin: 0 auto 2.5rem;
}

.hero__button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius);
    font-size: var(--normal-font-size);
    font-weight: 500;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero__button:hover {
    background-color: var(--primary-color-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(138, 63, 252, 0.2);
}

/* Адаптация для мобильных устройств */
@media screen and (max-width: 768px) {
    .hero {
        min-height: 600px;
        height: auto;
        padding: 6rem 0;
    }

    .hero__title {
        line-height: 1.3;
    }

    .hero__description {
        margin-bottom: 2rem;
    }
}

/*=============== REUSABLE CSS CLASSES ===============*/
.section {
    padding: 6rem 0 2rem;
}

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

.section__subtitle {
    display: block;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

.section__description {
    color: var(--text-color-secondary);
    max-width: 600px;
    margin: 0 auto;
}

@media screen and (min-width: 992px) {
    .section {
        padding: 8rem 0 4rem;
    }
    .section__title {
        font-size: 2.5rem;
    }
}


/*=============== HOW IT WORKS ===============*/
.how__container {
    display: grid;
    gap: 2rem;
    padding-top: 2rem;
}

.how__step {
    background-color: var(--surface-color);
    padding: 2.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.how__step:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.how__icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

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

.how__step-number {
	position: absolute;
	top: -10px;
	right: -20px;
	font-family: var(--title-font);
	font-size: 2rem;
	font-weight: 700;
	color: rgba(0, 0, 0, 0.05);
	z-index: -1;
}

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

.how__step-description {
    color: var(--text-color-secondary);
    font-size: var(--normal-font-size);
}

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

/*=============== TOOLS ===============*/
.tools__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tools__card {
    background-color: transparent;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.tools__card:hover {
    background-color: var(--surface-color);
    transform: translateY(-5px);
}

.tools__icon-wrapper {
    margin-bottom: 1.5rem;
}

.tools__icon {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
}

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

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

@media screen and (min-width: 992px) {
    .tools__container {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/*=============== USE CASES ===============*/
.use-cases__container {
    margin-top: 3rem;
}

.use-cases__tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.use-cases__tab-button {
    background-color: var(--surface-color);
    color: var(--text-color-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.use-cases__tab-button:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}

.use-cases__tab-button.active-tab {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}

.use-cases__item {
    display: none;
    gap: 3rem;
    align-items: center;
}

.use-cases__item.active-content {
    display: grid;
}

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

.use-cases__image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
    aspect-ratio: 16/10;
    object-fit: cover;
}

.use-cases__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
}

.use-cases__description {
    color: var(--text-color-secondary);
    margin-bottom: 1.5rem;
}

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

.use-cases__list-item {
    position: relative;
    padding-left: 2rem;
}

.use-cases__list-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: 700;
}

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

.use-cases__item.active-content {
    animation: fadeIn 0.5s ease;
}

@media screen and (min-width: 768px) {
    .use-cases__item.active-content {
        grid-template-columns: 1fr 1fr;
    }
}

/*=============== PRICING ===============*/
.pricing__container {
    display: grid;
    gap: 2rem;
    justify-content: center;
}

.pricing__card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pricing__card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

/* Popular card styles */
.pricing__card--popular {
    border-color: var(--primary-color);
    transform: scale(1.05);
}
.pricing__card--popular:hover {
    transform: scale(1.05) translateY(-8px);
}

.pricing__popular-badge {
    position: absolute;
    top: 1.5rem;
    right: -45px;
    transform: rotate(45deg);
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 0.25rem 3rem;
    font-size: var(--small-font-size);
    font-weight: 500;
}


.pricing__header {
    margin-bottom: 1.5rem;
}

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

.pricing__plan-description {
    color: var(--text-color-secondary);
    font-size: var(--small-font-size);
}

.pricing__price {
    margin-bottom: 2rem;
    display: flex;
    align-items: baseline;
}

.pricing__price-amount {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--title-font);
}

.pricing__price-period {
    margin-left: 0.5rem;
    color: var(--text-color-secondary);
}

.pricing__features {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1; /* Pushes button to the bottom */
}

.pricing__feature-item {
    position: relative;
    padding-left: 1.75rem;
}

.pricing__feature-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.pricing__button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.pricing__button:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.pricing__button--popular {
    background-color: var(--primary-color);
    color: var(--text-color);
}
.pricing__button--popular:hover {
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
}


@media screen and (min-width: 768px) {
    .pricing__container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin: 0 auto;
    }
}

@media screen and (min-width: 992px) {
    .pricing__container {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
    .pricing__card--popular {
        transform: scale(1.1);
    }
}

/*=============== CONTACT ===============*/
.contact__container {
    display: grid;
    gap: 3rem;
}

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

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

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

.contact__info-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.contact__form-label {
    margin-bottom: 0.5rem;
    color: var(--text-color-secondary);
    font-size: var(--small-font-size);
}

.contact__form-input {
    width: 100%;
    padding: 1rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    transition: var(--transition);
}

.contact__form-input::placeholder {
    color: var(--text-color-secondary);
    opacity: 0.5;
}

.contact__form-input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(138, 63, 252, 0.2);
}

.contact__form-input.error {
	border-color: #f87171;
	box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.contact__form-input.error:focus {
	border-color: #f87171;
	box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.3);
}

/* Checkbox styles */
.contact__form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.contact__form-checkbox {
    width: 1.25em;
    height: 1.25em;
    accent-color: var(--primary-color);
}

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

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

.contact__form-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--normal-font-size);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.contact__form-button:hover {
    background-color: var(--primary-color-hover);
}
.contact__form-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Form message styles */
.contact__form-message {
    font-size: var(--small-font-size);
    text-align: center;
    display: none; /* Hidden by default */
}

.contact__form-message.success {
    display: block;
    color: #4ade80; /* Green */
}

.contact__form-message.error {
    display: block;
    color: #f87171; /* Red */
}


@media screen and (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 1.25fr;
        align-items: center;
    }
}

/*=============== COOKIE POPUP ===============*/
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden */
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    z-index: 110;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup.show {
    bottom: 0;
}

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

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

.cookie-popup__button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.cookie-popup__button:hover {
    background-color: var(--primary-color-hover);
}

@media screen and (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
    }
}

/*=============== POLICY PAGES STYLES ===============*/
.pages {
    padding: calc(var(--header-height) + 4rem) 0 6rem;
}

.pages .container {
    max-width: 800px;
}

.pages h1, .pages h2 {
    color: var(--text-color);
    font-family: var(--title-font);
}

.pages h1 {
    font-size: clamp(1.5rem, 5vw, 2.75rem);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.pages h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.pages p {
    color: var(--text-color-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.pages ul {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color-secondary);
}

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

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

.pages a:hover {
    text-decoration: none;
}

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