/* ===== ПРЕМИАЛЬНЫЙ МИНИМАЛИЗМ - IT КОНСАЛТИНГ СТИЛЬ ===== */

body.home-page {
    overflow-x: hidden;
}

/* ===== HERO SECTION ===== */
body.home-page header.hero-section {
    padding-top: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding-left: var(--page-padding-x);
    padding-right: var(--page-padding-x);
    gap: 100px;
    min-height: 85vh;
    position: relative;
}

.hero-content {
    flex: 0 0 auto;
    width: 50%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    z-index: 2;
}

body.home-page header.hero-section h1 {
    font-size: 4em;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5),
                 0 0 20px rgba(0, 255, 255, 0.3),
                 0 0 30px rgba(0, 255, 255, 0.2);
    transform: none !important;
    letter-spacing: -0.02em;
    text-align: left;
}

body.home-page .hero-subheadline,
.hero-content .hero-subheadline {
    font-size: 1.5em !important;
    color: #00ffff !important;
    margin-bottom: 35px !important;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.4),
                 0 0 20px rgba(0, 255, 255, 0.2) !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    text-align: left !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#typewriter {
    font-size: 1.3em;
    line-height: 1.6;
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4),
                 0 0 15px rgba(0, 255, 255, 0.2);
    margin-bottom: 40px;
    max-width: 600px;
    font-weight: 300;
    min-height: 80px;
    display: block !important;
    text-align: left;
    position: relative;
}

#typewriter-text {
    display: inline !important;
    color: #00ffff;
}

/* Мигающий курсор для печатающей машинки */
#cursor {
    display: inline-block !important;
    width: 8px !important;
    min-width: 8px !important;
    height: 1.3em !important;
    background-color: #00ffff !important;
    margin-left: 3px !important;
    vertical-align: text-bottom !important;
    animation: blink 1s infinite !important;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.9),
                0 0 15px rgba(0, 255, 255, 0.5) !important;
    border-radius: 1px !important;
    visibility: visible !important;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.3; }
}

@media (max-width: 1200px) {
    #typewriter {
        display: block; /* Показываем typewriter на всех размерах */
        font-size: 1.1em;
        max-width: 100%;
    }
}

/* Мобильная адаптация сферы */
@media (max-width: 1200px) {
    canvas#bgCanvas {
        width: 100vw !important;
        height: 50vh !important;
        top: auto !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        opacity: 0.5 !important;
    }
}

@media (max-width: 768px) {
    canvas#bgCanvas {
        height: 40vh !important;
        opacity: 0.4 !important;
    }
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 1200px) {
    body.home-page header.hero-section {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 10px;
        gap: 40px;
        min-height: auto;
    }
    
    body.home-page header.hero-section::after {
        display: none;
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        flex: 1 1 auto;
        align-self: flex-start;
        align-items: flex-start;
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }
    
    body.home-page header.hero-section h1 {
        font-size: 3em;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }

    #typewriter {
        width: 100%;
        max-width: 100%;
        min-height: 4.8em;
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }
    
    .hero-btn {
        max-width: 100%;
    }
    
    .stats-section {
        padding: 40px var(--page-padding-x);
        margin: 80px auto 60px;
    }
    
    .stats-section h2 {
        font-size: 2.2em;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .stat-number {
        font-size: 3.5em;
    }
}

@media (max-width: 767px) {
    body.home-page header.hero-section h1 {
        font-size: 2.2em;
        width: 100%;
        text-align: left;
    }

    #typewriter {
        min-height: 5.8em;
        text-align: left;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 3em;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.hero-btn {
    display: inline-block;
    padding: 20px 45px;
    font-size: 1.15em;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 1.25, 0.5, 1);
    text-align: center;
    border: 2px solid transparent;
    width: 100%;
    max-width: 400px;
}

.hero-btn.primary {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
}

.hero-btn.primary:hover {
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.6);
    transform: translateY(-3px);
}

.hero-btn.secondary {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.hero-btn.secondary:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* Предотвращаем выход canvas за пределы */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Правая область для визуального разделения */
body.home-page header.hero-section::after {
    content: '';
    flex: 1 1 auto;
    min-width: 400px;
    height: 100%;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

/* ===== СТАТИСТИКА ===== */
.stats-section {
    width: 100%;
    max-width: var(--page-max-width);
    margin: 120px auto 80px;
    padding: 60px var(--page-padding-x);
    text-align: center;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

body.home-page .stats-section {
    margin: var(--section-gap, 56px) auto 0;
}

.stats-section h2 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    letter-spacing: -0.02em;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.stat-card {
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 50px 30px;
    backdrop-filter: blur(10px);
    background: rgba(0, 191, 255, 0.03);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.1);
    cursor: default;
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.25, 1.25, 0.5, 1);
    visibility: visible !important;
    display: block !important;
    min-height: 200px;
}

.stat-card.visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5), 0 0 80px rgba(0, 255, 255, 0.2) inset;
    border-color: var(--accent);
    background: rgba(0, 191, 255, 0.06);
}

.stat-number {
    font-size: 4.5em;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent);
    font-family: var(--font-title);
    line-height: 1;
    margin-bottom: 15px;
}

.stat-label {
    font-size: 1.2em;
    color: var(--text);
    opacity: 0.9;
    font-weight: 400;
}

.stats-more-btn {
    display: inline-block;
    margin-top: 50px;
    padding: 16px 30px;
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #9cf8ff;
    text-decoration: none;
    border: 1px solid rgba(0, 255, 255, 0.6);
    border-radius: 999px;
    transition: all 0.3s ease;
    background: rgba(0, 24, 36, 0.78);
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.16);
}

