/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;
    --bg-card: #1a1a1d;
    --border-color: #27272a;
    --border-hover: #3f3f46;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-muted: rgba(59, 130, 246, 0.15);
    --success: #22c55e;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

html {
    scroll-behavior: smooth;
}

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

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: #e4e4e7;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

@media (min-width: 1024px) {
    .hero {
        flex-direction: row;
        padding: 0 2rem;
    }
}

.hero-content {
    flex: 1;
    max-width: 560px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.tagline code {
    font-family: var(--font-mono);
    background: var(--accent-muted);
    color: var(--accent);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-code {
    flex: 1;
    max-width: 520px;
    width: 100%;
}

/* Code window */
.code-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.code-window.wide {
    max-width: 700px;
    margin: 0 auto;
}

.code-header {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-title {
    margin-left: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.code-window pre {
    padding: 1.5rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
}

.code-window code {
    color: var(--text-secondary);
}

.code-window .comment { color: var(--text-muted); }
.code-window .keyword { color: #c084fc; }
.code-window .string { color: #4ade80; }
.code-window .number { color: #fb923c; }
.code-window .builtin { color: #60a5fa; }

/* Features */
.features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2, .how-it-works h2, .pricing h2, .waitlist h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: border-color 0.15s, transform 0.15s;
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-muted);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-card code {
    font-family: var(--font-mono);
    background: var(--accent-muted);
    color: var(--accent);
    padding: 0.1em 0.3em;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
}

/* How it works */
.how-it-works {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 3rem auto;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 180px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 1rem;
}

.step-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.flow-arrow {
    width: 40px;
    height: 2px;
    background: var(--border-color);
    position: relative;
}

.flow-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid var(--border-color);
}

@media (max-width: 768px) {
    .flow-arrow {
        display: none;
    }

    .flow-diagram {
        flex-direction: column;
        gap: 2rem;
    }
}

.code-example {
    max-width: 800px;
    margin: 3rem auto 0;
}

/* Pricing */
.pricing {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.pricing-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.15s, transform 0.15s;
}

.pricing-card:hover {
    border-color: var(--border-hover);
}

.pricing-card.featured {
    border-color: var(--accent);
    background: linear-gradient(to bottom, var(--accent-muted), var(--bg-secondary));
}

.pricing-card.featured:hover {
    transform: translateY(-4px);
}

.badge {
    position: absolute;
    top: -10px;
    right: 1.5rem;
    background: var(--accent);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.pricing-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 2rem;
    flex: 1;
}

.pricing-card li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-card li::before {
    content: '';
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
    flex-shrink: 0;
}

.pricing-card .btn {
    width: 100%;
}

/* Waitlist */
.waitlist {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.waitlist-content {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.waitlist-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.waitlist-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.waitlist-form input {
    flex: 1;
    min-width: 240px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}

.waitlist-form input::placeholder {
    color: var(--text-muted);
}

.waitlist-form input:focus {
    border-color: var(--accent);
}

.form-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-brand {
    max-width: 280px;
}

.footer-brand .logo {
    display: block;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s;
}

.footer-column a:hover {
    color: var(--text-secondary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    nav {
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a:not(.btn) {
        display: none;
    }

    .hero {
        padding: 7rem 1rem 3rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .features, .pricing, .waitlist {
        padding: 4rem 1rem;
    }

    .footer-links {
        gap: 2rem;
    }
}

/* Code tabs */
.code-tabs {
    display: flex;
    gap: 0;
}

.code-tab {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.code-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.code-tab.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.code-tab .coming-soon {
    font-size: 0.65rem;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.code-header.compact {
    padding: 0.5rem 0.75rem;
}

.code-header.compact .code-tabs {
    gap: 0;
}

.code-header.compact .code-tab {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Use cases section */
.use-cases {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.use-case-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.15s;
}

.use-case-card:hover {
    border-color: var(--border-hover);
}

.use-case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.use-case-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.use-case-tag {
    font-size: 0.7rem;
    background: var(--accent-muted);
    color: var(--accent);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.code-window.small {
    margin: 0;
}

.code-window.small pre {
    padding: 1rem;
    font-size: 0.85rem;
    line-height: 1.6;
    max-height: 300px;
    overflow: auto;
}

@media (max-width: 1024px) {
    .use-case-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
}

@media (max-width: 640px) {
    .use-cases {
        padding: 4rem 1rem;
    }
}
