:root {
    --bg-color: #121110;
    --text-color: #f5f4f0;
    --accent-color: #c5a080;
    --border-color: rgba(197, 160, 128, 0.2);
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none !important;
    -webkit-user-select: none !important;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Скролл управляется виртуально через JS */
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-weight: 300;
}

@media (min-width: 1025px) {
    body {
        cursor: none;
    }
}

/* Фоновые эффекты */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.custom-cursor {
    position: fixed;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10010;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    display: none;
}

.cursor-glow {
    position: fixed;
    width: 25vw;
    height: 25vw;
    background: radial-gradient(circle, rgba(197, 160, 128, 0.04) 0%, rgba(18, 17, 16, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    display: none;
}

@media (min-width: 1025px) {
    .custom-cursor, .cursor-glow { display: block; }
}

/* HUD ПАНЕЛЬ ДАТЧИКОВ */
.hud-live-panel {
    position: fixed;
    bottom: 30px;
    left: 4vw;
    z-index: 98;
    font-family: monospace;
    font-size: 10px;
    letter-spacing: 1px;
    color: rgba(245, 244, 240, 0.4);
    display: flex;
    flex-direction: column;
    gap: 5px;
    pointer-events: none;
}

.hud-row {
    display: flex;
    gap: 10px;
}

/* Магнитный бейдж */
.touch-badge {
    position: fixed;
    width: 100px;
    height: 100px;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.touch-badge.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.touch-badge svg {
    width: 100%;
    height: 100%;
    animation: spin 12s linear infinite;
}

.touch-badge text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 8px;
    fill: var(--accent-color);
    letter-spacing: 2px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Шапка сайта */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 3px;
    color: var(--text-color);
}

.header-nav {
    pointer-events: auto;
}

.nav-link-btn {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 2px;
    border: 1px solid var(--accent-color);
    padding: 8px 18px;
    border-radius: 20px;
    transition: background-color 0.3s, color 0.3s;
    cursor: none;
}

.nav-link-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

/* Виртуальный скролл-контейнер */
.scroll-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
}

/* Контейнер островков */
.islands-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 120px 4vw 60px 4vw;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    will-change: transform; /* Оптимизация производительности GSAP */
}

/* Карточки-островки */
.island-card {
    background-color: rgba(18, 17, 16, 0.95);
    border: 1px solid var(--border-color);
    padding: 60px 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 480px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s;
}

/* Декоративные чертежные плюсы по углам */
.corner-cross {
    position: absolute;
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--accent-color);
    opacity: 0.3;
    transition: transform 0.4s, opacity 0.4s, color 0.4s;
    pointer-events: none;
}

.top-left { top: -9px; left: -5px; }
.top-right { top: -9px; right: -5px; }
.bottom-left { bottom: -11px; left: -5px; }
.bottom-right { bottom: -11px; right: -5px; }

.island-card:hover {
    border-color: rgba(197, 160, 128, 0.5);
}

.island-card:hover .corner-cross {
    opacity: 1;
    color: #ffd700;
    transform: rotate(90deg);
}

/* АНИМАЦИЯ БЕГУЩЕГО СВЕТА В ЛИНИЯХ (LASERS) */
.laser-line {
    position: absolute;
    opacity: 0.15;
    transition: opacity 0.3s;
    pointer-events: none;
}

.laser-top {
    top: -1px; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    background-size: 200% 100%;
    animation: laserH 3s linear infinite;
}

.laser-bottom {
    bottom: -1px; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    background-size: 200% 100%;
    animation: laserH 3s linear infinite reverse;
}

.laser-left {
    top: 0; left: -1px; width: 1px; height: 100%;
    background: linear-gradient(180deg, transparent, var(--accent-color), transparent);
    background-size: 100% 200%;
    animation: laserV 3s linear infinite;
}

.laser-right {
    top: 0; right: -1px; width: 1px; height: 100%;
    background: linear-gradient(180deg, transparent, var(--accent-color), transparent);
    background-size: 100% 200%;
    animation: laserV 3s linear infinite reverse;
}

.island-card:hover .laser-line {
    opacity: 0.9;
}

@keyframes laserH {
    0% { background-position: -200% 0%; }
    100% { background-position: 200% 0%; }
}

@keyframes laserV {
    0% { background-position: 0% -200%; }
    100% { background-position: 0% 200%; }
}

/* Hero типографика */
.hero-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(34px, 5.5vw, 76px);
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 25px;
}

.accent-color {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: clamp(14px, 1.1vw, 16px);
    line-height: 1.6;
    max-width: 440px;
    opacity: 0.6;
    margin-bottom: 35px;
}

