/* ==================== GLOBAL STYLES ==================== */
:root {
    --color-background: #111318;
    --color-surface: #1A1D23;
    --color-primary: #00F5A0;
    --color-primary-hover: #00e090;
    --color-text-primary: #F0F0F0;
    --color-text-secondary: #8A8F98;

    --font-family-headings: 'Manrope', sans-serif;
    --font-family-body: 'Inter', sans-serif;

    --header-height: 70px;
}

*,
*::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;
    color: var(--color-text-primary);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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);
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(17, 19, 24, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-surface);
    transition: background-color 0.3s ease;
}

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

.header__logo {
    font-family: var(--font-family-headings);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.header__nav {
    display: none; /* Mobile first: hide navigation */
}

.header__nav-list {
    display: flex;
    gap: 32px;
}

.header__nav-link {
    font-size: 16px;
    color: var(--color-text-secondary);
    transition: color 0.3s ease;
    padding: 8px 0;
    position: relative;
}

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

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

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

.header__menu-toggle {
    background: none;
    border: none;
    color: var(--color-text-primary);
    cursor: pointer;
}

/* Desktop styles */
@media (min-width: 768px) {
    .header__nav {
        display: block;
    }
    .header__menu-toggle {
        display: none;
    }
}


/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--color-surface);
    padding-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer__logo {
    font-family: var(--font-family-headings);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-primary);
    display: inline-block;
    margin-bottom: 16px;
}

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

.footer__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text-primary);
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__link {
    color: var(--color-text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer__link:hover {
    color: var(--color-primary);
    transform: translateX(4px);
}

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

.footer__address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--color-text-secondary);
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
}

.footer__bottom-container {
    text-align: center;
}

.footer__copyright {
    color: var(--color-text-secondary);
    font-size: 14px;
}

/* Desktop styles for footer grid */
@media (min-width: 768px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer__container {
        grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
        gap: 60px;
    }
}

/* ==================== BUTTON ==================== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background-color: var(--color-primary);
    color: var(--color-background);
    font-family: var(--font-family-headings);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-align: center;
}

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

.button__icon {
    width: 20px;
    height: 20px;
}


/* ==================== HERO ==================== */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: var(--header-height);
    padding-bottom: 60px;
    overflow: hidden; /* Важно для эффекта свечения */
}

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

.hero__content {
    max-width: 750px;
    text-align: center;
    margin: 0 auto;
}

.hero__title {
    font-size: 40px;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(90deg, #ffffff 0%, #d8d8d8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.hero__subtitle {
    font-size: 18px;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
}

/* Эффект свечения */
.hero__glow {
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 245, 160, 0.1) 0%, rgba(0, 245, 160, 0) 60%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; /* Чтобы не мешал кликам */
    transition: top 0.2s ease-out, left 0.2s ease-out;
    z-index: 1;
}

