/* --- 1. Базовые настройки и Шрифты --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --index: calc(1vw + 1vh);
    --text: #777;
    --transition: transform .150s cubic-bezier(.075, .5, 0, 1);
    --accent: #9d822b;
}
@font-face {
    font-family: raleway_f;
    src: url(../fonts/raleway-regular.woff2);
}
@font-face {
    font-family: raleway_f;
    src: url(../fonts/raleway-black.woff2);
    font-weight: 900;
}
body {
    background-color: #ffffff;
    font-family: raleway_f, sans-serif;
    line-height: 1.55;
    color: var(--text);
}

/* --- 2. Шапка и Параллакс слои --- */
.main-header { position: relative; }
.main-header::after {
    content: '';
    position: absolute;
    z-index: 100;
    width: 100%;
    height: calc(var(--index) * 10);
    background: url(../img/ground.png) center / cover no-repeat;
    bottom: calc(var(--index) * -4.5);
}
.layers {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    position: relative;
}
.layer {
    height: 100%;
    width: 100%;
    position: absolute;
    background-size: cover;
    background-position: center;
    will-change: transform;
    z-index: 2;
    transition: 0 0 15px #4f4c45;
}
.layers__base { transform: translate3d(0, calc(var(--scrollTop) / 1.6), 0); z-index: 0; }
.layers__middle { transform: translate3d(0, calc(var(--scrollTop) / 2.5), 0); }
.layers__front { transform: translate3d(0, calc(var(--scrollTop) / 5.7), 0); }

.layer__header {
    z-index: 1;
    transform: translate3d(0, calc(var(--scrollTop) / 2), 0);
    transition: var(--transition);
    will-change: transform;
    text-transform: uppercase;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 15px #797979
}
.layers__title {
    font-size: calc(var(--index) * 2.65);
    letter-spacing: calc(var(--index) / 2.25);
}
.layers__caption {
    font-size: calc(var(--index) / 1.175);
    letter-spacing: calc(var(--index) / 3.5);
    margin-top: calc(var(--index) * -13);
}

/* --- 3. Основной контент (Main Article) --- */
.main-article {
    --main-article-transform: translate3d(0, calc(var(--scrollTop) / -15), 0);
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    top: -1px;
    z-index: 10;
}
.main-article__logo, .main-article__header, .main-article__paragraph {
    transform: var(--main-article-transform);
    transition: var(--transition);
    will-change: transform;
}
.main-article__logo {
    width: clamp(200px, calc(var(--index) * 30), 900px); 
    height: clamp(100px, calc(var(--index) * 15), 450px);
    background: url(../img/logo.png) center / contain no-repeat; /* Путь проверь */
    flex-shrink: 0;
}
.main-article__header {
    text-transform: uppercase;
    font-size: clamp(24px, calc(var(--index) * 1.8), 54px);
    letter-spacing: calc(var(--index) / 7.5);
    margin-top: calc(var(--index) / 1.25);
}
.main-article__paragraph {
    max-width: clamp(300px, calc(var(--index) * 30), 900px);
    font-size: clamp(14px, calc(var(--index) * .9), 27px);
    margin-top: calc(var(--index) / 1.25);
}

