/* v40.2: Лендинг «Community» — фирменный стиль соцсети
   (токены из community.css: чёрный #000, Inter, pill-кнопки, поверхности #161616,
   границы #2a2a2a, фиолетовые акценты #8b7cf7 / #c084fc) */

:root {
    --ux-bg: #000000;
    --ux-surface: #161616;
    --ux-surface-hover: #1f1f1f;
    --ux-active: #262626;
    --ux-border: #2a2a2a;
    --ux-text: #ffffff;
    --ux-muted: #9c9c9c;
    --ux-dim: #737373;
    --ux-accent: #8b7cf7;
    --ux-accent-strong: #7c5cfc;
    --ux-moon: #c084fc;
    --ux-accent-lt: #c4b5fd;
    --ux-pill-gradient: #232323; /* v45 */
    --ux-pill-glow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 1px 2px rgba(255, 255, 255, 0.04);
    --ux-pill-active-gradient: #2e2e2e; /* v45 */
    --ux-pill-active-glow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.06);
    --ux-publish-bg: #e5e5e5;
    --ux-publish-text: #171717;
    --ux-glass: blur(20px) saturate(160%);
    --ux-radius: 16px;
    --ux-radius-lg: 22px;
    --ux-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--ux-bg);
    color: var(--ux-text);
    font-family: var(--ux-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

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

img { display: block; max-width: 100%; }

::selection { background: rgba(139, 124, 247, 0.4); }

.ux-container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */

.ux-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: background .25s ease, border-color .25s ease;
}

.ux-header.is-scrolled {
    background: rgba(0, 0, 0, 0.72);
    -webkit-backdrop-filter: var(--ux-glass);
    backdrop-filter: var(--ux-glass);
    border-bottom-color: var(--ux-border);
}

.ux-header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 64px;
}

.ux-brand {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -.01em;
}

.ux-brand img {
    /* v41: полная версия логотипа вместо надписи — ширина авто, пропорции сохранены */
    width: auto;
    height: 30px;
    max-width: 168px;
    object-fit: contain;
    border-radius: 0;
    display: block;
}

.ux-nav { display: flex; align-items: center; gap: .25rem; margin-left: .75rem; }

.ux-nav a {
    padding: .5rem .9rem;
    border-radius: 999px;
    color: var(--ux-dim);
    font-size: .925rem;
    font-weight: 500;
    transition: color .15s ease, background .15s ease;
}

.ux-nav a:hover { color: var(--ux-text); background: var(--ux-surface); }

.ux-header-cta { margin-left: auto; display: flex; align-items: center; gap: .625rem; }

/* ---------- Buttons (как в приложении: btn-publish / btn-pill) ---------- */

.ux-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    border-radius: 999px;
    border: none;
    font-family: inherit;
    font-size: .925rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease, background .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent;
}

.ux-btn:active { transform: scale(.98); }

.ux-btn--primary {
    background: var(--ux-publish-bg);
    color: var(--ux-publish-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.ux-btn--primary:hover { opacity: .9; }

.ux-btn--ghost {
    background: var(--ux-pill-gradient);
    box-shadow: var(--ux-pill-glow);
    color: var(--ux-text);
}

.ux-btn--ghost:hover {
    background: var(--ux-pill-active-gradient);
    box-shadow: var(--ux-pill-active-glow);
}

.ux-btn--sm { padding: .55rem 1.1rem; font-size: .875rem; }

/* ---------- Hero ---------- */

.ux-hero {
    position: relative;
    overflow: hidden;
    padding: 9.5rem 0 6rem;
    text-align: center;
}

.ux-hero-glow {
    position: absolute;
    inset: -30% -20% auto;
    height: 640px;
    pointer-events: none;
    background: none; /* v45: декоративный градиентный отсвет убран */
}

.ux-hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }

.ux-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border-radius: 999px;
    background: var(--ux-pill-gradient);
    box-shadow: var(--ux-pill-glow);
    color: var(--ux-muted);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
}

.ux-badge .ux-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ux-accent);
    box-shadow: 0 0 10px 2px rgba(139, 124, 247, 0.55);
}

.ux-hero h1 {
    margin: 1.5rem auto .5rem;
    max-width: 22ch;
    font-size: clamp(2.3rem, 6.2vw, 3.9rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.06;
}

.ux-hero h1 .grad {
    background: none;
    color: var(--ux-accent, #8b7cf7); /* v45: градиентный текст убран */
}

.ux-hero-sub {
    margin: 1.1rem auto 0;
    max-width: 46rem;
    color: var(--ux-muted);
    font-size: clamp(1rem, 2.4vw, 1.15rem);
    line-height: 1.65;
}

.ux-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2.2rem; }

.ux-hero-note { margin-top: 1.1rem; color: var(--ux-dim); font-size: .85rem; }

/* ---------- Sections ---------- */

.ux-section { padding: 5.5rem 0; }

.ux-section-head { max-width: 44rem; margin: 0 auto 3rem; text-align: center; }

.ux-kicker {
    display: inline-block;
    margin-bottom: .9rem;
    color: var(--ux-accent);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ux-section-head h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.12;
}

.ux-section-head p { margin: 1rem 0 0; color: var(--ux-muted); font-size: 1.02rem; line-height: 1.65; }

/* ---------- Features ---------- */

.ux-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 1rem; }

