/* --- ГЛОБАЛЬНЫЕ НАСТРОЙКИ И ПЕРЕМЕННЫЕ --- */
:root {
    --bg-color: #0A0A0A;
    --bg-secondary-color: #141414;
    --text-color: #EAEAEA;
    --text-secondary-color: #A0A0A0;
    --accent-color: #00ff9d;
    --glow-color: rgba(0, 255, 157, 0.5);
    --border-color: #2a2a2a;
    --font-display: 'Unbounded', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container-width: 1200px;
}
/* --- БАЗОВЫЕ СТИЛИ --- */
*, *::before, *::after { box-sizing: border-box; }
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.7;
    cursor: none;
    scroll-behavior: smooth;
}
body::before { /* Эффект шума */
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39sbGxvb29oCHANU5gAAAAsSURBVDjNY2AYBaNgFIyCUTAKRsEoFxVTAAFgeAGpBCgAKAuA5QGQFQDqgAQA3+p7A8s2cZ4AAAAASUVORK5CYII=);
    opacity: 0.05;
    pointer-events: none;
    z-index: 1000;
}
main {
    overflow-x: hidden;
}
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}
a { color: var(--accent-color); text-decoration: none; }
/* --- ИНТЕРАКТИВНЫЙ КУРСОР --- */
#cursor-dot, #cursor-outline {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
#cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
}
#cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-color);
    transition: transform 0.2s ease-out, width 0.3s, height 0.3s;
}
body.cursor-hover #cursor-outline {
    transform: translate(-50%, -50%) scale(1.5);
    width: 50px;
    height: 50px;
}
/* --- ХЕДЕР --- */
.header {
    padding: 25px 0;
    position: absolute;
    width: 100%;
    z-index: 10;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.logo {
    flex-shrink: 0;
}
.logo img {
    height: 60px;
    width: auto;
    display: block;
}
.header-right-group {
    display: flex;
    align-items: center;
    gap: 40px;
}
.header-contacts {
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.header-contacts a {
    color: var(--text-secondary-color);
    transition: color 0.3s;
    white-space: nowrap;
}
.header-contacts a:hover {
    color: var(--text-color);
}
.nav {
    flex-shrink: 0;
}
.nav a {
    color: var(--text-secondary-color);
    margin-left: 30px;
    transition: color 0.3s;
    white-space: nowrap;
}
.nav a:hover, .nav a.active { color: var(--text-color); }
/* --- ГЛАВНЫЙ ЭКРАН (HERO) --- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    overflow: hidden;
}
#hero-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    margin: 0 0 20px;
    text-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.hero .subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-secondary-color);
}
/* --- КНОПКИ --- */
.cta-button {
    font-family: var(--font-display);
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: none;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}
.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--glow-color);
}
/* --- ОБЩИЕ СТИЛИ СЕКЦИЙ --- */
.page-section {
    padding: 150px 0;
}
.section-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 80px;
}
/* --- Принципы (заголовки + вспышки аннотаций) --- */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 24px;
}
.principle-item {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 18px;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    cursor: pointer;
}
.principle-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
    transform: translateY(-2px);
}
.principle-item__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.1rem;
}
.principles-constellation { 
    position: fixed;
    inset: 0;
    z-index: 5000;
    pointer-events: none;
}
@keyframes pulse-glow {
    0% { box-shadow: 0 10px 24px rgba(0,0,0,0.35), 0 0 30px var(--glow-color); }
    50% { box-shadow: 0 10px 24px rgba(0,0,0,0.35), 0 0 50px var(--glow-color); }
    100% { box-shadow: 0 10px 24px rgba(0,0,0,0.35), 0 0 30px var(--glow-color); }
}
.principle-flash {
    position: absolute;
    max-width: 320px;
    background: rgba(10,10,10,0.95);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text-secondary-color);
    box-shadow: 0 10px 24px rgba(0,0,0,0.35), 0 0 0px rgba(0, 255, 157, 0);
    opacity: 0;
    transform: scale(0.9);
    pointer-events: auto;
    transition: opacity 0.25s ease-out, transform 0.25s ease-out, box-shadow 0.3s ease-in-out;
}
.principle-flash.is-visible {
    opacity: 1;
    transform: scale(1);
    animation: pulse-glow 2s infinite ease-in-out;
}
/* --- СЕКЦИЯ УСЛУГ --- */
.services-parallax-section {
    position: relative;
}
.services-parallax-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 0 5vw;
    align-items: center;
    overflow: hidden;
}
.services-parallax-title {
    font-family: var(--font-display); /* ИСПРАВЛЕНИЕ: Добавлен правильный шрифт */
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.2;
    padding-right: 20px;
}
.services-slides-wrapper {
    position: relative;
    height: 100%;
}
.service-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(145deg, var(--bg-secondary-color), #111);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    opacity: 0;
    transform: scale(0.95);
    visibility: hidden;
    transition: opacity 0.5s, transform 0.5s, visibility 0.5s;
}
.service-slide.is-active {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    z-index: 2;
}
.service-slide::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    border-radius: 20px;
    background: radial-gradient(circle at center, var(--glow-color), transparent 70%);
    opacity: 0;
    transform: scale(0.8);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    pointer-events: none;
}
.service-slide.is-active::before {
    transform: scale(1);
    opacity: 1;
    animation: flash-out 0.8s ease-out forwards;
}
@keyframes flash-out {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.2); opacity: 0; }
}
.service-slide__title {
    font-size: 2rem;
    color: var(--accent-color);
    margin: 0 0 15px;
}
.service-slide__description {
    font-size: 1.1rem;
    color: var(--text-secondary-color);
    max-width: 500px;
}
/* --- СТИЛИ ДЛЯ СЕКЦИИ "КОНСТЕЛЛЯЦИЯ" --- */
.constellation-container {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    position: relative;
    user-select: none;
}
.constellation-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.constellation-node {
    position: absolute;
    color: var(--text-color);
    padding: 5px 10px;
    cursor: pointer;
    transition: transform 0.3s ease-out, color 0.3s ease-out, opacity 0.3s ease-out, text-shadow 0.3s ease-out;
    transform-origin: center center;
    white-space: nowrap;
}
.constellation-node.tech {
    font-size: 15px; 
    color: var(--text-secondary-color);
}
.constellation-node.hub {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--text-color);
}
.constellation-node.highlight {
    color: var(--accent-color);
    font-weight: 700 !important;
    font-size: 19px !important; 
}
.constellation-container.is-hovering .constellation-node:not(.active) {
    opacity: 0.3;
}
.constellation-node.active {
    opacity: 1;
    color: var(--accent-color);
    transform: scale(1.25);
    text-shadow: 0 0 15px var(--glow-color);
}
/* --- SHOWCASE --- */
.showcase-section { position: relative; }
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.showcase-card {
    background: linear-gradient(145deg, var(--bg-secondary-color), #111);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}
.showcase-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-color);
    box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}
