@charset "UTF-8";

.home-hero { text-align: center; padding: var(--space-3xl) 0; }
.home-hero-title { font-size: clamp(var(--font-size-2xl), 4vw, 2.6rem); font-weight: 800; line-height: 1.2; margin: 0 0 var(--space-lg); background: linear-gradient(135deg, var(--accent-primary), var(--accent-info)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.home-hero-desc { font-size: var(--font-size-lg); color: var(--text-secondary); max-width: 800px; margin: 0 auto; line-height: 1.6; }

.home-hero-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md) var(--space-xl);
    align-items: stretch;
    max-width: 840px;
    margin: var(--space-2xl) auto;
    text-align: left;
}
.home-hero:not(:has(.home-hero-btn)) {
    padding-bottom: calc(var(--space-3xl) * 0.7);
}

.home-hero:has(.home-hero-btn) {
    padding-bottom: 0;
}
.home-hero:not(:has(.home-hero-btn)) .home-hero-features {
    margin-bottom: calc(var(--space-2xl) * 0.5);
}
.hero-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    height: 100%;
}
.hero-feature-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}
.hero-feature-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}
.hero-feature-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
    overflow-wrap: break-word;
}
.hero-feature-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}
.hero-feature-desc {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.4;
}
.home-hero-btn, .btn.home-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 var(--space-40);
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-inverse);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-info));
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    box-shadow: var(--shadow-md);
    line-height: 1.3;

    margin-top: 56px;
    margin-bottom: var(--space-md);
}
.home-hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--text-inverse);
}
.home-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-md); margin-bottom: var(--space-3xl); }
.home-grid .home-block:nth-child(1) { grid-column: span 5; }
.home-grid .home-block:nth-child(2) { grid-column: span 7; }
.home-grid .home-block:nth-child(3),
.home-grid .home-block:nth-child(4),
.home-grid .home-block:nth-child(5) { grid-column: span 4; }

.home-block { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: var(--space-xl); display: flex; flex-direction: column; transition: transform var(--transition-base), box-shadow var(--transition-base); overflow: hidden; }
.home-block:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

.home-block h2 { margin: 0 0 var(--space-sm); font-size: var(--font-size-base); font-weight: 600; display: flex; align-items: center; gap: var(--space-sm); color: var(--text-primary); }
.home-block h2 i { color: var(--accent-primary); font-size: var(--font-size-lg); }
.home-block > p { color: var(--text-secondary); font-size: var(--font-size-sm); margin: 0 0 var(--space-md); line-height: 1.5; flex-shrink: 0; }
.home-block-link { display: flex; align-items: center; gap: var(--space-xs); margin-top: auto; padding-top: var(--space-xl); color: var(--text-link); font-weight: 600; font-size: var(--font-size-sm); text-decoration: none; border-top: 1px solid var(--border-color); line-height: 1; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.home-block-link i { font-size: var(--font-size-sm); line-height: 1; position: relative; top: 2px; }
.home-block-link:hover { color: var(--text-link-hover); }
.home-block-link:active { background: transparent; }
.home-block-link i { transition: transform var(--transition-fast); }
.home-block-link:hover i { transform: translateX(4px); }
.home-block a { color: var(--text-link); }

.home-community-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}
.home-community-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-hairline);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    text-align: center;
}
.home-community-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--accent-primary);
}
.home-community-label {
    font-size: 0.6875rem;
    line-height: 1.2;
    color: var(--text-secondary);
    /* одно длинное слово не должно вылезать за фон пилюли */
    overflow-wrap: break-word;
}

.home-block p a:hover { text-decoration: underline; }

[data-anim] { opacity: 0; transform: translateY(20px); transition: opacity var(--transition-slow), transform var(--transition-slow); }
[data-anim].visible { opacity: 1; transform: translateY(0); }
@keyframes home-fallback { to { opacity: 1; } }
[data-anim]:not(.visible) { animation: home-fallback 0.3s 0.15s both; }

@media (prefers-reduced-motion: reduce) {
    [data-anim] { opacity: 1; transform: none; transition: none; animation: none; }
    .home-bar-fill { transition: none; }
}