.ux-feature {
    padding: 1.6rem 1.5rem;
    background: var(--ux-surface);
    border: 1px solid var(--ux-border);
    border-radius: var(--ux-radius);
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.ux-feature:hover {
    border-color: rgba(139, 124, 247, 0.5);
    background: var(--ux-surface-hover);
    transform: translateY(-3px);
}

.ux-feature-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    margin-bottom: 1.1rem;
    border-radius: 12px;
    background: rgba(139, 124, 247, 0.14);
    border: 1px solid rgba(139, 124, 247, 0.28);
}

.ux-feature-ico svg { width: 24px; height: 24px; }

.ux-feature h3 { margin: 0 0 .5rem; font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; }

.ux-feature p { margin: 0; color: var(--ux-muted); font-size: .925rem; line-height: 1.6; }

/* ---------- Moons (карточка в стиле кошелька орбов) ---------- */

.ux-moons { position: relative; padding: 5.5rem 0; }

.ux-moons-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }

.ux-moons-copy p.lead { color: var(--ux-muted); font-size: 1.02rem; line-height: 1.65; margin: 1rem 0 2rem; }

.ux-moons-copy h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.12;
}

.ux-steps { display: flex; flex-direction: column; gap: .9rem; margin: 0; padding: 0; list-style: none; }

.ux-steps li {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: 1rem 1.15rem;
    background: var(--ux-surface);
    border: 1px solid var(--ux-border);
    border-radius: 14px;
}

.ux-step-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 8px;
    background: rgba(139, 124, 247, 0.16);
    color: var(--ux-accent-lt);
    font-size: .8rem;
    font-weight: 700;
}

.ux-steps h4 { margin: 0 0 .25rem; font-size: .98rem; font-weight: 600; }

.ux-steps p { margin: 0; color: var(--ux-muted); font-size: .88rem; line-height: 1.55; }

.ux-moons-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    border-radius: var(--ux-radius-lg);
    background: #8b5cf6; /* v45 */
    box-shadow:
        0 16px 36px rgba(124, 58, 237, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.ux-moons-visual .glow {
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16); /* v45 */
    filter: blur(6px);
}

.ux-moons-visual img {
    position: relative;
    width: 180px; height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 18px 40px rgba(46, 16, 101, 0.45));
    animation: ux-moon-float 7s ease-in-out infinite;
}

@keyframes ux-moon-float {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-14px) rotate(4deg); }
}

.ux-moon-chip-row {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1.5rem;
}

.ux-moon-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .9rem;
    border-radius: 999px;
    background: var(--ux-pill-gradient);
    box-shadow: var(--ux-pill-glow);
    font-size: .85rem;
    font-weight: 600;
    color: var(--ux-moon);
}

/* ---------- Safety ---------- */

.ux-safety { padding: 0 0 5.5rem; }

.ux-safety-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.ux-safety-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
    padding: 1.4rem 1.4rem 1.5rem;
    background: var(--ux-surface);
    border: 1px solid var(--ux-border);
    border-radius: var(--ux-radius);
}

.ux-safety-item svg { width: 24px; height: 24px; }

.ux-safety-item b { font-size: .95rem; font-weight: 700; }

.ux-safety-item span { color: var(--ux-muted); font-size: .875rem; line-height: 1.55; }

/* ---------- PWA ---------- */

.ux-pwa { text-align: center; padding-top: 0; }

.ux-pwa-card {
    position: relative;
    overflow: hidden;
    max-width: 56rem;
    margin: 0 auto;
    padding: 3.2rem 2rem;
    background: var(--ux-surface);
    border: 1px solid var(--ux-border);
    border-radius: var(--ux-radius-lg);
}

.ux-pwa-card::before {
    content: '';
    position: absolute;
    inset: -60% -30% auto;
    height: 300px;
    background: none; /* v45 */
    pointer-events: none;
}

.ux-pwa-card h2 { position: relative; margin: 0 0 .9rem; font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -.025em; }

.ux-pwa-card p { position: relative; margin: 0 auto 2rem; max-width: 34rem; color: var(--ux-muted); line-height: 1.65; }

.ux-pwa-actions { position: relative; display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* v55: карточка только с кнопками (PWA-тексты убраны по фидбеку) */
.ux-pwa-card--actions-only { padding: 1.6rem 1.4rem; }

/* ---------- Footer ---------- */

.ux-footer { border-top: 1px solid var(--ux-border); padding: 3rem 0 2.5rem; }

.ux-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.ux-footer-brand { display: flex; align-items: center; gap: .6rem; color: var(--ux-muted); font-weight: 600; font-size: .95rem; }

.ux-footer-brand img { width: auto; height: 24px; max-width: 150px; object-fit: contain; display: block; }

.ux-footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }

.ux-footer-links a { color: var(--ux-muted); font-size: .88rem; transition: color .15s ease; }

.ux-footer-links a:hover { color: var(--ux-accent-lt); }

.ux-footer-copy { width: 100%; margin-top: .5rem; color: var(--ux-dim); font-size: .8rem; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .ux-moons-grid { grid-template-columns: 1fr; gap: 2rem; }
    .ux-moons-visual { min-height: 280px; }
    .ux-moons-visual img { width: 150px; height: 150px; }
}

@media (max-width: 760px) {
    .ux-nav { display: none; }
    .ux-hero { padding: 7.5rem 0 4.5rem; }
    .ux-section, .ux-moons { padding: 4rem 0; }
    .ux-safety { padding: 0 0 4rem; }
    .ux-header-cta .ux-btn--ghost { display: none; }
}

@media (max-width: 480px) {
    .ux-hero-actions .ux-btn { width: 100%; max-width: 320px; }
    .ux-footer-inner { flex-direction: column; align-items: flex-start; }
}
