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

:root {
    --color-bg: #0a0e17;
    --color-surface: #111827;
    --color-surface-2: #1a2332;
    --color-border: #1e293b;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-accent: #10b981;
    --color-accent-hover: #059669;
    --color-code-bg: #0d1117;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    --max-width: 1140px;
    --radius: 8px;
    --radius-lg: 12px;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    text-align: center;
}
.btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-nav { padding: 8px 20px; font-size: 0.875rem; }

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
}
.logo:hover { color: var(--color-text); }
.logo-sep { color: var(--color-primary); margin: 0 4px; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}
.nav-links a { color: var(--color-text-muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--color-text); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: 0.3s;
}

/* === Hero === */
.hero {
    padding: 140px 0 80px;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(59, 130, 246, 0.25);
}
.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.highlight { color: var(--color-primary); }
.hero-sub {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 640px;
    margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 48px; justify-content: center; }
.stat { text-align: center; }
.stat-value { display: block; font-size: 1.8rem; font-weight: 800; color: var(--color-accent); }
.stat-label { font-size: 0.82rem; color: var(--color-text-muted); }

/* === Section Shared === */
.features, .use-cases, .api-demo, .pricing, .faq, .waitlist {
    padding: 80px 0;
}
.features, .api-demo, .faq {
    background: var(--color-surface);
}
section h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.section-sub {
    text-align: center;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 48px;
}

/* === Features === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { color: var(--color-text-muted); font-size: 0.92rem; }

/* === Use Cases === */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.use-case-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.use-case-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-accent);
}
.use-case-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.use-case-card p { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.use-case-attrs { list-style: none; }
.use-case-attrs li {
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.use-case-attrs li::before { content: "→ "; color: var(--color-accent); font-weight: 600; }

/* === API Demo === */
.api-demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.code-block {
    background: var(--color-code-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--color-border);
}
.code-label { font-size: 0.82rem; font-weight: 600; color: var(--color-text); }
.code-lang { font-size: 0.75rem; color: var(--color-text-muted); font-family: var(--font-mono); }
.code-block pre {
    padding: 20px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.6;
}
.code-block code {
    font-family: var(--font-mono);
    color: #c9d1d9;
}

/* === Pricing === */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}
.pricing-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    position: relative;
}
.pricing-featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.1);
    transform: scale(1.03);
}
.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 12px;
}
.pricing-tier { font-size: 1rem; font-weight: 600; color: var(--color-text-muted); margin-bottom: 8px; }
.pricing-price { margin-bottom: 28px; }
.price-amount { font-size: 2.8rem; font-weight: 800; }
.price-period { font-size: 0.9rem; color: var(--color-text-muted); }
.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 28px;
}
.pricing-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}
.pricing-features li::before { content: "✓ "; color: var(--color-accent); font-weight: 600; }
.pricing-card .btn { width: 100%; }

/* === Waitlist === */
.waitlist { padding: 100px 0; }
.waitlist-box {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.waitlist-box h2 { margin-bottom: 12px; }
.waitlist-box > p { color: var(--color-text-muted); margin-bottom: 32px; }
.waitlist-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.waitlist-form input,
.waitlist-form select {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    font-size: 0.95rem;
    font-family: var(--font-sans);
}
.waitlist-form input::placeholder,
.waitlist-form select { color: var(--color-text-muted); }
.waitlist-form input:focus,
.waitlist-form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.waitlist-form button { margin-top: 4px; }
.form-hint { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 12px; }
.form-hint a { color: var(--color-text-muted); text-decoration: underline; }

.waitlist-success, .waitlist-error { margin-top: 24px; }
.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 16px;
}
.waitlist-success h3 { color: var(--color-accent); margin-bottom: 8px; }
.waitlist-error p { color: #ef4444; }

/* === FAQ === */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
    border-bottom: 1px solid var(--color-border);
}
.faq-item summary {
    padding: 20px 0;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::after {
    content: "+";
    font-size: 1.3rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
    margin-left: 16px;
    transition: transform 0.2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
    padding: 0 0 20px;
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* === Footer === */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 60px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand p { color: var(--color-text-muted); font-size: 0.9rem; margin-top: 8px; }
.footer-links h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--color-text); }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid var(--color-border); }
.footer-bottom p { font-size: 0.82rem; color: var(--color-text-muted); }

/* === Mobile === */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: 24px;
        gap: 16px;
    }
    .mobile-toggle { display: block; }
    .hero { padding: 110px 0 60px; }
    .hero h1 { font-size: 2rem; }
    .hero-sub { font-size: 1rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-stats { gap: 24px; }
    .stat-value { font-size: 1.4rem; }
    .features-grid { grid-template-columns: 1fr; }
    .use-cases-grid { grid-template-columns: 1fr; }
    .api-demo-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-featured { transform: none; }
    .waitlist-form .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    section h2 { font-size: 1.6rem; }
    .code-block pre { font-size: 0.75rem; }
}

/* === Legal Pages === */
.legal-page {
    padding: 120px 0 80px;
}
.legal-page h1 {
    font-size: 2.2rem;
    margin-bottom: 32px;
    text-align: left;
}
.legal-page h2 {
    font-size: 1.3rem;
    text-align: left;
    margin: 32px 0 12px;
}
.legal-page h3 {
    font-size: 1.05rem;
    margin: 20px 0 8px;
}
.legal-page p, .legal-page li {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 8px;
}
.legal-page ul {
    padding-left: 20px;
    margin-bottom: 12px;
}
.legal-page em {
    color: var(--color-text-muted);
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.65rem; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .footer-grid { grid-template-columns: 1fr; }
}
