/* Сброс и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #0a0e27;
    --color-bg-light: #151b3d;
    --color-text: #e4e4e7;
    --color-text-secondary: #a1a1aa;
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-secondary: #8b5cf6;
    --color-accent: #06b6d4;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

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

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

/* Навигация */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 14, 39, 0.95);
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.logo-icon {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
}

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

.nav-menu a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-menu a:hover {
    color: var(--color-text);
}

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

.nav-cta {
    padding: 10px 24px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--color-text);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero секция */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    z-index: 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
}

.hero-stats {
    display: flex;
    gap: 60px;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* Code Window */
.hero-image {
    animation: fadeInRight 1s ease;
}

.code-window {
    background: rgba(21, 27, 61, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.window-dots span:nth-child(1) { background: #ff5f56; }
.window-dots span:nth-child(2) { background: #ffbd2e; }
.window-dots span:nth-child(3) { background: #27c93f; }

.window-title {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.window-content {
    padding: 24px;
}

.window-content code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-tag { color: #569cd6; }
.code-attr { color: #9cdcfe; }
.code-string { color: #ce9178; }
.code-comment { color: #6a9955; font-style: italic; }

/* Секции */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
}

/* Услуги */
.services {
    background: var(--color-bg-light);
}

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

.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px 32px;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 16px;
    margin-bottom: 24px;
}

.service-icon svg {
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.service-card > p {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: 8px 0;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-features li::before {
    content: '✓';
    color: var(--color-primary);
    font-weight: bold;
}

/* Портфолио */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.portfolio-image {
    overflow: hidden;
    height: 240px;
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-placeholder {
    transform: scale(1.1);
}

.portfolio-content {
    padding: 24px;
}

.portfolio-content h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.portfolio-content > p {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.portfolio-tags span {
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--color-primary-light);
}

/* Portfolio iframe */
.portfolio-iframe-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portfolio-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    transform: scale(1);
    transform-origin: top left;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    gap: 16px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-category {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.portfolio-view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: var(--color-bg);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: auto;
}

.portfolio-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* Цены */
.prices {
    background: var(--color-bg-light);
}

.prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.price-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px 32px;
    transition: var(--transition);
    position: relative;
}

.price-card.featured {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--color-primary);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
}

.price-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.price-badge {
    position: absolute;
    top: -12px;
    right: 32px;
    background: var(--gradient-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.price-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.price-header h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.price-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-currency {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
}

.price-features {
    list-style: none;
    margin-bottom: 32px;
}

.price-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--color-text-secondary);
}

.price-features svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.price-card .btn {
    width: 100%;
    justify-content: center;
}

/* Контакты */
.contacts {
    background: var(--color-bg);
}

.contacts-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.contacts-info h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.contacts-info > p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-methods {
    display: grid;
    gap: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.contact-method:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(8px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.contact-icon.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
}

.contact-icon.telegram {
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
}

.contact-icon.instagram {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
}

.contact-icon.email {
    background: var(--gradient-primary);
}

.contact-details h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
    color: var(--color-text);
}

.contact-details p {
    color: var(--color-text-secondary);
}

/* Форма заявки */
.order-form {
    background: var(--color-bg-light);
}

.order-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
}

.required {
    color: #ef4444;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

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

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--gradient-primary);
    border-color: var(--color-primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.checkbox-label span:last-child {
    color: var(--color-text-secondary);
}

.btn-large {
    width: 100%;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Футер */
.footer {
    background: var(--color-bg-light);
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-left p,
.footer-right p {
    color: var(--color-text-secondary);
    margin-top: 8px;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Адаптивность */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        transform: translateX(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
    }

    .nav-menu li {
        padding: 16px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        font-size: 1.1rem;
    }

    .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    .hero {
        padding-top: 100px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-image {
        order: -1;
    }

    .code-window {
        transform: scale(0.9);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-stats {
        gap: 40px;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid,
    .portfolio-grid,
    .prices-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero {
        padding-top: 120px;
    }

    .hero-image {
        display: none;
    }

    .hero .container {
        gap: 20px;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .hero-buttons {
        gap: 12px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .navbar {
        padding: 0;
    }

    .nav-wrapper {
        padding: 16px 0;
    }

    .logo {
        font-size: 1.3rem;
    }

    .logo-icon {
        font-size: 1.6rem;
    }

    .nav-menu {
        top: 70px;
    }

    .contact-form {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .checkbox-wrapper {
        padding: 16px;
    }

    .checkbox-label {
        font-size: 0.9rem;
    }
}