:root {
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --ink: #0f172a;
    --text: #1e293b;
    --muted: #64748b;
    --brand: #4f46e5;
    --brand-hover: #4338ca;
    --brand-2: #7c3aed;
    --brand-soft: #eef2ff;
    --live: #059669;
    --live-soft: #ecfdf5;
    --primary-contrast: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
    --shadow-md: 0 4px 6px rgba(15, 23, 42, .05), 0 10px 24px rgba(15, 23, 42, .08);
    --radius: 14px;
    --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1120;
        --bg-soft: #0f1729;
        --surface: #131c30;
        --border: #263248;
        --ink: #f1f5f9;
        --text: #dbe4f0;
        --muted: #94a3b8;
        --brand: #818cf8;
        --brand-hover: #a5b4fc;
        --brand-2: #a78bfa;
        --brand-soft: #1c2340;
        --live: #34d399;
        --live-soft: #10251e;
        --primary-contrast: #0b1120;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow-md: 0 10px 30px rgba(0, 0, 0, .45);
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 750; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-logo { display: block; border-radius: 9px; }

.header-nav { display: flex; align-items: center; gap: 26px; }
.header-nav a { text-decoration: none; color: var(--muted); font-weight: 550; font-size: .95rem; }
.header-nav a:hover { color: var(--ink); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 10px; text-decoration: none; font-weight: 650;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 15px; font-size: .9rem; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-primary { background: var(--brand); color: var(--primary-contrast); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ===== Hero ===== */
.hero {
    position: relative;
    padding: 104px 0 88px;
    text-align: center;
    background:
        radial-gradient(60% 80% at 50% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
    border-bottom: 1px solid var(--border);
}

.eyebrow {
    display: inline-block;
    font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-soft);
    padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}

.hero h1 { margin: 0 0 20px; font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.08; letter-spacing: -.025em; color: var(--ink); }
.grad { background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero .lead { max-width: 680px; margin: 0 auto 34px; font-size: clamp(1.08rem, 2.2vw, 1.28rem); color: var(--muted); }

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-badges {
    list-style: none; margin: 42px 0 0; padding: 0;
    display: flex; gap: 12px 28px; justify-content: center; flex-wrap: wrap;
    color: var(--muted); font-size: .95rem; font-weight: 550;
}

/* ===== Sections ===== */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -.02em; color: var(--ink); }
.section-sub { margin: 0; color: var(--muted); font-size: 1.05rem; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }

.card-icon {
    display: grid; place-items: center;
    width: 46px; height: 46px; border-radius: 11px;
    background: var(--brand-soft); font-size: 1.4rem; margin-bottom: 15px;
}
.card h3 { margin: 0 0 8px; font-size: 1.12rem; color: var(--ink); }
.card p { margin: 0; color: var(--muted); }

/* ===== Module cards ===== */
.module-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.module-top .card-icon { margin-bottom: 0; }

.badge {
    font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent);
    padding: 5px 11px; border-radius: 999px;
}
.badge-live { color: var(--live); background: var(--live-soft); }

.module.featured { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent), var(--shadow-md); }
.module-link { display: inline-block; margin-top: 14px; color: var(--brand); font-weight: 650; text-decoration: none; }
.module-link:hover { text-decoration: underline; }

/* ===== CTA ===== */
.section-cta {
    text-align: center;
    background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 12%, var(--bg-soft)), color-mix(in srgb, var(--brand-2) 12%, var(--bg-soft)));
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cta-inner h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--ink); letter-spacing: -.02em; }
.cta-inner p { margin: 0 0 28px; color: var(--muted); font-size: 1.08rem; }
.cta-inner .hero-actions { margin-top: 0; }

/* ===== Footer ===== */
.site-footer { padding: 44px 0; background: var(--bg); border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; }
.footer-name { font-weight: 750; color: var(--ink); }
.footer-tag { font-size: .85rem; color: var(--muted); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 550; }
.footer-links a:hover { color: var(--ink); }
.footer-copy { color: var(--muted); font-size: .88rem; }

@media (max-width: 640px) {
    .header-nav { gap: 14px; }
    .header-nav a:not(.btn) { display: none; }
    .hero { padding: 76px 0 64px; }
    .section { padding: 60px 0; }
    .footer-inner { flex-direction: column; text-align: center; }
}
