/* GLOBAL SETTINGS */
:root {
    --background-color: #FFFFFF;
    --secondary-bg-color: #f9fafb;
    --text-color: #111827;
    --secondary-text-color: #6b7280;
    --primary-color: #4f46e5;
    --accent-color: #f59e0b;
    
    --font-family-base: 'Inter', sans-serif;
    --font-family-heading: 'Poppins', sans-serif;
    
    --container-width: 1140px;
    --container-padding: 1.5rem;
    
    --border-radius: 8px;
    --transition-duration: 0.3s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-duration) ease;
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

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

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

/* HEADER */
.header {
    background-color: var(--background-color);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
}

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

.header__logo {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

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

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

.header__nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-text-color);
    position: relative;
    padding: 0.25rem 0;
}

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

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

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

.header__nav-link--cta {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-duration) ease;
}

.header__nav-link--cta:hover {
    background-color: #4338ca;
    color: var(--background-color);
}
.header__nav-link--cta::after {
    display: none;
}

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

/* FOOTER */
.footer {
    background-color: var(--secondary-bg-color);
    padding: 4rem 0;
    border-top: 1px solid #e5e7eb;
    color: var(--secondary-text-color);
}

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

.footer__logo {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer__tagline {
    font-size: 0.9rem;
}

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

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

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

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

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

.footer__icon {
    width: 16px;
    height: 16px;
    margin-top: 4px;
    flex-shrink: 0;
}

.footer__address {
    font-style: normal;
}

/* ADAPTIVE STYLES */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* Will implement mobile menu logic later if needed */
    }

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

@media (max-width: 480px) {
    .footer__container {
        grid-template-columns: 1fr;
    }
}

/* GENERAL PURPOSE CLASSES (можно использовать в других секциях) */
.button {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-family-base);
    font-weight: 500;
    font-size: 1rem;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-duration) ease;
}

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

.button--primary:hover {
    background-color: #4338ca;
    color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

/* HERO SECTION */
.hero {
    position: relative;
    min-height: calc(100vh - 80px); /* 80px - примерная высота хедера */
    display: flex;
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding: 4rem 0;
}

.hero__container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 1rem;
    max-width: 800px;
}

/* Скрываем буквы для анимации появления */
.hero__title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--secondary-text-color);
    line-height: 1.7;
    max-width: 650px;
    margin-bottom: 2rem;
}

/* Анимированные фоновые фигуры */
.hero__background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    opacity: 0.1;
}

.hero__shape--1 {
    width: 150px;
    height: 150px;
    top: 15%;
    left: 10%;
}
.hero__shape--2 {
    width: 80px;
    height: 80px;
    top: 25%;
    right: 15%;
    border-radius: 30%;
}
.hero__shape--3 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    right: 20%;
}
.hero__shape--4 {
    width: 50px;
    height: 50px;
    bottom: 20%;
    left: 25%;
    border-radius: 10% 40% 20% 50%;
}
.hero__shape--5 {
    width: 100px;
    height: 100px;
    top: 60%;
    left: 5%;
}

/* ADAPTIVE STYLES FOR HERO */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2.5rem;
    }

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

@media (max-width: 480px) {
    .hero {
        min-height: calc(100vh - 70px);
        padding: 3rem 0;
    }
    .hero__title {
        font-size: 2rem;
    }
    .hero__shape {
        opacity: 0.05;
    }
}

/* GENERAL PURPOSE CLASSES (дополняем) */
.section {
    padding: 5rem 0;
}

.section:nth-of-type(odd) {
    background-color: var(--secondary-bg-color);
}

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

.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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


/* CONCEPTS SECTION */
.concepts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.concepts__card {
    background-color: var(--background-color);
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: transform var(--transition-duration) ease, box-shadow var(--transition-duration) ease;
}

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

.concepts__card-icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #eef2ff; /* Light indigo */
    margin-bottom: 1.5rem;
}

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

.concepts__card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.concepts__card-text {
    color: var(--secondary-text-color);
    line-height: 1.6;
}

/* ADAPTIVE STYLES FOR CONCEPTS */
@media (max-width: 992px) {
    .concepts__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section__title {
        font-size: 2rem;
    }
}

/* TECH SECTION */
.tech__component {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 5rem;
}

.tech__component:last-child {
    margin-bottom: 0;
}

.tech__component--reversed {
    grid-template-areas: "tabs image";
}
.tech__component--reversed .tech__image-wrapper {
    grid-area: image;
}
.tech__component--reversed .tech__tabs {
    grid-area: tabs;
}

.tech__image-wrapper {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.tech__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tech__tab-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.tech__tab-button {
    background: none;
    border: none;
    font-family: var(--font-family-base);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--secondary-text-color);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all var(--transition-duration) ease;
    border: 2px solid transparent;
    text-align: left;
}

