:root {
    --bg:         #080810;
    --surface:    #0f0f1a;
    --surface2:   #161628;
    --border:     rgba(99, 102, 241, 0.15);
    --spark:      #f97316;
    --green:      #4ade80;
    --text:       #e2e8f0;
    --text-dim:   #94a3b8;
    --text-muted: #475569;
    --code-bg:    #0d1117;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

/* ── Nav ──────────────────────────────────────── */
nav {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(8,8,16,0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav-logo { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.nav-logo .s { color: var(--spark); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

/* ── Hero ─────────────────────────────────────── */
.hero {
    min-height: 90vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 5rem 2rem;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.045) 1px, transparent 1px);
    background-size: 52px 52px;
}
.hero::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -60%);
    width: 700px; height: 420px;
    background: radial-gradient(ellipse, rgba(249,115,22,0.11) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 780px; }
.hero-badge {
    display: inline-block;
    background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.32);
    color: var(--spark); font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    padding: 0.35rem 0.9rem; border-radius: 999px; margin-bottom: 1.5rem;
}
/* ── Title entrance + spark crackle ──────────── */
@keyframes title-powerup {
    0%   { opacity: 0; transform: scale(0.86) translateY(14px); filter: blur(14px); }
    55%  { opacity: 1; filter: blur(0); }
    72%  { transform: scale(1.045) translateY(-3px); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

@keyframes spark-crackle {
    0%,  86%  { text-shadow: 0 0 70px rgba(249,115,22,0.65), 0 0 140px rgba(249,115,22,0.30); opacity: 1; }
    87.0%     { text-shadow: 0 0 120px rgba(249,115,22,0.92), 0 0 190px rgba(249,115,22,0.50); opacity: 0.70; }
    87.7%     { text-shadow: 0 0 70px rgba(249,115,22,0.65), 0 0 140px rgba(249,115,22,0.30); opacity: 1; }
    88.5%     { text-shadow: 0 0 180px rgba(249,115,22,1.00), 0 0 300px rgba(255,180,50,0.75), 0 0 12px #ffe8b0; opacity: 0.38; }
    89.1%     { text-shadow: 0 0 70px rgba(249,115,22,0.65), 0 0 140px rgba(249,115,22,0.30); opacity: 1; }
    89.9%     { text-shadow: 0 0 100px rgba(249,115,22,0.88), 0 0 170px rgba(249,115,22,0.48); opacity: 0.86; }
    90.5%     { text-shadow: 0 0 70px rgba(249,115,22,0.65), 0 0 140px rgba(249,115,22,0.30); opacity: 1; }
    100%      { text-shadow: 0 0 70px rgba(249,115,22,0.65), 0 0 140px rgba(249,115,22,0.30); opacity: 1; }
}

.hero h1 {
    font-size: clamp(4rem, 12vw, 7.5rem);
    font-weight: 900; line-height: 1; letter-spacing: -0.04em; margin-bottom: 1.25rem;
    animation: title-powerup 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}
.hero h1 .s {
    color: var(--spark);
    text-shadow: 0 0 70px rgba(249,115,22,0.65), 0 0 140px rgba(249,115,22,0.3);
    display: inline-block;
    animation: spark-crackle 4s ease-in-out 1s infinite;
}
.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-dim); max-width: 540px; margin: 0 auto 2.5rem; line-height: 1.7;
}
.hero-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2.5rem; }
.pill {
    position: relative; z-index: 0; overflow: hidden;
    background: var(--surface2); border: 1px solid var(--border);
    color: var(--text-dim); font-size: 0.78rem;
    padding: 0.28rem 0.8rem; border-radius: 999px;
    font-family: 'Consolas', monospace;
    transition: color 0.28s, border-color 0.28s;
    cursor: default;
}
.pill::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--spark);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}
.pill:hover::before { transform: scaleX(1); }
.pill:hover { color: #000; border-color: var(--spark); }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem; border-radius: 10px;
    font-size: 1rem; font-weight: 700; text-decoration: none;
    transition: transform 0.15s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--spark); color: #000; box-shadow: 0 0 28px rgba(249,115,22,0.4); }
.btn-primary:hover { box-shadow: 0 0 44px rgba(249,115,22,0.65); }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }

/* ── Shared ───────────────────────────────────── */
.section-wrap { padding: 5rem 2rem; max-width: 1100px; margin: 0 auto; }
.section-label {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--spark); margin-bottom: 0.6rem;
}
.section-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.65rem; }
.section-desc { color: var(--text-dim); font-size: 1rem; max-width: 540px; margin-bottom: 2.75rem; }
.divider { height: 1px; background: linear-gradient(to right, transparent, var(--border), transparent); }

/* ── Features ─────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.feature-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: rgba(99,102,241,0.42); transform: translateY(-2px); }
.feature-icon { font-size: 1.65rem; margin-bottom: 0.7rem; display: block; }
.feature-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }
.feature-desc { font-size: 0.875rem; color: var(--text-dim); line-height: 1.6; }
.feature-desc code {
    background: var(--surface2); padding: 0.1rem 0.35rem; border-radius: 4px;
    font-family: 'Consolas', monospace; font-size: 0.8rem; color: var(--green);
}

/* ── Examples ─────────────────────────────────── */
.eg-label {
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--text-muted);
    margin-bottom: 0.75rem; margin-top: 2rem;
}
.eg-label:first-child { margin-top: 0; }
.examples-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 0.65rem; }
.ec {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 0.85rem 1.1rem;
    text-decoration: none; color: var(--text);
    font-size: 0.88rem; font-weight: 600;
    display: flex; align-items: center; gap: 0.55rem;
    position: relative;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.ec:hover { background: var(--surface2); border-color: rgba(99,102,241,0.42); transform: translateY(-2px); }
.ec .ci { font-size: 1.15rem; flex-shrink: 0; }
.ec .wip {
    position: absolute; top: 5px; right: 7px;
    font-size: 0.6rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.07em; font-weight: 400;
}
.ec.ext::after { content: '↗'; margin-left: auto; color: var(--text-muted); font-size: 0.8rem; }

/* ── Quick start ───────────────────────────────── */
.qs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 680px) { .qs-grid { grid-template-columns: 1fr; } }
.steps { display: flex; flex-direction: column; gap: 1.4rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
    width: 28px; height: 28px; background: var(--spark); color: #000;
    font-weight: 800; font-size: 0.78rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 3px;
}
.step-title { font-weight: 700; margin-bottom: 0.2rem; }
.step-body { font-size: 0.875rem; color: var(--text-dim); }
.step-body code {
    background: var(--surface2); padding: 0.1rem 0.38rem; border-radius: 4px;
    font-family: 'Consolas', monospace; font-size: 0.8rem; color: var(--green);
}
pre {
    background: var(--code-bg); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.5rem;
    overflow-x: auto; font-family: 'Consolas', monospace;
    font-size: 0.82rem; line-height: 1.75; color: #cdd9e5;
}
.kw { color: #c084fc; }
.cl { color: #67e8f9; }
.fn { color: #4ade80; }
.cm { color: #4b5563; }
.nm { color: #fbbf24; }

/* ── Footer ────────────────────────────────────── */
.footer-wrap {
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem; text-align: center;
    color: var(--text-muted); font-size: 0.875rem;
    max-width: 1100px; margin: 0 auto;
}
.footer-wrap a { color: var(--text-dim); text-decoration: none; }
.footer-wrap a:hover { color: var(--text); }