/* --- 4. Описание и процесс --- */
.description-section {
    padding: calc(var(--index) * 4) 0;
    display: flex;
    justify-content: center;
    background-color: #fff;
}
.description__content {
    max-width: 1080px;
    width: 90%;
    text-align: left;
}
.description__title, .description-section p, .description__list li {
    font-size: clamp(14px, calc(var(--index) * .9), 27px);
}
.description__title {
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.description-section p { margin-bottom: 15px; line-height: 1.6; color: #444; }
.description__list { margin: 20px 0 20px 20px; list-style: none; }
.description__list li { margin-bottom: 10px; }
.description__list li::before { content: "— "; color: var(--accent); }

.grey-bg { background-color: #f9f9f9; }

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin: 30px 0;
}
.process-item span { font-weight: 900; display: block; margin-bottom: 5px; color: #454545; }

/* Софт (объединено) */
.software-icons {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    align-items: center;
    flex-wrap: wrap;
}
.software-icons img {
    height: clamp(60px, calc(var(--index) * 5), 168px); 
    width: auto;
    filter: grayscale(1);
    transition: 0.3s;
    object-fit: contain;
}
.software-icons img:hover { filter: grayscale(0); }

/* Контейнер для иконки и подсказки */
.icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Сама подсказка */
.icon-wrapper::after {
    content: attr(data-tooltip); /* Берет текст из HTML-атрибута */
    position: absolute;
    bottom: 115%; /* Чуть приподнял, чтобы было место для маневра */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.85); /* Сделал чуть плотнее для читаемости текста */
    color: #fff;
    padding: 8px 14px; /* Увеличил отступы для многострочного текста */
    font-size: 14px;
    border-radius: 4px;
    
    /* ПРАВКИ ДЛЯ МНОГОСТРОЧНОСТИ */
    white-space: pre-wrap;    /* Позволяет использовать &#xa; для переноса */
    text-align: center;       /* Центрирует строки относительно друг друга */
    line-height: 1.4;         /* Межстрочный интервал */
    width: max-content;       /* Ширина по контенту */
    max-width: 220px;         /* Ограничение, чтобы не разносило на весь экран */
    
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 20;
}

/* Маленький треугольник под подсказкой */
.icon-wrapper::before {
    content: '';
    position: absolute;
    bottom: 105%; /* Подогнал под новый отступ подсказки */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 20;
}

/* Показ при наведении */
.icon-wrapper:hover::after,
.icon-wrapper:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Стиль для картинок */
.icon-wrapper img {
    height: clamp(60px, calc(var(--index) * 5), 168px);
    width: auto;
    filter: grayscale(1);
    transition: 0.3s;
    object-fit: contain;
    cursor: pointer;
}

.icon-wrapper img:hover {
    filter: grayscale(0);
}

/* --- 5. Блок баннеров (Статика) --- */
.banners-section { --main-article-transform: translate3d(0, 0, 0) !important; }

.banners-grid-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--index) * 3);
    width: 100%;
}
.banners-grid {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(20px, calc(var(--index) * 4), 120px);
    width: 100%;
}
.banner-column {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, calc(var(--index) * 0.8), 24px);
    transform: none !important;
    will-change: auto;
}
.banner-label {
    font-size: clamp(12px, calc(var(--index) * 0.65), 20px);
    opacity: 0.6;
    font-family: sans-serif;
}
.banner-item {
    width: clamp(150px, calc(var(--index) * 15), 450px);
    aspect-ratio: 9 / 16;
    background-size: cover;
    background-position: center;
    border-radius: clamp(4px, calc(var(--index) * 0.4), 12px);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* Горизонтальный баннер */
.banner-horizontal {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, calc(var(--index) * 0.8), 24px);
    width: 100%;
    max-width: clamp(320px, calc(var(--index) * 34), 1020px); 
}
.horizontal-item {
    width: 100% !important;
    aspect-ratio: 920 / 340;
    background-size: cover;
    background-position: center;
    border-radius: clamp(4px, calc(var(--index) * 0.4), 12px);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

/* Видео и кнопка */
.video-banner { position: relative; }
.video-banner video { width: 100%; height: 100%; object-fit: cover; }
.mute-button {
    position: absolute;
    bottom: 15px; right: 15px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    transition: background 0.3s, transform 0.2s;
    z-index: 15;
}
.mute-button:hover { background: rgba(0, 0, 0, 0.8); transform: scale(1.1); }

/* --- 6. Футер и Утилиты --- */
.full-width-img { width: 100%; margin-top: 30px; border-radius: 10px; }
.copy { position: absolute; bottom: calc(var(--index) * 2.5); opacity: .45; font-size: calc(var(--index) * .75); }
.final-note { padding: 40px; text-align: center; font-size: 12px; opacity: 0.5; }
.content, .gsap-reveal { will-change: transform; }

/* --- 7. Медиа-запросы (Все вместе) --- */
@media (max-width: 768px) {
    .banners-grid { flex-wrap: wrap; align-items: center; gap: calc(var(--index) * 6); }
    .banner-item { width: 70vw; max-width: 320px; }
    .banner-label { font-size: 14px; text-align: center; }
    .banner-horizontal { align-items: center; text-align: center; }
    .horizontal-item { width: 70vw !important; max-width: 320px; }
    .software-icons { justify-content: center; gap: 15px; }
    .software-icons img { height: 60px; }
}

/* --- FOOTER STYLES --- */
.footer {
    padding: calc(var(--index) * 3) 0; /* Отступ сверху и снизу */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff; /* Или #f9f9f9, если хочешь отделить от основного контента */
    border-top: 1px solid rgba(0, 0, 0, 0.05); /* Еле заметная линия раздела */
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-logo-link {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.6; /* Делаем лого спокойным */
}

.footer-logo-img {
    /* Минималка 200px, на десктопе до 400px, а между ними растет в зависимости от экрана */
    width: clamp(200px, calc(var(--index) * 12), 400px);
    height: auto;
    display: block;
    margin: 0 auto; /* Центрируем, если вдруг контейнер шире */
}

/* Эффект при наведении */
.footer-logo-link:hover {
    opacity: 1; /* Проявляется при наведении */
    transform: translateY(-3px); /* Легкий прыжок вверх */
}