.home-users-list { flex: 1; display: flex; flex-direction: column; gap: var(--space-xs); margin-bottom: var(--space-sm); }
.home-users-empty { text-align: center; padding: var(--space-lg); }
.home-bar-row { display: flex; align-items: center; gap: var(--space-xs); }
.home-bar-avatar { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.home-bar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.home-bar-avatar-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-tertiary); color: var(--text-muted); font-size: var(--font-size-xs); font-weight: 700; }
.home-bar-info { flex: 1; min-width: 0; position: relative; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); overflow: hidden; display: flex; justify-content: space-between; align-items: center; }
.home-bar-name { font-size: var(--font-size-xs); font-weight: 500; position: relative; z-index: var(--z-base); color: inherit; text-decoration: none; }
.home-bar-name:hover { color: var(--text-link); }
.home-bar-count { font-size: var(--font-size-xs); font-weight: 600; color: var(--text-muted); position: relative; z-index: var(--z-base); }
.home-bar-track { position: absolute; left: 0; top: 0; bottom: 0; right: 0; }
.home-bar-fill { height: 100%; width: 0; transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1); opacity: 0.10; }
.home-bar-row.c0 .home-bar-fill { background: var(--accent-danger); }
.home-bar-row.c1 .home-bar-fill { background: var(--accent-warning); }
.home-bar-row.c2 .home-bar-fill { background: var(--accent-info); }
.home-bar-row:not(.top) .home-bar-fill { background: var(--accent-primary); }
.home-bar-row.top .home-bar-count { color: var(--text-primary); font-weight: 700; }
.home-bar-name.skel { height: 12px; background: var(--bg-tertiary); border-radius: var(--radius-sm); }
.home-bar-name--w60 { width: 60%; }
.home-bar-name--w70 { width: 70%; }
.home-bar-name--w50 { width: 50%; }

.home-ticker { overflow: hidden; flex: 1; position: relative; min-height: 60px; display: flex; flex-direction: column; justify-content: center; gap: var(--space-sm); padding: var(--space-sm) 0 var(--space-lg); }
.home-ticker::before,
.home-ticker::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40px; pointer-events: none; z-index: 1; }
.home-ticker::before { left: 0; background: linear-gradient(to left, transparent, var(--bg-primary)); }
.home-ticker::after { right: 0; background: linear-gradient(to right, transparent, var(--bg-primary)); }
.home-ticker-track { display: flex; width: max-content; flex-shrink: 0; }
.home-ticker-item { display: inline-flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-md) var(--space-xs) var(--space-xs); margin-right: var(--space-sm); background: var(--bg-tertiary); color: var(--text-secondary); border-radius: var(--radius-full); font-size: var(--font-size-xs); white-space: nowrap; flex-shrink: 0; text-decoration: none; }
.home-ticker-item:hover { color: var(--accent-primary); }
.home-ticker-logo { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--bg-secondary); flex-shrink: 0; }

