:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(20, 27, 45, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #ff3366; 
    --accent-glow: rgba(255, 51, 102, 0.3);
    --accent-gradient: linear-gradient(135deg, #ff3366, #ff4500);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
}

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

body {
    background-color: var(--bg-color); color: var(--text-main);
    font-family: 'Manrope', sans-serif; line-height: 1.6; overflow-x: hidden;
}

.bg-pattern {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255, 0.01) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
}

.container { max-width: 1280px; margin: 0 auto; padding: 100px 20px; }
.text-center { text-align: center; }

.cursor-glow {
    position: fixed; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255, 51, 102, 0.15) 0%, transparent 60%);
    border-radius: 50%; pointer-events: none; z-index: -1;
    transform: translate(-50%, -50%); transition: width 0.2s, height 0.2s;
}

/* --- НАВИГАЦИЯ --- */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(11, 15, 25, 0.85); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border); z-index: 1000;
}

.nav-container { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; }
.logo-img { height: 75px; width: auto; max-width: 250px; object-fit: contain; transition: transform 0.3s; }
.logo-img:hover { transform: scale(1.05); }

.nav-menu { display: flex; gap: 30px; align-items: center; }
.nav-menu a { text-decoration: none; color: var(--text-main); font-weight: 600; transition: color 0.3s; }
.nav-menu a:hover { color: var(--accent); }
.nav-btn { background: var(--accent-gradient); padding: 12px 28px; border-radius: 50px; color: #fff !important; }

.hover-underline { position: relative; }
.hover-underline::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 50%; background: var(--accent);
    transition: width 0.3s ease, left 0.3s ease;
}
.hover-underline:hover::after { width: 100%; left: 0; }

.mobile-toggle {
    display: none; background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 6px; z-index: 1001; padding: 5px;
}
.mobile-toggle span { width: 30px; height: 3px; background: #fff; border-radius: 3px; transition: 0.3s; }

/* --- HERO (ГЛАВНЫЙ ЭКРАН) --- */
.hero { 
    height: 100vh; min-height: 600px; position: relative; 
    display: flex; align-items: center; justify-content: center; 
    overflow: hidden; /* Защита от багов */
}
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }

/* Затемнение видео — теперь равномерное по всему экрану, чтобы было видно детали! */
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11, 15, 25, 0.65); z-index: -1; }

.hero-content { 
    position: relative; z-index: 1; text-align: center; 
    width: 100%; max-width: 1000px; padding: 0 20px; 
    /* Текст ИДЕАЛЬНО центрируется через flexbox в .hero */
}

h1 { font-size: clamp(2.5rem, 6vw, 5.5rem); line-height: 1.1; font-weight: 800; margin-bottom: 20px; }

.gradient-text {
    background: linear-gradient(270deg, #ff3366, #ff7b54, #ff007f, #ff3366);
    background-size: 300% 300%; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: gradientFlow 6s ease infinite;
}
@keyframes gradientFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.hero-content p { font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--text-muted); max-width: 700px; margin: 0 auto 40px; }
.btn-primary {
    display: inline-block; background: var(--accent-gradient); color: #fff; text-decoration: none;
    padding: 18px 45px; border-radius: 50px; font-weight: 800; font-size: 1.1rem; transition: transform 0.3s, box-shadow 0.3s;
}
.btn-primary:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(255, 51, 102, 0.4); }

/* --- КАРТОЧКИ --- */
.glass-card {
    position: relative; overflow: hidden; 
    background: var(--card-bg); backdrop-filter: blur(15px); border: 1px solid var(--glass-border);
    border-radius: 24px; padding: 40px; transform-style: preserve-3d; will-change: transform;
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1), border-color 0.4s, box-shadow 0.4s;
}

.shine-effect::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg); transition: 0s; z-index: 1; pointer-events: none;
}
.shine-effect:hover::before { left: 200%; transition: 0.7s ease-in-out; }

.glass-card:hover { border-color: rgba(255, 51, 102, 0.3); box-shadow: 0 10px 30px rgba(255, 51, 102, 0.1); }
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin-bottom: 50px; }
.text-hover-accent { transition: color 0.3s; }
.glass-card:hover .text-hover-accent { color: var(--accent); }

/* --- СЕТКИ --- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; align-items: stretch; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; align-items: stretch; }

/* Блоки контента */
.metrics-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.metric-card { flex: 1; min-width: 250px; text-align: center; }
.metric-card .num { font-size: 3.5rem; font-weight: 800; color: var(--accent); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about-image { padding: 0; overflow: hidden; }
.about-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }

