/* ============================================================
   OpenClaw X API — Landing Page Styles
   Design: Dark mode, neon green accents, inspired by bird.fast
   ============================================================ */

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

:root {
    --bg: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text: #e4e4e7;
    --text-muted: #71717a;
    --text-dim: #52525b;
    --accent: #a3e635;
    --accent-hover: #bef264;
    --accent-dim: rgba(163, 230, 53, 0.15);
    --blue: #60a5fa;
    --orange: #fb923c;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

/* --- Background Effects --- */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    left: -200px;
    opacity: 0.08;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: #22d3ee;
    bottom: -100px;
    right: -200px;
    opacity: 0.05;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    backdrop-filter: blur(12px);
    background: rgba(10, 10, 10, 0.8);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    font-size: 1.4rem;
}

.nav-name {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 0.875rem;
}

.nav-github {
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-github:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- Hero --- */
.hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 160px 24px 80px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--accent);
    padding: 6px 16px;
    border: 1px solid var(--accent-dim);
    border-radius: 100px;
    background: rgba(163, 230, 53, 0.05);
    margin-bottom: 32px;
    animation: fadeInDown 0.6s ease-out;
}

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

.hero-title {
    font-family: var(--font-serif);
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* --- Waitlist --- */
.waitlist {
    width: 100%;
    max-width: 480px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.waitlist-form {
    display: flex;
    gap: 8px;
}

.waitlist-form input {
    flex: 1;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

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

.waitlist-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.btn-primary {
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--accent);
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.waitlist-note {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 10px;
}

.waitlist-success {
    display: none;
    padding: 12px 20px;
    background: rgba(163, 230, 53, 0.08);
    border: 1px solid var(--accent-dim);
    border-radius: 8px;
    color: var(--accent);
    font-size: 0.9rem;
    margin-top: 12px;
    animation: fadeInUp 0.3s ease-out;
}

/* --- Terminal --- */
.terminal {
    width: 100%;
    max-width: 640px;
    background: #111111;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
    animation: fadeInUp 0.6s ease-out 0.4s both;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

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

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

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.terminal-copy {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.terminal-copy:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.terminal-body {
    padding: 20px;
    overflow-x: auto;
}

.terminal-body pre {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--text);
}

.terminal-body .comment { color: var(--text-dim); }
.terminal-body .cmd { color: var(--accent); }
.terminal-body .string { color: #fbbf24; }
.terminal-body .output { color: var(--text-muted); font-style: italic; }

/* --- Sections --- */
.section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 16px;
    text-align: center;
}

.section-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    text-align: center;
    margin-bottom: 56px;
}

/* --- Features --- */
.features {
    position: relative;
    z-index: 1;
    padding: 100px 24px;
    max-width: 1000px;
    margin: 0 auto;
}

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

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}

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

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.feature-channel {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- How it works --- */
.how-it-works {
    position: relative;
    z-index: 1;
    padding: 80px 24px 100px;
    max-width: 1000px;
    margin: 0 auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}

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

.step-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.04);
    line-height: 1;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- API Section --- */
.api-section {
    position: relative;
    z-index: 1;
    padding: 80px 24px 100px;
    max-width: 900px;
    margin: 0 auto;
}

.api-table-wrapper {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.api-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.api-table th {
    padding: 14px 20px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.api-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.api-table tr:last-child td {
    border-bottom: none;
}

.api-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.method {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.method.get {
    background: rgba(96, 165, 250, 0.12);
    color: var(--blue);
}

.method.post {
    background: rgba(163, 230, 53, 0.12);
    color: var(--accent);
}

.ch-official {
    font-size: 0.82rem;
    white-space: nowrap;
}

.ch-cookie {
    font-size: 0.82rem;
    white-space: nowrap;
}

/* --- CTA Section --- */
.cta-section {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 100px 24px 120px;
    max-width: 700px;
    margin: 0 auto;
}

.cta-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 36px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-large {
    padding: 14px 32px;
    font-size: 1rem;
    border-radius: 10px;
}

.btn-outline {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text);
    transform: translateY(-1px);
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 1;
    padding: 40px 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-dim);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.footer-sep {
    color: var(--text-dim);
    opacity: 0.4;
}

.footer a {
    color: var(--text-dim);
}

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

.footer-credit {
    color: var(--text-dim);
    opacity: 0.6;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav {
        padding: 12px 20px;
    }

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

    .hero {
        padding: 120px 20px 60px;
    }

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

    .waitlist-form {
        flex-direction: column;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .api-table {
        font-size: 0.8rem;
    }

    .api-table th,
    .api-table td {
        padding: 10px 12px;
    }
}
