/* Self-hosted Inter (cyrillic + latin, woff2) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/inter-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --card-hover: #f1f5f9;
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --green: #059669;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --header-bg: #ffffff;
    --footer-bg: #ffffff;
    --footer-text: #64748b;
    --header-height: 72px;
    --header-control-height: 40px;
    --logo-height: 48px;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.04);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-light);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    transition: border-color 0.3s;
}

.site-header.scrolled {
    border-bottom-color: var(--border);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 16px;
}

.logo-link {
    flex-shrink: 0;
}

.logo-link img {
    height: var(--logo-height);
    width: auto;
    max-width: min(360px, 52vw);
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 28px;
}

.nav-desktop a:not(.btn) {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-desktop a:not(.btn):hover {
    color: var(--text);
}

.nav-desktop .btn-outline,
.nav-desktop .btn-primary {
    height: var(--header-control-height);
    padding: 0 18px;
    font-size: 0.875rem;
    line-height: 1;
    box-sizing: border-box;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--accent-light);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    padding: 0;
}

.menu-toggle svg {
    width: 22px;
    height: 22px;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0 20px;
    border-top: 1px solid var(--border);
}

.nav-mobile.open {
    display: flex;
}

.nav-mobile a {
    color: var(--text-muted);
    font-weight: 500;
    padding: 8px 0;
}

.nav-mobile .btn {
    margin-top: 8px;
}

/* Hero */
.hero {
    padding: calc(var(--header-height) + 48px) 0 64px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%);
}

.hero::before {
    display: none;
}

.hero-carousel {
    position: relative;
}

.hero-slides {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
}

.hero-slide {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    width: 100%;
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.hero-content {
    max-width: 720px;
}

.badge-green {
    display: inline-block;
    background: #ecfdf5;
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #a7f3d0;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-muted);
    margin: 0 0 28px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-visual {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    background: var(--card);
    min-height: 280px;
    min-width: 0;
    width: 100%;
}

.hero-illustration {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 560 / 400;
    vertical-align: middle;
}

.hero-visual img,
.hero-visual svg,
.hero-visual object {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 560 / 400;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    padding: 0;
}

.carousel-btn:hover {
    background: var(--card-hover);
    border-color: var(--accent);
}

.carousel-dots {
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--text-muted);
    opacity: 0.4;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
}

.carousel-dot.active {
    opacity: 1;
    background: var(--accent);
    transform: scale(1.2);
}

/* Sections */
.section {
    padding: 72px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text);
}

.section-header .section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0;
}

/* Partners */
.partners {
    padding: 48px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 32px 48px;
}

.partner-item {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.partner-item:hover {
    opacity: 1;
}

.partner-item img,
.partner-item svg {
    height: 36px;
    width: auto;
    max-width: 140px;
    filter: brightness(0);
}

/* Cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 24px rgba(0, 0, 0, 0.06);
}

.card-icon {
    margin-bottom: 12px;
    line-height: 1;
    color: var(--accent);
}

.card-icon svg {
    display: block;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.65;
}

.card-action {
    margin-top: 20px;
}

.card-action .btn-outline {
    padding: 8px 18px;
    font-size: 0.875rem;
}

/* Testimonials */
.testimonial-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow);
}

.testimonial-card::before {
    display: none;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.75;
    margin: 0 0 20px;
    color: var(--text);
    font-style: italic;
}

.testimonial-author {
    font-weight: 700;
    margin: 0;
    font-size: 0.95rem;
}

.testimonial-role {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 4px 0 0;
}

/* Pricing */
.pricing-section {
    background: #f8fafc;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    opacity: 0;
    transform: translateY(24px);
}

.pricing-section.is-visible .pricing-card {
    animation: pricing-fade-up 0.55s ease forwards;
}

.pricing-section.is-visible .pricing-card:nth-child(1) {
    animation-delay: 0.05s;
}

.pricing-section.is-visible .pricing-card:nth-child(2) {
    animation-delay: 0.15s;
}

.pricing-section.is-visible .pricing-card:nth-child(3) {
    animation-delay: 0.25s;
}

.pricing-section.is-visible .pricing-card:nth-child(4) {
    animation-delay: 0.35s;
}

