:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #8b5cf6;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
    --error: #ef4444;
    --header-height: 70px;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0f172a, #0b1120);
    color: #e2e8f0;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 70px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 600px;
    margin-bottom: 3rem;
}

/* Навигация */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: all 0.4s ease;
}

nav.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: white;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Герой секция */
#hero {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.15), transparent 40%),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.15), transparent 40%),
                linear-gradient(to bottom, #0f172a, #0b1120);
    position: relative;
    padding-top: 100px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-title span {
    color: var(--primary);
    position: relative;
}

.hero-title span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background: rgba(37, 99, 235, 0.2);
    z-index: -1;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-top: 2rem;
}

/* Секция услуг */
#services {
    background: linear-gradient(to bottom, #0b1120, #0f172a);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: var(--primary);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-description {
    color: #94a3b8;
}

/* Секция KPI */
#business-impact {
    background: linear-gradient(to bottom, #0f172a, #0b1120);
    position: relative;
}

.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.kpi-card {
    display: flex;
    flex-direction: column;
    align-items: center;   
    justify-content: flex-start;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: var(--primary);
    transition: left 0.8s ease;
}

.kpi-card.animate {
    transform: translateY(0);
    opacity: 1;
}

.kpi-card.animate::before {
    left: 0;
}

.kpi-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.kpi-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    transform: scale(0);
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.kpi-card.animate .kpi-icon {
    transform: scale(1);
}

.kpi-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    display: block;
}

.kpi-label {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
}

.kpi-description {
    color: #94a3b8;
    line-height: 1.5;
    font-size: 0.95rem;
    margin: 0 0 12px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
    margin: 20px 0 0;    
    overflow: hidden;
    margin-top: auto;    
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    width: 0%;
    transition: width 2s ease-out 0.5s;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.kpi-card.animate .progress-fill {
    width: var(--progress-width);
}

.chart-container {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.8s ease;
    position: relative;
    z-index: 2;
    margin-top: 50px;
}

.chart-container.animate {
    transform: translateY(0);
    opacity: 1;
}

.chart-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #e2e8f0;
    text-align: center;
    margin-bottom: 2rem;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    margin-bottom: 1rem;
    padding: 0 2.5%;
}

.chart-bar {
    flex: 1;
    margin: 0 5px;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
    position: relative;
    height: 0%;
    transition: height 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: calc(var(--bar-index) * 0.2s);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.chart-container.animate .chart-bar {
    height: var(--bar-height);
}

.chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    transition-delay: calc(var(--bar-index) * 0.2s + 0.5s);
}

.chart-container.animate .chart-bar::after {
    opacity: 1;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 0 2.5%;
}

.chart-label {
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
    flex: 1;
    margin: 0 5px;
}

.floating-shapes {
    display: none;
}

/* Контактная форма */
#contact {
    background: linear-gradient(to bottom, #0b1120, #0f172a);
    position: relative;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.contact-info {
    padding-right: 30px;
}

.contact-title {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

.contact-text {
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 500px;
}

.contact-form {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Телефонное поле: префикс +7 и инпут в одну линию */
.phone-input-container {
    display: flex;
    align-items: stretch;
}

.phone-prefix {
    display: inline-flex;
    align-items: center;
    padding: 14px 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #94a3b8;
    white-space: nowrap;
}

.phone-input {
    flex: 1 1 auto;
    width: auto;
    border-radius: 0 8px 8px 0;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.error {
    display: none;
    color: var(--error);
    margin-top: 5px;
    font-size: 0.85rem;
}

.form-input.error-border,
.form-textarea.error-border {
    border-color: var(--error);
}

#responseMessage {
    display: none;
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
}

#responseMessage.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

#responseMessage.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}

.csrf-status {
    display: none;
    padding: 5px;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 10px;
}

.csrf-ready {
    color: var(--success);
}

.csrf-error {
    color: var(--error);
}

/* Стилизация чекбокса соглашения */
.checkbox-group {
    margin: 1.8rem 0;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label {
    display: inline-block;
    position: relative;
    padding-left: 35px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.checkbox-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 22px;
    height: 22px;
    border: 2px solid var(--light-gray);
    border-radius: 4px;
    background-color: white;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.checkbox-label::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 5px;
    width: 8px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked ~ .checkbox-label::before {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 3px 8px rgba(197, 48, 48, 0.2);
}

input[type="checkbox"]:checked ~ .checkbox-label::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

input[type="checkbox"]:focus ~ .checkbox-label::before {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.2);
}

.checkbox-label:hover::before {
border-color: var(--primary);
}

.checkbox-group.has-error .checkbox-label::before {
border-color: var(--error);
}

.checkbox-group.has-error .checkbox-label {
color: var(--error);
}

.privacy-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.privacy-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: var(--transition);
}

.privacy-link:hover {
color: var(--primary);
}

.privacy-link:hover::after {
width: 100%;
}

/* Анимация для фокуса */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(197, 48, 48, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(197, 48, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(197, 48, 48, 0); }
}

input[type="checkbox"]:focus ~ .checkbox-label::before {
    animation: pulse 1.5s infinite;
}

/* Футер */
footer {
    background: #0b1120;
    padding: 50px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Анимации для эффекта конструктора */
.animate-element {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.animate-from-left {
    transform: translateX(-50px);
}

.animate-from-right {
    transform: translateX(50px);
}

.animate-from-bottom {
    transform: translateY(50px);
}

.animate-from-top {
    transform: translateY(-50px);
}

.animate-element.animated {
    opacity: 1;
    transform: translate(0, 0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-title span::after {
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        padding-right: 0;
        text-align: center;
    }
    
    .contact-text {
        margin: 0 auto 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .section-title {
        font-size: 2.3rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    #business-impact .section-title {
        font-size: 2.5rem;
    }
    
    .kpi-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .kpi-card {
        padding: 30px 25px;
    }
    
    .kpi-number {
        font-size: 2.8rem;
    }
    
    .chart-container {
        padding: 30px 20px;
    }
    
    .chart-bars {
        height: 150px;
        padding: 0 1%;
    }
    
    .chart-bar {
        margin: 0 2px;
    }
    
    .chart-labels {
        padding: 0 1%;
    }
    
    .chart-label {
        margin: 0 2px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}