@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== Переменные ===== */
:root {
    --color-bg: #ffffff;
    --color-text: #1c1c1e;
    --color-text-secondary: #5b5b66;
    --color-purple: #6c2bd9;
    --color-purple-dark: #5421ad;
    --color-purple-light: #f2ecfc;
    --color-orange: #ff6a00;
    --color-orange-dark: #e35e00;
    --color-border: #ececf2;
    --shadow-soft: 0 4px 20px rgba(20, 10, 40, 0.06);
    --shadow-soft-strong: 0 10px 30px rgba(20, 10, 40, 0.09);
    --radius-md: 12px;
    --radius-lg: 18px;
    --container-width: 1140px;
    --font-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===== Сброс ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-base);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

ul, ol {
    padding-left: 1.2em;
}

a {
    color: inherit;
    text-decoration: none;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    display: inline-block;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
    margin: 0;
}

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

.accent {
    color: var(--color-purple);
}

/* ===== Шапка ===== */
.site-header {
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 20px;
}

.logo {
    position: relative;
    z-index: 160;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.main-nav a {
    font-weight: 500;
    font-size: 15px;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--color-purple);
}

.nav-item {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 12px;
    min-width: 240px;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft-strong);
    padding: 10px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 110;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .nav-dropdown a {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.main-nav .nav-dropdown a:hover {
    background: var(--color-purple-light);
    color: var(--color-purple);
}

.main-nav .nav-cta {
    background: var(--color-purple);
    color: #ffffff;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.main-nav .nav-cta:hover {
    background: var(--color-purple-dark);
    color: #ffffff;
    transform: translateY(-2px);
}

.header-actions {
    display: none;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 160;
}

.header-cta {
    display: none;
    background: var(--color-purple);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-cta:hover {
    background: var(--color-purple-dark);
    color: #ffffff;
    transform: translateY(-2px);
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 200;
}

.burger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger.is-open .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.is-open .burger-line:nth-child(2) {
    opacity: 0;
}

.burger.is-open .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== Хлебные крошки ===== */
.breadcrumbs {
    padding: 18px 0 0;
}

.breadcrumbs ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.breadcrumbs a {
    color: var(--color-purple);
    font-weight: 600;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--color-purple-dark);
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 6px;
    color: var(--color-border);
}

/* ===== Внутренние текстовые ссылки ===== */
.inline-link {
    color: var(--color-purple);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--color-purple-light);
    transition: color 0.2s ease;
}

.inline-link:hover {
    color: var(--color-purple-dark);
}

/* ===== Команды терминала ===== */
code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
    background: var(--color-purple-light);
    color: var(--color-purple-dark);
    padding: 2px 7px;
    border-radius: 6px;
}

/* ===== Ссылки на скачивание пакетов ===== */
.download-list {
    list-style: none;
    color: var(--color-text-secondary);
    font-size: 16px;
    margin: 16px 0 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.download-list strong {
    color: var(--color-text);
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-orange);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.download-link:hover {
    background: var(--color-orange-dark);
    transform: translateY(-2px);
}

/* ===== Главный экран (hero) ===== */
.hero {
    padding: 64px 0 48px;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-purple-light);
    color: var(--color-purple);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.2;
    margin-bottom: 18px;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
}

.hero-text {
    font-size: 17px;
    color: var(--color-text-secondary);
    max-width: 760px;
    margin: 0 auto;
}

/* ===== Карточки платформ ===== */
.platforms {
    padding: 40px 0 64px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 32px 26px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-purple-light);
    color: var(--color-purple);
    border-radius: 50%;
    margin-bottom: 20px;
}

.card-icon .material-symbols-outlined {
    font-size: 28px;
}

.card-icon-svg {
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.card-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
}

.card-text {
    color: var(--color-text-secondary);
    font-size: 15px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--color-purple);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease, gap 0.2s ease;
}

.card-link:hover {
    background: var(--color-purple-dark);
    transform: translateY(-2px);
    gap: 9px;
}

.card-link .material-symbols-outlined {
    font-size: 18px;
}

/* ===== Пошаговая инструкция (нумерованные карточки) ===== */
.steps-section {
    padding: 8px 0 48px;
}

.steps-heading {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 24px;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 28px 26px;
    margin: 22px 0;
}

.step-card:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-purple);
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-content p {
    color: var(--color-text-secondary);
    font-size: 16px;
    margin: 0;
}

.step-content p + p {
    margin-top: 10px;
}

/* ===== Предупреждение о блокировке в App Store ===== */
.warning-section {
    padding: 0 0 16px;
}

.warning-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 28px 30px;
}

.warning-card h2 {
    color: var(--color-purple);
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 12px;
}

.warning-card p {
    color: var(--color-text-secondary);
    font-size: 16px;
    margin-bottom: 22px;
}

.warning-card .btn {
    margin: 0;
}

/* ===== Акцентный блок (callout) ===== */
.highlight-box {
    background: var(--color-purple-light);
    border-left: 4px solid var(--color-purple);
    border-radius: var(--radius-md);
    padding: 30px 32px;
}