/* Адаптивность */
@media (min-width: 768px) {
    .hero__title {
        font-size: 64px;
    }
    .hero__subtitle {
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .hero {
        min-height: 80vh;
    }
    .hero__glow {
        display: none; /* Отключаем эффект на мобильных, где нет курсора */
    }
}

/* Header menu toggle on mobile */
@media (max-width: 767px) {
    .header__nav {
        display: flex;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-background);
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
    }

    .header__nav--active {
        transform: translateX(0);
    }

    .header__nav-list {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .header__nav-link {
        font-size: 24px;
    }
}
/* ==================== REUSABLE COMPONENTS ==================== */
.section {
    padding-top: 80px;
    padding-bottom: 80px;
}

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

.section__title {
    font-size: 32px;
    margin-bottom: 16px;
}

.section__subtitle {
    font-size: 18px;
    color: var(--color-text-secondary);
}

@media (min-width: 768px) {
    .section {
        padding-top: 100px;
        padding-bottom: 100px;
    }
    .section__title {
        font-size: 42px;
    }
}


/* ==================== CONCEPTS ==================== */
.concepts__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.concepts__card {
    background-color: var(--color-surface);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.concepts__card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px rgba(0, 245, 160, 0.1);
}

.concepts__card-icon {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.concepts__card-icon i {
    width: 100%;
    height: 100%;
}

.concepts__card-title {
    font-size: 22px;
    margin-bottom: 12px;
}

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


/* Адаптивность */
@media (min-width: 768px) {
    .concepts__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== TECHNOLOGIES ==================== */
.tech__features {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.tech__feature-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
}

.tech__image-wrapper {
    background-color: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

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

.tech__feature-title {
    font-size: 28px;
    margin-bottom: 16px;
}

.tech__feature-description {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.tech__feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech__feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech__feature-list i {
    color: var(--color-primary);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Desktop layout */
@media (min-width: 768px) {
    .tech__feature-item {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }

    .tech__feature-item--reverse .tech__image-wrapper {
        order: 2;
    }

    .tech__feature-item--reverse .tech__content-wrapper {
        order: 1;
    }
}

/* ==================== EXAMPLES ==================== */
.examples__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.examples__card {
    display: block;
    background-color: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent; /* Для плавного перехода hover */
}

.examples__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 245, 160, 0.5);
}

.examples__card-image-wrapper {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.examples__card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.examples__card:hover .examples__card-image-wrapper img {
    transform: scale(1.05);
}

.examples__card-content {
    padding: 24px;
}

.examples__card-category {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(0, 245, 160, 0.1);
    color: var(--color-primary);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

.examples__card-title {
    font-size: 20px;
    line-height: 1.4;
    color: var(--color-text-primary);
    margin-bottom: 16px;
}

.examples__card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: color 0.3s ease, gap 0.3s ease;
}

.examples__card-link i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.examples__card:hover .examples__card-link {
    color: var(--color-primary);
    gap: 10px;
}

.examples__card:hover .examples__card-link i {
    transform: translateX(4px);
}

/* Адаптивность */
@media (min-width: 768px) {
    .examples__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ==================== FORMATS (ACCORDION) ==================== */
.formats__accordion {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
}

.accordion__item {
    border-bottom: 1px solid var(--color-surface);
}

.accordion__item:last-child {
    border-bottom: none;
}

.accordion__header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px 24px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--color-text-primary);
    transition: background-color 0.3s ease;
}

.accordion__header:hover {
    background-color: var(--color-surface);
}

.accordion__header-icon {
    width: 22px;
    height: 22px;
    color: var(--color-primary);
    margin-right: 16px;
    flex-shrink: 0;
}

.accordion__header-title {
    font-size: 18px;
    font-weight: 500;
    font-family: var(--font-family-body);
    flex-grow: 1;
}

.accordion__header-chevron {
    width: 24px;
    height: 24px;
    color: var(--color-text-secondary);
    transition: transform 0.4s ease;
    flex-shrink: 0;
}

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

.accordion__content-text {
    padding: 0 24px 0 62px; /* 24px padding + 22px icon + 16px margin */
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* Active State */
.accordion__item.accordion__item--active .accordion__header {
    background-color: var(--color-surface);
}

.accordion__item.accordion__item--active .accordion__header-chevron {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.accordion__item.accordion__item--active .accordion__content {
    /* max-height будет установлен в JS, но можно задать запас */
    max-height: 200px;
    padding-bottom: 24px;
}

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

.contact__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: center;
}

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

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.form__group {
    display: flex;
    flex-direction: column;
}

.form__label {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.form__input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--color-background);
    border: 1px solid #333;
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 245, 160, 0.2);
}

.form__group--checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

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

.form__checkbox-label {
    font-size: 14px;
    color: var(--color-text-secondary);
}

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

.form__checkbox-label a:hover {
    color: var(--color-primary-hover);
}

.contact__form-button {
    margin-top: 10px;
    width: 100%;
}

.form__success-message {
    display: none; /* Hidden by default */
    text-align: center;
    padding: 40px;
    border: 1px solid var(--color-primary);
    border-radius: 12px;
    background-color: rgba(0, 245, 160, 0.05);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.form__success-message i {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.form__success-message h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

/* JS-controlled classes */
.contact__form--hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}
.form__success-message--visible {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transform: scale(1);
}

@media (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 1.2fr;
    }
}
/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-top: 1px solid #333;
    padding: 20px;
    z-index: 200;
    transform: translateY(120%);
    transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

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

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

.cookie-popup__button {
    padding: 10px 24px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .cookie-popup__content {
        flex-direction: row;
        justify-content: space-between;
    }
    .cookie-popup__text {
        text-align: left;
    }
}

/* ==================== GENERIC PAGES (Privacy, Terms etc.) ==================== */
.pages {
    padding-top: calc(var(--header-height) + 60px); /* 70px header + 60px extra space */
    padding-bottom: 80px;
    min-height: 100vh;
}

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

.pages h1 {
    font-size: 42px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--color-surface);
    padding-bottom: 16px;
}

.pages h2 {
    font-size: 28px;
    margin-top: 48px;
    margin-bottom: 16px;
}

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

.pages ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 16px;
    color: var(--color-text-secondary);
}

.pages li {
    margin-bottom: 10px;
}

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

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

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