:root {
    --indigo: #4F46E5; --purple: #7C3AED; --cyan: #06B6D4; --emerald: #10B981; --red: #EF4444; 
    --bg-main: #050714; --text-main: #F3F4F6; --text-muted: #9CA3AF;
    --glass-bg: rgba(255, 255, 255, 0.03); --glass-border: rgba(255, 255, 255, 0.08); --glass-shadow: rgba(0, 0, 0, 0.4);
    --font-text: 'Inter', sans-serif; --font-heading: 'Space Grotesk', sans-serif; --font-data: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    --bg-main: #F0F4F8; --text-main: #0F172A; --text-muted: #475569;
    --glass-bg: rgba(255, 255, 255, 0.6); --glass-border: rgba(0, 0, 0, 0.05); --glass-shadow: rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }
body { background-color: var(--bg-main); color: var(--text-main); font-family: var(--font-text); overflow-x: hidden; transition: 0.4s ease; }

/* Курсор и Прелоадер */
.cursor-dot { width: 8px; height: 8px; background: var(--cyan); border-radius: 50%; position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width 0.2s, height 0.2s; mix-blend-mode: difference; }
.cursor-outline { width: 40px; height: 40px; border: 1px solid var(--cyan); border-radius: 50%; position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9998; transform: translate(-50%, -50%); transition: 0.2s; }
.cursor-hover .cursor-dot { width: 0; height: 0; }
.cursor-hover .cursor-outline { width: 60px; height: 60px; background: rgba(6, 182, 212, 0.2); border-color: transparent; backdrop-filter: blur(2px); }

