/*
---
--- Файл: /public/assets/css/style.css
--- Описание: Основной файл стилей для "Society Of Future".
---           Версия с переходом на гибридную адаптивную верстку (rem).
--- Версия: 4.037 | 19.08.2025 02:30
--- Изменения:
--- - Стили прелоадера изменены для отображения GIF-логотипа вместо CSS-спиннера.
---
*/

/* 1. Шрифты */
@font-face {
  font-family: 'Art Script'; /* имя для вашего шрифта */
  src: url('/assets/fonts/ArtScript.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
    font-family: 'GT Walsheim Pro';
    src: url('/assets/fonts/GTWalsheimPro-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GT Walsheim Pro';
    src: url('/assets/fonts/GTWalsheimPro-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GT Walsheim Pro';
    src: url('/assets/fonts/GTWalsheimPro-LightOblique.woff2') format('woff2');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'GT Walsheim Pro';
    src: url('/assets/fonts/GTWalsheimPro-RegularOblique.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'GT Walsheim Pro';
    src: url('/assets/fonts/GTWalsheimPro-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GT Walsheim Pro';
    src: url('/assets/fonts/GTWalsheimPro-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GT Walsheim Pro';
    src: url('/assets/fonts/GTWalsheimPro-UltraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'GT Walsheim Pro';
    src: url('/assets/fonts/GTWalsheimPro-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}


/* 2. Цветовые переменные для тем */
:root {
    /* Темная тема (по умолчанию) */
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-header: rgba(18, 18, 18, 0.85);
    --bg-interactive: #333;
    --border-color: #333;
    --text-primary: #E0E0E0;
    --text-secondary: #BDBDBD;
    --text-logo: #FFFFFF;
    --accent-primary: #8888FF;
    --accent-primary-text: #121212;
    --accent-hover: #FFFFFF;
    /* Цвета для кнопок */
    --btn-primary-bg: #4f46e5;
    --btn-primary-hover-bg: #4338ca;
    --btn-secondary-bg: #4b5563;
    --btn-secondary-hover-bg: #374151;
    --btn-secondary-text: #f3f4f6;
    --btn-success-bg: #16a34a;
    --btn-success-hover-bg: #15803d;
}


body.light-theme {
    /* Светлая тема */
/*    --bg-primary: #C5C5C5;
    --bg-secondary: #E0E0E0;
    --bg-header: rgba(240, 240, 240, 0.85);
    --bg-interactive: #e0e0e0;
    --border-color: #d1d1d1;
    --text-primary: #212121;
    --text-secondary: #555555;
    --text-logo: #000000;
    --accent-primary: #444488;
    --accent-primary-text: #FFFFFF;
    --accent-hover: #000000; */
    --bg-primary: #f3f4f6; /* bg-gray-100 */
    --bg-secondary: #ffffff; /* bg-white */
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-interactive: #e5e7eb; /* bg-gray-200 */
    --border-color: #d1d5db; /* border-gray-300 */
    --text-primary: #111827; /* text-gray-900 */
    --text-secondary: #4b5563; /* text-gray-600 */
    --text-logo: #000000;
    --accent-primary: #4f46e5; /* indigo-600 */
    --accent-primary-text: #FFFFFF;
    --accent-hover: #3730a3; /* indigo-800 */
    /* Цвета для кнопок в светлой теме */
    --btn-primary-bg: #4f46e5;
    --btn-primary-hover-bg: #4338ca;
    --btn-secondary-bg: #e5e7eb;
    --btn-secondary-hover-bg: #d1d5db;
    --btn-secondary-text: #1f2937;
    --btn-success-bg: #22c55e;
    --btn-success-hover-bg: #16a34a;
}
/* ================================================================== */
/* --- НОВЫЙ БЛОК: Стили для кнопок --- */
/* ================================================================== */
.btn {
    display: inline-block;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background-color 0.2s, transform 0.1s;
    user-select: none;
    text-align: center;
}
.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--btn-primary-bg);
    color: #ffffff;
}
.btn-primary:hover {
    background-color: var(--btn-primary-hover-bg);
}

.btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}
.btn-secondary:hover {
    background-color: var(--btn-secondary-hover-bg);
}

.btn-success {
    background-color: var(--btn-success-bg);
    color: #ffffff;
}
.btn-success:hover {
    background-color: var(--btn-success-hover-bg);
}

/* 3. Глобальные стили и гибридное масштабирование */
html {
    /* Базовый размер для стандарта 1280px. 1rem = 16px */
    font-size: 14px; 
}
/* --- СТУПЕНЧАТОЕ МАСШТАБИРОВАНИЕ ДЛЯ БОЛЬШИХ ЭКРАНОВ --- */
@media (min-width: 960px) { html { font-size: 15px; } }
@media (min-width: 1024px) { html { font-size: 16px; } }
@media (min-width: 1280px) { html { font-size: 17px; } }
@media (min-width: 1440px) { html { font-size: 18px; } }
@media (min-width: 1600px) { html { font-size: 19px; } }
@media (min-width: 1920px) { html { font-size: 20px; } }
@media (min-width: 2560px) { html { font-size: 21px; } }


body {
    font-family: 'GT Walsheim Pro', sans-serif;
    margin: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

/* 4. Стили для шапки сайта (header) */
header {
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 0.9375rem 5%; /* 15px -> rem */
    background-color: var(--bg-header);
    backdrop-filter: blur(10px); 
    border-bottom: 0.0625rem solid var(--border-color); /* 1px -> rem */
    transition: background-color 0.3s, border-color 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem; /* 12px -> rem */
}

.logo-image {
    height: 2.8125rem; /* 45px -> rem */
    width: auto;
}

/* По умолчанию показываем темный логотип, скрываем светлый */
.logo-light {
    display: none;
}
.logo-dark {
    display: block;
}

/* Когда тема светлая, делаем наоборот */
body.light-theme .logo-light {
    display: block;
}
body.light-theme .logo-dark {
    display: none;
}

header .logo .logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-logo);
    white-space: nowrap;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-link:hover {
    color: var(--text-primary);
}
.main-button {
    background-color: var(--accent-primary);
    color: var(--accent-primary-text);
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
    white-space: nowrap;
}
.main-button:hover {
    background-color: var(--accent-hover);
    color: var(--bg-secondary);
    transform: translateY(-0.125rem); /* 2px -> rem */
    box-shadow: 0 0.25rem 0.625rem rgba(0,0,0,0.2); /* 4px 10px -> rem */
}
#language-switcher-header {
    position: relative;
    margin-left: 1.25rem;
}
#language-switcher-button {
    background: none; border: none; color: var(--text-primary);
    cursor: pointer; display: flex; align-items: center;
    font-weight: 500; padding: 0.32rem
}
#language-switcher-button:hover {
    color: var(--accent-primary);
}
#language-switcher-button img {
    width: 1.25rem; height: 1.25rem; border-radius: 50%;
}

#language-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-secondary);
    border: 0.0625rem solid var(--border-color); /* 1px -> rem */
    border-radius: 0.5rem;
    padding: 0.5rem;
    min-width: 12.5rem; /* 200px -> rem */
}
.language-option {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.25rem;
}
.language-option:hover {
    background-color: var(--bg-primary);
}
.language-option img {
    width: 1.5rem; /* 24px -> rem */
    margin-right: 0.75rem;
}

/* ==================================================================
--- 5. СТИЛИ ДЛЯ КОМПОНЕНТОВ (АВАТАРЫ) ---
==================================================================
*/
.avatar-image, .avatar-placeholder {
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    font-size: 1.5em; /* Размер шрифта будет масштабироваться относительно размера контейнера */
    line-height: 1;
}
.avatar-placeholder span {
    display: block;
    transform: scale(0.8); 
}
/* Формы аватара */
.shape-circle, 
.shape-circle-3d { border-radius: 9999px; } /* Используем большое значение для идеального круга */
.shape-square,
.shape-square-3d { border-radius: 0; }
.shape-rounded,
.shape-rounded-3d { border-radius: 0.75rem; }
/* 3D-эффекты для аватара */
.shape-circle-3d,
.shape-square-3d,
.shape-rounded-3d {
    border-width: 3px;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.5), inset 1px 1px 2px rgba(255,255,255,0.3);
}
.shape-circle-3d { border-color: #bababa #4a4a4a #4a4a4a #bababa; }
.shape-square-3d { border-color: #4a4a4a #bababa #bababa #4a4a4a; }
.shape-rounded-3d { border-color: #888888 #cccccc #cccccc #888888; }


/* 6. Адаптивный дизайн для главной страницы */

/* Общий контейнер для секций на главной */
.screen {
    display: flex; 
    flex-direction: column; 
    justify-content: center;
    align-items: center; 
    text-align: center; 
    min-height: 100vh;
    padding: 5rem 1.5rem;
    box-sizing: border-box; 
    position: relative;
    overflow: hidden; 
    border-bottom: 0.0625rem solid var(--border-color); /* 1px -> rem */
}

/* Контейнер для контента с максимальной шириной */
.screen .content { 
    position: relative; 
    z-index: 2; 
    width: 100%;
    max-width: 80rem; /* 1280px -> rem */
    margin: 0 auto;
}

/* Задний фон (видео или изображение) */
.background-media {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 1; opacity: 0.5;
}
.background-holder {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 1; opacity: 0.2;
    background-size: cover; background-position: center center;
}

/* Убираем нижнюю границу у последней секции внутри main */
main > .screen:last-of-type {
    border-bottom: none;
}

/* Типографика в rem */
.title1 { font-size: 4.5rem; margin-bottom: 1.25rem; text-shadow: 0 0 1rem rgba(0,0,0,0.7); font-weight: 700; }
.title2 { font-size: 3rem; margin-bottom: 3.125rem; font-weight: 700; }
.subtitle { font-size: 1.6rem; margin-bottom: 2.5rem; color: #BDBDBD; }
.scroll-button { display: inline-block; padding: 1.125rem 2.2rem; font-size: 1.1rem; font-weight: 700; color: var(--accent-primary-text); background-color: var(--accent-primary); border-radius: 0.5rem; text-decoration: none; transition: all 0.3s ease; }
.scroll-button:hover { background-color: var(--accent-hover); color: var(--bg-secondary); transform: scale(1.05); }

/* Сетка преимуществ */
.promise-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; text-align: left; }
.promise-item { display: flex; align-items: center; }
.promise-item img { width: 3.75rem; height: 3.75rem; margin-right: 1.25rem; border-radius: 10%; }
.promise-item p { margin: 0; font-size: 1.3rem; font-weight: 500;}

/* Колонки с логикой */
.logic-columns { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem; margin-top: 2.5rem; }
.column { flex-basis: 20.6rem; background: rgba(128, 128, 128, 0.1); padding: 1.875rem; border-radius: 0.625rem; text-align: center; }
.column img { width: 5.6rem; height: 5.6rem;  border-radius: 10%; margin: auto}
.column h3 { font-size: 1.5rem; color: var(--accent-primary); margin-top: 1.25rem; font-weight: 700; }
.column p { font-size: 1.2rem; line-height: 1.6; font-weight: 500;}

/* Сетка концептов */
.concepts-grid { display: flex; justify-content: center; gap: 1.875rem; flex-wrap: wrap; margin: 2.5rem 0; }
.concept-item img { width: 11.25rem; height: 11.25rem; object-fit: cover; border-radius: 1rem; border: 0.125rem solid #444; } /* 2px -> rem */

#trust .content { max-width: 56.25rem; }
#trust p { font-size: 1.4rem; max-width: 50rem; margin: 2.5rem auto 0; }
#cta-button { font-size: 1.2rem; padding: 1.25rem 2.5rem; margin-top: 2.5rem; }


/* 7. Адаптивность для малых экранов */
@media (max-width: 1024px) {
    .title1 { font-size: 3.5rem; }
    .title2 { font-size: 2.5rem; }
    .subtitle { font-size: 1.4rem; }
}

/* --- Планшеты и большие телефоны (< 768px) --- */
@media (max-width: 768px) {
    .screen { padding: 4rem 1rem; }
    .title1 { font-size: 2.8rem; }
    .title2 { font-size: 2.2rem; margin-bottom: 2rem; }
    .subtitle { font-size: 1.2rem; }

    /* Перестраиваем сетку в одну колонку */
    .promise-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .promise-item p { font-size: 1.1rem; }

    .logic-columns { flex-direction: column; align-items: center; }
    .column { flex-basis: 100%; max-width: 25rem; } /* 400px -> rem */
}

/* --- Мобильные телефоны (< 480px) --- */
@media (max-width: 480px) {
    .title1 { font-size: 2.2rem; }
    .title2 { font-size: 1.8rem; }
    .subtitle { font-size: 1.1rem; }
    .scroll-button { padding: 1rem 1.5rem; font-size: 1rem; }

    .concepts-grid { gap: 1rem; }
    .concept-item img { width: 8rem; height: 8rem; }

    #trust p { font-size: 1.1rem; }
}
/* ================================================================== */
/* --- Глобальная настройка шрифтов для мобильных устройств --- */
/* ================================================================== */
body.is-mobile-device {
    /* Устанавливаем жесткий базовый размер шрифта в 16px.
       Теперь 1rem на мобильных устройствах будет равен 16px,
       что является комфортным минимумом для чтения. */
    font-size: 1.3rem;

    /* Запрещает браузерам на iOS (Safari) самостоятельно
       увеличивать или уменьшать текст, сохраняя наш контроль. */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
/* ================================================================== */
/* --- Глобальные стили для полей ввода на мобильных устройствах --- */
/* ================================================================== */
body.is-mobile-device input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.is-mobile-device textarea,
body.is-mobile-device select,
body.is-mobile-device button,
body.is-mobile-device label {
    /* Устанавливаем комфортный размер шрифта для всех полей ввода на мобильных */
    font-size: 1.2rem; /* 16px */
}


/* ================================================================== */
/* --- 8. Стили для прелоадера --- */
/* ================================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #111; /* Темный фон */
    z-index: 9999; /* Поверх всего остального контента */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out; /* Плавное исчезновение */
    opacity: 1;
    visibility: visible;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Стили для GIF-логотипа в прелоадере */
.preloader-logo {
    width: 90px;  /* Вдвое больше, чем 45px в шапке */
    height: 90px;
    object-fit: cover;
    box-sizing: border-box; /* Учитываем рамку внутри размеров */
}

/* ================================================================== */
/* --- 9. Адаптивность для Панели Управления --- */
/* ================================================================== */

/* Стили для устройств с вертикальной ориентацией и шириной до 1023px */
@media (max-width: 1023px), (orientation: portrait) {
    /* Скрываем основной сайдбар по умолчанию */
    #sidebar-container {
        pointer-events: none;
    }
    
    #sidebar-container.is-open {
        pointer-events: auto;
    }

    #sidebar-container.is-open #sidebar-overlay {
        display: block;
        opacity: 1;
        transition: opacity 0.3s ease-in-out;
    }
    
    #sidebar-container.is-open #sidebar {
        transform: translateX(0);
    }
    
    main > .flex-1 {
        padding-left: 1rem;
    }

    /* --- Прячем/показываем элементы в шапке --- */
    /* Скрываем десктопное меню и десктопный блок пользователя */
    header nav.hidden.md\:flex, 
    header .hidden.md\:flex {
        display: none;
    }
    /* Показываем мобильные элементы */
    header #sidebar-toggle,
    header .relative.md\:hidden,
    header .flex-grow.md\:hidden { 
        display: flex;
    }

    /* Увеличиваем иконку-бургер */
    header #sidebar-toggle svg {
        width: 2rem; /* 32px */
        height: 2rem;
    }
}


