
/* ═══════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════ */
:root {
    /* Brand */
    --green-50:  #E1F5EE;
    --green-100: #9FE1CB;
    --green-200: #5DCAA5;
    --green-400: #1D9E75;
    --green-600: #0F6E56;
    --green-800: #085041;
    --green-900: #04342C;

    /* Spacing scale */
    --s1: 4px;
    --s2: 8px;
    --s3: 12px;
    --s4: 16px;
    --s5: 24px;
    --s6: 32px;
    --s7: 48px;
    --s8: 64px;
    --s9: 96px;
    --s10: 128px;

    /* Radius */
    --r1: 4px;
    --r2: 6px;
    --r3: 8px;
    --r4: 12px;
    --r5: 16px;
    --r-pill: 100px;

    /* Layout */
    --max-width: 1200px;
    --nav-height: 64px;
}

/* DARK MODE */
:root, [data-theme="dark"] {
    --bg:        #080c0a;
    --bg-2:      #0d1210;
    --bg-3:      #111916;
    --surface:   #141f18;
    --surface-2: #1a2820;
    --border:    #1a2e24;
    --border-2:  #22382c;
    --border-3:  #2a4438;

    --text:      #e4f0e8;
    --text-2:    #7fa892;
    --text-3:    #3d6050;
    --text-4:    #274535;

    --accent:    var(--green-400);
    --accent-dim: #1D9E7520;
    --accent-dim2: #1D9E7510;

    --code-bg:   #0d1a14;
    --shadow:    0 1px 3px #00000040, 0 4px 16px #00000030;
    --shadow-lg: 0 8px 40px #00000050;

    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg:        #f5f7f5;
        --bg-2:      #eef1ee;
        --bg-3:      #e8ece8;
        --surface:   #ffffff;
        --surface-2: #f0f4f0;
        --border:    #d4e0d4;
        --border-2:  #c2d4c2;
        --border-3:  #b0c8b0;

        --text:      #0d1f14;
        --text-2:    #3a5c45;
        --text-3:    #6b9478;
        --text-4:    #9ebfaa;

        --accent:    var(--green-600);
        --accent-dim: #0F6E5618;
        --accent-dim2: #0F6E560c;

        --code-bg:   #f0f4f0;
        --shadow:    0 1px 3px #0d1f1412, 0 4px 16px #0d1f140a;
        --shadow-lg: 0 8px 40px #0d1f1418;

        color-scheme: light;
    }
}

[data-theme="light"] {
    --bg:        #f5f7f5;
    --bg-2:      #eef1ee;
    --bg-3:      #e8ece8;
    --surface:   #ffffff;
    --surface-2: #f0f4f0;
    --border:    #d4e0d4;
    --border-2:  #c2d4c2;
    --border-3:  #b0c8b0;
    --text:      #0d1f14;
    --text-2:    #3a5c45;
    --text-3:    #6b9478;
    --text-4:    #9ebfaa;
    --accent:    var(--green-600);
    --accent-dim: #0F6E5618;
    --accent-dim2: #0F6E560c;
    --code-bg:   #f0f4f0;
    --shadow:    0 1px 3px #0d1f1412, 0 4px 16px #0d1f140a;
    --shadow-lg: 0 8px 40px #0d1f1418;
    color-scheme: light;
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Instrument Sans', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Subtle grid texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
            linear-gradient(var(--border) 1px, transparent 1px),
            linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* Ambient glow */
body::after {
    content: '';
    position: fixed;
    top: -300px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ═══════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════ */
h1, h2, h3, h4 {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text);
}

h1 { font-size: clamp(44px, 7vw, 88px); }
h2 { font-size: clamp(30px, 4vw, 52px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: 18px; letter-spacing: -0.01em; }

p { color: var(--text-2); line-height: 1.75; }

a { color: inherit; text-decoration: none; }

code, .mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
}

/* ═══════════════════════════════════════════
   LAYOUT UTILITIES
═══════════════════════════════════════════ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--s7);
}

@media (max-width: 768px) {
    .container { padding: 0 var(--s5); }
}

.section {
    position: relative;
    z-index: 1;
    padding: var(--s10) 0;
}

.section-sm { padding: var(--s8) 0; }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--s3);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--s4);
}

.section-label::before {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background: var(--accent);
}

/* ═══════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--s7);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s6);
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--s3);
    flex-shrink: 0;
    text-decoration: none;
}

.nav-logo-mark {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.nav-logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 17px;
    letter-spacing: -0.5px;
    line-height: 1;
}

.nav-logo-text .fast { color: var(--text-2); font-weight: 400; }
.nav-logo-text .kit  { color: var(--accent); font-weight: 700; }

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--s2);
    list-style: none;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--text-3);
    padding: var(--s2) var(--s3);
    border-radius: var(--r1);
    transition: color 0.15s, background 0.15s;
    position: relative;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--accent-dim);
}

.nav-links a.active {
    color: var(--accent);
}

/* Nav right */
.nav-right {
    display: flex;
    align-items: center;
    gap: var(--s3);
    flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-2);
    border-radius: var(--r2);
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--border-3);
    background: var(--surface);
}

