/* ─────────────────────────────────────────────────────────────────────────────
   Q-Ку — лендинг.
   Палитра совпадает с темой Android-приложения (ui/theme/Color.kt).
   ───────────────────────────────────────────────────────────────────────────── */

:root {
    --deep-navy:   #0A0E1A;
    --dark-navy:   #12182B;
    --surface:     #1E2746;
    --purple:      #6B46FF;
    --cyan:        #00D4FF;
    --pink:        #FF00E5;

    --text:        #F0F0F0;
    --text-dim:    #8B9BB4;
    --border:      rgba(255, 255, 255, 0.08);

    --radius:      16px;
    --radius-sm:   10px;
    --wrap:        1140px;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--deep-navy);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 760px; }

.skip-link {
    position: absolute; left: -9999px;
    background: var(--purple); color: #fff;
    padding: 12px 20px; border-radius: 0 0 var(--radius-sm) 0; z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }

/* ── Типографика ─────────────────────────────────────────────────────────── */

h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-weight: 800;
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(1.7rem, 3.6vw, 2.4rem);
    line-height: 1.2;
    letter-spacing: -0.015em;
    font-weight: 700;
    margin-bottom: 40px;
}

h3 { font-size: 1.15rem; font-weight: 650; margin-bottom: 10px; }

p { color: var(--text-dim); }

code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: rgba(107, 70, 255, 0.14);
    color: #C4B5FF;
    padding: 2px 7px;
    border-radius: 5px;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

/* ── Логотип ─────────────────────────────────────────────────────────────── */

.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.logo:hover { text-decoration: none; }

.logo__mark {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--purple), var(--cyan));
    border-radius: 11px;
    font-weight: 800; font-size: 1.25rem; color: #fff;
    box-shadow: 0 4px 20px rgba(107, 70, 255, 0.4);
}

.logo__text { font-size: 1.3rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }

.logo--sm .logo__mark { width: 32px; height: 32px; font-size: 1.05rem; border-radius: 9px; }
.logo--sm .logo__text { font-size: 1.1rem; }

/* ── Шапка ───────────────────────────────────────────────────────────────── */

.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 14, 26, 0.78);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.topbar__inner { display: flex; align-items: center; gap: 28px; height: 68px; }

.nav { display: flex; gap: 28px; margin-left: auto; }

.nav a {
    color: var(--text-dim);
    font-size: 0.94rem;
    font-weight: 500;
    transition: color 0.2s var(--ease);
}
.nav a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 720px) {
    .nav { display: none; }
    .topbar__inner { justify-content: space-between; }
}

/* ── Кнопки ──────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.95rem; font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
    background: linear-gradient(135deg, var(--purple), #8B5CFF);
    color: #fff;
    box-shadow: 0 6px 24px rgba(107, 70, 255, 0.34);
}
.btn--primary:hover { box-shadow: 0 10px 32px rgba(107, 70, 255, 0.46); }

.btn--ghost {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
    color: var(--text);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn--lg { padding: 15px 30px; font-size: 1rem; }
.btn--sm { padding: 8px 16px; font-size: 0.88rem; }

.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

.btn__icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Первый экран ────────────────────────────────────────────────────────── */

.hero { position: relative; padding: 90px 0 100px; overflow: hidden; }

.hero__glow {
    position: absolute; top: -320px; left: 50%; transform: translateX(-50%);
    width: 1000px; height: 700px;
    background: radial-gradient(ellipse at center,
        rgba(107, 70, 255, 0.24) 0%,
        rgba(0, 212, 255, 0.10) 42%,
        transparent 68%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    font-size: 0.82rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
    color: var(--cyan);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.22);
    padding: 6px 14px; border-radius: 100px;
    margin-bottom: 22px;
}

.lead { font-size: 1.1rem; max-width: 560px; margin-bottom: 34px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__meta { font-size: 0.87rem; color: var(--text-dim); margin-top: 18px; }

@media (max-width: 900px) {
    .hero { padding: 56px 0 70px; }
    .hero__inner { grid-template-columns: 1fr; gap: 48px; }
    .hero__visual { order: -1; }
}

/* ── Телефон-макет ───────────────────────────────────────────────────────── */

.hero__visual { display: grid; place-items: center; }

.phone {
    width: 278px; height: 560px;
    background: linear-gradient(160deg, #1a2138, #0d1220);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 34px;
    padding: 12px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 60px rgba(107, 70, 255, 0.16);
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-11px); }
}

.phone__screen {
    height: 100%;
    background: var(--deep-navy);
    border-radius: 24px;
    padding: 16px 14px;
    display: flex; flex-direction: column;
    overflow: hidden;
}