.service-card { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.card-img { width: 100%; height: 220px; object-fit: cover; border-bottom: 1px solid var(--glass-border); z-index: 2; position: relative;}
.card-content { padding: 30px; flex-grow: 1; z-index: 2; position: relative;}
.card-content h3 { font-size: 1.5rem; margin-bottom: 15px; }
.card-content p { color: var(--text-muted); }

.review-card { display: flex; flex-direction: column; justify-content: space-between; }
.review-text { font-style: italic; color: #ddd; margin-bottom: 30px; font-size: 1.05rem; z-index: 2; position: relative;}
.author { display: flex; align-items: center; gap: 15px; z-index: 2; position: relative;}
.author img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }

.faq-grid { display: flex; flex-direction: column; gap: 15px; max-width: 800px; margin: 0 auto; }
details { cursor: pointer; padding: 25px; transition: 0.3s; border-color: rgba(255, 255, 255, 0.1); }
details[open] { border-color: var(--accent); }
details p { margin-top: 15px; color: var(--text-muted); border-top: 1px solid var(--glass-border); padding-top: 15px; position: relative; z-index: 2;}
details summary { position: relative; z-index: 2; font-weight: 600; font-size: 1.1rem; list-style: none;}

/* --- КОМАНДА --- */
.team-card { text-align: center; padding: 30px; }
.team-img-wrap {
    width: 100%; height: 350px; border-radius: 20px; overflow: hidden; margin-bottom: 25px;
    transform: scale(0.8); opacity: 0; transition: transform 1.2s cubic-bezier(0.2, 1, 0.3, 1), opacity 1s ease;
    z-index: 2; position: relative;
}
.team-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.team-card h3 { font-size: 1.6rem; margin-bottom: 5px; z-index: 2; position: relative;}
.team-card p { color: var(--accent); font-weight: 600; z-index: 2; position: relative;}
.team-card:hover img { transform: scale(1.1); }
.creative-fly.visible .team-img-wrap { transform: scale(1); opacity: 1; }

.contacts-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-bottom: 60px; }
.contact-btn { text-decoration: none; color: #fff; display: flex; align-items: center; gap: 12px; font-weight: 600; padding: 20px 45px; border-radius: 50px; font-size: 1.15rem; }
.footer-bottom { border-top: 1px solid var(--glass-border); padding-top: 30px; display: flex; justify-content: space-between; flex-wrap: wrap; color: var(--text-muted); }
.socials a { color: #fff; text-decoration: none; margin-left: 20px; font-weight: 600; transition: color 0.3s; }
.socials a:hover { color: var(--accent); }

/* --- COOKIE БАННЕР --- */
.cookie-banner {
    position: fixed; bottom: -150px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 700px; display: flex; justify-content: space-between; align-items: center;
    padding: 20px 30px; z-index: 9999; gap: 20px;
    transition: bottom 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cookie-banner.show { bottom: 30px; }
.cookie-banner p { margin: 0; font-size: 0.95rem; color: #e2e8f0; }
.btn-small { padding: 12px 25px; font-size: 0.95rem; white-space: nowrap; border: none; cursor: pointer;}

/* --- КРЕАТИВНАЯ АНИМАЦИЯ --- */
.creative-fly {
    opacity: 0; transform: translateY(150px) scale(0.5) rotateZ(-10deg) rotateX(20deg);
    transition: opacity 0.6s ease, transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.creative-fly.visible { opacity: 1; transform: translateY(0) scale(1) rotateZ(0) rotateX(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }


/* =========================================
   ИДЕАЛЬНАЯ АДАПТИВНОСТЬ
   ========================================= */

@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .team-img-wrap { height: 300px; } 
}

@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-image { min-height: 400px; }
}

@media (max-width: 768px) {
    .container { padding: 60px 20px; } 
    
    /* ШАПКА: Жестко ограничиваем высоту на телефонах */
    .nav-container { padding: 10px 20px; } 
    .logo-img { height: 40px; max-width: 180px; } /* Логотип компактный, чтобы не дуть шапку */
    
    .navbar .nav-btn { display: none; } 
    .mobile-toggle { display: flex; }
    .nav-menu {
        position: fixed; top: 0; left: -100%; width: 100%; height: 100vh;
        background: rgba(11, 15, 25, 0.98); flex-direction: column; justify-content: center; transition: 0.4s; z-index: -1; gap: 15px;
    }
    .nav-menu.active { left: 0; }
    .nav-menu a { font-size: 1.8rem; padding: 10px 0;}
    
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    
    /* ТЕКСТ HERO: Уменьшаем, чтобы не давило */
    h1 { font-size: 2.3rem; margin-bottom: 15px; }
    .hero-content p { font-size: 1rem; margin-bottom: 30px; }
    
    .cookie-banner { flex-direction: column; text-align: center; bottom: -250px; padding: 20px; }
    .cookie-banner.show { bottom: 20px; }
    .cookie-banner .btn-primary { width: 100%; margin-top: 10px; }

    /* ЛАНДШАФТ (ТЕЛЕФОН ГОРИЗОНТАЛЬНО) */
    @media (orientation: landscape) {
        .hero { height: auto; min-height: 100vh; padding: 100px 0 40px; }
        .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } 
        .team-img-wrap { height: 250px; }
    }
}