/* GitHub link */
.nav-github {
    display: flex;
    align-items: center;
    gap: var(--s2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--text-3);
    padding: 6px var(--s3);
    border: 1px solid var(--border-2);
    border-radius: var(--r2);
    transition: all 0.15s;
}

.nav-github:hover {
    color: var(--text);
    border-color: var(--border-3);
    background: var(--surface);
}

/* CTA button */
.btn-nav {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--bg);
    background: var(--accent);
    padding: 7px var(--s4);
    border-radius: var(--r2);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-nav:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Mobile hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-2);
    border-radius: var(--r2);
    cursor: pointer;
    padding: 0;
}

.nav-hamburger span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--text-2);
    border-radius: 2px;
    transition: all 0.2s;
}

/* Mobile menu */
.nav-mobile {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: var(--s5) var(--s5) var(--s6);
    z-index: 999;
    flex-direction: column;
    gap: var(--s2);
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-2);
    padding: var(--s3) var(--s4);
    border-radius: var(--r2);
    border: 1px solid transparent;
    transition: all 0.15s;
}

.nav-mobile a:hover {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 11px var(--s6);
    border-radius: var(--r2);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--accent-dim);
}

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border-2);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border-3);
    background: var(--surface);
}

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
    z-index: 1;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--s10) var(--s7);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s9);
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    background: var(--accent-dim);
    border: 1px solid var(--accent-dim2);
    border-radius: var(--r-pill);
    padding: 5px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: var(--s5);
    animation: fadeUp 0.5s ease both;
}

.hero-badge-dot {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.hero h1 {
    margin-bottom: var(--s5);
    animation: fadeUp 0.5s 0.08s ease both;
}

.hero h1 .highlight { color: var(--accent); }

.hero-desc {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-2);
    max-width: 480px;
    margin-bottom: var(--s6);
    animation: fadeUp 0.5s 0.16s ease both;
}

.hero-actions {
    display: flex;
    gap: var(--s3);
    flex-wrap: wrap;
    animation: fadeUp 0.5s 0.24s ease both;
}

/* Hero code window */
.hero-code {
    animation: fadeUp 0.5s 0.2s ease both;
}

.code-window {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--r4);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s3) var(--s4);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 10px; height: 10px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-filename {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: 0.03em;
}

.code-body {
    padding: var(--s5) var(--s6);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.9;
    overflow-x: auto;
}

/* Syntax colors — work on both dark & light */
.t-comment  { color: var(--text-4); }
.t-keyword  { color: #a78bfa; }
.t-class    { color: #67e8f9; }
.t-fn       { color: #86efac; }
.t-string   { color: #fcd34d; }
.t-param    { color: #fb923c; }
.t-green    { color: var(--accent); }

/* ═══════════════════════════════════════════
   MARQUEE
═══════════════════════════════════════════ */
.marquee-wrap {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-2);
    padding: 18px 0;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 28s linear infinite;
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: 0 var(--s7);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--text-3);
    white-space: nowrap;
    border-right: 1px solid var(--border);
}

.marquee-item .dot {
    width: 4px; height: 4px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════
   STATS
═══════════════════════════════════════════ */
.stats {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--border);
}

.stats-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat-item {
    padding: var(--s7) var(--s7);
    border-right: 1px solid var(--border);
    text-align: center;
}

.stat-item:last-child { border-right: none; }

.stat-num {
    display: block;
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 800;
    font-size: 40px;
    letter-spacing: -0.04em;
    color: var(--accent);
    line-height: 1;
    margin-bottom: var(--s2);
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* ═══════════════════════════════════════════
   PACKAGES SECTION
═══════════════════════════════════════════ */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r4);
    overflow: hidden;
    margin-top: var(--s8);
}

.pkg-card {
    background: var(--bg);
    padding: var(--s7) var(--s6);
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.pkg-card:hover { background: var(--bg-3); }

.pkg-icon-wrap {
    width: 44px; height: 44px;
    background: var(--accent-dim);
    border: 1px solid var(--border-2);
    border-radius: var(--r3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--s5);
}

.pkg-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.04em;
    margin-bottom: var(--s3);
}

.pkg-version {
    font-size: 10px;
    color: var(--text-3);
    background: var(--surface);
    border: 1px solid var(--border-2);
    padding: 2px 7px;
    border-radius: var(--r1);
}

.pkg-title {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: var(--s3);
}

.pkg-desc {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: var(--s5);
}

.pkg-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--s2);
}