.showcase-card__cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.showcase-card__title {
    padding: 16px 18px;
    font-family: var(--font-display);
    font-size: 1.05rem;
}
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(12px);
    z-index: 6000;
    display: none;
    align-items: center;
    justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox__inner {
    width: min(96vw, 1400px);
    height: min(90vh, 850px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.lightbox__track {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
}
.lightbox__track.dragging { cursor: grabbing; }
.lightbox__img {
    height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
    flex: 0 0 100%;
}
.lightbox__dots {
    position: absolute;
    bottom: 12px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.lightbox__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
}
.lightbox__dot.is-active { background: var(--accent-color); }
.lightbox__close {
    position: absolute;
    top: 10px; right: 12px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
/* --- СТИЛИ ДЛЯ РЕКВИЗИТОВ --- */
.requisites-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-secondary-color);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 16px;
}
.requisites-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 40px;
}
.requisites-item {
    line-height: 1.5;
}
.requisites-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary-color);
    margin-bottom: 5px;
}
.requisites-value {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0;
}
/* --- ФУТЕР --- */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 50px 0;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}
.copyright {
    color: var(--text-color);
    margin: 0;
}
.legal-disclaimer {
    font-size: 0.8rem;
    color: var(--text-secondary-color);
    max-width: 800px;
    line-height: 1.6;
}
.legal-disclaimer p {
    margin: 0 0 10px;
}
.legal-disclaimer p:last-child {
    margin-bottom: 0;
}
/* --- ВОССТАНОВЛЕННЫЕ СТИЛИ МОБИЛЬНОГО МЕНЮ --- */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
    cursor: pointer;
}
.mobile-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    position: absolute;
    left: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.mobile-toggle span:nth-child(1) { top: 0; }
