/**
 * Community Magic Links — uvítací karta.
 * Light: bílá karta + --text. Dark: sklo na plátně + --fm-text (ne --text na tmavém CTA).
 */

.community-gate {
    min-height: calc(100dvh - 5.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem 2.75rem;
    box-sizing: border-box;
}

.community-gate__card {
    width: min(100%, 28rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.35rem;
    padding: 1.85rem 1.4rem 1.45rem;
    text-align: center;
    color: var(--text);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

.community-gate__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.community-gate__logo {
    width: 5.5rem;
    height: 5.5rem;
    object-fit: contain;
    border-radius: 1.15rem;
    display: block;
    background: transparent;
    box-shadow: none;
}

.community-gate__logo[hidden],
.community-gate__monogram[hidden] {
    display: none !important;
}

.community-gate__monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.6rem;
    height: 4.6rem;
    padding: 0 0.55rem;
    border-radius: 1.15rem;
    background: color-mix(in srgb, var(--gate-accent, #6366f1) 14%, var(--surface));
    border: 2px solid color-mix(in srgb, var(--gate-accent, #6366f1) 38%, transparent);
    color: var(--gate-accent, #6366f1);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.03em;
}

.community-gate__eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--muted);
}

.community-gate__card h1 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.35rem, 5vw, 1.7rem);
    line-height: 1.25;
    color: var(--text);
}

.community-gate__lead {
    margin: 0 0 0.55rem;
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.98rem;
}

.community-gate__note {
    margin: 0 0 1.15rem;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.community-gate__actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

/* CTA mimo .flek-hero — stejný vizuál jako landing, ať nejsou šedá „holá“ tlačítka */
.community-gate__actions .cta-btn {
    width: 100%;
    min-height: 3.1rem;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.community-gate__actions .cta-btn--primary {
    background: linear-gradient(135deg, #fbbf24 0%, var(--fm-amber, #f59e0b) 55%, #d97706 100%);
    color: #0f172a;
    border-color: #fbbf24;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.4);
}

.community-gate__actions .cta-btn--outline {
    background: var(--surface);
    color: var(--fm-indigo, #4f46e5);
    border-color: rgba(76, 224, 195, 0.55);
}

.community-gate__share-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

.community-reg-banner {
    margin: 0 0 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--indigo, #4f46e5) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--indigo, #4f46e5) 22%, var(--border));
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.45;
    text-align: left;
}

/* Dark: karta = sklo na plátně, ink = canvas (ne --text) */
html[data-theme="dark"] .community-gate__card {
    background: var(--fm-glass, rgba(15, 23, 42, 0.72));
    border-color: var(--fm-glass-border, rgba(148, 163, 184, 0.22));
    color: var(--fm-text, var(--canvas-text, #f1f5f9));
    box-shadow: 0 28px 56px rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(16px) saturate(1.15);
}

html[data-theme="dark"] .community-gate__card h1 {
    color: var(--fm-text, var(--canvas-text, #f8fafc));
}

html[data-theme="dark"] .community-gate__eyebrow,
html[data-theme="dark"] .community-gate__lead,
html[data-theme="dark"] .community-gate__note,
html[data-theme="dark"] .community-gate__share-hint {
    color: var(--fm-muted, var(--canvas-muted, rgba(226, 232, 240, 0.78)));
}

html[data-theme="dark"] .community-gate__logo {
    background: transparent;
    box-shadow: none;
}

html[data-theme="dark"] .community-gate__monogram {
    background: #312e81;
    color: #ffffff;
    border-color: #818cf8;
}

html[data-theme="dark"] .community-gate__actions .cta-btn--outline {
    background: rgba(248, 250, 252, 0.06);
    color: var(--fm-text, #f8fafc);
    border-color: rgba(76, 224, 195, 0.4);
}

html[data-theme="dark"] .community-reg-banner {
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(165, 180, 252, 0.28);
    color: var(--fm-text, #f8fafc);
}

@media (max-width: 767.98px) {
    .community-gate {
        padding-top: 1.25rem;
    }
}