.brutal-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 16px 28px;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 2px;
    transition: background-color 0.3s, color 0.3s;
    cursor: none;
}

.brutal-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.btn-arrow { transition: transform 0.3s; }
.brutal-btn:hover .btn-arrow { transform: translateX(4px); }

/* Зона 3D-модели */
.card-hero-visual {
    padding: 0;
    overflow: visible;
}

.canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: visible;
}

#hero-3d-canvas {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110% !important;
    height: 110% !important;
    z-index: 5;
    pointer-events: none;
}

/* Описание манифеста */
.section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(28px, 4vw, 56px);
    line-height: 1.0;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 30px;
}

.manifesto-paragraph {
    font-size: clamp(14px, 1.2vw, 17px);
    line-height: 1.6;
    opacity: 0.6;
    margin-bottom: 20px;
}

.manifesto-paragraph:last-child { margin-bottom: 0; }

/* Услуги */
.services-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 35px;
}

.service-row {
    border-top: 1px solid var(--border-color);
    padding: 25px 0;
    display: grid;
    grid-template-columns: 50px 1.5fr 2fr;
    align-items: center;
    transition: background-color 0.3s, padding-left 0.3s;
}

.service-row:last-child {
    border-bottom: 1px solid var(--border-color);
}

.service-row:hover {
    background-color: rgba(197, 160, 128, 0.03);
    padding-left: 15px;
}

.service-num {
    font-family: var(--font-heading);
    font-size: 11px;
    color: var(--accent-color);
}

.service-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
}

.service-desc {
    display: none; /* Скрываем описание на десктопе, так как оно будет в рентгене */
}

/* Спецификации */
.specs-grid-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.spec-label {
    font-size: 9px;
    letter-spacing: 1px;
    opacity: 0.4;
}

.spec-val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-color);
}

/* ПЛАВАЮЩИЕ PNG-АССЕТЫ (3D Наклон) */
.floating-assets-global {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    perspective: 1000px;
}

.floating-asset {
    position: absolute;
    pointer-events: none;
    opacity: 0.35;
    transform-style: preserve-3d;
    will-change: transform;
}

.asset-1 { width: 22vw; top: 12%; left: -6vw; }
.asset-2 { width: 26vw; bottom: -4%; right: -8vw; }
.asset-3 { width: 20vw; top: -5%; right: -5vw; }

/* 5. ПОЛНОЭКРАННЫЙ СВЕРХАКТИВНЫЙ ЭКРАН КОНТАКТОВ */
.fullscreen-contact-portal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1005;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.15) translateY(100vh); /* Готовность к резкому вылету */
    transition: filter 1s ease;
    filter: blur(20px);
}

.fullscreen-contact-portal.active {
    opacity: 1;
    pointer-events: auto;
    filter: blur(0px);
    transform: scale(1) translateY(0);
}

#physics-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1006;
    pointer-events: none;
}

.portal-glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(197, 160, 128, 0.015);
    z-index: -1;
}

.portal-content {
    text-align: center;
    z-index: 1007;
    position: relative;
    max-width: 800px;
    padding: 0 20px;
}

.portal-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(48px, 8vw, 110px);
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -3px;
    margin-bottom: 25px;
}

.portal-question {
    color: var(--accent-color);
    display: inline-block;
    cursor: grab;
    user-select: none;
    margin-left: 10px;
}

.portal-question:active {
    cursor: grabbing;
}

.portal-subtitle {
    font-size: clamp(12px, 1.2vw, 15px);
    line-height: 1.6;
    opacity: 0.5;
    max-width: 500px;
    margin: 0 auto 50px auto;
}

/* Круглые сферы связи */
.portals-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
}

.portal-sphere {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #302e2b 0%, #171615 70%);
    border: 1px solid rgba(197, 160, 128, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    position: relative;
    box-shadow: inset -5px -5px 15px rgba(0,0,0,0.8);
    transition: border-color 0.4s, box-shadow 0.4s;
    cursor: none;
}

.portal-sphere::after {
    content: attr(data-label);
    position: absolute;
    bottom: -25px;
    font-size: 8px;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    color: var(--accent-color);
    transform: translateY(5px);
}

.portal-sphere:hover {
    border-color: #ffd700;
    box-shadow: 0 0 30px rgba(197, 160, 128, 0.25), inset -5px -5px 15px rgba(0,0,0,0.8);
}

.portal-sphere:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Индикатор ревинда */
.rewind-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.3;
    animation: bounceRewind 2s infinite ease-in-out;
}

.rewind-arrow {
    font-size: 18px;
}