.pkg-features li {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.pkg-features li::before {
    content: '→';
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 1px;
}

/* ═══════════════════════════════════════════
   FEATURES GRID
═══════════════════════════════════════════ */
.features-section {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s8) var(--s7);
    margin-top: var(--s8);
}

.feature-item {}

.feature-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-4);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: var(--s4);
}

.feature-title {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: var(--s2);
}

.feature-desc {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: var(--s3);
}

.feature-chip {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--accent);
    background: var(--accent-dim2);
    border: 1px solid var(--accent-dim);
    padding: 2px 8px;
    border-radius: var(--r1);
    letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════
   SECTION DIVIDER
═══════════════════════════════════════════ */
.section-divider {
    position: relative;
    z-index: 1;
    height: 1px;
    background: var(--border);
}

/* ═══════════════════════════════════════════
   CTA SECTION
═══════════════════════════════════════════ */
.cta-section {
    text-align: center;
    border-top: 1px solid var(--border);
}

.cta-install {
    max-width: 480px;
    margin: 0 auto var(--s7);
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    background: var(--bg-2);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--s8) var(--s7);
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--s8);
}

.footer-brand {}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--s3);
    margin-bottom: var(--s4);
    text-decoration: none;
}

.footer-logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    letter-spacing: -0.5px;
}

.footer-logo-text .fast { color: var(--text-2); font-weight: 400; }
.footer-logo-text .kit  { color: var(--accent); font-weight: 700; }

.footer-tagline {
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.6;
    margin-bottom: var(--s5);
    max-width: 240px;
}

.footer-social {
    display: flex;
    gap: var(--s3);
}

.footer-social a {
    width: 32px; height: 32px;
    border: 1px solid var(--border-2);
    border-radius: var(--r2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    transition: all 0.15s;
}

.footer-social a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.footer-col-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: var(--s4);
    display: block;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--s2);
}

.footer-links a {
    font-size: 13px;
    color: var(--text-2);
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: var(--s2);
}

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

.footer-links .badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    padding: 1px 5px;
    border-radius: var(--r1);
    letter-spacing: 0.04em;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--s5) var(--s7);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s5);
}

.footer-copy {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-4);
    letter-spacing: 0.04em;
}

.footer-legal {
    display: flex;
    gap: var(--s5);
    list-style: none;
}

.footer-legal a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-4);
    transition: color 0.15s;
    letter-spacing: 0.04em;
}

.footer-legal a:hover { color: var(--text-3); }

/* ═══════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* When reveal wraps a card inside a grid, it must stretch to fill the cell */
.pkg-cards > .reveal {
    display: flex;
    flex-direction: column;
}

.pkg-cards > .reveal > .pkg-card-new,
.pkg-cards > .reveal > .pkg-card-soon {
    flex: 1;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: var(--s8); padding-bottom: var(--s8); }
    .hero-code { max-width: 600px; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: var(--s7); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-github { display: none; }
    .nav-hamburger { display: flex; }
    .packages-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .stats-inner { grid-template-columns: 1fr 1fr; }
    .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
    .stat-item:nth-child(odd) { border-right: 1px solid var(--border); }
    .stat-item:last-child { border-bottom: none; }
    .footer-inner { grid-template-columns: 1fr; gap: var(--s6); }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── Ecosystem section ────────────────────── */
.ecosystem-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s9);
    margin-top: var(--s8);
    padding-top: var(--s8);
    border-top: 1px solid var(--border);
}

.ecosystem-col-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--s4);
}

.ecosystem-col h3 {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 26px);
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: var(--s4);
}

.ecosystem-col p {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.75;
}

.ecosystem-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s5);
    margin-top: var(--s7);
}

.ecosystem-pillar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r4);
    padding: var(--s6);
    transition: border-color 0.2s, background 0.2s;
}

.ecosystem-pillar:hover {
    border-color: var(--border-3);
    background: var(--surface-2);
}