.highlight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--color-purple);
    margin-bottom: 16px;
}

.highlight-icon .material-symbols-outlined {
    font-size: 24px;
}

.highlight-box h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 14px;
}

.highlight-box p {
    color: var(--color-text-secondary);
    font-size: 16px;
    margin: 0;
}

/* ===== Текстовые секции ===== */
.text-section {
    padding: 40px 0;
}

.text-section h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
}

.text-section p {
    color: var(--color-text-secondary);
    font-size: 16px;
    margin-bottom: 16px;
}

.text-section p:last-child {
    margin-bottom: 0;
}

.key-list,
.steps-list,
.hint-list {
    color: var(--color-text-secondary);
    font-size: 16px;
    margin-bottom: 20px;
}

.key-list li,
.steps-list li {
    margin-bottom: 14px;
    padding-left: 6px;
}

.key-list strong,
.steps-list strong,
.hint-list strong {
    color: var(--color-text);
}

.hint-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.hint-list li {
    position: relative;
    margin-bottom: 14px;
    padding-left: 30px;
}

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

.hint-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-purple);
    font-weight: 800;
}

/* ===== Блок устранения неполадок ===== */
.trouble-section {
    padding: 8px 0 64px;
}

.trouble-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 36px 32px;
}

.trouble-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
}

.trouble-list {
    list-style: none;
    color: var(--color-text-secondary);
    font-size: 16px;
    margin: 0;
    padding-left: 0;
}

.trouble-list li {
    position: relative;
    margin-bottom: 14px;
    padding-left: 30px;
}

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

.trouble-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-purple);
    font-weight: 800;
}

.trouble-list strong {
    color: var(--color-text);
}

/* ===== Новостные карточки ===== */
.news-section {
    padding: 8px 0 56px;
}

.news-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 36px 32px;
}

.news-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
}

.news-card p {
    color: var(--color-text-secondary);
    font-size: 16px;
    margin-bottom: 16px;
}

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

/* ===== CTA-блок ===== */
.cta-block {
    background: var(--color-purple);
    padding: 56px 0;
    margin: 24px 0;
}

.cta-inner {
    text-align: center;
    color: #ffffff;
}

.cta-inner h2 {
    font-size: 30px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 14px;
}

.cta-inner p {
    font-size: 17px;
    color: #ffffff;
    opacity: 0.92;
    margin-bottom: 28px;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-block;
    background: var(--color-orange);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 28px;
    border-radius: 10px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: var(--color-orange-dark);
    transform: translateY(-2px);
}

/* ===== FAQ ===== */
.faq-section {
    padding: 40px 0 72px;
}

.faq-section h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 24px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px 22px;
}

.faq-item summary {
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 28px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: -2px;
    color: var(--color-purple);
    font-size: 22px;
    font-weight: 400;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    margin-top: 14px;
    color: var(--color-text-secondary);
    font-size: 15px;
}

/* ===== Подвал ===== */
.site-footer {
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(20, 10, 40, 0.06);
    margin-top: 40px;
}

.footer-inner {
    padding: 32px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-copy {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-purple);
}

/* ===== Плавающий информационный баннер ===== */
.floating-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    width: calc(100% - 32px);
    max-width: 400px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft-strong);
    padding: 24px 24px 22px;
}

.floating-banner-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--color-orange);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.floating-banner-close:hover {
    color: var(--color-orange-dark);
}

.floating-banner-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--color-purple);
    margin: 0 24px 8px 0;
}

.floating-banner-text {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0 0 16px;
}

.floating-banner-link {
    display: inline-block;
    background: var(--color-orange);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.floating-banner-link:hover {
    background: var(--color-orange-dark);
    transform: translateY(-2px);
}

/* ===== Адаптивность ===== */
@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .hero {
        padding: 40px 0 32px;
    }

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

    .btn {
        text-align: center;
    }

    .step-card {
        flex-direction: column;
        gap: 14px;
    }

    .highlight-box {
        padding: 24px 22px;
    }

    .news-card {
        padding: 24px 22px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .floating-banner {
        bottom: 12px;
        padding: 20px 20px 18px;
    }
}

@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .header-actions {
        display: flex;
    }

    .header-cta {
        display: inline-flex;
    }

    .header-inner {
        flex-wrap: nowrap;
        padding: 14px 20px;
    }

    .logo {
        font-size: 19px;
    }

    .main-nav {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        background: #ffffff;
        padding: 88px 24px 32px;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
        z-index: 150;
    }

    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav a {
        font-size: 16px;
    }

    .nav-item {
        width: 100%;
    }

    .nav-item > a {
        display: block;
        padding: 13px 0;
        border-bottom: 1px solid var(--color-border);
    }

    .main-nav > a {
        padding: 13px 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-dropdown {
        position: static;
        margin-top: 0;
        min-width: 0;
        padding: 4px 0 4px 14px;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .nav-dropdown a {
        font-size: 14px;
        padding: 8px 0;
    }

    .main-nav .nav-cta {
        display: block;
        margin-top: 20px;
        text-align: center;
        border-bottom: none;
    }

    body.nav-open {
        overflow: hidden;
    }
}
