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

:root {
    --bg-primary: #0a0606;
    --bg-secondary: #140a0a;
    --bg-card: #1f1010;
    --text-primary: #f5f0f0;
    --text-secondary: #b8a8a8;
    --accent-blue: #4a90d9;
    --accent-cyan: #39ff14;
    --accent-coral: #c41e3a;
    --accent-orange: #e94535;
    --border-color: #3a1a1a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Star canvas */
#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: linear-gradient(to bottom, var(--bg-primary) 0%, transparent 100%);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    height: 48px;
    width: auto;
}

.logo-icon.small {
    height: 32px;
    width: auto;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Main content */
main {
    position: relative;
    z-index: 1;
    padding-top: 100px;
}

section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

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

.section-desc a {
    color: var(--accent-orange);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
}

.section-desc a:hover {
    text-decoration: underline;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 200px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    max-width: 800px;
}

.hero .highlight {
    color: var(--accent-orange);
    position: relative;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 0.3rem;
}

.hero .subtitle:last-of-type {
    margin-bottom: 1.5rem;
}

.hero .subtitle em {
    color: var(--accent-cyan);
    font-style: normal;
}

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

/* Hero widget - larger and more prominent */
.hero-widget {
    margin-top: 1rem;
}

.hero-widget .clawcha-anchor {
    transform: scale(1.2);
    transform-origin: center;
}

.hero-widget .clawcha-trigger-btn {
    padding: 14px 24px !important;
    font-size: 16px !important;
    gap: 10px !important;
}

.hero-widget .clawcha-robot-icon {
    width: 26px !important;
    height: 26px !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: #5a9ee9;
    transform: translateY(-2px);
}

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

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

/* Widget loading state */
#clawcha-demo:empty::after {
    content: "Loading widget...";
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Integration steps */
.integrate-section {
    padding-top: 6rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step-content > p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Code blocks */
.code-block {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 1rem;
    overflow: hidden;
}

.code-block.response {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

.code-block pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.copy-btn.copied {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
}

/* API section */
.api-section {
    padding-top: 6rem;
}

.api-endpoints {
    display: grid;
    gap: 1rem;
}

.endpoint {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.method.get {
    background: rgba(74, 144, 217, 0.2);
    color: var(--accent-blue);
}

.method.post {
    background: rgba(0, 229, 204, 0.2);
    color: var(--accent-cyan);
}

.endpoint-header code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.endpoint p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Features */
.features-section {
    padding-top: 6rem;
}

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

.feature {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: border-color 0.2s;
}

.feature:hover {
    border-color: var(--accent-blue);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(74, 144, 217, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

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

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

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

/* Footer */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    background: var(--bg-primary);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

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

.footer-links a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-copy a {
    color: var(--accent-orange);
    text-decoration: none;
}

.footer-copy a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-image {
        width: 180px;
        margin-bottom: 1.5rem;
    }

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

    .hero .subtitle {
        font-size: 1.1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .nav-links {
        display: none;
    }

    .step {
        flex-direction: column;
        gap: 1rem;
    }

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

    section {
        padding: 3rem 1rem;
    }
}

/* Clawcha widget overrides for dark theme */
.clawcha-widget {
    --clawcha-bg: var(--bg-secondary);
    --clawcha-border: var(--border-color);
}