.mobile-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mobile-toggle span:nth-child(3) { bottom: 0; }
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}
.mobile-nav {
    display: flex;
    flex-direction: column;
    text-align: center;
}
.mobile-nav a {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 8vw, 2rem);
    color: white;
    padding: 15px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

/* Кнопка закрытия мобильного меню */
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    border-color: var(--accent-color);
    background: rgba(0, 255, 157, 0.1);
}

.mobile-menu-close span {
    display: block;
    width: 16px;
    height: 2px;
    background-color: white;
    position: absolute;
    transition: transform 0.3s ease;
}

.mobile-menu-close span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-close span:nth-child(2) {
    transform: rotate(-45deg);
}

/* Состояния, когда мобильное меню открыто */
body.mobile-menu-open { overflow: hidden; }
body.mobile-menu-open .mobile-menu {
    opacity: 1;
    visibility: visible;
}
body.mobile-menu-open .mobile-nav a {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(0.1s * var(--i));
}
body.mobile-menu-open .mobile-toggle span:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
body.mobile-menu-open .mobile-toggle span:nth-child(2) { opacity: 0; }
body.mobile-menu-open .mobile-toggle span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }
/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@media (max-width: 1024px) {
    .header .container {
        flex-wrap: wrap;
    }
    .header-contacts {
        display: none;
    }
    .header-right-group {
        flex-grow: 1;
        justify-content: flex-end;
    }
    .nav a {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .showcase-grid { grid-template-columns: repeat(2, 1fr); }
    .requisites-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .logo img { height: 40px; }
    .hero h1 { font-size: 2.2rem; }
    .section-title { font-size: 2.5rem; margin-bottom: 50px; }
    .page-section { padding: 80px 0; }
    .principles-grid { grid-template-columns: 1fr; }
    .showcase-grid { grid-template-columns: 1fr; }
    .services-parallax-container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        padding: 80px 20px;
        height: auto;
        text-align: center;
    }
    .services-parallax-title {
        padding-right: 0;
        margin-bottom: 40px;
    }
    .services-slides-wrapper {
        width: 100%;
        height: 50vh;
    }
    #cursor-dot, #cursor-outline { display: none; }
    body { cursor: auto; }
    
    /* Исправляем размер заголовков и перенос слов */
    .service-slide__title {
        font-size: 26px !important; /* Устанавливаем размер 26px */
        line-height: 1.3; /* Уменьшаем межстрочный интервал */
        overflow-wrap: break-word; /* Разрешаем перенос слов */
        word-wrap: break-word; /* Для старых браузеров */
        word-break: break-word; /* Дополнительная страховка */
    }
    
    /* Дополнительно уменьшаем размер описания, если нужно */
    .service-slide__description {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Улучшения для мобильного меню */
    .mobile-menu {
        padding: 60px 20px 40px; /* Добавляем отступ сверху для кнопки закрытия */
    }
    
    .mobile-nav {
        width: 100%;
        max-width: 400px;
    }
    
    .mobile-nav a {
        padding: 20px 0;
        font-size: 1.8rem;
        position: relative;
    }
    
    /* Добавляем разделители между пунктами меню */
    .mobile-nav a:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* Стили для секции технологий на мобильных устройствах */
    .constellation-container {
        height: 60vh;
        min-height: 400px;
    }
    
    .constellation-node.tech {
        font-size: 13px !important;
        padding: 4px 8px;
    }
    
    .constellation-node.hub {
        font-size: 18px !important;
        padding: 6px 12px;
    }
    
    .constellation-node.highlight {
        font-size: 16px !important;
    }
}