@keyframes pricing-fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.pricing-section.is-visible .pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-card-popular {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12), 0 4px 16px rgba(37, 99, 235, 0.08);
}

.pricing-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: var(--accent);
    border-radius: 999px;
}

.pricing-card-name {
    margin: 0 0 12px;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.pricing-card-price {
    margin: 0 0 24px;
    line-height: 1.2;
}

.pricing-amount {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: #1e293b;
}

.pricing-period {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    flex: 1;
}

.pricing-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.pricing-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateY(-50%);
}

.pricing-btn {
    width: 100%;
    padding: 12px 32px;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
}

.pricing-btn:hover {
    color: #fff;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--card);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-item.open .faq-question {
    color: var(--accent);
}

.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
    color: var(--accent);
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 24px 20px;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-item.open .faq-answer {
    display: block;
}

/* Contact form */
.contact-section {
    background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%);
}

.contact-form {
    max-width: 720px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.contact-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.contact-optional {
    font-weight: 500;
    color: var(--text-muted);
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.contact-field input:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.contact-field input.contact-input-error,
.contact-field textarea.contact-input-error {
    border-color: #dc2626;
}

.contact-field textarea {
    resize: vertical;
    min-height: 112px;
}

.contact-field-full {
    grid-column: 1 / -1;
}

.contact-hint {
    margin: 16px 0 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.contact-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.contact-form-actions {
    margin-top: 24px;
}

.contact-submit {
    padding: 12px 32px;
    min-width: 200px;
}

.contact-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.contact-form-status {
    margin: 16px 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-form-status.is-success {
    color: var(--green);
}

.contact-form-status.is-error {
    color: #dc2626;
}

.contact-field-error {
    margin: 6px 0 0;
    font-size: 0.8125rem;
    color: #dc2626;
}

@media (min-width: 640px) {
    .contact-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* CTA */
.cta-banner {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%);
    border-top: 1px solid var(--border);
}

.cta-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--text);
}

.cta-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0 0 28px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.cta-banner .btn-primary {
    background: var(--accent);
}

.cta-banner .btn-primary:hover {
    background: var(--accent-light);
}

/* Footer */
.site-footer {
    padding: 48px 0 32px;
    background: var(--footer-bg);
    color: var(--footer-text);
    border-top: 1px solid var(--border);
}

.site-footer .logo-link img {
    filter: none;
}

.site-footer .footer-logo img {
    height: 40px;
    max-width: min(220px, 70vw);
}

.footer-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
    align-items: center;
    text-align: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
}

.footer-nav a {
    color: var(--footer-text);
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-nav a:hover {
    color: var(--accent);
}

.footer-contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    color: var(--footer-text);
    font-size: 0.95rem;
}

.footer-contacts a {
    color: var(--footer-text);
}

.footer-contacts a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    grid-column: 1 / -1;
    text-align: center;
}

/* Responsive */
@media (min-width: 640px) {
    .cards-grid.cols-2,
    .cards-grid.cases {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    .nav-desktop {
        display: flex;
    }

    .nav-mobile {
        display: none !important;
    }

    .cards-grid.cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 24px 32px;
        text-align: left;
    }

    .footer-logo {
        justify-self: start;
    }

    .footer-nav {
        justify-content: center;
        justify-self: center;
    }

    .footer-contacts {
        justify-content: flex-end;
        justify-self: end;
    }
}

@media (min-width: 1024px) {
    .cards-grid.cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .cards-grid.benefits {
        grid-template-columns: repeat(3, 1fr);
    }

    .cards-grid.cases.cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .cards-grid.features {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Case study pages */
.case-breadcrumb {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.case-breadcrumb a {
    color: var(--accent-light);
}

.case-hero {
    padding: calc(var(--header-height) + 48px) 0 64px;
    background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%);
}

.case-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.case-section {
    padding: 56px 0;
    border-top: 1px solid var(--border);
}

.case-section:first-of-type {
    border-top: none;
}

.case-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.case-list-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.case-list-marker {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.case-list-item.problem .case-list-marker {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.case-list-body strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.case-list-body p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-card {
    text-align: center;
    padding: 28px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-value {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 8px;
    line-height: 1.4;
}

.case-diffs .case-list-marker {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
}

@media (min-width: 768px) {
    .case-hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
