:root {
    --primary: #6C63FF;
    --primary-dark: #564FD8;
    --secondary: #00D4FF;
    --accent: #817BFF;
    --dark: #050510;
    --darker: #030308;
    --light: #F5F5F7;
    --gray: #8A8A8E;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --radius: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
}

/* Progress Bar */
#page-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 1001;
    transition: width 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 25px 0;
    background: rgba(5, 5, 16, 0.08);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(5, 5, 16, 0.95);
    padding: 20px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 500;
    font-size: 22px;
    color: var(--light);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.02);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: var(--light);
    text-decoration: none;
    font-weight: 450;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

/* Анимация подчеркивания в шапке */
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cta-button {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.25);
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.8), rgba(0, 212, 255, 0.8));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.3);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* Hero Section */
.hero {
    padding: 200px 0 120px;
    position: relative;
    overflow: hidden;
    background: var(--dark);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(108, 99, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(108, 99, 255, 0.04) 0%, transparent 50%);
    z-index: 0;
    animation: gradientShift 25s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { 
        background: 
            radial-gradient(circle at 20% 80%, rgba(108, 99, 255, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(108, 99, 255, 0.04) 0%, transparent 50%);
    }
    50% { 
        background: 
            radial-gradient(circle at 80% 80%, rgba(108, 99, 255, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 60% 60%, rgba(108, 99, 255, 0.04) 0%, transparent 50%);
    }
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--light) 0%, var(--primary) 25%, var(--accent) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
    transform: translateY(50px);
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero p {
    font-size: 1.15rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 400;
    line-height: 1.6;
    transform: translateY(50px);
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

@keyframes fadeInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Promotion Content Section */
.promotion-content {
    padding: 100px 0;
    background: var(--dark);
}

.content-block {
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.content-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.content-block:last-child {
    margin-bottom: 0;
}

.content-block h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--light) 0%, var(--accent) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.content-block p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.7;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content-block p:last-child {
    margin-bottom: 0;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(108, 99, 255, 0.15);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.service-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1));
}

.icon-seo {
    background: linear-gradient(135deg, #6C63FF, #00D4FF);
}

.icon-serm {
    background: linear-gradient(135deg, #FF6B6B, #6C63FF);
}

.icon-context {
    background: linear-gradient(135deg, #00D4FF, #817BFF);
}

.icon-targeting {
    background: linear-gradient(135deg, #817BFF, #FF6B6B);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--light);
}

.service-card p {
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.6;
    text-align: left;
    margin-bottom: 20px;
}

.service-features {
    list-style: none;
    margin-top: auto;
}

.service-features li {
    color: var(--gray);
    margin-bottom: 8px;
    font-size: 0.9rem;
    position: relative;
    padding-left: 15px;
}

.service-features li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.03) 0%, rgba(0, 212, 255, 0.03) 100%);
    padding: 80px 0;
    text-align: center;
    border-radius: var(--radius);
    margin-top: 60px;
}

.cta-section h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--light);
}

.cta-section p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background: var(--darker);
    color: var(--light);
    padding: 70px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.15rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: var(--light);
    font-weight: 600;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

.footer-col p {
    color: var(--gray);
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 400;
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 3px;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 30px 0;
    width: 100%;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 400;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
}

.footer-bottom-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--primary);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 1200px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 1100px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .content-block h2 {
        font-size: 1.9rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .service-card {
        padding: 30px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.9rem;
    }
    
    .hero {
        padding: 160px 0 80px;
    }
    
    footer {
        padding: 50px 0 25px;
    }
    
    .content-block h2 {
        font-size: 1.7rem;
    }
    
    .service-card {
        padding: 25px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 25px;
    }
}