.tech__tab-button:hover {
    background-color: #f3f4f6; /* very light gray */
    color: var(--text-color);
}

.tech__tab-button--active {
    color: var(--primary-color);
    font-weight: 700;
    background-color: #eef2ff; /* light indigo */
}

.tech__content-panels {
    position: relative;
    padding: 1.5rem;
    background-color: var(--secondary-bg-color);
    border-radius: var(--border-radius);
    min-height: 200px;
}

.tech__content-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tech__content-panel--active {
    display: block;
}

.tech__content-panel h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.tech__content-panel p {
    color: var(--secondary-text-color);
    line-height: 1.7;
}

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

/* ADAPTIVE STYLES FOR TECH */
@media (max-width: 992px) {
    .tech__component,
    .tech__component--reversed {
        grid-template-columns: 1fr;
        grid-template-areas: unset;
        gap: 2rem;
    }
     .tech__component--reversed .tech__image-wrapper,
     .tech__component--reversed .tech__tabs {
        grid-area: unset;
    }
    .tech__tab-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* CASES SECTION */
.cases {
    background-color: var(--secondary-bg-color);
}

.cases__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.cases__card {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-duration) ease, box-shadow var(--transition-duration) ease;
    display: flex;
    flex-direction: column;
}

.cases__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cases__card-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.cases__card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-duration) ease;
}

.cases__card:hover .cases__card-image {
    transform: scale(1.05);
}

.cases__card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cases__card-tag {
    display: inline-block;
    background-color: #e0e7ff; /* Lighter indigo */
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.cases__card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cases__card-text {
    color: var(--secondary-text-color);
    line-height: 1.6;
    flex-grow: 1;
}

/* ADAPTIVE STYLES FOR CASES */
@media (max-width: 992px) {
    .cases__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cases__grid {
        grid-template-columns: 1fr;
    }
}

/* ETHICS SECTION */
.ethics__accordion {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid #e5e7eb;
}

.ethics__item {
    border-bottom: 1px solid #e5e7eb;
}

.ethics__accordion-button {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    cursor: pointer;
    text-align: left;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-family-heading);
    color: var(--text-color);
}

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

.ethics__accordion-icon {
    transition: transform var(--transition-duration) ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.ethics__accordion-button.ethics__accordion-button--active .ethics__accordion-icon {
    transform: rotate(180deg);
}

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

.ethics__accordion-content p {
    color: var(--secondary-text-color);
    line-height: 1.7;
    padding-bottom: 1.5rem;
}

/* ADAPTIVE STYLES FOR ETHICS */
@media (max-width: 768px) {
    .ethics__accordion-button {
        font-size: 1.1rem;
    }
}

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

.contact__wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--background-color);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.contact__form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.contact__label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.contact__input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-family-base);
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    transition: border-color var(--transition-duration) ease, box-shadow var(--transition-duration) ease;
}

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

.contact__form-group--checkbox {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    margin-top: 1rem;
}

.contact__checkbox {
    width: 1.25em;
    height: 1.25em;
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
}

.contact__checkbox-label {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
}
.contact__checkbox-label a {
    text-decoration: underline;
}

.contact__submit-button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    font-size: 1.1rem;
}

.contact__message {
    display: none; /* Скрыты по умолчанию */
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
    text-align: center;
}

.contact__message--error {
    background-color: #fee2e2;
    color: #b91c1c;
}

.contact__message--success {
    background-color: #dcfce7;
    color: #166534;
}

.contact__message h4 {
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
}

.contact__message i {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}


/* ADAPTIVE STYLES FOR CONTACT */
@media (max-width: 768px) {
    .contact__wrapper {
        padding: 2rem;
    }
    .contact__form-grid {
        grid-template-columns: 1fr;
    }
}

/* COOKIE POPUP */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(5px);
    color: var(--background-color);
    padding: 1.5rem;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.5s ease-out;
}

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

.cookie-popup__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    gap: 1.5rem;
}

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

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

.cookie-popup__button {
    flex-shrink: 0;
    padding: 0.6rem 1.2rem;
}

/* STYLES FOR STATIC POLICY PAGES (privacy.html, terms.html etc.) */
.pages .container {
    max-width: 800px; /* Делаем текстовый блок уже для лучшей читаемости */
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.pages h1 {
    font-size: 2.8rem;
    margin-bottom: 2rem;
}

.pages h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

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

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

.pages li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
    color: var(--secondary-text-color);
}

.pages a {
    text-decoration: underline;
}

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

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

/* ADAPTIVE STYLES */
@media (max-width: 768px) {
    .cookie-popup__content {
        flex-direction: column;
        text-align: center;
    }

    .pages h1 { font-size: 2.2rem; }
    .pages h2 { font-size: 1.5rem; }
}