.pillar-icon {
    width: 40px; height: 40px;
    background: var(--accent-dim);
    border: 1px solid var(--border-2);
    border-radius: var(--r3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--s4);
}

.pillar-title {
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: var(--s3);
}

.pillar-desc {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
}

/* ── Footer 3-col (brand + resources + community) */
.footer-inner {
    grid-template-columns: 1.8fr 1fr 1fr !important;
}

@media (max-width: 1024px) {
    .ecosystem-split { grid-template-columns: 1fr; gap: var(--s7); }
    .ecosystem-pillars { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr !important; }
}

/* ── Page-specific styles ── */
.docs-hero {
    padding: calc(var(--nav-height) + 64px) 0 64px;
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--border);
}

.docs-hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--s7);
}

.docs-hero h1 {
    font-size: clamp(36px, 5vw, 64px);
    margin-bottom: var(--s4);
}

.docs-hero p {
    font-size: 17px;
    max-width: 520px;
    color: var(--text-2);
}

/* ── Package sections ── */
.pkg-section {
    position: relative;
    z-index: 1;
    padding: var(--s9) 0;
}

.pkg-section + .pkg-section {
    border-top: 1px solid var(--border);
}

.pkg-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s5);
    margin-bottom: var(--s7);
    flex-wrap: wrap;
}

.pkg-section-meta {
    display: flex;
    align-items: center;
    gap: var(--s3);
}

.pkg-type-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    border: 1px solid;
}

.pkg-type-badge.fastapi {
    color: var(--accent);
    border-color: var(--accent-dim);
    background: var(--accent-dim2);
}

.pkg-type-badge.python {
    color: var(--text-2);
    border-color: var(--border-2);
    background: var(--surface);
}

.pkg-type-badge .badge-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.pkg-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-3);
}

/* ── Package cards grid ── */
.pkg-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s5);
}

/* ── Package card ── */
.pkg-card-new {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r4);
    padding: var(--s6);
    display: flex;
    flex-direction: column;
    gap: var(--s5);
    transition: border-color 0.2s, box-shadow 0.2s;
    color: inherit;
}

.pkg-card-new:hover {
    border-color: var(--border-3);
    box-shadow: var(--shadow);
}

/* Card header — title row + badges */
.pkg-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--s4);
}

.pkg-card-title-row {
    display: flex;
    align-items: center;
    gap: var(--s3);
}

.pkg-card-icon {
    width: 44px; height: 44px;
    background: var(--accent-dim);
    border: 1px solid var(--border-2);
    border-radius: var(--r3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pkg-card-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--s2);
}

/* Live badges — GitHub stars + PyPI version */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--r1);
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.live-badge:hover {
    border-color: var(--border-3);
    color: var(--text);
}

.live-badge svg { flex-shrink: 0; }

.live-badge .loading {
    opacity: 0.4;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Card body */
.pkg-card-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.03em;
    margin-bottom: var(--s1);
}

.pkg-card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: var(--s3);
}

.pkg-card-desc {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
}

/* Card features */
.pkg-card-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: var(--s4);
    border-top: 1px solid var(--border);
}

.pkg-card-features li {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.pkg-card-features li::before {
    content: '→';
    color: var(--accent);
    flex-shrink: 0;
}

/* Card footer */
.pkg-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
    padding-top: var(--s4);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.pkg-install-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--r1);
    overflow: hidden;
}

.pkg-install {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-3);
    padding: 5px 10px;
    background: transparent;
    border: none;
    user-select: all;
}

.pkg-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--text-4);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.pkg-copy-btn:hover {
    background: var(--surface-2);
    color: var(--accent);
}

.pkg-copy-btn.copied {
    color: var(--accent);
}

.pkg-card-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--bg);
    background: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--r2);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: filter 0.15s, gap 0.15s;
    align-self: flex-start;
}

.pkg-card-link:hover {
    filter: brightness(1.08);
    gap: 10px;
}

/* ── Coming soon card ── */
.pkg-card-soon {
    background: var(--bg-2);
    border: 1px dashed var(--border);
    border-radius: var(--r4);
    padding: var(--s6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: var(--s3);
    min-height: 200px;
}

.soon-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-4);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: var(--r1);
}

.soon-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--text-3);
    letter-spacing: 0.03em;
}

.soon-desc {
    font-size: 13px;
    color: var(--text-4);
    line-height: 1.6;
}

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

@media (max-width: 768px) {
    .docs-hero-inner { padding: 0 var(--s5); }
}