.chat-head {
    display: flex; align-items: center; gap: 11px;
    padding-bottom: 14px; margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.chat-avatar {
    display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    font-weight: 700; font-size: 0.95rem;
}

.chat-name { font-size: 0.9rem; font-weight: 600; }
.chat-status { font-size: 0.72rem; color: var(--cyan); }

.bubbles { display: flex; flex-direction: column; gap: 9px; }

.bubble {
    max-width: 84%;
    padding: 9px 13px;
    border-radius: 15px;
    font-size: 0.8rem;
    line-height: 1.45;
    position: relative;
    animation: pop 0.5s var(--ease) backwards;
}

.bubble--in {
    align-self: flex-start;
    background: var(--surface);
    border-bottom-left-radius: 5px;
}

.bubble--out {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--purple), #7C5CFF);
    color: #fff;
    border-bottom-right-radius: 5px;
    padding-right: 34px;
}

.tick { position: absolute; right: 11px; bottom: 7px; font-size: 0.6rem; color: var(--cyan); }

.bubble:nth-child(1) { animation-delay: 0.2s; }
.bubble:nth-child(2) { animation-delay: 0.7s; }
.bubble:nth-child(3) { animation-delay: 1.2s; }
.bubble:nth-child(4) { animation-delay: 1.7s; }
.bubble:nth-child(5) { animation-delay: 2.2s; }

@keyframes pop {
    from { opacity: 0; transform: translateY(9px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

.bubble--typing {
    align-self: flex-start;
    background: var(--surface);
    border-bottom-left-radius: 5px;
    display: flex; gap: 4px; padding: 13px;
}

.bubble--typing i {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--text-dim);
    animation: blink 1.4s infinite;
}
.bubble--typing i:nth-child(2) { animation-delay: 0.2s; }
.bubble--typing i:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 60%, 100% { opacity: 0.28; }
    30%           { opacity: 1; }
}

/* ── Секции ──────────────────────────────────────────────────────────────── */

.section { padding: 90px 0; }
.section--alt { background: var(--dark-navy); border-block: 1px solid var(--border); }

@media (max-width: 720px) { .section { padding: 62px 0; } }

/* ── Карточки ────────────────────────────────────────────────────────────── */

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

.card {
    background: var(--dark-navy);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(107, 70, 255, 0.4); }

.section--alt .card { background: var(--deep-navy); }

.card__icon {
    display: grid; place-items: center;
    width: 48px; height: 48px;
    border-radius: 13px;
    font-size: 1.4rem;
    margin-bottom: 18px;
}
.card__icon--purple { background: rgba(107, 70, 255, 0.16); }
.card__icon--cyan   { background: rgba(0, 212, 255, 0.14); }
.card__icon--pink   { background: rgba(255, 0, 229, 0.13); }

.card p { font-size: 0.94rem; }

/* ── Две колонки ─────────────────────────────────────────────────────────── */

.split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 44px; align-items: start; }

.split__text h3 { margin-top: 28px; }
.split__text h3:first-child { margin-top: 0; }
.split__text p { margin-bottom: 4px; }

.notice {
    background: rgba(255, 0, 229, 0.05);
    border: 1px solid rgba(255, 0, 229, 0.24);
    border-radius: var(--radius);
    padding: 26px;
}
.notice h3 { color: #FF6BEC; }
.notice p { font-size: 0.93rem; }
.notice p + p { margin-top: 12px; }
.notice strong { color: var(--text); }

@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* ── Блок скачивания ─────────────────────────────────────────────────────── */

.download { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: start; }

.steps { margin: 22px 0 28px; padding-left: 20px; color: var(--text-dim); }
.steps li { margin-bottom: 9px; }
.steps strong { color: var(--text); }

.specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 18px;
    margin-top: 32px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}
.specs dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-bottom: 4px; }
.specs dd { font-size: 1rem; font-weight: 600; }

.checksum { margin-top: 26px; }
.checksum summary { cursor: pointer; font-size: 0.9rem; color: var(--text-dim); }
.checksum summary:hover { color: var(--text); }
.checksum p { font-size: 0.87rem; margin: 12px 0 8px; }
.checksum code { display: block; word-break: break-all; padding: 12px; line-height: 1.5; }

.download__web {
    background: var(--dark-navy);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}
.download__web p { font-size: 0.94rem; margin-bottom: 18px; }
.download__web .small { font-size: 0.83rem; margin: 16px 0 0; }

@media (max-width: 860px) { .download { grid-template-columns: 1fr; gap: 32px; } }

/* ── Вопросы ─────────────────────────────────────────────────────────────── */

.faq {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin-bottom: 12px;
    background: var(--deep-navy);
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    font-size: 1.4rem; font-weight: 400; color: var(--text-dim);
    transition: transform 0.2s var(--ease);
    flex-shrink: 0;
}
.faq[open] summary::after { transform: rotate(45deg); }

.faq p { margin-top: 14px; font-size: 0.94rem; }

/* ── Подвал ──────────────────────────────────────────────────────────────── */

.footer { padding: 46px 0; border-top: 1px solid var(--border); }

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

.footer__links { display: flex; gap: 24px; margin-left: auto; }
.footer__links a { color: var(--text-dim); font-size: 0.9rem; }
.footer__links a:hover { color: var(--text); }

.footer__note { font-size: 0.85rem; width: 100%; }

@media (max-width: 640px) {
    .footer__links { margin-left: 0; flex-wrap: wrap; }
}