.stats-more-btn:hover {
    transform: translateY(-2px);
    background: rgba(0, 37, 52, 0.92);
    box-shadow: 0 0 28px rgba(0, 255, 255, 0.28);
}

/* ===== КНОПКА QUICK START CTA ===== */
.quick-start-cta-btn {
    display: inline-block;
    padding: 16px 30px;
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 255, 0.6);
    background: rgba(0, 24, 36, 0.78);
    color: #9cf8ff;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.16);
}

.quick-start-cta-btn:hover {
    transform: translateY(-2px);
    background: rgba(0, 37, 52, 0.92);
    box-shadow: 0 0 28px rgba(0, 255, 255, 0.28);
}

.more-btn {
    display: inline-block;
    padding: 14px 32px;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-weight: 500;
    font-size: 1em;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    z-index: 2;
    background: transparent;
}

.more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.more-btn:hover::before {
    left: 100%;
}

.more-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Кнопка обратной связи всегда видна */
body.home-page #quickContactBtn {
    opacity: 1 !important;
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
.it-icon {
    position: fixed !important;
    /* Адаптивный размер: 24-40px в зависимости от ширины экрана */
    width: clamp(24px, 3vw, 40px) !important;
    height: clamp(24px, 3vw, 40px) !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    opacity: 0.22 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    transition: opacity 0.3s ease !important;
    display: block !important;
    visibility: visible !important;
}

/* ===== ЛОГОТИПЫ КЛИЕНТОВ - Плавное движение под сферой ===== */
.clients-logos-section {
    width: 100%;
    max-width: var(--page-max-width);
    margin: -60px 0 0 auto;
    padding: 0 var(--page-padding-x) 40px;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.logos-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 14px 0 18px;
}

/* Плавное скрытие слева и справа */
.logos-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 10;
    pointer-events: none;
}

.logos-fade-left {
    left: 0;
    background: linear-gradient(to right, #050505 0%, rgba(5,5,5,0.5) 50%, transparent 100%);
}

.logos-fade-right {
    right: 0;
    background: linear-gradient(to left, #050505 0%, rgba(5,5,5,0.5) 50%, transparent 100%);
}

.logos-track {
    display: flex;
    align-items: center;
    gap: 60px;
    width: fit-content;
    padding: 8px 0;
    animation: scrollLogos 40s linear infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.logos-track:hover {
    animation-play-state: paused;
}

.logo-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 18px 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 255, 0.35);
    background: linear-gradient(135deg, rgba(0, 28, 40, 0.75), rgba(0, 12, 18, 0.88));
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.18), inset 0 0 10px rgba(0, 255, 255, 0.08);
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.logo-item:hover {
    opacity: 1;
    transform: scale(1.05);
    border-color: rgba(120, 255, 255, 0.6);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 12px rgba(0, 255, 255, 0.12);
}

.logo-item::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8df8ff;
    box-shadow: 0 0 8px rgba(141, 248, 255, 0.9);
}

.logos {
    font-family: var(--font-title);
    font-size: 1.05em;
    font-weight: 600;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5),
                 0 0 20px rgba(0, 255, 255, 0.3),
                 0 0 30px rgba(0, 255, 255, 0.2);
    white-space: nowrap;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
}

.logo-item:hover .logos {
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8),
                 0 0 25px rgba(0, 255, 255, 0.5),
                 0 0 35px rgba(0, 255, 255, 0.3);
    color: var(--accent-1);
}

@keyframes scrollLogos {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-33.333%, 0, 0);
    }
}

@media (max-width: 1200px) {
    body.home-page .clients-logos-section {
        width: 100% !important;
        max-width: none !important;
        margin: 26px auto 34px !important;
        padding: 0 16px 20px !important;
        box-sizing: border-box;
        overflow: hidden !important;
    }

    body.home-page .logos-container {
        width: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
        mask-image: none !important;
        -webkit-mask-image: none !important;
    }

    body.home-page .logos-fade,
    body.home-page .logos-track {
        display: none !important;
    }

    body.home-page .logos-mobile-marquee {
        display: grid;
        gap: 12px;
        width: 100%;
    }

    body.home-page .logos-row {
        width: 100%;
        overflow: hidden;
    }

    body.home-page .logos-track-mobile {
        display: flex;
        align-items: center;
        gap: 12px;
        width: max-content;
        min-width: max-content;
        will-change: transform;
    }

    body.home-page .logos-row-top .logos-track-mobile {
        animation: scrollLogosMobileLeft 28s linear infinite;
    }

    body.home-page .logos-row-bottom .logos-track-mobile {
        animation: scrollLogosMobileRight 28s linear infinite;
    }

    body.home-page .logos-mobile-marquee .logo-item {
        flex: 0 0 auto;
        min-width: max-content;
        padding: 6px 14px 6px 11px;
    }
}

@media (max-width: 768px) {
    body.home-page .clients-logos-section {
        padding: 0 var(--page-padding-x) 20px !important;
    }

    body.home-page .logos-mobile-marquee {
        gap: 10px;
    }

    body.home-page .logos-track-mobile {
        gap: 10px;
    }

    body.home-page .logos-mobile-marquee .logo-item {
        padding: 6px 12px 6px 10px;
    }

    body.home-page .logos-mobile-marquee .logos {
        font-size: 0.92em;
    }

    body.home-page .logos-mobile-marquee .logo-item::before {
        width: 7px;
        height: 7px;
    }
}

@keyframes scrollLogosMobileLeft {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes scrollLogosMobileRight {
    0% {
        transform: translate3d(-50%, 0, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}