.rewind-txt {
    font-family: var(--font-heading);
    font-size: 9px;
    letter-spacing: 2px;
}

@keyframes bounceRewind {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Адаптивность для планшетов и мобильных */
@media (max-width: 1024px) {
    html, body {
        overflow-y: auto !important; /* Разрешаем полноценный нативный скролл на мобильных */
        overflow-x: hidden !important;
        height: auto !important;
    }

    .scroll-wrapper {
        height: auto;
        overflow: visible;
    }

    .islands-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 100px 4vw 40px 4vw;
    }

    .island-card {
        min-height: auto;
        padding: 40px 20px;
    }

    .canvas-container {
        height: 350px;
    }

    .service-row {
        grid-template-columns: 40px 1fr;
        gap: 10px;
    }

    .service-desc {
        display: block; /* Показываем текст на мобилках */
        grid-column: 2;
        font-size: 13px;
        opacity: 0.5;
        margin-top: 5px;
    }

    .specs-grid-mini {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .floating-asset { display: none; } /* Скрываем ассеты на мобилках ради производительности */
    .hud-live-panel { display: none; }
}
/* Подсказка скролла под островками */
.scroll-down-hint {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.35;
    padding: 60px 0 20px 0;
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 2px;
    animation: bounceScrollHint 2s infinite ease-in-out;
}

@keyframes bounceScrollHint {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@media (max-width: 1024px) {
    .scroll-down-hint {
        grid-column: span 1 !important;
    }
}
/* Рентген-эффект (HUD Scanner Card) */
.focus-hud-card {
    position: fixed;
    width: 280px;
    padding: 18px;
    background: rgba(18, 17, 16, 0.95);
    border: 1px solid rgba(197, 160, 128, 0.45);
    border-radius: 8px;
    backdrop-filter: blur(12px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    pointer-events: none; /* Пропускает события мыши сквозь себя */
    opacity: 0;
    z-index: 10009;
    font-size: 11px;
    line-height: 1.6;
    color: rgba(245, 244, 240, 0.85);
    font-family: var(--font-body);
    transform: translate(-50%, -120%) scale(0.9);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: none;
}

@media (min-width: 1025px) {
    .focus-hud-card {
        display: block; /* Включаем только на ПК */
    }
}

.focus-hud-card.active {
    opacity: 1;
    transform: translate(-50%, -120%) scale(1);
}

.hud-scanner {
    width: 100%;
    height: 1px;
    background-color: var(--accent-color);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.7;
    animation: scanLine 2.5s linear infinite;
}

@keyframes scanLine {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}
/* Стили загрузочного окна (Preloader) */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 10015; /* Самый верхний слой над всем */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, filter 0.8s ease;
}

.preloader-wrap {
    text-align: center;
    width: 200px;
}

.preloader-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 6px;
    display: block;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.preloader-bar {
    width: 100%;
    height: 1px;
    background-color: rgba(245, 244, 240, 0.1);
    position: relative;
    overflow: hidden;
}

.preloader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--accent-color);
}

.preloader-percent {
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 2px;
    display: block;
    margin-top: 10px;
    opacity: 0.5;
}
/* Мобильная адаптация экрана контактов */
@media (max-width: 1024px) {
    .fullscreen-contact-portal {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
        filter: none !important;
        padding: 80px 4vw 60px 4vw !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Скрываем ненужный на телефонах индикатор кручения */
    .rewind-indicator {
        display: none !important;
    }

    /* Показываем кнопку "НАВЕРХ" на телефонах */
    .mobile-back-to-top {
        display: inline-flex !important;
        margin-top: 40px !important;
        z-index: 1007;
    }
}

@media (min-width: 1024px) {
    /* Скрываем физический холст и отключаем кликабельность знака ? на телефонах */
    #physics-canvas {
        display: none !important;
    }
    
    #fallingQuestion {
        pointer-events: none !important; /* Делает знак ? статичным текстом */
        cursor: default !important;
    }

    /* Полностью скрываем залипающий кругляшок "Пощупать в 3D" на мобильных */
    #touchBadge {
        display: none !important;
    }
    .mobile-back-to-top {
        display: none !important; /* На ПК скрываем эту кнопку */
    }
}
/* Стили для аккуратного телефона в футере контактов */
.portal-phone-wrap {
    margin: 30px 0 15px 0;
    text-align: center;
    z-index: 15;
    position: relative;
}

.portal-phone-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4); /* Мягкий полупрозрачный белый */
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.portal-phone-link:hover {
    color: rgba(255, 255, 255, 0.95); /* Яркий белый при наведении */
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}