* {
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-pill: 9999px;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
    --shadow-lg: 0 16px 32px rgba(15, 23, 42, 0.1);
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-page);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

/* ==========================================
   HERO SECTION (COMPACT SPACING)
========================================== */
.hero {
    position: relative;
    background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0b0f19 100%);
    color: #ffffff;
    padding: 42px 20px 32px;
    text-align: center;
    border-bottom: 1px solid #1e293b;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0) 70%);
    pointer-events: none;
}

.hero__container {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    z-index: 1;
}

.hero__logo-wrap {
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
}

.hero__logo-img {
    width: 168px;
    height: 168px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
    transition: transform 0.3s ease;
}

.hero__logo-img:hover {
    transform: scale(1.05) rotate(2deg);
}

.hero__title {
    margin: 0 0 8px;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: #ffffff;
    line-height: 1.2;
}

.hero__subtitle {
    margin: 0 0 20px;
    font-size: 16px;
    color: #94a3b8;
    font-weight: 400;
    line-height: 1.5;
}

/* Иконки контактов сверху справа */
.hero__top-actions {
    position: absolute;
    top: 16px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.icon-contact-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.icon-contact-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.icon-contact-btn__icon svg,
.icon-contact-btn__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.icon-contact-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.icon-contact-btn--email:hover {
    background: rgba(59, 130, 246, 0.35);
    border-color: #3b82f6;
}

.icon-contact-btn--tg:hover {
    background: rgba(36, 161, 222, 0.35);
    border-color: #24a1de;
}

.icon-contact-btn--max:hover {
    background: rgba(168, 85, 247, 0.35);
    border-color: #a855f7;
}

/* Быстрая навигация к продуктам */
.hero__nav-quick {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #60a5fa;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==========================================
   ГОРИЗОНТАЛЬНЫЕ КОНТАКТЫ (PILLS)
========================================== */
.contacts-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.top-contacts {
    margin-top: 4px;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-pill);
    color: #ffffff;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.contact-pill:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.contact-pill__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.contact-pill__icon svg,
.contact-pill__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.contact-pill--tg:hover {
    background: rgba(36, 161, 222, 0.3);
    border-color: #24a1de;
}

.contact-pill--max:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: #a855f7;
}

/* ==========================================
   SECTION COMMON (TIGHT SPACING)
========================================== */
.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 26px;
}

.section-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 6px;
}

.section-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 8px;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.section-desc {
    font-size: 14.5px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ==========================================
   FLAGSHIPS SHOWCASE SECTION
========================================== */
.flagships-section {
    padding: 40px 0 35px;
    background: #f1f5f9;
}

.flagships-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.flagship-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

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

.flagship-card--lesort {
    border-top: 4px solid #3b82f6;
}

.flagship-card--levscan {
    border-top: 4px solid #8b5cf6;
}

.flagship-badge {
    position: absolute;
    top: -12px;
    right: 22px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1e1e1e;
    font-size: 11.5px;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.25);
}

.flagship-badge--ai {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(139, 92, 246, 0.25);
}

.flagship-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.flagship-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.flagship-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
}

.flagship-type {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.flagship-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 16px;
    flex-grow: 1;
}

.flagship-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.f-tag {
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.flagship-actions {
    display: flex;
    width: 100%;
}

/* ==========================================
   BUTTONS
========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

/* ==========================================
   ABOUT / SERVICES SECTION (TIGHT SPACING)
========================================== */
.about {
    padding: 35px 0 45px;
}

.about__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.about__item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.25s ease;
}

.about__item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.about__header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.about__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.about__item h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}

.about__item p {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #475569;
    flex-grow: 1;
}

.service-price {
    font-size: 13px;
    font-weight: 600;
    color: #059669;
    margin-bottom: 14px;
}

.about__item-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.btn-max-channel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(168, 85, 247, 0.1);
    color: #9333ea;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.btn-max-channel img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

.btn-max-channel:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: #9333ea;
    color: #7e22ce;
}

.product-inline-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

/* ==========================================
   CONTACTS BOTTOM & FOOTER
========================================== */
.contacts-bottom-section {
    padding: 35px 0 35px;
    background: #f1f5f9;
    text-align: center;
}

.bottom-contacts .contact-pill {
    background: #ffffff;
    color: var(--text-main);
    border-color: #cbd5e1;
    box-shadow: var(--shadow-sm);
}

.bottom-contacts .contact-pill:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

.footer {
    background: #0b0f19;
    color: #94a3b8;
    padding: 30px 0 20px;
    font-size: 12.5px;
}

/* Компактный технический блок условий в футере */
.footer__legal {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.5;
    color: #94a3b8;
}

.footer__legal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 12px;
    text-align: left;
}

.footer__legal-item strong {
    color: #cbd5e1;
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
}

.footer__legal-links {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
}

.footer__legal-links a {
    color: #93c5fd;
    text-decoration: none;
}

.footer__legal-links a:hover {
    text-decoration: underline;
}

.footer__legal-links span {
    margin: 0 8px;
    color: #475569;
}

.footer__content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
}

.footer__content p {
    margin: 0;
}

.footer__requisites {
    color: #64748b;
    font-size: 11.5px;
}

/* ==========================================
   MOBILE OPTIMIZATION (RESPONSIVE)
========================================== */
@media (max-width: 850px) {
    .hero__top-actions {
        top: 12px;
        right: 12px;
        gap: 6px;
    }
    .icon-contact-btn {
        width: 34px;
        height: 34px;
    }
    .icon-contact-btn__icon {
        font-size: 14px;
    }
    .flagships-grid, .about__grid, .footer__legal-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .hero {
        padding: 38px 12px 22px;
    }
    .hero__title {
        font-size: 26px;
    }
    .hero__subtitle {
        font-size: 14px;
        margin-bottom: 16px;
    }
    .hero__logo-img {
        width: 110px;
        height: 110px;
    }
    .hero__nav-quick {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }
    .quick-link {
        font-size: 11.5px;
        padding: 6px 10px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .contacts-bar {
        gap: 8px;
    }
    .contact-pill {
        font-size: 12.5px;
        padding: 8px 14px;
    }
    .flagships-section, .about, .contacts-bottom-section {
        padding: 28px 0;
    }
    .section-header {
        margin-bottom: 20px;
    }
    .section-title {
        font-size: 22px;
    }
    .section-desc {
        font-size: 13.5px;
    }
    .flagship-card, .about__item {
        padding: 20px 18px;
    }
    .footer__legal-grid {
        gap: 12px;
    }
}

/* ==========================================
   КНОПКА «НАВЕРХ»
========================================== */
.scroll-top-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.55);
}

@media (max-width: 600px) {
    .scroll-top-btn {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}
