/* CSS Reset & Variables */
:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #475569;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --border-glass: rgba(255, 255, 255, 0.4);
    --bg-glass: rgba(255, 255, 255, 0.75);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-max: 9999px;
    --radius-lg: 1rem;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

html, body { width: 100%; overflow-x: hidden; }
body { font-family: var(--font-sans); color: var(--text-main); background-color: var(--bg-primary); line-height: 1.6; }

/* Global Canvas Background */
.global-canvas-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: -1;
}
.global-canvas-container canvas {
    width: 100%; height: 100%; object-fit: cover;
}
.video-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(248, 250, 252, 0.55);
}

/* Typography */
h1, h2, h3, h4 { color: var(--text-main); line-height: 1.2; font-weight: 700; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

/* Layout & Containers */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section-title { text-align: center; font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 3rem; color: var(--text-main); letter-spacing: -0.02em; }
.glass-section { padding: 6rem 0; }
.content-overlay { position: relative; z-index: 1; }

/* Logo */
.brand-logo { height: 55px; width: auto; object-fit: contain; margin-top: 5px; }
.footer-logo { height: 75px; margin-bottom: 1rem; }
.loader-logo { height: 100px; margin-bottom: 2rem; }

/* Cards & Glassmorphism */
.card {
    background: var(--bg-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass); border-radius: var(--radius-lg); padding: 2rem;
    box-shadow: var(--shadow-soft); transition: var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(255,255,255,0.8); }

/* Buttons V2 (Solid Rendering without Compositing Effects) */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2.2rem;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 40px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    position: relative;
    z-index: 10;
    font-family: inherit;
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    transform: none !important;
}

.btn-primary {
    background-color: #2563EB;
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #1D4ED8;
    color: #FFFFFF;
}

.btn-secondary {
    background-color: #FFFFFF;
    color: #0F172A;
    border: 2px solid #E2E8F0;
}

.btn-secondary:hover {
    background-color: #F8FAFC;
    color: #2563EB;
    border-color: #2563EB;
}

.btn-large { padding: 1rem 2.5rem; font-size: 1.125rem; }
.w-full { width: 100%; }

/* Navbar Full-width Fixed */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.05); transition: background 0.3s;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; max-width: 1400px; margin: 0 auto; }
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }
.nav-links a:hover { color: var(--accent); }

/* Loader */
.loader { position: fixed; inset: 0; background: var(--bg-primary); z-index: 9999; display: flex; justify-content: center; align-items: center; text-align: center; transition: opacity 0.5s ease; }
.loader.fade-out { opacity: 0; pointer-events: none; }
.progress-bar { width: 100%; max-width: 300px; height: 6px; background: #E2E8F0; border-radius: var(--radius-max); margin: 1.5rem auto; overflow: hidden; }
.progress { width: 0%; height: 100%; background: var(--accent); transition: width 0.1s ease; }

/* Scroll Progress indicator */
.scroll-progress-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); z-index: 10000; width: 0%; }

/* Hero Section */
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 1.5rem 2rem 1.5rem; position: relative; padding-top: 5rem; z-index: 1; }
.glass-hero { padding: 2rem 2rem 4rem 2rem; max-width: 950px; margin: auto; }
.glass-hero .btn { text-shadow: none; }
.badge-accent { display: inline-block; background: #e53935; color: white; padding: 0.5rem 1.5rem; border-radius: 2rem; font-weight: 700; font-size: 0.9rem; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 0.05em; text-shadow: none; box-shadow: 0 4px 15px rgba(229,57,53,0.3); }
.hero-title { font-size: clamp(2rem, 8vw, 4.5rem); letter-spacing: -0.02em; margin-bottom: 1.5rem; line-height: 1.1; color: #0F172A; font-weight: 800; text-shadow: 0 0 8px rgba(255,255,255,1), 0 0 20px rgba(255,255,255,0.8); }
.hero-subtitle { font-size: 1.35rem; color: #0F172A; margin-bottom: 2.5rem; font-weight: 600; text-shadow: 0 0 6px rgba(255,255,255,1), 0 0 15px rgba(255,255,255,0.9); max-width: 750px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; position: relative; z-index: 10; }

/* Scroll Hint */
.scroll-hint { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--text-main); font-size: 0.875rem; font-weight: 600; animation: bounce 2s infinite; text-shadow: 0 0 10px rgba(255,255,255,0.8); margin-top: 1rem; }
.mouse { width: 26px; height: 40px; border: 2px solid var(--text-main); border-radius: 20px; display: flex; justify-content: center; padding-top: 6px; }
.wheel { width: 4px; height: 8px; background: var(--text-main); border-radius: 2px; animation: scroll 1.5s infinite; }
@keyframes scroll { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }

/* Services Grid */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 2rem; }
.service-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 1rem; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.service-icon { font-size: 2.5rem; background: white; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 16px; box-shadow: var(--shadow-soft); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.service-card { transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.service-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 15px 35px rgba(37,99,235,0.15); border-color: rgba(37,99,235,0.3); }
.service-card:hover .service-icon { transform: scale(1.1) rotate(5deg); background: var(--accent); color: white; box-shadow: 0 10px 20px rgba(37,99,235,0.3); }
.service-card h3 { font-size: 1.3rem; margin-bottom: 0; }
.semantic-list { list-style: none; }
.semantic-list li { position: relative; padding-left: 1.75rem; margin-bottom: 1rem; color: var(--text-muted); font-size: 1rem; }
.semantic-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: bold; font-size: 1.2rem; line-height: 1; }
.semantic-list.text-center li { padding-left: 0; }
.semantic-list.text-center li::before { display: none; }

/* Dynamic SVG Animations for Service Cards */
.service-icon { color: #475569; }
.service-icon svg { width: 30px; height: 30px; stroke-width: 1.8; transition: color 0.4s ease; }
.service-card:hover .service-icon svg { color: white; }
.anim-pulse svg { animation: dashPulse 2.5s infinite ease-in-out; }
.anim-zap svg { animation: dashZap 1.5s infinite ease-in-out; }
.anim-float svg { animation: dashFloat 3s infinite ease-in-out; }
.anim-wrench svg { transform-origin: center; animation: dashWrench 2.5s infinite ease-in-out; }
.anim-spin svg { animation: dashSpin 8s infinite linear; }

@keyframes dashPulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0px transparent); } 50% { transform: scale(1.15); filter: drop-shadow(0 0 5px rgba(37,99,235,0.4)); } }
@keyframes dashZap { 0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; filter: drop-shadow(0 0 0px transparent); } 50% { transform: scale(0.95) rotate(-5deg); opacity: 0.8; filter: drop-shadow(0 0 6px currentColor); } }
@keyframes dashFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes dashWrench { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(20deg); } }
@keyframes dashSpin { 100% { transform: rotate(360deg); } }