#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-main); z-index: 10000; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: 0.8s; }
.loader-logo { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 20px; font-weight: bold; background: linear-gradient(90deg, var(--cyan), var(--indigo)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: flex; align-items: center; gap: 10px; }
.loader-bar { width: 200px; height: 2px; background: rgba(255,255,255,0.1); position: relative; overflow: hidden; }
.loader-progress { position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: var(--cyan); animation: loading 1.5s infinite; }
@keyframes loading { 50% { left: 0; } 100% { left: 100%; } }

/* Текстура и Фоны */
.noise-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: -1; 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='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E"); }
[data-theme="light"] .noise-overlay { opacity: 0.08; mix-blend-mode: multiply; }
.aurora-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2; background: linear-gradient(45deg, #050714, #1e1b4b, #312e81, #050714); background-size: 400% 400%; animation: aurora 15s infinite; }
[data-theme="light"] .aurora-bg { background: linear-gradient(45deg, #F0F4F8, #E0E7FF, #CFFAFE, #F0F4F8); opacity: 0.8; }
@keyframes aurora { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
#particles-js { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Общая Сетка */
.container { max-width: 1300px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; }
.section-title { font-family: var(--font-heading); font-size: 2.8rem; text-align: center; margin-bottom: 50px; letter-spacing: -1px; }

/* Glassmorphism & Магия */
.glass-card { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: 0 8px 32px 0 var(--glass-shadow); transition: 0.4s; transform-style: preserve-3d; }
.glass-card:hover { border-color: rgba(6, 182, 212, 0.4); }

.magic-card { position: relative; overflow: hidden; }
.magic-card::before { content: ""; position: absolute; top: var(--mouse-y, 0); left: var(--mouse-x, 0); width: 500px; height: 500px; background: radial-gradient(circle closest-side, rgba(6, 182, 212, 0.15), transparent); transform: translate(-50%, -50%); transition: opacity 0.3s; opacity: 0; pointer-events: none; z-index: -1; }
.magic-card:hover::before { opacity: 1; }
[data-theme="light"] .magic-card::before { background: radial-gradient(circle closest-side, rgba(79, 70, 229, 0.1), transparent); }

/* Кнопки и Текст */
.btn { padding: 12px 24px; border-radius: 8px; font-weight: 600; text-decoration: none; display: inline-block; border: none; transition: 0.3s; }
.btn-primary { background: linear-gradient(90deg, var(--indigo), var(--purple)); color: #fff; position: relative; overflow: hidden; z-index: 1; box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2); }
.btn-icon { background: transparent; border: none; color: inherit; font-size: 1.2rem; transition: 0.3s; padding: 0 10px; }
.btn-icon:hover { color: var(--cyan); transform: rotate(20deg); }

.text-cyan { color: var(--cyan); }
.text-emerald { color: var(--emerald); }
.outline-text { color: transparent; -webkit-text-stroke: 1px var(--cyan); opacity: 0.7; }
.gradient-text { background: linear-gradient(90deg, var(--cyan), var(--emerald)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-red { -webkit-text-stroke: 1px var(--red) !important; opacity: 1; }
.gradient-red { background: linear-gradient(90deg, #ff6b6b, var(--red)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.border-red { border-top: 1px solid rgba(239, 68, 68, 0.3) !important; border-bottom: 1px solid rgba(239, 68, 68, 0.3) !important; }

[data-theme="light"] .outline-text { -webkit-text-stroke: 1px var(--indigo); }
[data-theme="light"] .stat-num, [data-theme="light"] .logo { color: var(--text-main) !important; }

/* Навигация */
.topbar { padding: 10px 0; font-size: 0.85rem; color: var(--text-muted); border-bottom: 1px solid var(--glass-border); transition: 0.4s; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.topbar-left, .topbar-right { display: flex; gap: 20px; align-items: center; }
.topbar a { color: inherit; text-decoration: none; transition: 0.3s; }
.topbar a:hover { color: var(--cyan); }
.pulse-dot { display: inline-block; width: 8px; height: 8px; background: var(--emerald); border-radius: 50%; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); animation: pulse-em 2s infinite; }
.pulse-dot.emerald { background: var(--emerald); }
@keyframes pulse-em { 70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }

.navbar { position: sticky; top: 0; z-index: 100; padding: 20px 0; transition: 0.4s; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-heading); font-size: 1.5rem; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 700; transition: 0.4s; }
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--cyan); }
.mobile-burger { display: none; font-size: 1.5rem; cursor: pointer; }
[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.5); }

/* HERO - КОМПОНОВКА */
.hero { padding: 60px 0; min-height: 90vh; display: flex; align-items: center; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; width: 100%; position: relative; z-index: 2; }

.hero-content h1 { font-family: var(--font-heading); font-size: 3.8rem; line-height: 1.1; margin-bottom: 25px; letter-spacing: -2px; }
.hero-content p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 30px; font-size: 0.9rem; margin-bottom: 20px; border-color: rgba(6, 182, 212, 0.3); }

.hero-stats { display: flex; gap: 20px; }
.stat-item { padding: 20px; flex: 1; text-align: center; }
.stat-num { font-family: var(--font-data); font-size: 2.5rem; font-weight: 700; color: #fff; display: block; margin-bottom: 5px; }

/* Видео Контейнер */
.hero-visual { position: relative; width: 100%; height: 500px; display: flex; justify-content: center; align-items: center; perspective: 1000px; }
.video-wrapper { position: relative; z-index: 1; width: 100%; height: 100%; transform: translateZ(30px); }
.video-wrapper canvas, .video-wrapper video { width: 100%; height: 100%; object-fit: contain; }

/* Плавающие карточки (fc-1, fc-2) */
.floating-card { position: absolute; padding: 15px 20px; display: flex; align-items: center; gap: 15px; border-radius: 12px; transform: translateZ(80px); z-index: 2; }
.fc-1 { top: 10%; left: -10%; }
.fc-2 { bottom: 10%; right: -10%; }

/* Бегущая строка */
.marquee-section { padding: 25px 0; overflow: hidden; background: rgba(0,0,0,0.3); display: flex; white-space: nowrap; }
.marquee-inner { display: flex; gap: 40px; align-items: center; font-family: var(--font-heading); font-size: 2.2rem; font-weight: bold; animation: marquee 25s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Блоки */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-list { list-style: none; margin-top: 30px; }
.about-list li { margin-bottom: 15px; font-size: 1.1rem; display: flex; align-items: center; gap: 15px; }
.about-image { border-radius: 20px; overflow: hidden; height: 400px; }
.about-image img { width: 100%; height: 100%; object-fit: cover; }

.services-grid, .gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-card { padding: 30px; text-align: left; }
.icon-box { width: 60px; height: 60px; border-radius: 12px; background: rgba(6, 182, 212, 0.1); color: var(--cyan); display: flex; justify-content: center; align-items: center; font-size: 1.8rem; margin-bottom: 25px; transition: 0.3s; transform: translateZ(30px); }

/* Галерея (Наши работы) */
.gallery-item { display: block; padding: 0; overflow: hidden; text-align: center; text-decoration: none; color: inherit; }
.img-wrapper { width: 100%; height: 250px; overflow: hidden; }
.img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.gallery-item:hover .img-wrapper img { transform: scale(1.1); }
.gallery-info { padding: 20px; }
.gallery-info h4 { font-family: var(--font-heading); margin-bottom: 5px; }
.gallery-info p { font-size: 0.9rem; color: var(--text-muted); }

/* Документы */
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.doc-card { display: flex; align-items: center; gap: 20px; padding: 25px; text-decoration: none; color: inherit; transition: 0.3s; }
.doc-icon { font-size: 2.5rem; color: var(--cyan); }
.doc-info h4 { font-size: 1.1rem; margin-bottom: 5px; }
.doc-info span { font-size: 0.85rem; color: var(--text-muted); }
.doc-download { margin-left: auto; color: var(--text-muted); transition: 0.3s; }
.doc-card:hover .doc-download { color: var(--cyan); transform: translateY(3px); }

/* Аналитика */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.wide-chart { grid-column: span 2; }
.chart-wrapper { padding: 30px; }
#chart-doughnut, #chart-radial { max-height: 320px; margin: 0 auto; display: flex; justify-content: center; }

/* ОТЗЫВЫ */
.swiper-slide { padding: 40px; height: auto; display: flex; flex-direction: column; justify-content: space-between; }
.stars { color: #F59E0B; margin-bottom: 20px; }
.swiper-slide p { font-size: 1.1rem; font-style: italic; margin-bottom: 30px; flex-grow: 1; }
.author { display: flex; align-items: center; gap: 15px; }
.author img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cyan); }
.swiper-pagination-bullet { background: var(--text-muted); }
.swiper-pagination-bullet-active { background: var(--cyan); }

/* Карта Яндекс */
.map-container { position: relative; padding: 0; overflow: hidden; height: 500px; display: flex; border-radius: 20px; }
.map-iframe { width: 100%; height: 100%; border: none; transition: filter 0.4s; }
[data-theme="dark"] .map-iframe { filter: invert(95%) hue-rotate(180deg) contrast(90%) grayscale(20%); }
.map-overlay-info { position: absolute; top: 30px; left: 30px; padding: 25px; z-index: 10; max-width: 350px; background: rgba(10, 14, 39, 0.85); border-radius: 20px; }
[data-theme="light"] .map-overlay-info { background: rgba(255, 255, 255, 0.9); }
.map-overlay-info h4 { font-family: var(--font-heading); color: var(--cyan); margin-bottom: 15px; font-size: 1.3rem; }
.map-overlay-info p { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }

/* ФУТЕР */
.footer { border-top: 1px solid var(--glass-border); padding-top: 60px; background: rgba(0,0,0,0.3); }
[data-theme="light"] .footer { background: rgba(255,255,255,0.5); }
.footer-main-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; margin-bottom: 50px; }
.footer-brand-col p { color: var(--text-muted); margin-bottom: 10px; font-size: 0.95rem; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(16, 185, 129, 0.1); padding: 5px 12px; border-radius: 20px; color: var(--emerald) !important; font-weight: 500; font-size: 0.85rem !important; border: 1px solid rgba(16, 185, 129, 0.3); }
.socials a { color: var(--text-main); font-size: 1.2rem; margin-right: 15px; transition: 0.3s; }
.socials a:hover { color: var(--cyan); }

.footer-legal-col { padding: 30px; }
.legal-title { font-family: var(--font-heading); color: var(--cyan); margin-bottom: 25px; font-size: 1.3rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 15px; }
.legal-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.legal-item { display: flex; flex-direction: column; gap: 5px; position: relative; }
.legal-item span { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.legal-item strong { font-family: var(--font-data); font-size: 1rem; color: var(--text-main); font-weight: 400; }
.legal-item.full-width { grid-column: span 3; }
.legal-item.full-width strong { font-family: var(--font-text); line-height: 1.5; }

.copy-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: rgba(6, 182, 212, 0.1); border: 1px solid var(--cyan); color: var(--cyan); width: 28px; height: 28px; border-radius: 6px; display: flex; justify-content: center; align-items: center; transition: 0.3s; opacity: 0.5; }
.legal-item:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: var(--cyan); color: #fff; }

.footer-bottom { border-top: 1px solid var(--glass-border); padding: 20px 0; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
#copy-toast { position: fixed; bottom: -50px; left: 50%; transform: translateX(-50%); padding: 12px 24px; border-radius: 30px; font-weight: 600; display: flex; align-items: center; gap: 10px; opacity: 0; visibility: hidden; transition: 0.4s; z-index: 9999; border-color: var(--emerald); }
#copy-toast.show { bottom: 30px; opacity: 1; visibility: visible; }
#btn-up { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--text-main); opacity: 0; visibility: hidden; transition: 0.3s; z-index: 99; border: none; background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); }
#btn-up.visible { opacity: 1; visibility: visible; }
#btn-up:hover { background: var(--cyan); color: #fff; }

/* АДАПТИВНОСТЬ */
@media (max-width: 1024px) {
    .hero-grid, .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { height: 400px; max-width: 600px; margin: 0 auto; }
    .fc-1 { left: 0; } .fc-2 { right: 0; }
    .wide-chart { grid-column: span 1; }
    .charts-grid { grid-template-columns: 1fr; }
    .footer-main-grid { grid-template-columns: 1fr; }
    .legal-grid { grid-template-columns: 1fr 1fr; }
    .legal-item.full-width { grid-column: span 2; }
}
@media (max-width: 768px) {
    .nav-links, .nav-actions, .topbar-left .hours { display: none; }
    .mobile-burger { display: block; }
    .hero h1 { font-size: 2.8rem; }
    .services-grid, .gallery-grid, .docs-grid { grid-template-columns: 1fr; }
    .legal-grid { grid-template-columns: 1fr; }
    .legal-item.full-width { grid-column: span 1; }
    .map-overlay-info { position: static; max-width: 100%; border-radius: 0; border: none; border-bottom: 1px solid var(--glass-border); }
    .map-container { flex-direction: column; height: auto; }
    .map-iframe { height: 400px; border-radius: 0; }
    .copy-btn { opacity: 1; }
}
@media (pointer: coarse) {
    * { cursor: auto !important; }
    .cursor-dot, .cursor-outline { display: none !important; }
}