/* index.html — Connect / Team channels section */

#team.index-team-section {
    position: relative;
    isolation: isolate;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #f1f5f9 100%);
}

#team.index-team-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 8% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 92% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

html.dark #team.index-team-section {
    background: linear-gradient(180deg, #0f172a 0%, #111827 45%, #0f172a 100%);
}

html.dark #team.index-team-section::before {
    background:
        radial-gradient(ellipse 55% 45% at 8% 20%, rgba(59, 130, 246, 0.16) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 92% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 50%);
}

#team .container {
    position: relative;
    z-index: 1;
}

/* Header */
.index-team-head {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.index-team-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.875rem;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7c3aed;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 999px;
}

html.dark .index-team-eyebrow {
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(167, 139, 250, 0.35);
}

.index-team-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #0f172a;
}

html.dark .index-team-title {
    color: #f8fafc;
}

.index-team-title-accent {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 55%, #db2777 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

html.dark .index-team-title-accent {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.index-team-lead {
    margin: 0 auto;
    max-width: 520px;
    font-size: 1rem;
    line-height: 1.65;
    color: #64748b;
}

html.dark .index-team-lead {
    color: #94a3b8;
}

/* Groups */
.index-team-groups {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.index-team-group-title {
    margin: 0 0 1rem;
    padding-left: 0.15rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

html.dark .index-team-group-title {
    color: #94a3b8;
}

/* Grid */
.index-team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .index-team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.15rem;
    }
}

@media (min-width: 1024px) {
    .index-team-grid--channels {
        grid-template-columns: repeat(3, 1fr);
    }

    .index-team-grid--support {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Card */
#team .index-team-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    padding: 1.25rem 1.25rem 1.15rem;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    position: relative;
    overflow: hidden;
}

#team .index-team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--team-accent, linear-gradient(90deg, #3b82f6, #2563eb));
    opacity: 0.9;
}

#team .index-team-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

html.dark #team .index-team-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

html.dark #team .index-team-card:hover {
    border-color: rgba(96, 165, 250, 0.35);
}

#team .index-team-card[data-channel="telegram"] { --team-accent: linear-gradient(90deg, #0ea5e9, #0284c7); }
#team .index-team-card[data-channel="vk"] { --team-accent: linear-gradient(90deg, #7c3aed, #6d28d9); }
#team .index-team-card[data-channel="signal"] { --team-accent: linear-gradient(90deg, #6366f1, #4f46e5); }
#team .index-team-card[data-channel="support"] { --team-accent: linear-gradient(90deg, #8b5cf6, #7c3aed); }
#team .index-team-card[data-channel="primary"] { --team-accent: linear-gradient(90deg, #f59e0b, #d97706); }
#team .index-team-card[data-channel="backup"] { --team-accent: linear-gradient(90deg, #f97316, #ea580c); }

#team .index-team-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#team .index-team-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

html.dark #team .index-team-icon {
    background: #0f172a;
    border-color: #334155;
}

#team .index-team-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#team .index-team-tag {
    flex-shrink: 0;
    padding: 0.25rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    background: #f1f5f9;
    border-radius: 6px;
}

html.dark #team .index-team-tag {
    color: #cbd5e1;
    background: #0f172a;
}

#team .index-team-labels {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}

#team .index-team-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
    white-space: nowrap;
}

#team .index-team-name {
    margin: 0 0 0.5rem;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    transition: color 0.2s ease;
}

html.dark #team .index-team-name {
    color: #f1f5f9;
}

#team .index-team-card[data-channel="telegram"]:hover .index-team-name { color: #0284c7; }
#team .index-team-card[data-channel="vk"]:hover .index-team-name { color: #7c3aed; }
#team .index-team-card[data-channel="signal"]:hover .index-team-name { color: #4f46e5; }
#team .index-team-card[data-channel="support"]:hover .index-team-name { color: #7c3aed; }
#team .index-team-card[data-channel="primary"]:hover .index-team-name { color: #d97706; }
#team .index-team-card[data-channel="backup"]:hover .index-team-name { color: #ea580c; }

#team .index-team-desc {
    flex: 1;
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #64748b;
}

html.dark #team .index-team-desc {
    color: #94a3b8;
}

#team .index-team-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #2563eb;
    transition: gap 0.2s ease;
}

html.dark #team .index-team-cta {
    color: #93c5fd;
}

#team .index-team-card:hover .index-team-cta {
    gap: 0.55rem;
}

#team .index-team-cta svg {
    width: 1rem;
    height: 1rem;
}

@media (prefers-reduced-motion: reduce) {
    #team .index-team-card:hover {
        transform: none;
    }
}
