/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Цвета */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border: #e2e8f0;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    
    /* Шрифты */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Отступы */
    --container-padding: 2rem;
    --section-padding: 8rem 0;
    
    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Радиусы */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===== NAVIGATION (остров с отступами) ===== */
.navbar {
    --navbar-inset: clamp(0.45rem, 1.25vw, 0.85rem);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.5rem var(--navbar-inset) 0;
    background: transparent;
    border: none;
    pointer-events: none;
    transition: none;
}

.navbar-island {
    position: relative;
    z-index: 1002;
    pointer-events: auto;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.45rem clamp(0.85rem, 2vw, 1.35rem);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 100px;
    box-shadow: 0 3px 18px rgba(15, 23, 42, 0.07), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    transition: box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.navbar.scrolled .navbar-island {
    background: rgba(255, 255, 255, 0.94);
    border-color: var(--border);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.09), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.navbar-island-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.45rem, 1.1vw, 0.95rem);
    width: 100%;
    min-height: 2.65rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem 0.75rem;
    flex-shrink: 0;
}

.nav-phone {
    font-family: var(--font-heading);
    font-size: clamp(0.78rem, 1.15vw, 0.875rem);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.nav-phone:hover {
    color: var(--primary);
}

.btn-nav-cta {
    font-weight: 600;
    border-radius: 100px;
    white-space: nowrap;
    gap: 0;
}

/* Кнопка в шапке с классом nav-link: не даём стилям ссылки перекрашивать текст */
.nav-actions .btn-nav-cta.nav-link {
    color: #fff;
}

.nav-actions .btn-nav-cta.nav-link:hover {
    color: #fff;
}

.nav-actions .btn-nav-cta.nav-link::after {
    display: none;
}

.navbar-island-inner .logo {
    flex-shrink: 0;
    margin-inline-start: clamp(0.65rem, 2.2vw, 1.35rem);
}

.logo {
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.04em;
    line-height: 1.08;
}

.logo-line {
    font-family: var(--font-heading);
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.logo-line--top {
    font-size: clamp(1.05rem, 2.6vw, 1.28rem);
    letter-spacing: -0.02em;
}

.logo-line--bottom {
    font-size: clamp(0.72rem, 1.85vw, 0.82rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    opacity: 0.95;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: clamp(0.72rem, 1.35vw, 1.35rem);
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

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

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

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.25s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
}

.menu-toggle:active {
    background: rgba(99, 102, 241, 0.16);
}

.burger-icon {
    display: block;
    overflow: visible;
}

/* Три полоски — при открытии плавно исчезают */
.burger-bars {
    transform-origin: 12px 12px;
    transition:
        opacity 0.32s ease,
        transform 0.42s cubic-bezier(0.77, 0, 0.175, 1);
}

.menu-toggle.active .burger-bars {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

/* Симметричный × по диагоналям canvas (5,5)—(19,19) и (19,5)—(5,19) */
.burger-x {
    transform-origin: 12px 12px;
    transition:
        opacity 0.32s ease 0.1s,
        transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) 0.08s;
    transform: scale(0.35) rotate(-45deg);
    opacity: 0;
    pointer-events: none;
}

.menu-toggle.active .burger-x {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .burger-bars,
    .burger-x {
        transition-duration: 0.12s;
        transition-delay: 0s !important;
    }
}

@media (max-width: 1100px) {
    .nav-menu {
        position: fixed;
        top: calc(var(--navbar-inset) + 0.5rem + 3.1rem + var(--navbar-inset));
        left: var(--navbar-inset);
        right: var(--navbar-inset);
        max-width: 1200px;
        margin: 0 auto;
        width: auto;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 1.25rem 1.5rem;
        gap: 1rem;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s ease, opacity 0.3s ease;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
        border-radius: 1.25rem;
        border: 1px solid var(--border);
        align-items: stretch;
        z-index: 1001;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-menu .nav-link {
        padding: 0.35rem 0;
    }
}

@media (max-width: 520px) {
    .navbar-island {
        border-radius: 1.35rem;
    }

    .nav-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.35rem 0.5rem;
    }

    .nav-phone {
        font-size: 0.75rem;
        white-space: normal;
        text-align: right;
        line-height: 1.25;
        width: 100%;
    }

    .nav-actions .btn.btn-primary.btn-nav-cta {
        padding: 0.36rem 0.6rem;
        font-size: 0.6875rem;
        width: 100%;
        justify-content: center;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: clamp(4.9rem, 11.5vw, 6.35rem);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-1);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-2);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--gradient-3);
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.title-line:nth-child(2) {
    animation-delay: 0.4s;
}

.title-line:nth-child(3) {
    animation-delay: 0.6s;
}

.title-line.highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1s forwards;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Компактная CTA в шапке (перекрывает .btn, т.к. объявлен ниже) */
.nav-actions .btn.btn-primary.btn-nav-cta {
    padding: 0.4rem 0.78rem;
    font-size: 0.75rem;
    line-height: 1.25;
    min-height: 0;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.nav-actions .btn.btn-primary.btn-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.42);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-demo {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}

.btn-demo:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

.hero-buttons {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn svg {
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: translateX(4px);
}

/* ===== HERO VISUAL ===== */
.hero-visual {
    position: relative;
    height: 500px;
    animation: fadeIn 1s ease-out 0.5s both;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    animation: floatCard 6s infinite ease-in-out;
}

.card-1 {
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation-delay: 2s;
}

.card-3 {
    bottom: 0;
    left: 20%;
    animation-delay: 4s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(10px, -10px) rotate(2deg);
    }
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
}

/* ===== SECTION STYLES ===== */
section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-header--project .section-description {
    max-width: 42rem;
}

.project-vs-list {
    list-style: none;
    padding: 0;
    margin: 1.75rem auto 0;
    max-width: 48rem;
    text-align: left;
}

.project-vs-list li {
    position: relative;
    padding-left: 1.35rem;
    margin-bottom: 0.9rem;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.project-vs-list li:last-child {
    margin-bottom: 0;
}

.project-vs-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

/* ===== ABOUT SECTION ===== */
.about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.about-card {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

.about-card:hover::before {
    transform: scaleX(1);
}

.card-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    opacity: 0.2;
}

.about-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 5rem;
}

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

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

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

/* ===== SERVICES SECTION ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

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

.service-card > * {
    position: relative;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--gradient-1);
    color: white;
    transform: rotate(5deg) scale(1.1);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.service-link:hover {
    gap: 0.75rem;
    color: var(--primary-dark);
}

.service-link svg {
    transition: transform 0.3s ease;
}

.service-link:hover svg {
    transform: translateX(4px);
}

/* ===== PRICING SECTION ===== */
.pricing {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.75rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.35);
}

.pricing-card--accent {
    background: var(--bg-primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

.pricing-card--accent:hover {
    border-color: var(--primary-dark);
}

.pricing-card--flagship {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    border-color: rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.pricing-card--flagship .pricing-tier,
.pricing-card--flagship .pricing-name,
.pricing-card--flagship .pricing-tagline,
.pricing-card--flagship .pricing-features li {
    color: #cbd5e1;
}

.pricing-card--flagship .pricing-name {
    color: #f8fafc;
}

.pricing-card--flagship .pricing-value {
    background: linear-gradient(135deg, #a5b4fc 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-card--flagship .pricing-from,
.pricing-card--flagship .pricing-currency {
    color: #94a3b8;
}

.pricing-card--flagship .pricing-features li::before {
    color: #818cf8;
}

.pricing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    background: var(--gradient-1);
    color: white;
}

.pricing-badge--dark {
    background: rgba(129, 140, 248, 0.35);
    color: #e0e7ff;
    border: 1px solid rgba(129, 140, 248, 0.5);
}

.pricing-tier {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.pricing-card--flagship .pricing-tier {
    color: #a5b4fc;
}

.pricing-name {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.pricing-tagline {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    min-height: 2.85em;
}

.pricing-amount {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.pricing-card--flagship .pricing-amount {
    border-bottom-color: rgba(148, 163, 184, 0.25);
}

.pricing-from {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pricing-value {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-currency {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    flex: 1;
    margin-bottom: 1.5rem;
}

.pricing-features li {
    position: relative;
    padding-left: 1.35rem;
    margin-bottom: 0.65rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pricing-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
}

.pricing-cta {
    width: 100%;
    justify-content: center;
    margin-top: auto;
}

.pricing-footnote {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-light);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}

/* ===== BLOG + CMS (контент из API) ===== */
.blog-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

.blog-card-date {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.75rem;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.blog-card-body {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.blog-card-body p {
    margin-bottom: 0.75rem;
}

.blog-card-body p:last-child {
    margin-bottom: 0;
}

.cms-loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    grid-column: 1 / -1;
}

.cms-loading--wide {
    grid-column: 1 / -1;
}

.cms-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem 1rem;
    line-height: 1.65;
    grid-column: 1 / -1;
}

.cms-empty code {
    font-size: 0.85em;
    color: var(--primary-dark);
}

.section-header--tight {
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
}

.section-title--sm {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.project-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-card-media {
    aspect-ratio: 16 / 10;
    background: var(--bg-secondary);
    overflow: hidden;
}

.project-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-media--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--gradient-1);
    color: rgba(255, 255, 255, 0.95);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.project-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.project-card-body h4 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
}

.project-card-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.project-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.25rem 0;
}

.project-tags li {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.portfolio-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    background: var(--bg-secondary);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border);
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-md);
}

.project-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.75;
}

.project-intro p + p {
    margin-top: 1rem;
}

.project-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.project-feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.project-feature-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-feature-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.project-cta {
    text-align: center;
    margin: 0 auto 2.75rem;
    max-width: 40rem;
}

.project-cta-label {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

.project-cta-buttons {
    justify-content: center;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.tech-pill {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-primary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    cursor: pointer;
}

/* Скриншоты чаще шире 4:3 — чуть «киношнее» полотно, картинка без обрезки за счёт object-fit: contain */
.portfolio-item:has(.portfolio-photo) {
    aspect-ratio: 16 / 10;
}

.portfolio-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border);
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.placeholder-label {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.35rem;
}

.placeholder-hint {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 280px;
    line-height: 1.45;
}

.portfolio-1 {
    background: var(--gradient-1);
}

.portfolio-2 {
    background: var(--gradient-2);
}

.portfolio-3 {
    background: var(--gradient-3);
}

.portfolio-4 {
    background: var(--gradient-4);
}

.portfolio-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.portfolio-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

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

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.portfolio-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.2s;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
}

.portfolio-link {
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s ease 0.3s;
    box-shadow: var(--shadow-lg);
}

.portfolio-item:hover .portfolio-link {
    transform: translateY(0) scale(1);
}

.portfolio-link:hover {
    transform: scale(1.1) rotate(90deg);
}

/* ===== CONTACT SECTION ===== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-details {
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    align-items: start;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-item h4 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.contact-demo-btn {
    margin-top: 0.85rem;
}

.contact-form {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

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

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

/* ===== Модальное окно заказа тарифа ===== */
body.modal-open {
    overflow: hidden;
}

.pricing-modal[hidden] {
    display: none;
}

.pricing-modal:not([hidden]) {
    display: flex;
}

.pricing-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pricing-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.pricing-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.pricing-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
    max-height: min(92vh, 40rem);
    overflow-y: auto;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    padding: 1.75rem 1.75rem 1.5rem;
}

.pricing-modal__close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.pricing-modal__close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.pricing-modal__title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 2.25rem 1rem 0;
    line-height: 1.25;
}

.pricing-modal__summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
}

.pricing-modal__summary-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pricing-modal__summary-row + .pricing-modal__summary-row {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.pricing-modal__summary-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.pricing-modal__summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.pricing-modal__form .form-group {
    margin-bottom: 1rem;
}

.pricing-modal__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.pricing-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.25rem;
    padding-top: 0.25rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.footer-column h4 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

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

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.8);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-visual {
        height: 400px;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1.5rem;
        --section-padding: 5rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-visual {
        height: 300px;
    }
    
    .floating-card {
        padding: 1.5rem;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
}

