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

html, body {
    height: 100%;
}

body {
    background: #0a0a0f;
    color: #e8e8f0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

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

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding: 0.9rem 0;
}

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

.logo a {
    font-size: 1.6rem;
    font-weight: 600;
    font-family: 'Space Mono', monospace;
    background: linear-gradient(135deg, #c084fc, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-decoration: none;
    letter-spacing: -0.3px;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    color: #d1d5db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #c084fc;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #cbd5e1;
}

/* Hero */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    background: linear-gradient(135deg, #ffffff, #a78bfa, #6d28d9);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.2rem;
    color: #9ca3af;
    max-width: 700px;
    margin: 0 auto 1.8rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    padding: 12px 28px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    font-family: 'Space Mono', monospace;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

/* Услуги – карточки с плавной анимацией наведения */
.services-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 3rem 0;
    justify-content: center;
}

.service-card {
    flex: 1;
    min-width: 250px;
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 28px;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(124, 58, 237, 0.2);
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(124, 58, 237, 0.3), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    border-color: #7c3aed;
    transform: translateY(-6px);
    background: rgba(30, 30, 45, 0.8);
    box-shadow: 0 15px 25px -12px rgba(124, 58, 237, 0.3);
}

.service-card i {
    font-size: 2.2rem;
    color: #c084fc;
    margin-bottom: 1rem;
}

/* Цифры */
.stats-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin: 3rem 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    font-family: 'Space Mono', monospace;
    background: linear-gradient(135deg, #c084fc, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Преимущества */
.features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
}

.feature {
    background: rgba(18, 18, 26, 0.5);
    border-radius: 24px;
    padding: 1.2rem 1.8rem;
    width: 220px;
    text-align: center;
    border: 1px solid #2d2d3a;
    transition: all 0.3s;
}

.feature:hover {
    border-color: #7c3aed;
    transform: scale(1.02);
}

/* Кейсы */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.case-card {
    background: rgba(18, 18, 26, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 28px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid rgba(139, 92, 246, 0.15);
    cursor: pointer;
    text-align: left;
}

.case-card:hover {
    transform: translateY(-8px);
    border-color: #7c3aed;
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.5);
}

.case-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.case-card .content {
    padding: 1.5rem;
}

/* Отзывы */
.reviews {
    background: rgba(18, 18, 26, 0.4);
    border-radius: 32px;
    padding: 2rem;
    margin: 3rem 0;
}

.review-card {
    background: #12121a;
    border-radius: 24px;
    padding: 1.5rem;
    margin: 1rem;
    display: inline-block;
    width: 280px;
    text-align: left;
    border: 1px solid #2d2d3a;
    transition: 0.2s;
}

.review-card:hover {
    border-color: #7c3aed;
}

/* Форма */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

input, textarea {
    width: 100%;
    padding: 14px 18px;
    background: #12121a;
    border: 1px solid #2d2d3a;
    border-radius: 24px;
    color: #f0f0f0;
    font-size: 1rem;
    transition: 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

button[type="submit"] {
    background: #7c3aed;
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    font-family: 'Space Mono', monospace;
    cursor: pointer;
    transition: 0.2s;
    display: block;
    margin: 0 auto;
}

button[type="submit"]:hover {
    background: #6d28d9;
    transform: scale(1.02);
}

/* Модалка (только для картинок, не для кейсов) */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
}

.modal img {
    width: auto;
    max-height: 80vh;
    border-radius: 20px;
}

.close-modal {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 36px;
    color: white;
    cursor: pointer;
}

/* Страница детального кейса */
.page-content {
    padding: 2rem 0 4rem;
    min-height: 60vh;
}

.case-detail-layout {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    align-items: flex-start;
}

.case-detail-image {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.case-detail-image img {
    width: 100%;
    border-radius: 28px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.case-detail-image .btn {
    align-self: flex-start;
    margin-top: 0.5rem;
}

.case-detail-info {
    flex: 1.5;
    text-align: left;
}

.case-detail-info h1 {
    font-family: 'Space Mono', monospace;
    margin-bottom: 1rem;
}

.case-detail-info p {
    margin-bottom: 0.8rem;
}

.case-detail-full {
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    padding-top: 2rem;
    margin-top: 1rem;
    text-align: left;
}

.case-detail-full h2 {
    font-family: 'Space Mono', monospace;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

/* Футер */
.site-footer {
    background: rgba(8, 8, 12, 0.9);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links a {
    color: #a0a0b0;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links a i {
    font-size: 1.2rem;
}

.social-links a:hover {
    color: #c084fc;
}

/* Анимации */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-nav ul {
        display: none;
        flex-direction: column;
        background: #0f0f18;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        padding: 1.5rem;
        gap: 1.2rem;
        backdrop-filter: blur(20px);
        border-bottom: 1px solid #2d2d3a;
    }
    .main-nav ul.active {
        display: flex;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .hero h1 {
        font-size: 2.3rem;
    }
    .services-grid {
        flex-direction: column;
    }
    .stats-grid {
        gap: 1.5rem;
    }
    .case-detail-layout {
        flex-direction: column;
    }
    .case-detail-image .btn {
        align-self: stretch;
        text-align: center;
    }
}