/* ===== MainBrains Global Site Styles ===== */

:root {
    --mb-bg: #020617;            /* deep dark slate */
    --mb-bg-alt: #0b1120;
    --mb-bg-raised: #111827;
    --mb-border-subtle: #1f2937;
    --mb-text-main: #e5e7eb;
    --mb-text-muted: #9ca3af;
    --mb-accent: #60a5fa;
    --mb-accent-soft: rgba(96, 165, 250, 0.25);
}

/* Applied only to site pages (not admin or wallet full-doc templates) */
body.mb-site {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--mb-bg);
    color: var(--mb-text-main);
}

/* Layout shell */
.mb-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header + branding */
.mb-header {
    padding: 1rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--mb-border-subtle);
    background: linear-gradient(90deg, #020617, #020617);
}

/* Logo */
.mb-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.mb-logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    background: radial-gradient(circle at top left, #6d8bff, #1d1b3b);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mb-logo-initials {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
}

.mb-logo-text {
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #f5f5ff;
}

.mb-logo-sub {
    color: #9ca3af;
}

/* Top nav on pages that use it */
.mb-top-links {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.mb-top-links a {
    color: var(--mb-text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.mb-top-links a:hover {
    color: var(--mb-accent);
}

/* Main content area */
.mb-main {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 2.5rem 1.5rem 2.75rem;
}

/* Standard dark card container */
.mb-card {
    width: 100%;
    max-width: 900px;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 2.25rem 2.5rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.9);
}

/* Hero-style glowing card variant */
.mb-card--glow {
    background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.3), rgba(15, 23, 42, 0.98));
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow:
        0 0 40px rgba(96, 165, 250, 0.5),
        0 26px 70px rgba(15, 23, 42, 1);
}

/* Prevent any third-party or Django classes from forcing white backgrounds */
.mb-main .container,
.mb-main .content,
.mb-main #content,
.mb-main > div {
    background: transparent !important;
}

/* Footer */
.mb-footer {
    padding: 0.75rem 1.75rem 1.25rem;
    font-size: 0.75rem;
    color: var(--mb-text-muted);
    border-top: 1px solid var(--mb-border-subtle);
    background: #020617;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.mb-footer a {
    color: var(--mb-text-muted);
    text-decoration: none;
    font-size: 0.75rem;
}

.mb-footer a:hover {
    color: var(--mb-accent);
}

/* Global link styling */
a,
a:link,
a:visited {
    color: var(--mb-accent);
}

a:hover {
    color: #93c5fd;
}

/* Homepage layout */
.home {
    width: 100%;
}

.home-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

/* Hero */
.home-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.home-hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    color: var(--mb-text-muted);
    margin-bottom: 0.75rem;
}

.home-hero-title {
    font-size: 2.6rem;
    line-height: 1.1;
    margin-bottom: 0.85rem;
}

.home-hero-subtitle {
    max-width: 640px;
    margin: 0 auto 1.8rem;
    color: var(--mb-text-muted);
    font-size: 0.98rem;
}

.home-hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
}

/* Buttons */
.mb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
}

.mb-btn-primary {
    background: linear-gradient(135deg, #60a5fa, #34d399);
    color: #020617;
    box-shadow: 0 15px 30px rgba(8, 47, 73, 0.7);
}

.mb-btn-primary:hover {
    filter: brightness(1.05);
}

.mb-btn-ghost {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.6);
    color: var(--mb-text-main);
}

.mb-btn-ghost:hover {
    border-color: var(--mb-accent);
}

/* Sections */
.home-section {
    margin-bottom: 3rem;
}

.home-section-title {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.home-section-subtitle {
    text-align: center;
    color: var(--mb-text-muted);
    margin-bottom: 2rem;
}

/* Card rows */
.home-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.home-cards .mb-card {
    max-width: none;
    padding: 1.8rem 1.9rem;
}

.home-cards h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.home-cards p {
    margin: 0;
    color: var(--mb-text-muted);
}

/* Responsive tweaks */
@media (max-width: 900px) {
    .home-cards {
        grid-template-columns: 1fr;
    }

    .home-hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .mb-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .home-hero-actions {
        flex-direction: column;
    }

    .home-inner {
        padding-inline: 1.1rem;
    }
}