.home-counter-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: var(--space-md); }
.home-counter-circle { position: relative; width: 110px; height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.home-counter-circle svg { position: absolute; width: 110px; height: 110px; top: 0; left: 0; }
.hcc-bg { fill: none; stroke: var(--bg-tertiary); stroke-width: 8; }
.hcc-fill { fill: none; stroke: var(--accent-primary); stroke-width: 8; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 60px 60px; transition: stroke 0.3s; }
.hcc-value { font-size: 1.6rem; font-weight: 800; line-height: 1;     z-index: var(--z-base); color: var(--text-primary); }
.hcc-label { font-size: var(--font-size-xs); color: var(--text-muted); text-align: center; line-height: 1.2; max-width: 70px; z-index: var(--z-base); margin-top: var(--space-hairline); }

.home-checklist-roll { flex: 1; display: flex; flex-direction: column; min-height: 170px; }
.home-checklist-roll.is-static { height: auto; min-height: 0; flex-direction: row; flex-wrap: wrap; gap: var(--space-xs); }
.home-checklist-orbit { position: relative; flex: 1; min-height: 154px; touch-action: pan-y; cursor: grab; transition: transform .25s ease; user-select: none; -webkit-user-select: none; }
.home-checklist-orbit.is-dragging { cursor: grabbing; transition: none; }
.home-checklist-slide {
    position: absolute; top: 0; left: 50%; width: 132px; height: 154px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-sm); padding: 18px var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-tertiary);
    text-decoration: none; cursor: pointer;
    transition: transform .5s cubic-bezier(.22,.68,.35,1), opacity .5s ease, filter .5s ease;
}
.home-checklist-slide .home-checklist-img {
    width: 70px; height: 70px; border-radius: var(--radius-xl); object-fit: cover; background: var(--bg-secondary); flex-shrink: 0;
}
.home-checklist-slide .home-checklist-title {
    font-size: var(--font-size-sm); font-weight: 600; text-align: center; line-height: 1.25; color: var(--text-primary);
    padding: 0 var(--space-sm); max-width: 100%; overflow: hidden; flex-shrink: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.home-checklist-slide:hover .home-checklist-title { color: var(--text-link); }
.home-checklist-progress { display: flex; gap: var(--space-sm); justify-content: center; align-items: center; margin-top: var(--space-md); margin-bottom: var(--space-12); }
.home-checklist-progress button {
    width: 6px; height: 6px; padding: 0; border: none; border-radius: 50%;
    background: var(--border-color); cursor: pointer; transition: background .25s, transform .25s;
}
.home-checklist-progress button.active { background: var(--accent-primary); transform: scale(1.35); }
.home-checklist-progress button:hover:not(.active) { background: var(--text-muted); }
.home-checklist-item { font-size: var(--font-size-xs); font-weight: 500; color: var(--text-secondary); text-decoration: none; padding: var(--space-xs) var(--space-sm); background: rgba(128,128,128,0.06); border-radius: var(--radius-sm); display: block; }
.home-checklist-item:hover { color: var(--text-link); background: rgba(128,128,128,0.08); }

/* Средние ширины: блоки главной перестраиваются в 2 колонки раньше 768px */
@media (max-width: 1100px) {
    .home-grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
    .home-grid .home-block:nth-child(1) { grid-column: span 2; }
    .home-grid .home-block:nth-child(n+2) { grid-column: span 1; }
}

/* Узкое окно ПК (501–768px): 5-й блок (Сообщество) один в ряду — на всю ширину */
@media (min-width: 501px) and (max-width: 768px) {
    .home-grid .home-block:nth-child(5) { grid-column: span 2 !important; }
}

@media (max-width: 768px) {
    .home-hero-features {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        max-width: 500px;
    }
    .hero-feature-icon {
        width: 48px;
        height: 48px;
    }
    .hero-feature-icon img {
        width: 36px;
        height: 36px;
    }
    .hero-feature-title {
        font-size: var(--font-size-sm);
    }
    .home-hero-btn {
        display: flex;
        padding: var(--space-md) var(--space-lg);
        font-size: var(--font-size-base);
        width: 100%;

        margin-top: var(--space-40);
        margin-bottom: var(--space-12);
    }
    .home-grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
    .home-grid .home-block { grid-column: span 1 !important; }
    .home-block { padding: var(--space-xl); min-height: 0; }
    .home-hero { padding: var(--space-xl) 0; }
    .home-hero:has(.home-hero-btn) { padding-bottom: 0; }
    .home-hero-desc { font-size: var(--font-size-base); }
    .home-checklist-roll { margin-bottom: var(--space-lg); }
    .home-ticker { min-height: 40px; }
    .home-ticker::before, .home-ticker::after { width: 20px; }
}
@media (max-width: 500px) {
    .home-grid { grid-template-columns: 1fr; }
    .home-block { padding: var(--space-lg); }
    .home-checklist-roll { margin-bottom: var(--space-lg); }
}

.home-hero-audience { max-width: 920px; margin: 0 auto; }

.hero-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin: var(--space-xl) auto var(--space-lg);
    padding: var(--space-xs);
    width: fit-content;
    max-width: 100%;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}
.hero-tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1;
    padding: 11px var(--space-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}
.hero-tab:hover { color: var(--text-primary); }
.hero-tab.is-active {
    color: var(--text-primary);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}
.hero-tab:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }

.hero-tab-panel { display: none; }
.hero-tab-panel.is-active { display: block; animation: tab-fade .18s ease; }
@keyframes tab-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.hero-shared {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px dashed var(--border-color);
}
.hero-shared-label {
    margin: 0 0 var(--space-md);
    color: var(--text-muted);
    text-align: center;
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hero-shared-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
    text-align: left;
}

@media (prefers-reduced-motion: reduce) {
    .hero-tab-panel.is-active { animation: none; }
}

@media (max-width: 768px) {
    .hero-shared-grid { grid-template-columns: 1fr; }
    /* Блоки героя на одной оси: всё центрируется в колонке 500px */
    .hero-tabs { width: 100%; max-width: 500px; }
    .hero-tab { flex: 1; padding-inline: var(--space-sm); }
    .hero-shared { max-width: 500px; margin-left: auto; margin-right: auto; }
}
