/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9em;
    background: rgba(85, 2, 150, 0.1);
    color: #550296;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1a1a2e;
}

.logo-mark {
    font-size: 24px;
    color: #550296;
    line-height: 1;
}

.logo-text {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.logo-text b {
    color: #550296;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #4a4a6a;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #550296;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1a1a2e;
    margin: 4px 0;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
    padding: 180px 0 100px;
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(85, 2, 150, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(154, 59, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid rgba(85, 2, 150, 0.2);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #550296;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(85, 2, 150, 0.08);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.hero h1 {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #1a1a2e;
}

.gradient-text {
    background: linear-gradient(135deg, #550296, #9a3bf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-subtitle {
    font-size: 20px;
    color: #6b6b8a;
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #550296, #7a04d4);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(85, 2, 150, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(85, 2, 150, 0.4);
}

.btn-secondary {
    background: #ffffff;
    color: #1a1a2e;
    border: 1.5px solid #e2e2f0;
}

.btn-secondary:hover {
    border-color: #550296;
    color: #550296;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 17px;
}

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

.section-dark {
    background: #0f0f1e;
    color: #ffffff;
}

.section-dark .section-title {
    color: #ffffff;
}

.section-dark .section-subtitle {
    color: #9b9bb8;
}

.section-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.section-subtitle {
    font-size: 18px;
    color: #6b6b8a;
    text-align: center;
    margin-bottom: 64px;
}

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: #ffffff;
    border: 1px solid #e8e8f2;
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(85, 2, 150, 0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(85, 2, 150, 0.1), rgba(154, 59, 246, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.feature-card p {
    font-size: 14px;
    color: #6b6b8a;
    line-height: 1.7;
}

/* ===== Architecture ===== */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.arch-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 32px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.arch-item:hover {
    background: rgba(85, 2, 150, 0.08);
    border-color: rgba(85, 2, 150, 0.3);
}

.arch-number {
    font-size: 16px;
    font-weight: 800;
    color: #550296;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.4;
}

.arch-item h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.arch-item p {
    font-size: 14px;
    color: #9b9bb8;
    line-height: 1.7;
}

/* ===== Installation ===== */
.install-steps {
    max-width: 720px;
    margin: 0 auto 48px;
}

.install-step {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #550296, #7a04d4);
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #1a1a2e;
}

.step-content p {
    font-size: 15px;
    color: #6b6b8a;
}

/* Code block */
.code-block {
    max-width: 720px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e8e8f2;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.code-header {
    background: #f3f3fa;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

.code-dots span:nth-child(2) {
    background: #febc2e;
}

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

.code-filename {
    font-size: 13px;
    color: #6b6b8a;
    font-weight: 500;
}

.code-block pre {
    background: #1a1a2e;
    padding: 24px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #e0e0ff;
    background: none;
    padding: 0;
}

.code-comment {
    color: #6b6b8a;
    font-style: italic;
}

.code-var {
    color: #9a3bf6;
}

.code-key {
    color: #fbbf24;
}

.code-string {
    color: #4ade80;
}

/* ===== Documentation ===== */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.doc-card {
    display: block;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.doc-card:hover {
    background: rgba(85, 2, 150, 0.08);
    border-color: rgba(85, 2, 150, 0.4);
    transform: translateY(-4px);
}

.doc-icon {
    font-size: 28px;
    margin-bottom: 14px;
}

.doc-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.doc-card p {
    font-size: 14px;
    color: #9b9bb8;
    line-height: 1.7;
}

/* ===== License ===== */
.license-card {
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e8e8f2;
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.license-badge {
    display: inline-block;
    background: linear-gradient(135deg, #550296, #9a3bf6);
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.license-card h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.license-card p {
    font-size: 15px;
    color: #6b6b8a;
    line-height: 1.8;
    margin-bottom: 16px;
}

.license-card a {
    color: #550296;
    text-decoration: none;
    font-weight: 600;
}

.license-card a:hover {
    text-decoration: underline;
}

/* ===== CTA ===== */
.cta {
    background: linear-gradient(135deg, #550296, #9a3bf6);
    padding: 100px 0;
    text-align: center;
    color: #ffffff;
}

.cta h2 {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.cta p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.cta .btn-primary {
    background: #ffffff;
    color: #550296;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* ===== Footer ===== */
.footer {
    background: #0f0f1e;
    color: #9b9bb8;
    padding: 48px 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    font-size: 16px;
}

.footer-brand b {
    color: #550296;
}

.footer-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #9b9bb8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #550296;
}

.footer-copy {
    font-size: 13px;
    color: #6b6b8a;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .features-grid,
    .docs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid #e8e8f2;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    }

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

    .nav-toggle {
        display: block;
    }

    .hero {
        padding: 140px 0 60px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .features-grid,
    .docs-grid,
    .arch-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 30px;
    }

    .arch-grid {
        display: flex;
        flex-direction: column;
    }

    .cta {
        padding: 64px 0;
    }

    .cta h2 {
        font-size: 30px;
    }

    .license-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }
}