/* Advantages Section */
.advantages-wrapper { display: flex; flex-direction: column; gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.advantage-row { display: flex; gap: 2rem; align-items: flex-start; }
.adv-number { font-size: 4rem; font-weight: 800; color: rgba(37,99,235,0.1); line-height: 1; font-family: 'Space Grotesk', sans-serif; }
.advantage-row h3 { font-size: 1.5rem; margin-bottom: 0.75rem; color: var(--accent); }
.advantage-row p { font-size: 1.1rem; color: var(--text-muted); }

/* Contacts & Map */
.contacts-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 2.5rem; }
.contacts-desc { margin-bottom: 2rem; color: var(--text-muted); font-size: 1.1rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.5rem; }
.contact-item .icon { font-size: 2rem; background: white; padding: 1rem; border-radius: 16px; box-shadow: var(--shadow-soft); }
.contact-item strong { display: block; font-size: 0.9rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.25rem; letter-spacing: 0.05em; }
.contact-item p { font-size: 1.25rem; font-weight: 600; color: var(--text-main); }
.highlight-link { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.yandex-map { padding: 0.5rem; } /* Less padding for map card */

/* Footer */
.footer { background: white; padding: 4rem 1.5rem; border-top: 1px solid var(--border-glass); text-align: center; }
.footer-content { display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.footer .links { display: flex; gap: 2.5rem; flex-wrap: wrap; justify-content: center; }
.footer .links a { font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.05em; }

/* Interactive Reveal Animations */
.interactive-card { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.interactive-card.revealed { opacity: 1; transform: translateY(0); }

/* Cookie Banner & Back To Top remain standard */
.cookie-banner { position: fixed; bottom: -100%; left: 50%; transform: translateX(-50%); width: 90%; max-width: 600px; background: white; border: 1px solid #E2E8F0; box-shadow: var(--shadow-hover); padding: 1.5rem; border-radius: var(--radius-lg); z-index: 9999; display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.cookie-banner.show { bottom: 2rem; }
.back-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 48px; height: 48px; background: var(--text-main); color: white; border: none; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; opacity: 0; transition: var(--transition); z-index: 1000; }
.back-to-top.show { opacity: 1; }

/* Mobile menu base styles */
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-main); cursor: pointer; padding: 0.5rem; z-index: 1001; }
.mobile-nav-btn { display: none; }
.nav-right { display: flex; align-items: center; gap: 1rem; }

/* Telegram Integration Styles */
.tg-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #27A6E6; /* Telegram Blue */
    color: white;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(39, 166, 230, 0.3);
}
.tg-icon-link:hover {
    background-color: #1994D1;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(39, 166, 230, 0.4);
    color: white;
}
.tg-svg {
    width: 22px;
    height: 22px;
    animation: gentlePulse 2.5s infinite ease-in-out;
}

.tg-btn {
    background-color: #27A6E6;
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(39, 166, 230, 0.2) !important;
}
.tg-btn:hover {
    background-color: #1994D1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(39, 166, 230, 0.4) !important;
}
.tg-svg-btn {
    animation: gentleRotateFloat 3s infinite ease-in-out;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
@keyframes gentleRotateFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(-8deg); }
}

/* Mobile Adaptations */
@media (max-width: 900px) {
    .contacts-layout { grid-template-columns: 1fr; }
    .advantage-row { flex-direction: column; gap: 1rem; }
    .adv-number { font-size: 3rem; margin-bottom: -1rem; }
}
@media (max-width: 768px) {
    .desktop-only { display: none; }
    .glass-hero { padding: 2rem 1.5rem; }
    .nav-container { padding: 1rem; }
    
    /* Mobile Menu */
    .desktop-nav-btn { display: none; }
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
    .nav-links {
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        flex-direction: column; justify-content: center; align-items: center;
        gap: 2rem; 
        opacity: 0; visibility: hidden; pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease; 
        z-index: 1000;
        padding: 2rem;
    }
    .nav-links.active { opacity: 1; visibility: visible; pointer-events: auto; }
    .nav-links a { font-size: 1.25rem; }
    .mobile-nav-btn { display: inline-flex; margin-top: 1rem; font-size: 1rem; padding: 1rem 2rem; }
    
    /* Hamburger animation */
    .mobile-menu-btn.active svg line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .mobile-menu-btn.active svg line:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active svg line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .mobile-menu-btn svg line { transition: all 0.3s; transform-origin: center; }
}
